public HoloNetObject Spawn(GameObject go) { if (go == null) { throw new HoloNetObjectSpawnException("[HOLONET] - Prefab to spawn is null"); } var oid = AllocateObjectId(); var prefabIndex = GetPrefabIndex(go); HoloNetAppModule.instance.messenger.SendMessage(NetObjectSpawnMessage.Create(oid, prefabIndex), DestinationGroup.Others, true); return(SpawnObjectLocal(oid, prefabIndex, HoloNetAppModule.instance.players.Local.actorId)); }
private void OnSpawnObject(NetObjectSpawnMessage msg) { SpawnObjectLocal(msg.oid, msg.prefabId, msg.creatorId); }