예제 #1
0
 public override sealed void OnInspectorGUI()
 {
     foreach (var targ in targets)
     {
         var anchoredJoint = (AnchoredJoint2DExt)targ;
         anchoredJoint.SetConnectedAnchorEditor();
     }
     Phys2DEditorHelpers.DrawDefaultInspector(serializedObject);
 }
        public override sealed void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            foreach (var targ in targets)
            {
                ((DistanceJointBase2DExt)targ).SetDistanceEditor();
            }

            Phys2DEditorHelpers.DrawDefaultInspector(serializedObject, "m_BreakTorque");
        }
예제 #3
0
 public override sealed void OnInspectorGUI()
 {
     Phys2DEditorHelpers.DrawDefaultInspector(serializedObject, "m_BreakForce");
     foreach (var targ in targets)
     {
         var    angleJoint = (AngleJoint2DExt)targ;
         string error;
         if (!angleJoint.ValidateAngleJoint(out error))
         {
             EditorGUILayout.HelpBox(error, MessageType.Error);
         }
     }
 }
예제 #4
0
 public override sealed void OnInspectorGUI()
 {
     Phys2DEditorHelpers.DrawDefaultInspector(serializedObject, "m_ConnectedRigidBody");
     foreach (var targ in targets)
     {
         var    gearJoint = (GearJoint2DExt)targ;
         string error;
         if (!gearJoint.ValidateJoints(out error))
         {
             EditorGUILayout.HelpBox(error, MessageType.Error);
         }
     }
 }
예제 #5
0
        public override void OnGUI(Rect position, SerializedProperty prop, GUIContent label)
        {
            var typeAttr = attribute as BitMaskAttribute;

            // Add the actual int value behind the field name
            if (prop.hasMultipleDifferentValues)
            {
                label.text += "*";
            }

            bool changed = GUI.changed;

            GUI.changed = false;

            int v = Phys2DEditorHelpers.DrawBitMaskField(position, prop.intValue, typeAttr.propertyType, label);

            if (GUI.changed)
            {
                prop.intValue = v;
            }

            GUI.changed = changed;
        }
예제 #6
0
 public override sealed void OnInspectorGUI()
 {
     Phys2DEditorHelpers.DrawDefaultInspector(serializedObject);
 }