void Update() { if (!lolsdkFinishedLoading) { lolsdkFinishedLoading = SDKLoader.CheckIfEverythingLoaded(); //If have not recieved lols jsons yet } if (lolsdkFinishedLoading && !flowInitialized) //Once recieved jsons, initialize the flow { LOLAudio.Instance.Initialize(); curFlow = InitializeFlowScript(currentState, ProgressTracker.Instance.currentProgress, true); //initial flow initialize flowInitialized = true; } if (flowInitialized) { if (curFlow == null) { return; //This means Initialize hasnt been called yet, can happen in weird Awake/Update way (should not though, but be safe) } float dt = Time.deltaTime; if (curFlow.initialized) { curFlow.Update(dt); } } }
// Update is called once per frame void Update() { if (SDKLoader.CheckIfEverythingLoaded()) { GetComponent <Text>().text = LangDict.Instance.GetText(jsonTextName); GameObject.Destroy(this); } }