Playmaker Forum

PlayMaker Help & Tips => PlayMaker Tips & Tricks => Topic started by: Thore on May 02, 2019, 04:08:10 AM

Title: Must-Have Collapse/Expand Editor Script
Post by: Thore on May 02, 2019, 04: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  (https://forum.unity.com/threads/expand-collapse-all-components-in-a-gameobject-refresh-issue.517866/)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.
Title: Re: Must-Have Collapse/Expand Editor Script
Post by: Adamantius on May 10, 2019, 01:43:04 AM
Great script, thankyou.  :)
Title: Re: Must-Have Collapse/Expand Editor Script
Post by: Broken Stylus on August 18, 2019, 04:56:56 PM
Life saver. Thx!