Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

First thing I noticed was that the text in the new scene is there for a single frame before disappearing. Also, Rebuild() is being called, and I set up a debug to check this. If I tell a mesh to not Rebuild() under Async single loading, the 1-frame flash doesn't happen. Even more interesting, this appears to only be effecting UI text! I added a non-Unity UI Super Text Mesh object to the scene, and it survived the load just fine.

I do notice that with debug mode enabled, the new scene's STM object doesn't appear to have an internal material. This material is still there when I switch the load mode to additive, so this has the be the cause of the problem.

It looks like if I tell STM to wait a frame before Rebuild() is called, it seems to work fine? As far as I can tell, it's not even flashing for the one frame it's not supposed to be there for. Give this a shot and lemme know what you think, and let me know if you see it blink for one frame. If it does, Rebuild() will just have to be called again, right before that "yield return null" line.


On line 821 of SuperTextMesh.cs, replace everything in the #if statement with these functions:


void OnSceneLoaded(Scene scene, LoadSceneMode loadSceneMode){
    if(this != null){
        if(loadSceneMode == LoadSceneMode.Single){
            StartCoroutine(WaitFrameThenRebuild());
        }else{
            Rebuild(autoRead);
        }
    }
}
IEnumerator WaitFrameThenRebuild(){
    yield return null;
    Rebuild(autoRead);
}