using System; using kt.Serialization; using UnityEngine; namespace kt.Physics { [Serializable] public class NativeColliderStatus : ASerializationVersionControl { public override int FixVersion { get { return 1000; } } public override void OnBeforeSerialize() { base.OnBeforeSerialize(); if (this.onBeforeSerialize != null) { this.onBeforeSerialize(); } } public override void OnAfterDeserialize() { base.OnAfterDeserialize(); if (this.onAfterDeserialize != null) { this.onAfterDeserialize(); } } [ReadOnly] public NativeColliderStatus.ColliderType colliderType; [HideInInspector] public string parentName; [HideInInspector] public string name; [HideInInspector] public Vector3 localPosition = Vector3.zero; [HideInInspector] public Quaternion localRotation = Quaternion.identity; [HideInInspector] public Vector3 localScale = Vector3.one; public Vector3 center = Vector3.zero; public NativeColliderStatus.Bound bound; [NonSerialized] public Action onBeforeSerialize; [NonSerialized] public Action onAfterDeserialize; public enum ColliderType { Plane, Capsule, Sphere, MaidPropCol } public enum Bound { Outside, Inside } } }