public color32 array not showing in inspector
I'm trying to change the colors on a few cubes as soon as they respawn and wrote this: public Color32[] gameColors = new Color32[4]; however the color options are not showing up in the inspector and all cubes are black. I only get a gameColors dropdown menu which only shows Size and 0.
Something is missing from your post. I've done a quick implementation and everything is great. Please update and give screenshots and relevant code. As you've described your issue it seems to work without issue as the screenshot below shows.
Answer by Bunny83 · Apr 28, 2017 at 03:36 PM
If you want to make the variable to "show up" in the inspector you have to actually set the the desired values in the inspector. The array is serialized in the inspector so it doesn't matter that you assigned an array with 4 elements since the serialization system deserializes the array from the stored data where it had 0 elements. You just have to set the size in the inspector to the desired count.