- Home /
Question by
Diet-Chugg · Dec 20, 2010 at 10:45 PM ·
arraylistinspectorhashtable
Inspector issue
I want to find a way to make the unity inspector do something like this: Not quite sure how to pull it off. Any help would be great.
Cakes
Size 4
Frosting 0
Size 3
Color 0 : int(I want to be able to modify a int value at each color)
Color 1
Color 2
Frosting 1
Size 2
Color 0
Color 1
Frosting 2
Size 4
Color 0
Color 1
Color 2
Color 3
Frosting 3
Size 1
Color 0
Comment
Best Answer
Answer by Mike 3 · Dec 20, 2010 at 11:00 PM
You'd make a couple of custom classes to do it, js should be the same as this, but slightly different syntax:
public class Test : MonoBehaviour //this is an example of how to use the custom class below { public Cake cake; }
[System.Serializable] public class Cake { public Frosting[] frosting; }
[System.Serializable] public class Frosting { public int[] color; }
dude you are brilliant! Thanks figured it out in javascript
Your answer
![](https://koobas.hobune.stream/wayback/20220613091836im_/https://answers.unity.com/themes/thub/images/avi.jpg)