Portrait2D

v1.0

Both Portrait3D and Portrait2D inherit from Portrait. As you might expect, one handles 3D portraits, while the other handles 2D portraits.

It's empty! On purpose!

Important: The Portrait2D has no exposed values in the Inspector.

As your game is unique, I expect you may have a need for custom code. You can create your own custom class which inherits from Portrait2D. This means that all of the scripts which look for a Portrait or Portrait2D component will find your custom class as well, and you can add whatever functionality you'd like.

Check out the Portrait Avatar - Demo 2D object, in the Portraits/Demo/Prefabs folder. This is the 2D Avatar used in the demo scene.

The prefab also has the Demo2DAvatarLoader component, which handles the spawning of the actual sprite in the portrait. Your version of will do something similar, I'd imaging, but will need to be customized by you to fit your game and your needs.

Last updated

Was this helpful?