- Home /
Objects that appear in the editor's game view do not appear in the game build
I've been working on this game for a while and I'm trying to start playing it as an executable and not just in the Unity editor. However I found that some objects that seem to appear just fine in the editor's game view and scene view do not appear when I run the game as an executable.
In this screen you can see how the power-ups on the kitchen counter (bottle-rockets, eggs, jello, etc) appear in the Unity editor's game view: https://imgur.com/HSdNTDl
View of the entire editor: https://imgur.com/zOarwwM
And in this screen from the executable they do not appear at all: https://imgur.com/ASvfVaf
The power-up display models appear by being instantiated when a power-up pad is ready (the colored cabinet doors). When it's ready the pad object randomly selects a power-up and actives, instantiating a floating/rotating display model above it. When the pad is hit the model is destroyed.
I can't figure if the power-ups are still there but just not displaying, or if they are just not spawning for some reason? Some routes I've tried testing out: Placing a bunch of power-ups all over the level before building it (IE placing the prefabs all over the place at different XYZ coords instead of just letting them spawn organically in their place on the counter) they show up and look just fine in the executable. Moving the power-up spawn location to the center of the screen to see if some reason the stuff on top of the counters was getting clipped out from the camera view doesn't solve anything, they still don't show up when instantiating through normal code no matter what location that spawn location is at.
Anyone know why this is happening? Thanks in advance for any thoughts.