x


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
more ▼

asked Dec 20, 2010 at 10:45 PM

Diet Chugg gravatar image

Diet Chugg
447 67 61 77

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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;
}
more ▼

answered Dec 20, 2010 at 11:00 PM

Mike 3 gravatar image

Mike 3
32.9k 19 80 290

dude you are brilliant! Thanks figured it out in javascript

Dec 21, 2010 at 12:29 AM Diet Chugg
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2118
x815
x777
x75

asked: Dec 20, 2010 at 10:45 PM

Seen: 1127 times

Last Updated: Dec 20, 2010 at 10:45 PM