- Home /
Simple Protoype works in Unity - Not when Built
Hey, everyone. My teammate and I have been trying to wrap our heads around what's going wrong during the build process, but we can't figure it out. We're just testing a proof of concept, so there aren't many moving pieces:
We attached 18 different cameras to the player. Each one draws to a different render texture that is situated at a different 18th of the screen. We're using the built in Character Motor script and FPS Controller script. On the Player Controller script, we have our variables for the 18 cameras.
When we test the game in unity, everything works perfectly, but, when we try building it, we get a black screen.
Not sure why that would happen on export.
Any advice?
thanks!
also, it's not because we havent added the scene to the build
Does the log file give you any more insight into what's happening? The game view in the editor is often small. Are you creating 18 full-screen size render textures and running out of video memory?
log file? are you referring to the console? Nope; the render textures are each taking up just a small portion of the screen. Also, i probably should have noted that the game audio is playing. We have a sound play when the player moves, and it plays when i move around properly. We just have a completely black screen.
Log file == output_log.txt in the build's _Data directory. Do you create your RenderTextures via script/on the fly, or are they assets?
oh. im on a mac, so i'm just building for macos and being given a .app file. We have our render textures as assets. A script file basically gives them the dimensions of the screen to draw to.
Answer by theVirtunaut · Feb 09, 2013 at 04:59 AM
Hello, everyone. I solved it. In case anyone runs into the same or a simular problem, i'll share what was going on:
So, what i'd had was a multicamera set up, with EACH (every) camera drawing to a render texture displaying in the GUI. I still dont know the exact REASON, but, apparently, Unity doesnt like when there is no normal camera - one not drawing to a render texture.
What i had to do was just add an extra dummy cam to the player character. I then just masked all game objects from its view. It's basically my avatar's equivalent of the human appendix.
just thought i'd share.
Can you please explain to me how you did this? $$anonymous$$y partner and I have a competition soon and it seems to work on our $$anonymous$$ain $$anonymous$$enu, but we're confused on every other scene. Thank you.
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
One RenderTexture to multiple cameras and OnPostRender problem 0 Answers
ARfoundation (unity 2019.1) black screen (samsangGalaxy S7) 2 Answers
Making the render texture blend in with its environment 0 Answers
How can i active again a render texture after set it to null ? 1 Answer