forked from BilalY/Rasagar
2.0 KiB
2.0 KiB
Entity type actions
ProBuilder provides some default "entity" behaviors. These are MonoBehaviours that provide some commonly used functionality.
Note: These actions are not available from the The ProBuilder toolbar in icon mode.
Set Trigger
The Set Trigger action assigns the Trigger Behaviour script to selected objects, which does the following:
- If no collider is present, the Trigger Behaviour script adds a MeshCollider component.
- If the collider is a Mesh Collider, the Trigger Behaviour script enables its Convex property.
- The Trigger Behaviour script enables the collider's isTrigger property.
- The Trigger Behaviour script sets the Mesh Renderer Material to ProBuilder's Trigger Material.
- The Trigger Behaviour script automatically disables the Mesh Renderer when you enter Play Mode or build your project.
Tip: You can also use the T shortcut to set the selected object(s) as a trigger, or from the ProBuilder menu (Tools > ProBuilder > Object > Set Trigger).
Set Collider
The Set Collider action assigns the Collider Behaviour script to selected objects, which does the following:
- If no collider is present, the Collider Behaviour script adds a MeshCollider component.
- The Collider Behaviour script sets the MeshRenderer Material to ProBuilder's Collider Material.
- The Collider Behaviour script automatically disables the MeshRenderer when you enter Play Mode or build your project.
Tip: You can also launch this action from the ProBuilder menu (Tools > ProBuilder > Object > Set Collider).