Impact CFX Manager
To create an Impact CFX Manager, the easiest way is to navigate to. An Impact CFX Manager game object will be created in your scene, along with several other objects and components that will likely be needed for the system to function as expected.
You can also add the Impact CFX Manager component by itself by going to.
Once you have an Impact CFX Manager, there are several properties you can edit.
- Collision Queue Capacity – The maximum number of collisions that can be processed in a single frame.
- Collision Limits – Optional limits for the different kinds of collisions. Setting limits can help prevent the Collision Capacity being used up by one particular type of collision. For example, Unity calls all OnCollisionEnter methods before OnCollisionStay, and so when a lot of collisions are happening, the Collision Capacity may get filled up before OnCollisionStay is called.
- Material Queue Capacity – The capacity of the array used to gather material data from the colliding objects. This should be at least twice as much as the Collision Queue Capacity, to allow for at least 1 material for both objects involved in a collision.
- Impact Effect Processors – These are processors used for calculating the results for specific effect types (e.g. Audio, Particle, and Decal). Processors must be present for the corresponding effect type to be played.
- Impact Material Processors – These are processors used for retrieving Impact Materials for specific object types. Processors must be present for material data to be retrieved from the corresponding object type.
- Material Mapping – The processor used for Material Mapping.
- Material Registry – The Impact Material Registry that contains the materials that should be loaded. If an Impact Material is not present in the registry, effects will not work for it.
- Don't Destroy On Load – Make this manager persist between level loads.
- Set as Active Instance – Make this manager the primary Impact CFX Manager instance on Awake.
Material Mapping allows you to map Unity's Physics Materials to Impact Materials. This is useful so that you don't necessarily have to add an Impact Object component to all of the objects in your scene.
The Impact Material Mapping Processor is responsible for handling material mapping. This component is automatically created if you used the option above, but you can manually add this component by going to .
Simply add an entry to the list, assign a Physic Material or Physics Material 2D, and assign the Impact Material it will map to.
The Capacity property defines how many materials the processor can process in a single frame. This automatically matches the Material Capacity of the Impact CFX Manager, but you can override it if you wish.