N
N
NeoLight32020-07-15 17:07:05
C++ / C#
NeoLight3, 2020-07-15 17:07:05

How to send coordinates of a 3D model to players over the network in Unity?

There is a GameObject that is initialized with Network.Instantiate for all players.
How to move this GameObject over the network without a script from the server and client?

GameObject gameObject = (GameObject)Network.Instantiate(Resources.Load(string.Concat("prefabs/props/smallPlane_0")), new Vector3(args.sender.position.x, args.sender.position.y + 50f, args.sender.position.z), args.sender.rotation, 0);

When trying to set a new value for this object, its new value (position) is not updated for clients
gameObject.transform.position = new Vector3(100f, 50f, 100f);

How can NetworkView pass new values ​​of this game object (3D models without scripts)?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question