I have an object which has for example 5 meshes where I would like to change the color in runtime. But every mesh has different colors to change. For example mesh 1 can be changed to blue, red and orange and mesh 2 can be changed to orange, yellow,green,purple and white.
I would like to have a c# script where I have an array with all 5 meshes. And for each array I would like to have another array appear in the inspector, where I can put in the different colors. This is no problem if the mesh count would always be 5. But I want it to be flexible. For example, another object only has 3 meshes than I only need 3 color arrays instead of 5.
I have never worked with Editor Scripts, but maybe there is a easy workaround for that?
I am working with Unity 5.3
Thank you.
GameObjects which are the children of anotherGameObjector are you talking aboutUnityEngine.Meshobjects? Can you give an example object hierarchy? As I understand, you basically want a script that has aUnityEngine.Color[]field which has the length of the number of "meshes", then color each mesh according to that color (via a Shader?material.color?) - Maximilian Gerhardt