Custom GUI with Odin Inspector
// Required to tell Databrain it should render UI using Odin Inspector.
[UseOdinInspector]
public class MyOdinDataObject : DataObject
{
[FoldoutGroup("Foldout")] public float foldout1;
[FoldoutGroup("Foldout")] public float foldout2;
[FoldoutGroup("Foldout")] public float foldout3;
[AssetList]
public GameObject prefab;
[TabGroup("Movement")]
public float movementSpeed;
public float rotationSpeed;
[TabGroup("Properties")]
public float health;
public float strength;
[ColorPalette("Underwater")]
public Color underwaterColor;
public enum Test
{
a,
b,
c
}
[OnValueChanged("StateChanged")]
[EnumToggleButtons]
public Test enumTest;
[ListDrawerSettings(ShowPaging = false)]
public List<string> myList = new List<string>();
[DictionaryDrawerSettings(DisplayMode = DictionaryDisplayOptions.ExpandedFoldout)]
public Dictionary<string, List<int>> StringListDictionary = new Dictionary<string, List<int>>()
{
{ "Numbers", new List<int>(){ 1, 2, 3, 4, } },
};
[Button(ButtonSizes.Medium)]
public void TestMethod()
{
Debug.Log("CLICK");
}
public void StateChanged()
{
Debug.Log("State changed to " + enumTest);
}
}Known Issues
Problem
Solution
Last updated