- Home /
Question by
thereal_mpellegr · Oct 14, 2013 at 03:47 PM ·
editorinspectorguistyleguistylestate
Can't modify custom class variables in the Inspector tab
I created a custom class and have variables in my script of that type like so:
var dragEntityImages : MenuButton;
var assignPointImages : MenuButton;
var haltImages : MenuButton;
var warpImages : MenuButton;
var glowStickImages : MenuButton;
var selectWeaponImages : MenuButton;
var reviveImages : MenuButton;
var lineOfSightImages : MenuButton;
class MenuButton{
var active : GUIStyleState;
var inactive : GUIStyleState;
function executeClick(){
}
}
But I'm not able to modify the active and inactive GUIStyleStates. The inspector just shows the two variable names, but the usual windows for a GUIStyleState are not showing (usually it has GUI to edit the Background and Text variables). How can I fix that?
Comment
Best Answer
Answer by thereal_mpellegr · Oct 14, 2013 at 08:23 PM
I changed my MenuButton class around and am using Texture2D objects instead of GUIStyleState objects for the active and inactive variables. The gui is being setup correctly now so I'm just going to use that instead.
I literally just changed the class type, but okay:
var dragEntityImages : $$anonymous$$enuButton;
var assignPointImages : $$anonymous$$enuButton;
var haltImages : $$anonymous$$enuButton;
var warpImages : $$anonymous$$enuButton;
var glowStickImages : $$anonymous$$enuButton;
var selectWeaponImages : $$anonymous$$enuButton;
var reviveImages : $$anonymous$$enuButton;
var lineOfSightImages : $$anonymous$$enuButton;
class $$anonymous$$enuButton{
var active : Texture2D;
var inactive : Texture2D;
function executeClick(){
}
}