예제 #1
0
        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();
        }
예제 #2
0
 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");
 }
예제 #3
0
 private void OnEnable()
 {
     myBow   = (MBow)target;
     UpperBn = serializedObject.FindProperty("UpperBn");
     LowerBn = serializedObject.FindProperty("LowerBn");
 }