11

Creating an NPC That Allows Us to Change Our Appearance

A fun feature for our metaverse is to allow our users to choose an alternative appearance. This will be very easy as we will follow most of the steps in Chapter 7, Building an NPC That Allows Us to Travel. The mechanism we will build in this chapter will allow you to add multiple avatars that your users will be able to select from a custom window.

We will also modify some existing scripts to allow avatar changes to be saved to PlayerPrefs, a new concept we will learn about in this chapter, so that when a user logs in again, the previously selected avatar will be loaded.

In the following figure, you can see the final result of the NPC that we are going to build throughout this chapter. ...

Get Build Your Own Metaverse with Unity now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.