so i created several classes
something like
Class Fruit{
var name:String;
var color:String;
var type:fruitType;
enum ft{apple, orange, pear}
var value:String;
}
Class Shop(){
var itemsHeld:Fruit[];
}
now i wanted to create a custom Inspector that would show different variables for my designers to work with in the inspector based on the enum selection, but after some tests and such I couldn’t figure out how to make my custom classes appear in my custom inspector In the way they currently do by default.
This is my first attempt at creating a custom inspector, so sorry if this is pretty basic stuff but can someone tell me the methods, I got a pretty good understanding of EditorGUILayout, but i just don’t see anything in the documentation for class referencing.
also the inspector I’m trying to create would reference a Javascript, which holds the shop class as well as a few other variables.
edit —
this is a code sample of what I’m doing in my actual projects basically what I’m trying to do is get it so that when my holder class references this class, it would hide variables like message and speaker unless eventType is set to dialogue, maybe I’m going about it the wrong way…definitely wouldn’t b the first time
////////////////////////////
class EventC {
enum eType {dialogue, endSequence}
var eventType:eType;
var message:String;
var speaker:String;
function eventStep(eS:EventSequence){
switch(eventType){
case 0:
//Display Message Event
var dB:DialogueBox = eS.currentScenario.Assets.DialogueBox;
dB.enabled = true;
dB.DisplayMessage(message, speaker, eS);
break;
case 1:
//End Event Sequence
eS.DecideNext(0);
break;
}
}
}
///////////////////////////////