diff --git a/CommunityEntity.UI.cs b/CommunityEntity.UI.cs index b49933c..fb0eab1 100644 --- a/CommunityEntity.UI.cs +++ b/CommunityEntity.UI.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; using UnityEngine.UI; using System; using System.Collections; @@ -313,7 +313,8 @@ T GetOrAddComponent() where T : Component { var c = GetOrAddComponent(); HandleEnableState( obj, c ); - + if (ShouldUpdateField("interactable")) + c.interactable = obj.GetBoolean( "interactable", true ); if ( obj.ContainsKey( "command" ) ) { var cmd = obj.GetString( "command" ); @@ -399,6 +400,8 @@ T GetOrAddComponent() where T : Component var c = GetOrAddComponent(); HandleEnableState( obj, c ); c.textComponent = t; + if (ShouldUpdateField("interactable")) + c.interactable = obj.GetBoolean( "interactable", true ); if ( ShouldUpdateField( "characterLimit" ) ) c.characterLimit = obj.GetInt( "characterLimit", allowUpdate ? c.characterLimit : 0 );