- Home /
"public GameObject" not appearing in Inspector
First, I'm learning a lot by doing the BurgZergArcade's Hack&Slash RPG Tutorial. Normally, most errors I get are due to some script in which I have made an error, but this one doesn't seems to be an error on my part.
I'm currently jammed at this part or it. http://www.youtube.com/watch?v=Jpi8fRj-wzo&list=SPE5C2870574BF4B06
While I did some modifications (minors ones like adjusting sizes to my liking), I got one thing that isn't working as intended: The Inspector doesn't show any "public GameObject" I input in my C# script when it's linked to an object in the game.
//This part appear in the Inspector
public GUISkin GeneralSkin;
//This part doesn't appear in the Inspector
public GameObject playerPrefab;
I got no compilation error or anything that would normally block the Inspector from updating the script content.
I'm using Unity 4 (Free) and I have read that some functions in the GameObject have been modified/expanded so I'm wondering what I should do to make the any GameObject public so that they appear in the Inspector. (then I could link a prefab to it.)
Thanks for any assistance!
Answer by CMaxo · Feb 03, 2013 at 09:39 AM
Ok, in case people sees this, it seems that there was some bug/issues with the updating of the inspector.
For a strange reason, I had to restart Unity 4 and it appeared, but not only did it appeared as intended, but it appeared in double and one didn't had it while the other had the GameObject. Strange isn't it?
Deleted the one who had the public element missing while keeping the one with it is the solution once both appeared after the restart.
Your answer