From 0675266fac2d1b9b1af9b89b5830bc7efedfed21 Mon Sep 17 00:00:00 2001 From: yum Date: Wed, 19 Feb 2025 02:24:48 -0800 Subject: Fix upload Scripts must be wrapped in `#if UNITY_EDITOR` or build shits the bed. Also document config structs. --- YOTSNDMFConfig.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'YOTSNDMFConfig.cs') diff --git a/YOTSNDMFConfig.cs b/YOTSNDMFConfig.cs index baf92b8..0609d18 100644 --- a/YOTSNDMFConfig.cs +++ b/YOTSNDMFConfig.cs @@ -1,11 +1,22 @@ +#if UNITY_EDITOR + using UnityEngine; +using nadena.dev.ndmf; using VRC.SDK3.Avatars.ScriptableObjects; namespace YOTS { + [DisallowMultipleComponent] public class YOTSNDMFConfig : MonoBehaviour { [Tooltip("The JSON configuration file.")] public TextAsset jsonConfig; + + void OnValidate() + { + gameObject.tag = "EditorOnly"; + } } } + +#endif // UNITY_EDITOR -- cgit v1.2.3