playMaker

Author Topic: Must-Have Collapse/Expand Editor Script  (Read 3749 times)

Thore

  • Sr. Member
  • ****
  • Posts: 480
Must-Have Collapse/Expand Editor Script
« on: May 02, 2019, 07:08:10 AM »
Using a lot of FSMs, as you should, means that it's a constant hassle to collapse and expand the components in the inspector. The information in FSM component in the inspector has some room for improvement, too. If you know how to access this and change it, let me know.

However, there's a great script that helps a little. It adds the function to collapse/expand all components at once.

How To Install.
1) Go here and copy the code.
2) In Project window, go to your "Editor" folder under Assets, or make one.
3) Right Click and make a C# script.
4) Copy/Paste FireMutant's script into the script.
5) Thank FireMutant in the Unity forum.

Now you can right-click on any component and use the option to collapse/expand all component at once.

Bonus Tip: holding ALT while expanding or collapsing in hierarchy will also collapse/expand all children (to expand/collapse all, you just need to do this on the scene item on top).

Cheers.
« Last Edit: May 02, 2019, 07:56:37 AM by Thore »

Adamantius

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Must-Have Collapse/Expand Editor Script
« Reply #1 on: May 10, 2019, 04:43:04 AM »
Great script, thankyou.  :)

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 772
Re: Must-Have Collapse/Expand Editor Script
« Reply #2 on: August 18, 2019, 07:56:56 PM »
Life saver. Thx!