x


Objects Disappear After Building

I have absolutely no problems building, testing, editing, etc my game in the Editor. The game itself is basically a robot arena and consists of a Plane (floor), some sideways Cylinders (inner walls), Cubes (outer walls) and a few other things. When I hit the play button in the editor it works great and everything I anticipated works. When I go and build the game as a computer standalone (tested both Mac and PC) the game becomes very messed up. The Plane floor is completely gone (gone not invisible) and many objects fall down infinitely because of that. The Cylinder walls stay in place and a few other cubes stay in place too. It appears like all scripts and lights work fine. The problem seems to be that for some reason the majority of the objects in my game disappear ONLY when compiled and built as a standalone.

Does anyone know how to fix this? Thanks a Ton!

more ▼

asked Aug 28 '11 at 09:29 AM

Destroyd gravatar image

Destroyd
1 2 2 4

(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

I'd suggest changing your floor plane to a cube and making sure it has a box collider. I've often seen items fall through planes. But the fact you are getting a different result in the editor to a stand-alone build is very strange indeed.

more ▼

answered Aug 28 '11 at 09:43 AM

Meltdown gravatar image

Meltdown
5.6k 18 25 49

Along with that check all of your scripts, and everything else for any errors.

Aug 28 '11 at 07:26 PM GuyFawkes
(comments are locked)
10|3000 characters needed characters left

I managed to fix it. I still don't quite know why it does that or why what I did fixed it, but I'm glad it did.

For the objects that were parented, I had to reparent them (often that meant moving them out of their parent in the hierarchy, recreating the parent, then putting them back in) and for the objects that did not have a parent, I simply had to recreate them. Most objects needed to be "re-done" one way or another as said above, but some didn't and I am still confused as to why.

To anyone who comes across this issue, keep your parenting structures simple and if anything disappears upon building, recreate it and it should work fine. Duplicating it via Control-D or Command-D does not work. You must create a new object from scratch. It seems as though some objects had some kind of invisible property that made them uninstantiable when built. This would explain why duplicating them didn't fix it (the property got copied as well, but a new object didn't have this property.)

I am 99% certain it wasn't anything visible in the editor. I've checked all components the troublesome objects had and nearly all settings in each similar component. Some objects didn't have scripts, so I didn't check those thoroughly.

To the developers of Unity, you've created something incredible. Incredibly powerful, versatile, and ingenious, yet also incredibly confusing at times. You'll get it right, I know you will ;)

more ▼

answered Aug 28 '11 at 09:11 PM

Destroyd gravatar image

Destroyd
1 2 2 4

(comments are locked)
10|3000 characters needed characters left

Check your game object tag. It should not be editor only

more ▼

answered May 09 '12 at 10:13 AM

COLLAnitySV gravatar image

COLLAnitySV
36 21 23 25

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x651
x110
x106
x74

asked: Aug 28 '11 at 09:29 AM

Seen: 1376 times

Last Updated: May 09 '12 at 10:13 AM