public void OnValidate() { if (this.f == null) { var f = this.Ensure <FollowObject>(); if (!f.IsNew) { Copy(f); } this.f = f; } #if UNITY_EDITOR if (!Application.isPlaying && GetComponents <FollowPlatformSettings>() .All(other => other.platform != PlatformType.None)) { var none = gameObject.AddComponent <FollowPlatformSettings>(); none.platform = PlatformType.None; } #endif }
public void OnValidate() { f = this.Ensure <FollowObject>(); }