unity-networking

Unity 5.1 Networking - Spawn an object as a child for the host and all clients

安稳与你 提交于 2019-12-01 06:38:48
I have a player object who can equip multiple weapons. When a weapon is equipped, its transform's parent is set to its hand. I have messed around with this for some time and cannot get this to work for both the host and the client. Right now I am trying to equip the weapon on the server, and tell all the clients to set their parents transforms. public NetworkInstanceId weaponNetId; [Command] void Cmd_EquipWeapon() { var weaponObject = Instantiate (Resources.Load ("Gun"), hand.position, Quaternion.Euler (0f, 0f, 0f)) as GameObject; weaponObject.transform.parent = hand; NetworkServer.Spawn

Built-in Multiplayer in Unity3D without a Server?

ε祈祈猫儿з 提交于 2019-11-30 14:36:45
I heard Unity3D has a Built-In Multiplayer functionality and it can provide the service without a server . But I couldn't find any information about it, all the turtorials I found were just about working with Photon(PUD) or Google Services. I know Photon is good, so I just started to study it and have a plan to use it. However I still want to write some very simple apps not using servers, something like One VS One Rock Paper Scissors game. Using Photon must be better on performance but in some cases like I said above, it seems to be too much. In addition, CCU of PUD for free users is just

How do I sync non-player GameObject properties in UNet/Unity5?

百般思念 提交于 2019-11-28 09:26:25
I'm working on and learning some basics of Unity 5, UNET, and networking. I made a simple 3D game where you go around and change the colors of objects. But I want to make it multiplayer now, and I am having lots of trouble figuring out how to send the changes over the network so all players can see a single player's color change. Part of the issue is that it has been difficult to find the answer using the newer UNET networking engine. And sometimes I come across answers that are for the older way. So the main question is, how do I network non-player GameObject property changes? Color, shape,

How do I sync non-player GameObject properties in UNet/Unity5?

让人想犯罪 __ 提交于 2019-11-27 02:54:59
问题 I'm working on and learning some basics of Unity 5, UNET, and networking. I made a simple 3D game where you go around and change the colors of objects. But I want to make it multiplayer now, and I am having lots of trouble figuring out how to send the changes over the network so all players can see a single player's color change. Part of the issue is that it has been difficult to find the answer using the newer UNET networking engine. And sometimes I come across answers that are for the older