- Home /
Exposed Areas
I have exposed 6 textures in my script, 6 gameobject, and 1 texture I have called background. In the Inspector its becoming one long list is there any way to place a blank line in between the differnt groups of them so it spaces it out some?
public GameObject location1;// Opens it up so you can set location 1 in Inspector.
public GameObject location2;// Opens it up so you can set location 2 in Inspector.
public GameObject location3;// Opens it up so you can set location 3 in Inspector.
public GameObject location4;// Opens it up so you can set location 4 in Inspector.
public GameObject location5;// Opens it up so you can set location 5 in Inspector.
public GameObject location6;// Opens it up so you can set location 6 in Inspector.
public Texture backgroundTexture;//Allows you to set your background texture in the Inspector
public Texture Location1Button;//Allows you to set the buttons 1 texture in the Inspector.
public Texture Location2Button;//Allows you to set the buttons 2 texture in the Inspector.
public Texture Location3Button;//Allows you to set the buttons 3 texture in the Inspector.
public Texture Location4Button;//Allows you to set the buttons 4 texture in the Inspector.
public Texture Location5Button;//Allows you to set the buttons 5 texture in the Inspector.
public Texture Location6Button;//Allows you to set the buttons 6 texture in the Inspector.
You would need to learn how to make your own Custom Inspector Editor view.
extending the editor : http://docs.unity3d.com/Documentation/Components/gui-ExtendingEditor.html
Ok thanks. If you convert that to an answer I will mark it as the correct answer.
Answer by markpdolby · Nov 02, 2012 at 03:12 PM
You could put them into Arrays which would make the inspector a bit cleaner
public GameObject[] locations; //Contains all locations
public Texture[] LocationButtons //Contains all buttons
public Texture backgroundTexture
You would have to change your code a bit to accomadate this however but in the long run it will make it more extensible.
Your answer
Follow this Question
Related Questions
Inspector vs Script: Component best practice? 1 Answer
C# public decimal variable not showing up in inspector 2 Answers
Multiple Cars not working 1 Answer
A node in a childnode? 1 Answer
Distribute terrain in zones 3 Answers