Rule Sets, Rules and Pixyz Actions 
Warning
This page details the use of Rule Sets, Rules & Pixyz Actions. For more information on how to use Piyxz 3 and import CADs, please see Importing CAD models page.
Pixyz Actions are introduced in Pixyz Plugin for Unity 3.0+.
We support Pixyz plugin for Unity (v3.0.3+) starting from INTERACT 24.12. You can now install it directly from your Interact project by clicking INTERACT > Import > CAD model
. It will install the recommended version for Interact. Otherwise, you can install it via the Unity Package Manager: com.unity.industry.toolkit.

Pixyz plugin for unity 3.0+ introduce a new way to customize model import. Before generating prefab from your imported model, you can choose a RuleSet to execute on generation. A RuleSet contains one or more Rules, each containing Actions.
Interact Custom Rule Set
Interact provides its own Rule Set designed to match pixyz 2.0 behaviour. However, you can add other rules and/or actions. See corresponding sections for more details. RuleSets | Rules | Actions
Rule Sets
A RuleSet is a set of Rules defining a list of actions to execute. This execution either occurs when generating a prefab from a model ("Import" button visible from CAD Scriptable Object
's RuleEngine (see Importing CAD models)) or when manually running the RuleSet ("Run" button" visible in the Inspector when selecting the RuleSet). In the first case, the input is the model. In the second, the input is the current scene.
Create a Rule Set
To create a RuleSet, you can either:
- click
Assets > Create > Pixyz > Rule Set
- click
Right Click > Create > Pixyz > Rule Set
- click "New" or "Clone" button located in the RuleEngine of a
CAD Scriptable Object
. The field next to these button is where to change the RuleSet to run when clicking "Import" button.
Edit your Rule Set
In this documentation, we consider editing a new RuleSet from the Rule Set's inspector, not from the Rule Engine. Although the labels of the button might slightly differ, the workflow is very similar and applicable to the RuleEngine's inspector.
After selecting your new Rule Set, click "Create Rule" button. This will open a new tab, next to the Inspector tab. Click "Add Rule". You should now have a Rule with one "Get" action in it.
Rules
In a single Rule Set, you can have several Rules. Each rule will have the same input (the whole model or the whole scene). You can add Rules by clicking "Add Rule" button. You can duplicate, remove, rename or rearrange rules using the three dots on the top right corner of each rule.
Actions
Pixyz contains built-in actions to filter, modify, ... GameObjects. Interact comes with a few of its own custom actions. Most of them are "InOutActions", meaning they take into account the output of previous action AND outputs a result (not necessarily different from input).
Pixyz Actions
Pixyz built-in actions are divided in several groups:
- Get/Filter: Performs selection on the GameObjects. Modifies the selection in order to perform action on it after.
- Add/Set: Adds GameObjects to the selection or sets component properties.
- Mesh/Material: Perform modification on mesh/materials.
- Collider: Add/Remove collider to GameObjects.
- And more...
For more details, see Pixyz documentation about Built-in actions.
Bugs with Pixyz 3.0.3 and 3.0.5
In version 3.0.3, some built-in action don't work or don't work properly. They seem fixed in version 3.0.5, but it appears this version does not handle properly custom actions. For instance, FilterOnMetadata
do not work and SetMaterial
appear to throw error (even though the action is still well performed).
Interact Custom Actions
Interact comes with its own custom actions. They all have tooltips to help use them properly (to show them, hover any property of the action, or the question mark (?) in the top right corner of every action.)
- Override Shader: Modify the shader of each mesh in the GameObject. This is designed to allow cross section view.
-
Load Prefab to Scene: Automatically load the generated prefab in the scene once the RuleSet is completed.
-
Physicalize Objects: Physicalize all filtered GameObjects.
- Filter on Mesh Topology: Filter selection to keep either only the selected mesh topology or all topologies except the one selected.
- Group Parts: Group all filtered GameObjects under a single parent.
Create your own Custom Actions
Scripting required
In order to create your own actions, you will need to write C# code.
You can create your own Actions. For more information, see Pixyz documentation.
Examples
Here is an example of how you can mix Built-in and Interact Pixyz actions to create complex automatic workflow. We are importing the following fbx:
We are going to put 4 rules in the ruleset:
- Set PACK_BATTERY GameObject & children as Static (built-in actions)
- Delete the wires by deleting WIRE_ELECTRIC GameObject & children (built-in actions)
- Delete remaining wires by deleting COOLING_SYSTEM GameObject & children (built-in actions)
- Regroup & Physicalize the Engine GameObjects (Weldable Joint) (Interact actions)
And here is the result:
As you can see, cables are gone, all the physicalized GameObjects are regrouped under one parent and have a WeldableJoint component, and the PACK_BATTERY GameObjects are set as static: