Skip to content

Commit

Permalink
layer overrides added
Browse files Browse the repository at this point in the history
  • Loading branch information
jetdog8808 committed Apr 23, 2024
1 parent bd051dc commit 7cad4dc
Show file tree
Hide file tree
Showing 3 changed files with 839 additions and 581 deletions.
23 changes: 21 additions & 2 deletions Editor/AvatarArmatureColliderSystemEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ public class AvatarArmatureColliderSystemEditor : Editor
{
#region Fields
SerializedProperty getLocalUserProperty;
SerializedProperty colliderIsTriggerProperty;
SerializedProperty colliderLayerProperty;
SerializedProperty colliderIsTriggerProperty;

bool layerOverrideDropdown = false;
SerializedProperty includeLayersProperty;
SerializedProperty excludeLayersProperty;


bool enabledSectionsDropdown = false;
SerializedProperty fingerColliderEnableProperty,
Expand Down Expand Up @@ -63,8 +68,10 @@ public class AvatarArmatureColliderSystemEditor : Editor
private void OnEnable()
{
getLocalUserProperty = serializedObject.FindProperty("getLocalUser");
colliderIsTriggerProperty = serializedObject.FindProperty("_colliderIsTrigger");
colliderLayerProperty = serializedObject.FindProperty("_colliderLayer");
colliderIsTriggerProperty = serializedObject.FindProperty("_colliderIsTrigger");
includeLayersProperty = serializedObject.FindProperty("_includeLayers");
excludeLayersProperty = serializedObject.FindProperty("_excludeLayers");

fingerColliderEnableProperty = serializedObject.FindProperty("_fingerColliderEnable");
handColliderEnableProperty = serializedObject.FindProperty("_handColliderEnable");
Expand Down Expand Up @@ -139,6 +146,18 @@ public override void OnInspectorGUI()
EditorGUILayout.PropertyField(colliderIsTriggerProperty);
colliderLayerProperty.intValue = EditorGUILayout.LayerField("Layer", colliderLayerProperty.intValue);

layerOverrideDropdown = EditorGUILayout.BeginFoldoutHeaderGroup(layerOverrideDropdown, "Layer Overrides");

if (layerOverrideDropdown)
{
EditorGUILayout.PropertyField(includeLayersProperty);
EditorGUILayout.PropertyField(excludeLayersProperty);
}

EditorGUILayout.EndFoldoutHeaderGroup();

EditorGUILayout.Space();

enabledSectionsDropdown = EditorGUILayout.BeginFoldoutHeaderGroup(enabledSectionsDropdown, "Enabled collider sections");

if (enabledSectionsDropdown)
Expand Down
Loading

0 comments on commit 7cad4dc

Please sign in to comment.