Unity Player Rendering Different in Development Mode vs Non-Development Mode
When I Build and Run my application, I'm seeing some strange behavior. The application works in the follow scenarios:
Unity Editor on Mac, Linux, Windows
Unity Player on Mac, Linux
Unity Player with Development Build checked on Mac, Linux, and Windows
It seems the only configuration in which it doesn't work correctly is non-development (production/release) build on Windows when I leave the Development Build checkbox unchecked. Of course, that's the target environment for my application.
I'm not entirely sure what the exact problem is, though it almost appears to be a layering issue. In all of the working environments, the application appears to be rendering in order of the hierarchy. I've considered using sorting layers and canvas components, though due to the complexity of that I'm hoping to find a different solution. I'm not even sure how to debug this since there aren't any errors, running the application in a development build/the editor results in it working as expected, and I don't know how to access the "Scene" tab to browse the hierarchy from a "broken" build.
I guess my question comes down to is there a way to access the equivalent of the "Scene" tab from a build? Or is there a way to simulate a build from within the editor so I can browse through the hierarchy to determine what the cause of the problem is? Or has anyone seen an issue similar to this?
Additional problem info for those interested in it: I have a video, using VideoPlayer and RawImage, set to play. My code is basically:
texture = new RenderTexture(width, height, 0)
videoPlayer.targetTexture = texture
videoRawImage.texture = texture
Maybe not the best way to do it but it works well to play the video. Over top of the video, I have a container with a background image and some text (TextMeshPro) over it. The background image appears OK, but the text doesn't show up. I'm unsure if it's behind the image, or what is happening to it. If I put a ~2 second delay, just to test, between adding the background image and adding the text over it, the text shows up fine.
Again, if I'm in a development build in windows, the editor, or any build on Mac and Linux, this delay isn't necessary.
Edit:
Quick update. The issue is actually related to rotation. I am rotating the parent element of the text. Despite setting the text's localEulerAngles to zero, it seems that something happens that hides the text. If I use the update function or a coroutine to reference the localEulerAngles, even just with a Debug.Log(text.transform.localEulerAngles), the text remains visible as the parent element rotates. This seems like a bug to me.