diff --git a/Runtime/Operations/UrlProcessor.cs b/Runtime/Operations/UrlProcessor.cs index be1b4b61..291dc33c 100644 --- a/Runtime/Operations/UrlProcessor.cs +++ b/Runtime/Operations/UrlProcessor.cs @@ -11,7 +11,7 @@ public class UrlProcessor : IOperation { private const string TAG = nameof(UrlProcessor); - private const string SHORT_CODE_BASE_URL = "https://api.readyplayer.me/v1/avatars"; + private const string SHORT_CODE_BASE_URL = "https://models.readyplayer.me"; private const string GLB_EXTENSION = ".glb"; private const string JSON_EXTENSION = ".json"; private const string URL_STRING_IS_NULL = "Url string is null"; diff --git a/Samples~/AvatarLoadingSamples/AvatarLoading/AvatarLoadingExample.cs b/Samples~/AvatarLoadingSamples/AvatarLoading/AvatarLoadingExample.cs index a2db71db..3e7cae21 100644 --- a/Samples~/AvatarLoadingSamples/AvatarLoading/AvatarLoadingExample.cs +++ b/Samples~/AvatarLoadingSamples/AvatarLoading/AvatarLoadingExample.cs @@ -9,7 +9,7 @@ namespace ReadyPlayerMe.Samples public class AvatarLoadingExample : MonoBehaviour { [SerializeField][Tooltip("Set this to the URL or shortcode of the Ready Player Me Avatar you want to load.")] - private string avatarUrl = "https://api.readyplayer.me/v1/avatars/638df693d72bffc6fa17943c.glb"; + private string avatarUrl = "https://models.readyplayer.me/638df693d72bffc6fa17943c.glb"; private GameObject avatar; diff --git a/Samples~/AvatarLoadingSamples/AvatarLoading/AvatarLoadingExample.unity b/Samples~/AvatarLoadingSamples/AvatarLoading/AvatarLoadingExample.unity index 614b2795..902eb000 100644 --- a/Samples~/AvatarLoadingSamples/AvatarLoading/AvatarLoadingExample.unity +++ b/Samples~/AvatarLoadingSamples/AvatarLoading/AvatarLoadingExample.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.4465782, g: 0.49641186, b: 0.5748162, a: 1} + m_IndirectSpecularColor: {r: 0.44657832, g: 0.49641258, b: 0.57481676, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -1874,7 +1874,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5ec678a30bb724ed9999a22a9e41d8af, type: 3} m_Name: m_EditorClassIdentifier: - avatarUrl: https://api.readyplayer.me/v1/avatars/638df693d72bffc6fa17943c.glb + avatarUrl: https://models.readyplayer.me/638df693d72bffc6fa17943c.glb --- !u!114 &2024074594 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Samples~/AvatarLoadingSamples/AvatarLod/AvatarLodExample.unity b/Samples~/AvatarLoadingSamples/AvatarLod/AvatarLodExample.unity index bde693d2..b5d15b07 100644 --- a/Samples~/AvatarLoadingSamples/AvatarLod/AvatarLodExample.unity +++ b/Samples~/AvatarLoadingSamples/AvatarLod/AvatarLodExample.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657815, g: 0.49641192, b: 0.57481617, a: 1} + m_IndirectSpecularColor: {r: 0.44657826, g: 0.49641263, b: 0.57481676, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -534,7 +534,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: lodExampleUI: {fileID: 217845738} - avatarUrl: https://api.readyplayer.me/v1/avatars/638df693d72bffc6fa17943c.glb + avatarUrl: https://models.readyplayer.me/638df693d72bffc6fa17943c.glb lodConfigs: - {fileID: 11400000, guid: 99552ccf737554f2fab58e864f9416e4, type: 2} - {fileID: 11400000, guid: 1d2a8b01037e24f54b99b6aa9a51f0db, type: 2} @@ -1655,7 +1655,7 @@ MonoBehaviour: m_TargetGraphic: {fileID: 6930787863501114648} m_HandleRect: {fileID: 6930787863501114655} m_Direction: 2 - m_Value: 1 + m_Value: 0 m_Size: 1 m_NumberOfSteps: 0 m_OnValueChanged: diff --git a/Samples~/AvatarLoadingSamples/MultipleAvatarLoading/MultipleAvatarLoadingExample.cs b/Samples~/AvatarLoadingSamples/MultipleAvatarLoading/MultipleAvatarLoadingExample.cs index 5fa40c95..c618be18 100644 --- a/Samples~/AvatarLoadingSamples/MultipleAvatarLoading/MultipleAvatarLoadingExample.cs +++ b/Samples~/AvatarLoadingSamples/MultipleAvatarLoading/MultipleAvatarLoadingExample.cs @@ -14,10 +14,10 @@ public class MultipleAvatarLoadingExample : MonoBehaviour [SerializeField][Tooltip("Set this to the URL or shortcodes of the Ready Player Me Avatar you want to load.")] private string[] avatarUrls = { - "https://api.readyplayer.me/v1/avatars/638df5fc5a7d322604bb3a58.glb", - "https://api.readyplayer.me/v1/avatars/638df70ed72bffc6fa179596.glb", - "https://api.readyplayer.me/v1/avatars/638df75e5a7d322604bb3dcd.glb", - "https://api.readyplayer.me/v1/avatars/638df7d1d72bffc6fa179763.glb" + "https://models.readyplayer.me/638df5fc5a7d322604bb3a58.glb", + "https://models.readyplayer.me/638df70ed72bffc6fa179596.glb", + "https://models.readyplayer.me/638df75e5a7d322604bb3dcd.glb", + "https://models.readyplayer.me/638df7d1d72bffc6fa179763.glb" }; private List avatarList; @@ -69,7 +69,7 @@ private IEnumerator LoadAvatars(HashSet urlSet) yield return new WaitUntil(() => !loading); } } - + /// This method is called after the avatar has been loadded and setup in the scene and is used to set the position of the GameObject in the scene. private void OnAvatarLoaded(GameObject avatar) { diff --git a/Samples~/AvatarLoadingSamples/MultipleAvatarLoading/MultipleAvatarLoadingExample.unity b/Samples~/AvatarLoadingSamples/MultipleAvatarLoading/MultipleAvatarLoadingExample.unity index 8f612511..ec53a905 100644 --- a/Samples~/AvatarLoadingSamples/MultipleAvatarLoading/MultipleAvatarLoadingExample.unity +++ b/Samples~/AvatarLoadingSamples/MultipleAvatarLoading/MultipleAvatarLoadingExample.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.4465782, g: 0.49641186, b: 0.5748162, a: 1} + m_IndirectSpecularColor: {r: 0.44657832, g: 0.49641258, b: 0.57481676, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -207,7 +207,7 @@ MonoBehaviour: m_TargetGraphic: {fileID: 2143326212} m_HandleRect: {fileID: 2143326211} m_Direction: 2 - m_Value: 1 + m_Value: 0 m_Size: 1 m_NumberOfSteps: 0 m_OnValueChanged: @@ -1815,10 +1815,10 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: avatarUrls: - - https://api.readyplayer.me/v1/avatars/638df5fc5a7d322604bb3a58.glb - - https://api.readyplayer.me/v1/avatars/638df70ed72bffc6fa179596.glb - - https://api.readyplayer.me/v1/avatars/638df75e5a7d322604bb3dcd.glb - - https://api.readyplayer.me/v1/avatars/638df7d1d72bffc6fa179763.glb + - https://models.readyplayer.me/638df5fc5a7d322604bb3a58.glb + - https://models.readyplayer.me/638df70ed72bffc6fa179596.glb + - https://models.readyplayer.me/638df75e5a7d322604bb3dcd.glb + - https://models.readyplayer.me/638df7d1d72bffc6fa179763.glb --- !u!114 &2024074594 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Samples~/AvatarLoadingSamples/MultipleQualityAvatarLoading/MultipleQualityAvatarLoadingExample.cs b/Samples~/AvatarLoadingSamples/MultipleQualityAvatarLoading/MultipleQualityAvatarLoadingExample.cs index 2880a65f..9caf991d 100644 --- a/Samples~/AvatarLoadingSamples/MultipleQualityAvatarLoading/MultipleQualityAvatarLoadingExample.cs +++ b/Samples~/AvatarLoadingSamples/MultipleQualityAvatarLoading/MultipleQualityAvatarLoadingExample.cs @@ -11,7 +11,7 @@ public class MultipleQualityAvatarLoadingExample : MonoBehaviour { [SerializeField] - private string avatarUrl = "https://api.readyplayer.me/v1/avatars/638df75e5a7d322604bb3dcd.glb"; + private string avatarUrl = "https://models.readyplayer.me/638df75e5a7d322604bb3dcd.glb"; [SerializeField] private Transform qualityContainerPrefab; [SerializeField] diff --git a/Samples~/AvatarLoadingSamples/MultipleQualityAvatarLoading/MultipleQualityAvatarLoadingExample.unity b/Samples~/AvatarLoadingSamples/MultipleQualityAvatarLoading/MultipleQualityAvatarLoadingExample.unity index 68cdbd0d..d67662ae 100644 --- a/Samples~/AvatarLoadingSamples/MultipleQualityAvatarLoading/MultipleQualityAvatarLoadingExample.unity +++ b/Samples~/AvatarLoadingSamples/MultipleQualityAvatarLoading/MultipleQualityAvatarLoadingExample.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.4465782, g: 0.49641186, b: 0.5748162, a: 1} + m_IndirectSpecularColor: {r: 0.44657832, g: 0.49641258, b: 0.57481676, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -1814,7 +1814,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 224f12c77efd85442b0ee207215e2259, type: 3} m_Name: m_EditorClassIdentifier: - avatarUrl: https://api.readyplayer.me/v1/avatars/638df75e5a7d322604bb3dcd.glb + avatarUrl: https://models.readyplayer.me/638df75e5a7d322604bb3dcd.glb qualityContainerPrefab: {fileID: 1853687888834283808, guid: 7e49cdc951d802d4d9bfdf45578ca7f8, type: 3} avatarConfigs: diff --git a/Tests/Editor/AvatarAPITests.cs b/Tests/Editor/AvatarAPITests.cs index 06a3c57b..9c28dd61 100644 --- a/Tests/Editor/AvatarAPITests.cs +++ b/Tests/Editor/AvatarAPITests.cs @@ -11,7 +11,7 @@ namespace ReadyPlayerMe.Core.Tests { public class AvatarAPITests { - private const string AVATAR_API_AVATAR_URL = "https://api.readyplayer.me/v1/avatars/638df693d72bffc6fa17943c.glb"; + private const string AVATAR_API_AVATAR_URL = "https://models.readyplayer.me/638df693d72bffc6fa17943c.glb"; private const int TEXTURE_SIZE_LOW = 256; private const int TEXTURE_SIZE_MED = 512; private const int TEXTURE_SIZE_HIGH = 1024; diff --git a/Tests/Editor/AvatarUriProcessTests.cs b/Tests/Editor/AvatarUriProcessTests.cs index c2b43ae3..3c12c4c7 100644 --- a/Tests/Editor/AvatarUriProcessTests.cs +++ b/Tests/Editor/AvatarUriProcessTests.cs @@ -6,28 +6,28 @@ namespace ReadyPlayerMe.Core.Tests public class AvatarUriProcessTests { private const string GUID = "633af24a573a46702919320f"; - private const string GUID_URL = "https://api.readyplayer.me/v1/avatars/633af24a573a46702919320f.glb"; + private const string GUID_URL = "https://models.readyplayer.me/633af24a573a46702919320f.glb"; private const string SHORT_CODE = "DDBWOI"; - private const string SHORT_CODE_URL = "https://api.readyplayer.me/v1/avatars/DDBWOI.glb"; + private const string SHORT_CODE_URL = "https://models.readyplayer.me/DDBWOI.glb"; - private const string RANDOM_PARAM_HASH = "123456789"; + private const string RANDOM_PARAM_HASH = "123456789"; private readonly AvatarUri expectedShortcodeUri = new AvatarUri { Guid = SHORT_CODE, - ModelUrl = $"{TestUtils.API_URL_PREFIX}{SHORT_CODE}{TestUtils.GLB_SUFFIX}", + ModelUrl = $"{TestUtils.MODELS_URL_PREFIX}{SHORT_CODE}{TestUtils.GLB_SUFFIX}", LocalModelPath = $"{DirectoryUtility.GetAvatarSaveDirectory(SHORT_CODE, RANDOM_PARAM_HASH)}/{SHORT_CODE}{TestUtils.GLB_SUFFIX}", - MetadataUrl = $"{TestUtils.API_URL_PREFIX}{SHORT_CODE}{TestUtils.JSON_SUFFIX}", + MetadataUrl = $"{TestUtils.MODELS_URL_PREFIX}{SHORT_CODE}{TestUtils.JSON_SUFFIX}", LocalMetadataPath = $"{DirectoryUtility.GetAvatarSaveDirectory(SHORT_CODE)}{SHORT_CODE}{TestUtils.JSON_SUFFIX}" }; private readonly AvatarUri expectedUri = new AvatarUri { Guid = GUID, - ModelUrl = $"{TestUtils.API_URL_PREFIX}{GUID}{TestUtils.GLB_SUFFIX}", + ModelUrl = $"{TestUtils.MODELS_URL_PREFIX}{GUID}{TestUtils.GLB_SUFFIX}", LocalModelPath = $"{DirectoryUtility.GetAvatarSaveDirectory(GUID, RANDOM_PARAM_HASH)}/{GUID}{TestUtils.GLB_SUFFIX}", - MetadataUrl = $"{TestUtils.API_URL_PREFIX}{GUID}{TestUtils.JSON_SUFFIX}", + MetadataUrl = $"{TestUtils.MODELS_URL_PREFIX}{GUID}{TestUtils.JSON_SUFFIX}", LocalMetadataPath = $"{DirectoryUtility.GetAvatarSaveDirectory(GUID)}{GUID}{TestUtils.JSON_SUFFIX}" };