- Home /
Question by
AlePhobia · Sep 05, 2013 at 01:49 AM ·
public strings
Public variables wont display on inspector
Hello, im trying to make a GUIStyle, but it wont show in inspector when i declare it (I'ts public and attached to a GameObject.
Any clue of what could be the problem?
And this is the code
public class Creditos : MonoBehaviour {
public GUIStyle textStyle;
public Font myFont;
public Texture2D nothingShowsUp;
Thank you very much!
capture.png
(21.1 kB)
capture2.png
(6.0 kB)
Comment
Best Answer
Answer by CHPedersen · Sep 05, 2013 at 02:15 AM
The class has failed to serialize for some reason. Perhaps you have edited it in an external editor and not yet saved the file? It's also possible that your project still contains compile-time errors you have not yet corrected. These can be in any script, it does not have to be in this class. Unity will not re-serialize the project's source until it passes compilation, and public variables do not show up in the editor until after that has taken place.
Your answer
