|
Hey, I'm trying to get an array of gameobjects editable in a custom editor. Does anyone know a good way to do this? For instance what if the enemyObject in the following code snippet was an Array[], how can I make this an editable Array list like in the normal inspector?
For clarity: I'm building a custom editor window (EditorGUI), and that's were I want to be able to see my GameObject Array. Doesn't have to be editable, just need to see whats in there. Thanks a lot! cheers
(comments are locked)
|
|
You probably have to do it by hand. Untested:
You might be able to set up something with a Foldout object to make it collapsable, as well as maybe putting an int field there to resize your array. But that's the path I would suggest going down. Thanks! I ended up using only the for loop, as my array's are quite small. But awesome to learn that I can use them in this manner. Thanks again! cheers!
Jul 13 '10 at 07:48 PM
Jaywalker
(comments are locked)
|
|
try this:
(comments are locked)
|

you declare game object arrays like this: var GOArray : GameObject[];
Hey, Thanks for the comment! not the issue though.. ill edit the question to elaborate!