Create Characters

First, Create The Data

To create 'characters' you need to create a new DataEntity that derives from ProdigyAgentDefinition. In Prodigy all characters have need this class as it defines a bunch of properties and this are referred to by all of the other classes that make Agents work.

You can refer to the demo for a good starting point on these, as the demo characters are already setup and ready to go.

Create The Prefab

After you've got a definition ready to go you can move on to the prefab setup. The easiest way to do this is to take an existing character and swap some things out like this:

  • Duplicate a character prefab.

  • Change the AgentDefinition field on the ProdigyAgent component to your new definition you made.

  • Delete the 3d model sub object.

  • Drag in your new 3d model and place it at 0,0,0.

  • Delete the Animator component from that model object.

  • On the prefab main object, change the Animator's Avatar to your character's Avatar.

  • Create Weapon Mount Objects in the hands, or whatever appendages your character has.

    • This is basically just a GameObject in each hand with Z pointing down the hand and Y pointing up like the thumb. Weapons are mounted directly onto these objects. Assign the Equipment component's mount fields to these objects you just made.

  • Assign ragdoll rigidbodies and colliders as needed in the DeathHandler component.

    • HINT: You can lock the inspector on your component stack, filter the model hierarchy for t:rigidbody, then drag them all directly into the array.

You can now assign it as your Player's preferred avatar and go shoot things. Hurray! You can find more specific information in the subsections here.

Last updated