initial upload
This commit is contained in:
19
Verhandeln2.0/Assets/Scripts/AvatarLoader.cs
Normal file
19
Verhandeln2.0/Assets/Scripts/AvatarLoader.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
using ReadyPlayerMe.Core;
|
||||
|
||||
public class MyAvatarLoader : MonoBehaviour
|
||||
{
|
||||
[Tooltip("Avatar URL von Ready Player Me")]
|
||||
public string avatarUrl = "https://models.readyplayer.me/YOUR-ID/avatar.glb";
|
||||
|
||||
void Start()
|
||||
{
|
||||
var loader = new AvatarObjectLoader();
|
||||
loader.OnCompleted += (_, args) =>
|
||||
{
|
||||
args.Avatar.transform.position = Vector3.zero;
|
||||
Debug.Log("Avatar geladen!");
|
||||
};
|
||||
loader.LoadAvatar(avatarUrl);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user