private void OnRecieve() { while (true) { try { byte[] buffer = new byte[1024]; int iRx = client.Receive(buffer); char[] chars = new char[iRx]; bytesRecieved += chars.LongLength; System.Text.Decoder d = System.Text.Encoding.UTF8.GetDecoder(); int charLen = d.GetChars(buffer, 0, iRx, chars, 0); System.String text = new System.String(chars); //Debug.Log(text); string command = text.Split(" ".ToCharArray())[0]; string rest = text.Replace(command + " ", ""); UnityMainThreadDispatcher.Instance().Enqueue(ExecuteCommand(command, rest)); } catch (Exception err) { print(err.ToString()); } } }
private void StartGame() { if (GameStarted == true) { return; } if (_allPlayersAdded == false || _matchJoined == false) { return; } GameStarted = true; UnityMainThreadDispatcher.Instance().Enqueue(() => { Debug.Log("Starting game"); OnGameStarted?.Invoke(); while (_incommingMessages.Count > 0) { IncommingMessageState incommingMessage = _incommingMessages.Dequeue(); ReceiveMatchStateHandle(incommingMessage.opCode, incommingMessage.message); } }); }
void EmitTelemetry(SocketIOEvent obj) { UnityMainThreadDispatcher.Instance().Enqueue(() => { stopWatch.Stop(); print("Attempting to Send frame " + stopWatch.ElapsedMilliseconds); stopWatch.Start(); // Collect Data from the Car Dictionary <string, string> data = new Dictionary <string, string>(); data["steering_angle"] = _carController.CurrentSteerAngle.ToString("N4"); data["throttle"] = _carController.AccelInput.ToString("N4"); data["speed"] = _carController.CurrentSpeed.ToString("N4"); data["cte"] = "0.0"; data["north"] = Convert.ToBase64String(CameraHelper.CaptureFrame(NorthCamera)); data["south"] = Convert.ToBase64String(CameraHelper.CaptureFrame(SouthCamera)); data["east"] = Convert.ToBase64String(CameraHelper.CaptureFrame(EastCamera)); data["west"] = Convert.ToBase64String(CameraHelper.CaptureFrame(WestCamera)); stopWatch.Stop(); Debug.Log("Sending frame at " + stopWatch.ElapsedMilliseconds); _socket.Emit("telemetry", new JSONObject(data)); stopWatch.Start(); }); }
public static void onLogin(int errorCode) { if (errorCode == 0) { UnityMainThreadDispatcher.Instance().Enqueue(() => { RtmWrapper.Instance.LoggedIn = true; RtmWrapper.Instance.OnLoginSuccessCallback(); }); } else if (errorCode == 5) { Debug.Log("Invalid Token!"); } else if (errorCode == 6) { Debug.Log("Token Expired!"); } else { Debug.Log("Error logging in: " + errorCode); } }
/// <summary> /// Method to start next round and switch turn to next player /// </summary> private void NextRound() { Debug.Log("Inside Next Round Logic Method, current round counter is " + roundCounter + " and set counter is" + setNumber); if (roundCounter <= Constants.totalrounds) { Debug.Log("Inside total round if case"); UnityMainThreadDispatcher.Schedule( CardDistributionAnimation.instance.PlayCardDistributionAnimationRoutine(false) , 0.5f); UnityMainThreadDispatcher.Schedule(() => StartNextRound(), 0.5f); UnityMainThreadDispatcher.Schedule(() => SwitchTurnToNextPlayer(true, Constants.turnPlayerDelay), 0.5f); } else if (setNumber <= Constants.totalmatch) { Debug.Log("Inside total sets if case"); UnityMainThreadDispatcher.Schedule(() => StartNextSet(), 0.5f); UnityMainThreadDispatcher.Schedule(() => SwitchTurnToNextPlayer(true, Constants.turnPlayerDelay), 0.5f); } else { Debug.Log("Game Over"); } }
public virtual void OnMemberReadyStatusChanged(LobbyMemberData member, bool isReady) { UnityMainThreadDispatcher.Instance().Enqueue(() => { LobbyUserUi user; Users.TryGetValue(member.Username, out user); if (user == null) { return; } user.SetReady(isReady); if (member.Username == CurrentUser) { IsReady = isReady; UpdateReadyButton(); } UpdateStartGameButton(); }); }
void client_MqttMsgPublishReceived(object sender, MqttMsgPublishEventArgs e) { //Console.WriteLine("message="+e.Message.ToString()); Debug.Log("Received: " + System.Text.Encoding.UTF8.GetString(e.Message)); topic = System.Text.Encoding.UTF8.GetString(e.Message); Debug.Log(topic); if (topic.Equals("1437043627")) { UnityMainThreadDispatcher.Instance().Enqueue(() => girarCofre(true)); Debug.Log("Received: " + System.Text.Encoding.UTF8.GetString(e.Message)); //client.Publish("tarjeta1", System.Text.Encoding.UTF8.GetBytes(""), MqttMsgBase.QOS_LEVEL_EXACTLY_ONCE, true); } if (topic.Equals("1426849450")) { UnityMainThreadDispatcher.Instance().Enqueue(() => girarCofre(false)); Debug.Log("Received: " + System.Text.Encoding.UTF8.GetString(e.Message)); //client.Publish("tarjeta1", System.Text.Encoding.UTF8.GetBytes(""), MqttMsgBase.QOS_LEVEL_EXACTLY_ONCE, true); } }
/// <summary> /// Attempts to stop a voice by putting it into its release phase. /// If there is no release phase defined the voice will stop immediately. /// </summary> /// <param name="channel">The channel of the voice.</param> /// <param name="note">The key of the voice.</param> public void NoteOff(int channel, int note) { UnityMainThreadDispatcher.Instance().Enqueue(ThisWillBeExecutedOnTheMainThread(note, false)); if (synthChannels[channel].holdPedal) { VoiceManager.VoiceNode node = voiceManager.registry[channel, note]; while (node != null) { node.Value.VoiceParams.noteOffPending = true; node = node.Next; } } else { VoiceManager.VoiceNode node = voiceManager.registry[channel, note]; while (node != null) { node.Value.Stop(); node = node.Next; } voiceManager.RemoveFromRegistry(channel, note); } }
private void WebSocketOnOnMessage(object sender, MessageEventArgs messageEventArgs) { var settings = new JsonSerializerSettings(); settings.NullValueHandling = NullValueHandling.Ignore; var message = messageEventArgs.Data; var messageContent = ServerMessage.GetMessageContent(message); ServerGame game; switch (ServerMessage.GetMessageType(message)) { case ServerMessage.PlayerSpawnType: game = JsonConvert.DeserializeObject <ServerGame>(messageContent, settings); GameStartUiManager.RoomId = game.RoomId; UnityMainThreadDispatcher.Instance().Enqueue(() => SpawnPlayer(game)); break; case ServerMessage.PlayerPositioningType: game = JsonConvert.DeserializeObject <ServerGame>(messageContent, settings); Console.WriteLine(game); UnityMainThreadDispatcher.Instance().Enqueue(() => RelocatePlayer(game)); break; case ServerMessage.PlayerMoveType: game = JsonConvert.DeserializeObject <ServerGame>(messageContent, settings); UnityMainThreadDispatcher.Instance().Enqueue(() => MovePlayer(game)); break; case ServerMessage.PlayerShootType: game = JsonConvert.DeserializeObject <ServerGame>(messageContent, settings); UnityMainThreadDispatcher.Instance().Enqueue(() => ShootPlayer(game)); break; default: break; } }
public void treatMessage(object s, MessageEventArgs e) { var generalResult = JsonUtility.FromJson <ResultClass>(e.Data); if (controller.gamePaused == false) { if (generalResult.id == 1) { var res = JsonUtility.FromJson <NewSessionResultClass> (e.Data); globalscripts.session = res.result; } //receiveing confirmation of accelerometer stream else if (generalResult.id == 2) //if this is connection data { Debug.Log("Received answer for creating new subscription to accelerometer stream..."); } else if (e.Data.IndexOf("\"jsonrpc\":\"2.0\"") == -1 && e.Data.IndexOf("\"mot\"") != -1) //mot information data { UnityMainThreadDispatcher.Instance().Enqueue(GetTime()); motEventClass motResult = JsonUtility.FromJson <motEventClass> (e.Data); //x axis = 4 xAxis = motResult.mot [4]; //y axis yAxis = motResult.mot [5]; //z axis = 6 zAxis = motResult.mot [6]; if (globalscripts.firstUpdate == false) { globalscripts.updateFirstShipPosition(xAxis, yAxis, zAxis); firstX = globalscripts.firstX; firstY = globalscripts.firstY; firstZ = globalscripts.firstZ; } } } }
public void loginClicked() { if (loginUsername.text.Length == 0 || loginPassword.text.Length == 0) { MNPopup mNPopup = new MNPopup("Error", "Please Input Correct!"); mNPopup.AddAction("Ok", () => { Debug.Log("Ok action callback"); }); mNPopup.Show(); } else { //MNP.ShowPreloader("", "Login..."); ParseUser.LogInAsync(loginUsername.text, loginPassword.text).ContinueWith(t => { MNP.HidePreloader(); if (t.IsFaulted || t.IsCanceled) { // The login failed. Check the error to see why. using (IEnumerator <System.Exception> enumerator = t.Exception.InnerExceptions.GetEnumerator()) { if (enumerator.MoveNext()) { ParseException error = (ParseException)enumerator.Current; // error.Message will contain an error message // error.Code will return "OtherCause" UnityMainThreadDispatcher.Instance().Enqueue(showErrorWithMessage(error.Message)); } } } else { //shouldLoginIn = true; UnityMainThreadDispatcher.Instance().Enqueue(loginSucceed()); // Login was successful. } }); } }
void SignInGetUserCredentials(string uid) { //fn = reference.Child(uid).Child("fname").GetValueAsync().Result.Value.ToString(); //ln = reference.Child(uid).Child("lname").GetValueAsync().Result.Value.ToString(); //usertype = reference.Child(uid).Child("usertype").GetValueAsync().Result.Value.ToString(); //em = reference.Child(uid).Child("email").GetValueAsync().Result.Value.ToString(); //UnityMainThreadDispatcher.Instance().Enqueue(() => GetUserCredentials(uid)); //UnityMainThreadDispatcher.Instance().Enqueue(()=> this.uid = uid; GetUserCredentials(uid); Debug.Log(usertype); Debug.Log(fn); Debug.Log(ln); Debug.Log(em); if (usertype == "Student") { isStudent = true; } if (usertype == "Instructor") { isStudent = false; } if (isStudent) { Debug.Log(fn); UnityMainThreadDispatcher.Instance().Enqueue(SetWelcomeStud("Welcome, " + fn + "!")); UnityMainThreadDispatcher.Instance().Enqueue(() => loginPage.DOAnchorPos(new Vector2(-1280, 0), 0.25f)); UnityMainThreadDispatcher.Instance().Enqueue(() => studentPage.DOAnchorPos(new Vector2(0, 0), 0.25f).SetDelay(2.0f)); } else if (!isStudent) { Debug.Log(fn); UnityMainThreadDispatcher.Instance().Enqueue(SetWelcomeInst("Welcome, " + fn + "!")); UnityMainThreadDispatcher.Instance().Enqueue(() => loginPage.DOAnchorPos(new Vector2(-1280, 0), 0.25f)); UnityMainThreadDispatcher.Instance().Enqueue(() => instructorsPage.DOAnchorPos(new Vector2(0, 0), 0.25f).SetDelay(2.0f)); } }
private void ExecuteSynchronouslyInMainThreadAndReturnResultAsJson(HttpListenerContext context, FunctionObject function) { object result = null; UnityMainThreadDispatcher.Instance().Enqueue((() => { try { result = function(); } catch (Exception ex) { result = ex; } finally { semaphore.Release(); } })); semaphore.WaitOne(); if (!(result is Exception)) { if (result is string) { context.JsonResponse((string)result); } else { context.JsonResponse(result.ToString()); } } else { context.JsonExceptionResponse((Exception)result); } }
protected override void Run() { ForceDotNet.Force(); using (RequestSocket client = new RequestSocket()) { client.Connect("tcp://localhost:5555"); while (running) { //Debug.Log("Sending Hello"); //client.SendFrame("subject: " + subject.x + "; " + subject.y); //Debug.Log("Sent " + JsonUtility.ToJson(personsData)); client.SendFrame(JsonUtility.ToJson(personsData)); string message = null; bool gotMessage = false; while (running) { gotMessage = client.TryReceiveFrameString(out message); if (gotMessage) { break; } } if (gotMessage) { Debug.Log("Received " + message); UnityMainThreadDispatcher.Instance().Enqueue(HandleMessage(message)); } } } NetMQConfig.Cleanup(); }
private void CallEvent(string eventName, PlayerModel player, string body) { Type parentType = typeof(GCMultiPlayer); Assembly assembly = Assembly.GetExecutingAssembly(); Type[] types = assembly.GetTypes(); IEnumerable <Type> subclasses = types.Where(t => t.IsSubclassOf(parentType)); foreach (Type type in subclasses) { Type instanceClass = Type.GetType(type.Name); MethodInfo[] methodInfos = instanceClass.GetMethods(BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.Public); object[] _params = { player, body }; foreach (MethodInfo item in methodInfos) { if (item.Name == eventName) { UnityMainThreadDispatcher.Instance().Enqueue(() => item.Invoke(this, _params)); } } } }
/// <summary> /// Method to determine winner player when minium is called /// and execute next round start instructions /// </summary> /// <param name="currentPlayer">Current player</param> public void CallMinium(Player currentPlayer) { Debug.Log("Inside Call Minium Method"); Player winnerPlayer = null;; ShowMessage("Minimum!", currentPlayerIndex); UnityMainThreadDispatcher.Schedule(() => { winnerPlayer = MinimumPlayer(currentPlayer); } , 1.0f); UnityMainThreadDispatcher.Schedule(() => { ShowMessage("Winner!", players.IndexOf(winnerPlayer)); } , 1.0f); UnityMainThreadDispatcher.Schedule(() => { scoreboardPopup.ShowPopup(); } , 5.0f); UnityMainThreadDispatcher.Schedule(() => { scoreboardPopup.HidePopup(); } , 5.0f); UnityMainThreadDispatcher.Schedule(() => { NextRound(); } , 1.0f); //UnityMainThreadDispatcher.Instance().Enqueue(SwitchTurnToNextPlayer(true, Constants.turnPlayerDelay)); Debug.Log("Call Minimum Completed"); }
/// <summary> /// Invoked, when user clicks a "Create" button /// </summary> public virtual void OnCreateClick() { var properties = new Dictionary <string, string>() { { OptionKeys.LobbyName, Name.text }, { OptionKeys.SceneName, GetSelectedMap() }, { OptionKeys.MapName, MapDropdown.captionText.text } }; var factory = GetSelectedFactory(); Client.Instance.GetPlugin <LobbyPlugin>().CreateAndJoin(factory, properties, (lobby) => { UnityMainThreadDispatcher.Instance().Enqueue(() => { // Hide this window gameObject.SetActive(false); if (LobbyUi != null) { // Show the UI LobbyUi.gameObject.SetActive(true); // Set the lobby Ui as current listener lobby.SetListener(LobbyUi); } else { Debug.Log("Please set LobbyUi property in the inspector"); } }); }, error => { Debug.Log(error + " (Factory: " + factory + ")"); }); }
void EmitTelemetry(SocketIOEvent obj) { UnityMainThreadDispatcher.Instance().Enqueue(() => { print("Attempting to Send..."); // send only if it's not being manually driven if ((Input.GetKey(KeyCode.W)) || (Input.GetKey(KeyCode.S))) { _socket.Emit("telemetry", new JSONObject()); } else { // Collect Data from the Car Dictionary <string, string> data = new Dictionary <string, string>(); var cte = wpt.CrossTrackError(_carController); data["steering_angle"] = _carController.CurrentSteerAngle.ToString("N4"); data["throttle"] = _carController.AccelInput.ToString("N4"); data["speed"] = _carController.CurrentSpeed.ToString("N4"); data["cte"] = cte.ToString("N4"); data["image"] = Convert.ToBase64String(CameraHelper.CaptureFrame(FrontFacingCamera)); _socket.Emit("telemetry", new JSONObject(data)); } }); }
/* * Fragt an der Datenbank an und zwar die fünf besten Scores, die in der Datenbank sind und füllt die * Ergebnisse in eine Liste. */ public void getFiveBestScore() { //Anfrage formulieren var query = ParseObject.GetQuery("GameScore").OrderByDescending("score").Limit(5); //Alle Elemente auslesen query.FindAsync().ContinueWith(t => { if (t.IsCanceled || t.IsFaulted) { UnityMainThreadDispatcher.Instance().Enqueue(() => OnTop5RequestFailed(t.Exception)); return; } anzeige.Clear(); IEnumerable <ParseObject> results = t.Result; int i = 0; foreach (ParseObject result in t.Result) { i += 1; anzeige.Add(result); } UnityMainThreadDispatcher.Instance().Enqueue(() => OnTop5Received(anzeige)); }); }
// Will get called by the Parallel.ForEach loop in order to check each window // for texture update individually on multiple threads public void UpdateWindowTextures(object key) { WindowCapture window = windowsRendering[(IntPtr)key]; GameObject windowObject = windowObjects[(IntPtr)key]; if (windowObject == null) { return; }/* * if (!Win32Funcs.IsWindowVisible(window.hwnd) && beenInitiallyRendered[(IntPtr)key] && (IntPtr) key != IntPtr.Zero && !window.isDesktop) * { * return; * }*/ byte[] textureBytes = window.GetWindowTexture(out bool didChange, out int width, out int height); // Check if texture Changed if (didChange) { // Sends Texture rendering job back to the main thread as a coroutine UnityMainThreadDispatcher.Instance().Enqueue(renderWindowUpdates(textureBytes, window, width, height, windowObject)); beenInitiallyRendered[(IntPtr)key] = true; } }
public void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode) { if (scene.name == "MenuCore") { _threadDispatcher = _threadDispatcher ?? new GameObject("Thread Dispatcher").AddComponent <UnityMainThreadDispatcher>(); } else if (scene.name == "GameCore") { if (client != null && client.Connected) { new GameObject("ScoreMonitor").AddComponent <ScoreMonitor>(); if (UseFloatingScoreboard) { new GameObject("FloatingScoreScreen").AddComponent <FloatingScoreScreen>(); UseFloatingScoreboard = false; } if (DisablePause) { new GameObject("AntiPause").AddComponent <AntiPause>(); } else if (UseSync) //DisablePause will invoke UseSync after it's done to ensure they don't interfere with each other { new GameObject("SyncHandler").AddComponent <SyncHandler>(); UseSync = false; } (client.Self as Player).PlayState = Player.PlayStates.InGame; var playerUpdated = new Event(); playerUpdated.Type = Event.EventType.PlayerUpdated; playerUpdated.ChangedObject = client.Self; client.Send(new Packet(playerUpdated)); } } }
public void SendTick() { //sending packs foreach (var queue in _sendQueues) { if (!queue.Value.IsEmpty) { List <JediumBehaviourMessage> s_msgs = new List <JediumBehaviourMessage>(50); int i = 0; JediumBehaviourMessage cmsg = null; do { if (queue.Value.TryDequeue(out cmsg)) { s_msgs.Add(cmsg); i++; } } while (i < MAX_PACK_SIZE && !queue.Value.IsEmpty); UnityMainThreadDispatcher.Instance().Enqueue(() => { _serverConnection.WithNoReply().SendMessagePack(s_msgs.ToArray()); }); } } }
public void ShowPng() { UnityMainThreadDispatcher.Instance().Enqueue(() => { _overlayCanvas ??= gameObject.AddComponent(Resources.FindObjectsOfTypeAll <Canvas>().First(x => x.name == "DropdownTableView")); _overlayCanvas.renderMode = RenderMode.ScreenSpaceOverlay; _overlayCanvas.overrideSorting = true; _overlayCanvas.sortingOrder = Resources.FindObjectsOfTypeAll <Canvas>().Length + 1; _overlayImage ??= _overlayCanvas.gameObject.AddComponent <RawImage>(); var imageTransform = _overlayImage.transform as RectTransform; imageTransform.SetParent(_overlayCanvas.transform, false); _overlayImage.material = Resources.FindObjectsOfTypeAll <Material>().FirstOrDefault(x => x.name == "UINoGlow"); if (imageBytes != null) { var texture = new Texture2D(1, 1); ImageConversion.LoadImage(texture, imageBytes); _overlayImage.color = Color.white; _overlayImage.texture = texture; } }); }
private void setPrintFinishedText(object source, System.EventArgs args) { PrintFinishedEventArgs e=(PrintFinishedEventArgs)args; System.TimeSpan timePrinted = System.TimeSpan.FromSeconds(e.Time); string time1; if (timePrinted.Hours > 0) { time1 = string.Format("{0:D2}h:{1:D2}m:{2:D2}s", timePrinted.Hours, timePrinted.Minutes, timePrinted.Seconds); } else { time1 = string.Format("{0:D2}m:{1:D2}s", timePrinted.Minutes, timePrinted.Seconds); } UnityMainThreadDispatcher.Instance().Enqueue(() => { toolTip.ToolTipText = "Druck abgeschlossen.\nDauer: " + time1; }); }
void OnSetPosition(JSONObject json) { if (GlobalState.extendedTelemetry) { float pos_x = float.Parse(json.GetField("pos_x").str, CultureInfo.InvariantCulture.NumberFormat); float pos_y = float.Parse(json.GetField("pos_y").str, CultureInfo.InvariantCulture.NumberFormat); float pos_z = float.Parse(json.GetField("pos_z").str, CultureInfo.InvariantCulture.NumberFormat); Quaternion rot = Quaternion.identity; if (json.GetField("Qx") != null && json.GetField("Qy") != null && json.GetField("Qz") != null && json.GetField("Qw") != null) { float qx = float.Parse(json.GetField("Qx").str, CultureInfo.InvariantCulture.NumberFormat); float qy = float.Parse(json.GetField("Qy").str, CultureInfo.InvariantCulture.NumberFormat); float qz = float.Parse(json.GetField("Qz").str, CultureInfo.InvariantCulture.NumberFormat); float qw = float.Parse(json.GetField("Qw").str, CultureInfo.InvariantCulture.NumberFormat); rot.x = qx; rot.y = qy; rot.z = qz; rot.w = qw; } UnityMainThreadDispatcher.Instance().Enqueue(setCarPosition(pos_x, pos_y, pos_z, rot)); } }
private void RemoveSelfFromMatch() { if (Plugin.IsInMenu()) { UnityMainThreadDispatcher.Instance().Enqueue(() => { if (TournamentMode) { SwitchToWaitingForCoordinatorMode(); } else { Dismiss(); } }); } else { //If the player is in-game... boot them out... Yeah. //Harsh, but... Expected functionality //IN-TESTING: Temporarily disabled. Too many matches being accidentally ended by curious coordinators //PlayerUtils.ReturnToMenu(); } }
public void JoinChannel() { //Debug.Log("User: "******" joined room: " + channelName); channelName = channelNameInput.GetComponent <InputField>().text; if (!rtm.LoggedIn) { Debug.LogError("You need to login before you can join a channel"); } else { UnityMainThreadDispatcher.Instance().Enqueue(() => { channel = rtm.JoinChannel(channelName); _currentChannelName(); //(value) => { Debug.LogError("Error joining/creating channel"); } }); } }
public void StartAcceptingMessages() { Debug.Log("Started accepting messages"); meshTarget = GameObject.Find("BlendShapeTarget").GetComponent <SkinnedMeshRenderer> (); meshTargetTwo = GameObject.Find("BlendShapeTargetTwo").GetComponent <SkinnedMeshRenderer>(); if (meshTarget == null || meshTargetTwo == null) { Debug.LogError("Cannot find BlendShapeTarget. Have you added it to your scene?"); return; } if (UnityMainThreadDispatcher.Exists()) { dispatcher = UnityMainThreadDispatcher.Instance(); } else { Debug.LogError("Cannot reach BlendShapeTarget. Have you added the UnityMainThreadDispatcher to your scene?"); } isAcceptingMessages = true; }
private void CheckNamingOrCreateOrganicData(CloData cloData, Action namingOrOrganicDataCallback) { if (cloData.naming) { RequestTrackLinkDataFromNaming(cloData.media_sources.ToList(), namingData => { if (namingData != null) { GenerateLink(cloData, namingData, namingOrOrganicDataCallback); return; } if (cloData.organic?.org_status == true) { GenerateOrganicData(cloData, namingOrOrganicDataCallback); } else { cloData.user = false; UnityMainThreadDispatcher.Instance().Enqueue(SaveTrackLink("none", namingOrOrganicDataCallback)); } }); } else { if (cloData.organic?.org_status == true) { GenerateOrganicData(cloData, namingOrOrganicDataCallback); } else { cloData.user = false; UnityMainThreadDispatcher.Instance().Enqueue(SaveTrackLink("none", namingOrOrganicDataCallback)); } } }
void OnDestroy() { _instance = null; }
void OnDestroy() { _instance = null; }
void Awake() { if (_instance == null) { _instance = this; DontDestroyOnLoad(this.gameObject); } else { Destroy (this.gameObject); } }