static void CreateMeshSyncServerWithCallback() { GameObject go = new GameObject("MeshSyncServer"); MeshSyncServer server = go.AddComponent <MeshSyncServer>(); server.SetAutoStartServer(true); server.SetOnPostRecvMessageCallback(OnRecvServerMessage); }
internal static MeshSyncServer CreateMeshSyncServer(bool autoStart) { GameObject go = new GameObject("MeshSyncServer"); MeshSyncServer mss = go.AddComponent <MeshSyncServer>(); mss.Init(MeshSyncConstants.DEFAULT_ASSETS_PATH); mss.SetAutoStartServer(autoStart); return(mss); }
internal static MeshSyncServer CreateMeshSyncServer(bool autoStart) { GameObject go = new GameObject("MeshSyncServer"); MeshSyncServer mss = go.AddComponent <MeshSyncServer>(); mss.Init("Assets/MeshSyncAssets"); mss.SetAutoStartServer(autoStart); return(mss); }
//---------------------------------------------------------------------------------------------------------------------- internal static MeshSyncServer CreateMeshSyncServer(bool autoStart) { GameObject go = new GameObject("MeshSyncServer"); MeshSyncServer mss = go.AddComponent <MeshSyncServer>(); Transform t = go.GetComponent <Transform>(); mss.SetAutoStartServer(autoStart); mss.rootObject = t; return(mss); }