Beispiel #1
0
 public void FinalizeInspectorGUI()
 {
     this.ShowColliderInfoProperties();
     this.CheckColliderErrorState();
     if (base.targets.Length == 1)
     {
         Collider2D collider2D = base.target as Collider2D;
         if (collider2D.isActiveAndEnabled && collider2D.composite == null && this.m_UsedByComposite.boolValue)
         {
             EditorGUILayout.HelpBox("This collider will not function with a composite until there is a CompositeCollider2D on the GameObject that the attached Rigidbody2D is on.", MessageType.Warning);
         }
     }
     Effector2DEditor.CheckEffectorWarnings(base.target as Collider2D);
 }
        public override void OnInspectorGUI()
        {
            Collider2D collider2D = this.target as Collider2D;

            base.serializedObject.Update();
            this.m_ShowDensity.target = (collider2D.attachedRigidbody && collider2D.attachedRigidbody.useAutoMass);
            if (EditorGUILayout.BeginFadeGroup(this.m_ShowDensity.faded))
            {
                EditorGUILayout.PropertyField(this.m_Density, new GUILayoutOption[0]);
            }
            EditorGUILayout.EndFadeGroup();
            base.serializedObject.ApplyModifiedProperties();
            base.OnInspectorGUI();
            this.CheckColliderErrorState();
            Effector2DEditor.CheckEffectorWarnings(this.target as Collider2D);
        }
Beispiel #3
0
        public void FinalizeInspectorGUI()
        {
            ShowColliderInfoProperties();

            // Check for collider error state.
            CheckColliderErrorState();

            // If used-by-composite is enabled but there is not composite then show a warning.
            if (targets.Length == 1)
            {
                var collider = target as Collider2D;
                if (collider.isActiveAndEnabled && collider.composite == null && m_UsedByComposite.boolValue)
                {
                    EditorGUILayout.HelpBox("This collider will not function with a composite until there is a CompositeCollider2D on the GameObject that the attached Rigidbody2D is on.", MessageType.Warning);
                }
            }

            // Check for effector warnings.
            Effector2DEditor.CheckEffectorWarnings(target as Collider2D);
        }
 public override void OnInspectorGUI()
 {
     base.OnInspectorGUI();
     this.CheckColliderErrorState();
     Effector2DEditor.CheckEffectorWarnings(this.target as Collider2D);
 }
 public void FinalizeInspectorGUI()
 {
     this.ShowColliderInfoProperties();
     this.CheckColliderErrorState();
     Effector2DEditor.CheckEffectorWarnings(base.target as Collider2D);
 }
 public void CheckAllErrorsAndWarnings()
 {
     this.CheckColliderErrorState();
     Effector2DEditor.CheckEffectorWarnings(this.target as Collider2D);
 }