Created
December 24, 2023 03:55
-
-
Save solsnare/3ccb2c9669b138a6cdbae5fe44cb8a97 to your computer and use it in GitHub Desktop.
Simple Component Grouping tool for Unity. Helps organize your inspector!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Made by Soltar @sullysaysyes on twitter | |
using UnityEngine; | |
public class ComponentGroup : MonoBehaviour | |
{ | |
// Start is called before the first frame update | |
public string Name = "GROUP NAME"; | |
public Component[] _componentsInGroup = null; | |
public bool _showGroup = false; | |
private void OnValidate() | |
{ | |
foreach(var c in _componentsInGroup) | |
{ | |
c.hideFlags = (_showGroup) ? HideFlags.None : HideFlags.HideInInspector; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment