ResetAvatarBody
Method
Reset the avatar body asset to what the user has set in their profile if it was overridden with SetAvatarBody
.
Definition
void ResetAvatarBody()
void ResetAvatarBody()
Examples
public void ChangeAvatarBody()
{
// Change the user's avatar to an embedded asset avatar
SpatialBridge.actorService.localActor.avatar.SetAvatarBody(AssetType.EmbeddedAsset, "OgreAvatar");
// Change the user's avatar to a Spatial Studio avatar
SpatialBridge.actorService.localActor.avatar.SetAvatarBody(AssetType.Package, "ITEM_ID_FROM_SPATIAL_STUDIO");
// Reset the user's avatar to the default
SpatialBridge.actorService.localActor.avatar.ResetAvatarBody();
}
public void ChangeAvatarBody()
{
// Change the user's avatar to an embedded asset avatar
SpatialBridge.actorService.localActor.avatar.SetAvatarBody(AssetType.EmbeddedAsset, "OgreAvatar");
// Change the user's avatar to a Spatial Studio avatar
SpatialBridge.actorService.localActor.avatar.SetAvatarBody(AssetType.Package, "ITEM_ID_FROM_SPATIAL_STUDIO");
// Reset the user's avatar to the default
SpatialBridge.actorService.localActor.avatar.ResetAvatarBody();
}