@ -89,6 +89,12 @@ namespace Fungus.Script
{
FungusCommand command = this [ index ] . objectReferenceValue as FungusCommand ;
CommandInfoAttribute commandInfoAttr = FungusCommandEditor . GetCommandInfo ( command . GetType ( ) ) ;
if ( commandInfoAttr = = null )
{
return ;
}
FungusScript fungusScript = command . GetFungusScript ( ) ;
bool error = false ;
@ -114,6 +120,10 @@ namespace Fungus.Script
{
GUI . backgroundColor = Color . yellow ;
}
else
{
GUI . backgroundColor = commandInfoAttr . ButtonColor ;
}
Rect buttonRect = position ;
buttonRect . width = 8 0 ;
@ -124,12 +134,6 @@ namespace Fungus.Script
summaryRect . x + = 8 5 ;
summaryRect . width - = 8 5 ;
CommandInfoAttribute commandInfoAttr = FungusCommandEditor . GetCommandInfo ( command . GetType ( ) ) ;
if ( commandInfoAttr = = null )
{
return ;
}
string commandName = commandInfoAttr . CommandName ;
GUIStyle commandStyle = new GUIStyle ( GUI . skin . box ) ;
if ( GUI . Button ( buttonRect , commandName , commandStyle ) )