Skip to main content
Became Hot Network Question
Minor cleanup
Source Link
DMGregory
  • 141k
  • 23
  • 258
  • 401

Unity list Map arrays of array depending ongame objects to values of an enum in Unity inspector

I wantedwant to have a serialized field with aan array of gameobjectsgame objects for each item in a global enum., like this:

   public enum MyEnum
{
    Item1, 
    Item2, 
    Item3
};

And having inhave a monobehaviourMonoBehaviour script present something presented as thatlike this in the inspector:

Array of gameobjectArray of game objects

I can't find proper documentation or example to make this work.

Thanks in advance.

Unity list of array depending on enum

I wanted to have a serialized field with a array of gameobjects for each item in a global enum. like this:

   public enum MyEnum
{
    Item1, 
    Item2, 
    Item3
};

And having in a monobehaviour script something presented as that:

Array of gameobject

I can't find proper documentation or example to make this work.

Thanks in advance.

Map arrays of game objects to values of an enum in Unity inspector

I want to have a serialized field with an array of game objects for each item in a global enum, like this:

public enum MyEnum
{
    Item1, 
    Item2, 
    Item3
}

And have a MonoBehaviour script present something like this in the inspector:

Array of game objects

I can't find proper documentation or example to make this work.

Source Link
Felox
  • 77
  • 7

Unity list of array depending on enum

I wanted to have a serialized field with a array of gameobjects for each item in a global enum. like this:

   public enum MyEnum
{
    Item1, 
    Item2, 
    Item3
};

And having in a monobehaviour script something presented as that:

Array of gameobject

I can't find proper documentation or example to make this work.

Thanks in advance.