1

I currently have players spawning in with a click to move functionality moving around a space synced perfectly, but I cant get the bullets to sync properly.

When the player spawns in he creates 60 bullets which are then set inactive and stored until an ability is cast, when the ability gets cast I the bullets get sent active and I have a script that syncs them with all the clients as well, but the bullets are only getting set active on the local client, so the SyncPos script doesn't even run.

Do I need to send a message to a separate game object(ie: the net manager) in order to then send a message out to the other clients and say "hey activate this so you can sync it" or is there a better way? and if so how would I go about doing that.

4

1 回答 1

0

不支持通过 Unet 同步游戏对象的活动标志,因为由于其他客户端处于非活动状态,因此无法在其他客户端上找到游戏对象。这就像使用GameObject.Find(); 它找不到非活动对象。

于 2015-11-09T21:46:52.487 回答