Input Provider Generator Tool Documentation
The Input Provider Generator tool is designed to help you easily create a script that connects the AI-controlled inputs from Omni Vehicle AI to your custom vehicle controller. This tool allows you to automate the generation of input provider scripts, saving time and minimizing the need for manual coding.
Accessing the Tool
- In Unity, go to the menu bar.
- Navigate to Tools > Ash Assets > Omni Vehicle AI > Input Provider Generator.
- Select Input Provider Generator to open the tool window.
Using the Tool
Once the Input Provider Generator window is open, you’ll see several sections that guide you through configuring and generating the script.
1. Vehicle Controller Selection
- Description: This field allows you to select the vehicle controller script or MonoBehaviour component that you want to connect to the AI inputs.
- How to Use: Click on the field labeled Vehicle Controller (Script or Component) and either:
- Drag and drop the MonoBehaviour component of your vehicle controller from the hierarchy.
- Select a MonoScript asset from your project that represents your vehicle controller.
- Note: Ensure the selected script is a valid MonoBehaviour; otherwise, the tool will display an error message.
2. Input Mode Selection
- Description: Choose how the generated script should handle input values for your vehicle controller.
- Options:
- Direct: Connects the AI inputs directly to public float fields on the vehicle controller.
- Separate Methods: Connects each AI input to separate methods (one method for each input).
- Single Method: Connects all AI inputs to a single method with multiple parameters.
- How to Use: Select an input mode from the dropdown labeled Input Mode.