using System; using UnityEngine; public class DisableOnPlatform : PlatformActive { public void Awake() { if (this.DisableOn == base.CurrentPlatform) { if (this._destroy) { UnityEngine.Object.Destroy(base.gameObject); } else { base.gameObject.SetActive(false); } } } [SerializeField] private PlatformActive.Platform DisableOn; [SerializeField] private bool _destroy; }