Setting up an AI with the Setup Manager
Last updated
Last updated
Important: The GameObject you are creating an AI with should have an Animator Component with an Avatar assigned. An Animator Controller will be created in a further step.
Note: It is recommended that no other Unity Components, other than the Animator Component, are attached to the GameObject you are creating an AI with.
The Setup Manager allows users to easily set up an AI on the desired GameObject by automatically applying all required components. There's also a list of optional components that can be selected that will add additional features and mechanics. The set up process will be finalized after the user has pressed the Setup AI button.
You can open the Setup Manager by going to Window>Emerald AI>Setup Manager or by pressing ctrl+shift+e within Unity.
You should now be able to see the Setup Manager. Look for the AI Object slot and assign the object you would like to be an AI. This object should have an Animator on it. There are text boxes that explain what every setting does and is used for.
Choose a Tag and Layer for your AI. This is dependent on your project and should be kept the same for all AI objects. In this example, we will be using the Enemy layer and tag.
Important: Ensure your tags and layers are correct. Having incorrect tags and layers can result in AI not being able to properly detect targets. These Tags and Layers will be used in another step.
Next, choose whether your AI will use Root Motion or Nav Mesh Movement. Root Motion AI will be driven by their animation's movement. Animations that use In-Place animations should use Nav Mesh Movement.
Important: Selecting the wrong option can cause AI to move incorrectly. If you are unsure what animations your AI is using, you can refer to the Animation Pack's information as it typically tells you.
Note: You can optionally assign an Animation Profile and/or a Sound Profile if you have already set them up with other AI. These will be automatically assigned during the setup process.
By default, all Required Components will be added to the AI Object. Users can choose additional components to add from the Optional Components list by checking any of the checkboxes. You can see detailed information via a tooltip for each component by putting the mouse over the ?.
Note: The Target Position Modifier component is recommended to improve targeting accuracy, however, this requires an additional step for setting up.
Note: Some Optional components require additional steps for setting up. If you are just starting out, it is recommended that you stick with the Required Components and optional Target Position Modifier.
Once you have finished doing all the above, you can press the Setup AI button at the bottom of the Setup Manager. You must have an object assigned to the AI Object slot for this button to become interactable.