private GameObject _InsSceneView(int viewId, string prefabPath, Vector3 pos, Quaternion rot, object[] customData) { GameObject ins = RoomClient.InstantiateFunc(prefabPath, pos, rot); RoomView view = ins.GetComponent <RoomView>(); if (view == null) { throw new Exception(prefabPath + " don't hava a RoomPlayerView component"); } view.Room = this.Room; view.OwnerId = 0; //scene view view.ViewIdInPlayer = viewId; this.Room.Views.Add(view.Id, view); view.OnInstantiate(customData); return(ins); }
public ToRoomClient(RoomClient roomClient) : base(CommandExecuteMode.Manual) { this.RoomClient = roomClient; }