Unity SDK 4.0.0 Migration guide
Last updated
Last updated
For some time, we have been developing the Avatar Creator as a separate project due to its initial readiness level, which required its own versioning and release cycle. Now that the Avatar Creator has been launched, we are integrating it into the core. This consolidation will simplify its utilization for developers.
We also decided to remove the auto-replacement of the avatars in the scene, when the avatar with the same ID was already in the scene to give you more freedom in avatar management.
Follow these steps if you have been using Avatar Creator and its sample.
It is recommended that you back up your project before updating to the new Unity SDK if you are not using source control.
Using the Unity package manager remove the avatar creator and delete the imported sample.
To update the core, navigate to the Ready Player Menu and select the ‘Check for Updates’ option. A confirmation prompt will appear to verify the update.
Once the core has been imported, you can proceed to import the ‘AvatarCreatorSamples’ from the samples in package manager.
This requires the configuration of the App ID in settings. You can obtain the App ID from your studio account.
In 4.0 the AvatarProcessor
no longer automatically finds and removes avatars with a particular ID. This was done as both an optimization but also to make our system more flexible. Now developers can handle avatar loading and removal however they like.
If your project uses AvatarProcessor
or AvatarObjectLoader
classes in your implementation you will need to make sure, that the avatar is cleared after loading.
In previous versions, the following code would automatically remove the previous avatar GameObject, if it existed in the scene:
The simplest way to add this feature back is by adding a similar functionality to the AvatarObjectLoader.OnCompleted method. For example