コード例 #1
0
        public void OnEnable()
        {
            m_Constraints = serializedObject.FindProperty("m_Constraints");
            m_ShowInfo.valueChanged.AddListener(Repaint);

            m_RequiresConstantRepaint = false;

            PhysicsDebugWindow.UpdateSelectionOnComponentAdd();
        }
コード例 #2
0
        public void OnEnable()
        {
            m_Mass       = serializedObject.FindProperty("m_Mass");
            m_Immovable  = serializedObject.FindProperty("m_Immovable");
            m_UseGravity = serializedObject.FindProperty("m_UseGravity");

            m_ImplicitCom     = serializedObject.FindProperty("m_ImplicitCom");
            m_ImplicitTensor  = serializedObject.FindProperty("m_ImplicitTensor");
            m_CenterOfMass    = serializedObject.FindProperty("m_CenterOfMass");
            m_InertiaTensor   = serializedObject.FindProperty("m_InertiaTensor");
            m_InertiaRotation = serializedObject.FindProperty("m_InertiaRotation");

            m_CollisionDetectionMode = serializedObject.FindProperty("m_CollisionDetectionMode");

            m_LinearDamping  = serializedObject.FindProperty("m_LinearDamping");
            m_AngularDamping = serializedObject.FindProperty("m_AngularDamping");
            m_JointFriction  = serializedObject.FindProperty("m_JointFriction");

            m_ParentAnchorPosition  = serializedObject.FindProperty("m_ParentAnchorPosition");
            m_ParentAnchorRotation  = serializedObject.FindProperty("m_ParentAnchorRotation");
            m_AnchorPosition        = serializedObject.FindProperty("m_AnchorPosition");
            m_AnchorRotation        = serializedObject.FindProperty("m_AnchorRotation");
            m_MatchAnchors          = serializedObject.FindProperty("m_MatchAnchors");
            m_ArticulationJointType = serializedObject.FindProperty("m_ArticulationJointType");

            m_LinearX = serializedObject.FindProperty("m_LinearX");
            m_LinearY = serializedObject.FindProperty("m_LinearY");
            m_LinearZ = serializedObject.FindProperty("m_LinearZ");
            m_SwingY  = serializedObject.FindProperty("m_SwingY");
            m_SwingZ  = serializedObject.FindProperty("m_SwingZ");
            m_Twist   = serializedObject.FindProperty("m_Twist");

            m_XDrive = serializedObject.FindProperty("m_XDrive");
            m_YDrive = serializedObject.FindProperty("m_YDrive");
            m_ZDrive = serializedObject.FindProperty("m_ZDrive");

            // Info foldout
            m_ShowInfo.valueChanged.AddListener(Repaint);

            m_RequiresConstantRepaint = false;

            PhysicsDebugWindow.UpdateSelectionOnComponentAdd();
        }
コード例 #3
0
        public void OnEnable()
        {
            m_Mass        = serializedObject.FindProperty("m_Mass");
            m_Drag        = serializedObject.FindProperty("m_Drag");
            m_AngularDrag = serializedObject.FindProperty("m_AngularDrag");

            m_ImplicitCom     = serializedObject.FindProperty("m_ImplicitCom");
            m_CenterOfMass    = serializedObject.FindProperty("m_CenterOfMass");
            m_ImplicitTensor  = serializedObject.FindProperty("m_ImplicitTensor");
            m_InertiaTensor   = serializedObject.FindProperty("m_InertiaTensor");
            m_InertiaRotation = serializedObject.FindProperty("m_InertiaRotation");

            m_UseGravity         = serializedObject.FindProperty("m_UseGravity");
            m_IsKinematic        = serializedObject.FindProperty("m_IsKinematic");
            m_Interpolate        = serializedObject.FindProperty("m_Interpolate");
            m_CollisionDetection = serializedObject.FindProperty("m_CollisionDetection");
            m_Constraints        = serializedObject.FindProperty("m_Constraints");

            m_ShowInfo.valueChanged.AddListener(Repaint);

            m_RequiresConstantRepaint = false;

            PhysicsDebugWindow.UpdateSelectionOnComponentAdd();
        }