А ничего что я хочу использовать такую структуру :
private class PlantInfo
{
private Rect commentLabel, growIcon, growLabel;
}
private PlantInfo plantInfoRect;
void Start()
{
plantInfoRect = new PlantInfo();
}
void Update
{
plantInfoRect.commentLabel = new Rect(..);
}
вместо
enum plantInfo {commentLabel, growIcon,};
private Rect[] plantInfoRect;
void Start()
{
plantInfoRect = new Rect[Enum.GetNames(typeof(plantInfo)).Length];
}
void Update
{
plantInfoRect[(int)plantInfo.commentLabel] = new Rect(..);
}
На производительности и других подводных камнях не отзовётся?