28. Improved Add Component Button

  04. Features No Comments

Smarter Require Component

With the help of two new attributes RequireComponents and RequireAnyComponent, you can specify complex requirement relationships between your components.
Both attributes also support using specify requirements in the form of interfaces and abstract classes, helping you write better, more decoupled and reliable code.

When the user tries to add a component to a GameObject that requires one of several possible components, and none of them are already found on the GameObject, then user will be prompted to select which component to add.

You no longer have to worry about cyclic component requirements preventing you from removing components either.
Power Inspector is smart enough to gather up all required components and to ask you if you want to remove them all, when you try to delete a component with requirements.

Hideable

It is possible to hide the Add Component button in Power Inspector.

This can be achieved by adding the OnlyComponent attribute to a component on the GameObject on which you want to hide the button.

Quick Add Menu

You can right-click the Add Component button to open a new context menu called the Quick Add Menu.
This menu will display a list of the last 10 components that you’ve added to your GameObjects using the Add Component button.
Click one of the items to add it to the target GameObject.

 

 

See also: Create Script Wizard