- Home /
Material Array Using Custom Editor
How do I make an array of materials in a custom editor script?
I know through the regular script it's var whatEver Material[]; but I can't find anything in the script reference about in the custom editor.
This is how you do a single material in the editor but I need an array for the logic part of the script.
var allowMaterial : boolean = !EditorUtility.IsPersistent (target);
target.testMaterial = EditorGUILayout.ObjectField ("Material", target.testMaterial, Material, allowMaterial);
Do anyone know how to do this?
Comment
Your answer
Follow this Question
Related Questions
Custom Material Editor 1 Answer
Drawing Editor Inspector GUI based on selected/current prefab (CustomPropertyDrawer) 2 Answers
Custom Asset Icons? 2 Answers
Custom Editor loosing data on play 1 Answer