- Home /
Why is my object disappearing at runtime?
I have an interative scene that allows you to click various objects and move them around however for the latest object I have added, I have followed the asme procedure as I have for the other objects yet this one seems to disappear when running the scene and cant seem to see a reason why, can anyone provide any clues please?
Many thanks
Have you assined your objects to a corresponding prefab? Is this last object same as the others and using the same scripts?
Answer by rstecca · Jul 13, 2012 at 10:49 AM
Hi, too few infos to be sure this is your case but since I had similar issues..
Find the Animation component in your object. There you should see the Culling Type option. This is set by default to Based on Renderers which basically means that if your object goes out the rendering context it will no longer be animated. If your object is out of the scene when the game start, you'll not see it. So, if you want your object to be animated bypassing any logics that Unity does to optimize animations, set Culling Type to Always Animated. Have a look to the other conditions too as they could meet your needs.
Make sure you don't have any script that changes your object's layer to another one that might be "culled out" and thus not rendered.
I had to comment a thank you as well as an up-vote on this one, we were stumped, with a deadline fast approaching, and our characters were set up under a gameobject whos culling time was Always Animated, but the imported characters below it were set to something different. This modification seems to have fixed our issues.
Thank you.
Been knocking my brain out on this, so glad I found this answer, thanks for the help!
I have no reward points, but you are the best men. Thank you so much dude u saved me big time!
Answer by Vecna · Feb 09, 2016 at 05:12 PM
My Animator models used to disappear and by right clicking on the rotation property and changing it from Euler Angles to Quaternion fix it.
Logged In just to say that I love you. I've been spending a whole afternoon trying to understand why the damn object was disappearing and giving me weird errors never seen before. Euler Angles (quaternion) fixed everything. Thanks <3
Answer by Sebas · Mar 26, 2010 at 02:16 AM
It might be worth a shot, but have you checked in your modelling application of choice whether the surface normals are reversed? That could be a reason why the object doesn't show up while the others do (given the same script and same scene used). Does it only happen at runtime? Have you checked up close in your scene view?
There are many related questions available to surface normals. Try this Answer
I know you said that all procedures are the same, but did you change anything with layers? Is it truly rendered by the correct camera? Is the object so close/far away to the camera, that it's outside of the the clipping range? That's all I can think of for now.
Answer by sskenth · Jan 12, 2017 at 09:34 PM
So I wanted to add to this because I tried the solutions above and still no luck!
Turns out that the Skinned Mesh Renderer I was using had "Update When Offscreen" unchecked! Once this was checked the animation and model stopped vanishing when it was half off screen. I hope that helps someone else in the future.
Great thanks!!!! It solves the weird problem making the model disappear when doing some special animation like flying out of the camera!!!
This did it for me. Animated objects were working during runtime on the PC, but when deployed to Hololens 2 they disappeared. Update When Offscreen must be checked for them to stay. Life saver!
Answer by Davidfails · May 16, 2021 at 01:57 AM
My issue was the camera deleted some Clear flags and culling masks were set to only some filters.. try setting it to the right mix or everything and skybox..
Your answer
Follow this Question
Related Questions
Export objects to a .3DS file at runtime 1 Answer
How to make an animated object disappear? 2 Answers
Referencing instantiated objects at runtime 2 Answers
object name disappearing!! 1 Answer