private void OnEnable() { SetOnEnable(); m = (MBow)target; UpperBn = serializedObject.FindProperty("UpperBn"); BowIsSet = serializedObject.FindProperty("BowIsSet"); knot = serializedObject.FindProperty("knot"); arrowPoint = serializedObject.FindProperty("arrowPoint"); DefaultPosKnot = serializedObject.FindProperty("DefaultPosKnot"); LowerBn = serializedObject.FindProperty("LowerBn"); UpperIndex = serializedObject.FindProperty("UpperIndex"); LowerIndex = serializedObject.FindProperty("LowerIndex"); holdTime = serializedObject.FindProperty("holdTime"); BowTension = serializedObject.FindProperty("BowTension"); MaxTension = serializedObject.FindProperty("MaxTension"); BonesFoldout = serializedObject.FindProperty("BonesFoldout"); RotUpperDir = serializedObject.FindProperty("RotUpperDir"); RotLowerDir = serializedObject.FindProperty("RotLowerDir"); //tensionLimit = serializedObject.FindProperty("tensionLimit"); if (!Application.isPlaying) { m.InitializeBow(); } EditorUtility.SetDirty(m); serializedObject.ApplyModifiedProperties(); }
private void OnEnable() { SetOnEnable(); m = (MBow)target; UpperBn = serializedObject.FindProperty("UpperBn"); BowIsSet = serializedObject.FindProperty("BowIsSet"); knot = serializedObject.FindProperty("knot"); arrowPoint = serializedObject.FindProperty("arrowPoint"); DefaultPosKnot = serializedObject.FindProperty("DefaultPosKnot"); LowerBn = serializedObject.FindProperty("LowerBn"); UpperIndex = serializedObject.FindProperty("UpperIndex"); LowerIndex = serializedObject.FindProperty("LowerIndex"); holdTime = serializedObject.FindProperty("holdTime"); BowTension = serializedObject.FindProperty("BowTension"); MaxTension = serializedObject.FindProperty("MaxTension"); BonesFoldout = serializedObject.FindProperty("BonesFoldout"); RotUpperDir = serializedObject.FindProperty("RotUpperDir"); RotLowerDir = serializedObject.FindProperty("RotLowerDir"); }
private void OnEnable() { myBow = (MBow)target; UpperBn = serializedObject.FindProperty("UpperBn"); LowerBn = serializedObject.FindProperty("LowerBn"); }