diff --git a/.gitignore b/.gitignore index 94c8b55..19732e3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ .DS_Store .AppleDouble .LSOverride - +.idea # Icon must end with two \r Icon diff --git a/Runtime/Scripts/SBCustomTypeAttribute.cs b/Runtime/Scripts/SBCustomTypeAttribute.cs index eedaacf..fe30bce 100644 --- a/Runtime/Scripts/SBCustomTypeAttribute.cs +++ b/Runtime/Scripts/SBCustomTypeAttribute.cs @@ -1,4 +1,5 @@ -using UnityEngine; +#if UNITY_EDITOR +using UnityEngine; using System; using System.Collections; @@ -20,6 +21,4 @@ public SBCustomTypeAttribute(string conditionalSourceField, bool inverse) } } - - - +#endif \ No newline at end of file diff --git a/Runtime/Scripts/SBCustomTypePropertyDrawer.cs b/Runtime/Scripts/SBCustomTypePropertyDrawer.cs index 0078679..6e663c8 100644 --- a/Runtime/Scripts/SBCustomTypePropertyDrawer.cs +++ b/Runtime/Scripts/SBCustomTypePropertyDrawer.cs @@ -1,4 +1,6 @@ -using UnityEngine; +#if UNITY_EDITOR + +using UnityEngine; using UnityEditor; using System.Collections.Generic; @@ -86,3 +88,4 @@ private bool GetConditionalHideAttributeResult(SBCustomTypeAttribute condHAtt, S return enabled; } } +#endif \ No newline at end of file diff --git a/Runtime/Scripts/SpacebrewClient.cs b/Runtime/Scripts/SpacebrewClient.cs index 5a271ba..48588a8 100644 --- a/Runtime/Scripts/SpacebrewClient.cs +++ b/Runtime/Scripts/SpacebrewClient.cs @@ -26,7 +26,9 @@ public class Publisher { public string name; public type pubType; +#if UNITY_EDITOR [SBCustomType("pubType", false)] +#endif public string customType; //public string defaultValue; @@ -50,7 +52,9 @@ public class Subscriber { public string name; public type subType; +#if UNITY_EDITOR [SBCustomType("subType", false)] +#endif public string customType; public SpacebrewMessageEvent onReceived;