Getting Started with Muse Behavior
This page will help you get started with the Muse Behavior, from setting up the package to adding an AI behavior graph to your project.
Adding the Muse Behavior package to your project
The Muse Behavior package is available on the Unity package manager and can be added by name.
In your Unity project:
Open the Package Manager (top toolbar: Window > Package Manager)
In the Package Manager window, click the Add button and select "Install package by name..."
Into the pop-up window, type "com.unity.muse.behavior" (without quotes) and click the "Install" button.
You now have the Muse Behavior package in your project! You can confirm that by checking that the Muse Behavior is shown in your Packages list:
Adding the sample
It is recommended that you add the Muse Behavior sample as a starting point. The sample includes a demo scene and a few example actions that'll help you get started.
In the Package Manager:
- Select the Muse Behavior in the packages list.
- Click on the Samples tab.
- Click Import on the right of the Muse Behavior Example.
You can now open the sample scene located at Assets > Samples > Muse Behavior > [Version Number] > Muse Behavior Example > Scenes > SampleScene.
In addition to the sample scene you'll also now have some useful actions that can be added in your project. For more about the sample specifically, see the Sample Scene Guide.
Using Generative AI features
In order to use generative AI features, please follow these steps:
- Register with your email at this link and select Muse Behavior as a product of interest.
- You will receive an email informing you that you have been invited to Muse Behavior. Once invited, you will be able to use generative AI features.
You can generate branches from text:
- Right-click anywhere on the graph and select "Generate Branch from Text".
- Enter a descriptive prompt representing the desired behavior and click "Generate".
- Make corrections if needed, or click close to use your branch. Congrats, you have made your first branch with AI!
Generating Branches with AI enables you to create simple behaviors with ease. It will also automatically assign the corresponding Blackboard Variables and local variables to the nodes.
You can also generate new actions with AI.
- Right-click anywhere on the graph and select Create New -> Action.
- Enter the name of the action and press "Next".
- Enter a description and set the parameters of the action.
- Click on the "Use Generative AI" button.
- Enter a descriptive prompt for the desired action and click "Create with AI".
- Save the generated C# file in your project folder.
- Check the generated code and make corrections if needed.
- Use the action in your own graph!
The more accurately you describe your action in the prompt, the better results you will get. Note: It knows about the DoTween library, so if you have it in your project, feel free to suggest it to the AI.