First off, Hello everyone !
I am having problems generating a customizable field in the Inspector for an array with multiple types. Basically, this is the mental image:
type | param1 | param2
type | param1 | param2
type | param1 | param2
If it helps more, think of the animation array, where the (guessed) pseudo code would be along the lines of:
public struct sAnimation
{
string Name;
int FrameStart;
int FrameEnd;
};
public sAnimation[] AnimList;
anim1 | FrameStart1 | FrameEnd1
anim2 | FrameStart2 | FrameEnd2
anim3 | FrameStart3 | FrameEnd3
I am trying to make a manager-like-wrapper-thing for some GUI menus (basically simple implementation for game designers where they’d just blindly add scripts and edit some fields).
My code is as follows:
public enum eGUIClickEvent
{
GUIClickEvent_GoToPreviousMenu = 0,
GUIClickEvent_GoToNextMenu = 1
};
public struct sGUIClickEvent
{
eGUIClickEvent ClickEvent;
string Parameter;
};
public sGUIClickEvent[] ClickEvents;
As you can guess, I am trying to use messaging to call functions specified in the ‘Parameter’ value. Depending on ‘ClickEvent’, it would either use different functions or params and such.
My problem ? The arrays (and implicitly the customizable array fields) don’t show up in the Inspector. How can I “replicate” the animation array to use for such a case ?
Thanks in advance!