示例#1
0
        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
        }
示例#2
0
 public void OnValidate()
 {
     f = this.Ensure <FollowObject>();
 }