From c71e31e4f72d6c10e7204922249b7b1aa01b1a4d Mon Sep 17 00:00:00 2001 From: Robin <1121080+rYuuk@users.noreply.github.com> Date: Tue, 7 Nov 2023 14:13:36 +0100 Subject: [PATCH] feat: refactor and clean up --- Runtime/Data/AvatarRenderSettings.cs | 34 +- Runtime/Data/Enums.cs | 36 +- Runtime/Utils/RenderSceneHelper.cs | 39 - Runtime/Utils/RenderSettingsHelper.cs | 31 + ...r.cs.meta => RenderSettingsHelper.cs.meta} | 0 .../MultipleAvatarRenderExample.cs | 78 -- .../MultipleAvatarRenderExample.cs.meta | 11 - .../MultipleRenders/RenderPanel.cs | 12 +- .../AvatarRenderSamples/SingleRender.meta | 8 - .../SingleRender/AvatarRenderExample.cs | 59 -- .../SingleRender/AvatarRenderExample.cs.meta | 11 - .../SingleRender/AvatarRenderExample.unity | 752 ------------------ .../AvatarRenderExample.unity.meta | 7 - 13 files changed, 59 insertions(+), 1019 deletions(-) delete mode 100644 Runtime/Utils/RenderSceneHelper.cs create mode 100644 Runtime/Utils/RenderSettingsHelper.cs rename Runtime/Utils/{RenderSceneHelper.cs.meta => RenderSettingsHelper.cs.meta} (100%) delete mode 100644 Samples~/AvatarRenderSamples/MultipleRenders/MultipleAvatarRenderExample.cs delete mode 100644 Samples~/AvatarRenderSamples/MultipleRenders/MultipleAvatarRenderExample.cs.meta delete mode 100644 Samples~/AvatarRenderSamples/SingleRender.meta delete mode 100644 Samples~/AvatarRenderSamples/SingleRender/AvatarRenderExample.cs delete mode 100644 Samples~/AvatarRenderSamples/SingleRender/AvatarRenderExample.cs.meta delete mode 100644 Samples~/AvatarRenderSamples/SingleRender/AvatarRenderExample.unity delete mode 100644 Samples~/AvatarRenderSamples/SingleRender/AvatarRenderExample.unity.meta diff --git a/Runtime/Data/AvatarRenderSettings.cs b/Runtime/Data/AvatarRenderSettings.cs index aeebb546..0b84c43d 100644 --- a/Runtime/Data/AvatarRenderSettings.cs +++ b/Runtime/Data/AvatarRenderSettings.cs @@ -4,30 +4,6 @@ namespace ReadyPlayerMe.Core { - public enum Expression - { - None, - Happy, - Lol, - Sad, - Scared, - Rage, - } - - public enum RenderPose - { - Relaxed, - PowerStance, - Standing, - ThumbsUp, - } - - public enum RenderCamera - { - Portrait, - FullBody - } - [System.Serializable] public struct BlendShape { @@ -63,7 +39,7 @@ public string GetParametersAsString() queryBuilder.AddKeyValue(nameof(Core.Expression).ToCamelCase(), Expression.ToString().ToCamelCase()); } - queryBuilder.AddKeyValue(nameof(Pose).ToCamelCase(), RenderSceneHelper.RenderPoseMap[Pose]); + queryBuilder.AddKeyValue(nameof(Pose).ToCamelCase(), RenderSettingsHelper.RenderPoseMap[Pose]); foreach (var blendShape in BlendShapes) { @@ -90,15 +66,11 @@ public string GetParametersAsString() if (!IsTransparent) { - queryBuilder.AddKeyValue(nameof(Background).ToCamelCase(), FloatToRGB(Background)); + queryBuilder.AddKeyValue(nameof(Background).ToCamelCase(), RenderSettingsHelper.FloatToRGBString(Background)); } return queryBuilder.Query; } - - public static string FloatToRGB(Color color) - { - return $"{(int) (color.r * 255)},{(int) (color.g * 255)},{(int) (color.b * 255)}"; - } + } } diff --git a/Runtime/Data/Enums.cs b/Runtime/Data/Enums.cs index 97dd119e..bb330ee3 100644 --- a/Runtime/Data/Enums.cs +++ b/Runtime/Data/Enums.cs @@ -34,18 +34,6 @@ public enum MeshType TeethMesh } - /// - /// This enumeration describes the different render scene options. - /// - public enum AvatarRenderScene - { - [Description("Upper body render")] FullbodyPortrait, - [Description("Upper body render")] HalfbodyPortrait, - [Description("Upper body render with transparent background")] FullbodyPortraitTransparent, - [Description("Upper body render with transparent background")] HalfbodyPortraitTransparent, - [Description("Posed full body render with transparent background")] FullBodyPostureTransparent - } - /// /// This enumeration describes the pose options for the avatar skeleton. /// @@ -111,5 +99,29 @@ public enum FailureType AvatarRenderError, OperationCancelled } + + public enum Expression + { + None, + Happy, + Lol, + Sad, + Scared, + Rage, + } + + public enum RenderPose + { + Relaxed, + PowerStance, + Standing, + ThumbsUp, + } + + public enum RenderCamera + { + Portrait, + FullBody + } } diff --git a/Runtime/Utils/RenderSceneHelper.cs b/Runtime/Utils/RenderSceneHelper.cs deleted file mode 100644 index c309e16c..00000000 --- a/Runtime/Utils/RenderSceneHelper.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Collections.Generic; - -namespace ReadyPlayerMe.Core -{ - public static class RenderSceneHelper - { - public static string ToCamelCase(this string str) - { - if (string.IsNullOrEmpty(str)) - return string.Empty; - - var letters = str.ToCharArray(); - letters[0] = char.ToLower(letters[0]); - return new string(letters); - } - - public static Dictionary RenderPoseMap = new Dictionary() - { - { RenderPose.PowerStance, "power-stance" }, - { RenderPose.Relaxed, "relaxed" }, - { RenderPose.Standing, "standing" }, - { RenderPose.ThumbsUp, "thumbs-up" } - }; - - public static string GetSceneNameAsString(this AvatarRenderScene avatarRenderScene) - { - return RenderSceneMap[avatarRenderScene]; - } - - public static readonly Dictionary RenderSceneMap = new Dictionary - { - { AvatarRenderScene.FullbodyPortrait, "fullbody-portrait-v1" }, - { AvatarRenderScene.HalfbodyPortrait, "halfbody-portrait-v1" }, - { AvatarRenderScene.FullbodyPortraitTransparent, "fullbody-portrait-v1-transparent" }, - { AvatarRenderScene.HalfbodyPortraitTransparent, "halfbody-portrait-v1-transparent" }, - { AvatarRenderScene.FullBodyPostureTransparent, "fullbody-posture-v1-transparent" } - }; - } -} diff --git a/Runtime/Utils/RenderSettingsHelper.cs b/Runtime/Utils/RenderSettingsHelper.cs new file mode 100644 index 00000000..5fd17104 --- /dev/null +++ b/Runtime/Utils/RenderSettingsHelper.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace ReadyPlayerMe.Core +{ + public static class RenderSettingsHelper + { + public static string ToCamelCase(this string str) + { + if (string.IsNullOrEmpty(str)) + return string.Empty; + + var letters = str.ToCharArray(); + letters[0] = char.ToLower(letters[0]); + return new string(letters); + } + + public static Dictionary RenderPoseMap = new Dictionary() + { + { RenderPose.PowerStance, "power-stance" }, + { RenderPose.Relaxed, "relaxed" }, + { RenderPose.Standing, "standing" }, + { RenderPose.ThumbsUp, "thumbs-up" } + }; + + public static string FloatToRGBString(Color color) + { + return $"{(int) (color.r * 255)},{(int) (color.g * 255)},{(int) (color.b * 255)}"; + } + } +} diff --git a/Runtime/Utils/RenderSceneHelper.cs.meta b/Runtime/Utils/RenderSettingsHelper.cs.meta similarity index 100% rename from Runtime/Utils/RenderSceneHelper.cs.meta rename to Runtime/Utils/RenderSettingsHelper.cs.meta diff --git a/Samples~/AvatarRenderSamples/MultipleRenders/MultipleAvatarRenderExample.cs b/Samples~/AvatarRenderSamples/MultipleRenders/MultipleAvatarRenderExample.cs deleted file mode 100644 index 25aaf590..00000000 --- a/Samples~/AvatarRenderSamples/MultipleRenders/MultipleAvatarRenderExample.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using ReadyPlayerMe.Core; -using UnityEngine; - -namespace ReadyPlayerMe.Samples -{ - /// - /// This class is a simple example on how to load a request a 2D render of a Ready Player Me avatar at runtime. - /// - public class MultipleAvatarRenderExample : MonoBehaviour - { - [Serializable] - private class RenderData - { - public string url; - public AvatarRenderScene avatarRenderScene; - public bool imageLoaded; - } - - private const string TAG = nameof(MultipleAvatarRenderExample); - - [SerializeField] - private GameObject renderPanelPrefab; - [SerializeField] - private Transform renderPanelParent; - [SerializeField] - private RenderData[] dataList; - [SerializeField] - private GameObject loadingPanel; - - /// A collection of blendshape names and values to pose the face mesh into a smile using blendshapes - private readonly List blendShapes = new List() - { - new BlendShape("mouthSmile", 0.7f), - new BlendShape("viseme_aa", 0.5f), - new BlendShape("jawOpen", 0.3f), - }; - - private readonly string[] blendShapeMeshes = { "Wolf3D_Head", "Wolf3D_Teeth" }; - - private async void Start() - { - loadingPanel.SetActive(true); - - foreach (var renderData in dataList) - { - var avatarRenderer = new AvatarRenderLoader(); - avatarRenderer.OnCompleted = texture => - { - var renderPanel = Instantiate(renderPanelPrefab, renderPanelParent).GetComponent(); - renderPanel.SetHeading(renderData.avatarRenderScene.ToString()); - renderPanel.SetImage(texture); - SDKLogger.Log(TAG, "Sprite Updated "); - renderData.imageLoaded = true; - }; - avatarRenderer.OnFailed = Fail; - avatarRenderer.LoadRender(renderData.url, new AvatarRenderSettings() - { - BlendShapes = blendShapes - }); - } - - while (dataList.Any(x => !x.imageLoaded)) - { - await Task.Yield(); - } - loadingPanel.SetActive(false); - } - - private void Fail(FailureType type, string message) - { - SDKLogger.Log(TAG, $"Failed with error type: {type} and message: {message}"); - } - } -} diff --git a/Samples~/AvatarRenderSamples/MultipleRenders/MultipleAvatarRenderExample.cs.meta b/Samples~/AvatarRenderSamples/MultipleRenders/MultipleAvatarRenderExample.cs.meta deleted file mode 100644 index 3b201264..00000000 --- a/Samples~/AvatarRenderSamples/MultipleRenders/MultipleAvatarRenderExample.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b2b358f16db09e64994ed07b04a9b298 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Samples~/AvatarRenderSamples/MultipleRenders/RenderPanel.cs b/Samples~/AvatarRenderSamples/MultipleRenders/RenderPanel.cs index 505aaf9d..8870858f 100644 --- a/Samples~/AvatarRenderSamples/MultipleRenders/RenderPanel.cs +++ b/Samples~/AvatarRenderSamples/MultipleRenders/RenderPanel.cs @@ -1,4 +1,3 @@ -using System.Linq; using ReadyPlayerMe.Core; using UnityEngine; using UnityEngine.UI; @@ -11,8 +10,6 @@ public class RenderPanel : MonoBehaviour [SerializeField] private AvatarRenderSettings renderSettings; [SerializeField] private Image image; - public Text heading; - private void Start() { var avatarRenderLoader = new AvatarRenderLoader(); @@ -20,18 +17,11 @@ private void Start() avatarRenderLoader.LoadRender(url, renderSettings); } - public void SetHeading(string text) - { - var headingText = string.Concat(text.Select(x => char.IsUpper(x) ? " " + x : x.ToString())).TrimStart(' '); - heading.text = headingText; - } - - public void SetImage(Texture2D texture) + private void SetImage(Texture2D texture) { var sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(.5f, .5f)); image.sprite = sprite; image.preserveAspect = true; } - } } diff --git a/Samples~/AvatarRenderSamples/SingleRender.meta b/Samples~/AvatarRenderSamples/SingleRender.meta deleted file mode 100644 index f34c9123..00000000 --- a/Samples~/AvatarRenderSamples/SingleRender.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 9880f04e6460c493d81cd7d9c46c9166 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Samples~/AvatarRenderSamples/SingleRender/AvatarRenderExample.cs b/Samples~/AvatarRenderSamples/SingleRender/AvatarRenderExample.cs deleted file mode 100644 index 31aa1dc6..00000000 --- a/Samples~/AvatarRenderSamples/SingleRender/AvatarRenderExample.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System.Collections.Generic; -using ReadyPlayerMe.Core; -using UnityEngine; - -namespace ReadyPlayerMe.Samples -{ - /// - /// This class is a simple to serve as an example on how to load a request a 2D render of a Ready Player Me avatar at runtime. - /// - public class AvatarRenderExample : MonoBehaviour - { - private const string TAG = nameof(AvatarRenderExample); - - [SerializeField] [Tooltip("Set this to the URL or shortcode of the Ready Player Me Avatar you want to render.")] - private string url = "https://models.readyplayer.me/638df70ed72bffc6fa179596.glb"; - [SerializeField] [Tooltip("The scene to use for the avatar render.")] - private AvatarRenderScene scene = AvatarRenderScene.FullBodyPostureTransparent; - [SerializeField] - private SpriteRenderer spriteRenderer; - [SerializeField] - private GameObject loadingPanel; - - private readonly string[] blendShapeMeshes = { "Wolf3D_Head", "Wolf3D_Teeth" }; - - /// A collection of blendshape names and values to pose the face mesh into a smile using blendshapes - private readonly List blendShapes = new List() - { - new BlendShape("mouthSmile", 0.7f), - new BlendShape("viseme_aa", 0.5f), - new BlendShape("jawOpen", 0.3f), - }; - - private void Start() - { - var avatarRenderer = new AvatarRenderLoader(); - avatarRenderer.OnCompleted = UpdateSprite; - avatarRenderer.OnFailed = Fail; - avatarRenderer.LoadRender(url, new AvatarRenderSettings() - { - BlendShapes = blendShapes - }); - loadingPanel.SetActive(true); - } - - /// Updates the sprite renderer with the provided render - private void UpdateSprite(Texture2D render) - { - var sprite = Sprite.Create(render, new Rect(0, 0, render.width, render.height), new Vector2(.5f, .5f)); - spriteRenderer.sprite = sprite; - loadingPanel.SetActive(false); - SDKLogger.Log(TAG, "Sprite Updated "); - } - - private void Fail(FailureType type, string message) - { - SDKLogger.Log(TAG, $"Failed with error type: {type} and message: {message}"); - } - } -} diff --git a/Samples~/AvatarRenderSamples/SingleRender/AvatarRenderExample.cs.meta b/Samples~/AvatarRenderSamples/SingleRender/AvatarRenderExample.cs.meta deleted file mode 100644 index a2318e31..00000000 --- a/Samples~/AvatarRenderSamples/SingleRender/AvatarRenderExample.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 62b7a236cf0534ae682c6aaa43737760 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Samples~/AvatarRenderSamples/SingleRender/AvatarRenderExample.unity b/Samples~/AvatarRenderSamples/SingleRender/AvatarRenderExample.unity deleted file mode 100644 index a2418b12..00000000 --- a/Samples~/AvatarRenderSamples/SingleRender/AvatarRenderExample.unity +++ /dev/null @@ -1,752 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 12 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 0} ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &466104546 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 466104547} - - component: {fileID: 466104549} - - component: {fileID: 466104548} - m_Layer: 5 - m_Name: Loading - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!224 &466104547 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 466104546} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 2023087858} - m_Father: {fileID: 1966123671} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 500, y: 100} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &466104548 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 466104546} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 0} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &466104549 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 466104546} - m_CullTransparentMesh: 0 ---- !u!1 &542222333 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 542222336} - - component: {fileID: 542222335} - - component: {fileID: 542222334} - m_Layer: 0 - m_Name: EventSystem - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &542222334 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 542222333} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} - m_Name: - m_EditorClassIdentifier: - m_HorizontalAxis: Horizontal - m_VerticalAxis: Vertical - m_SubmitButton: Submit - m_CancelButton: Cancel - m_InputActionsPerSecond: 10 - m_RepeatDelay: 0.5 - m_ForceModuleActive: 0 ---- !u!114 &542222335 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 542222333} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} - m_Name: - m_EditorClassIdentifier: - m_FirstSelected: {fileID: 0} - m_sendNavigationEvents: 1 - m_DragThreshold: 10 ---- !u!4 &542222336 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 542222333} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &856270645 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 856270647} - - component: {fileID: 856270646} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &856270646 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 856270645} - m_Enabled: 1 - serializedVersion: 10 - m_Type: 1 - m_Shape: 0 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.80208 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_UseViewFrustumForShadowCasterCull: 1 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &856270647 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 856270645} - m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1 &1704154898 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1704154900} - - component: {fileID: 1704154899} - m_Layer: 0 - m_Name: Sprite - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!212 &1704154899 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1704154898} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Sprite: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 1, y: 1} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 0 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 ---- !u!4 &1704154900 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1704154898} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 7.5} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 1794436998} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1794436997 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1794436998} - - component: {fileID: 1794436999} - m_Layer: 0 - m_Name: AvatarRender Test - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1794436998 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1794436997} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 1704154900} - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1794436999 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1794436997} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 62b7a236cf0534ae682c6aaa43737760, type: 3} - m_Name: - m_EditorClassIdentifier: - url: https://models.readyplayer.me/638df70ed72bffc6fa179596.glb - scene: 2 - spriteRenderer: {fileID: 1704154899} - loadingPanel: {fileID: 466104546} ---- !u!1 &1966123667 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1966123671} - - component: {fileID: 1966123670} - - component: {fileID: 1966123669} - - component: {fileID: 1966123668} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1966123668 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1966123667} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &1966123669 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1966123667} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 1 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 ---- !u!223 &1966123670 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1966123667} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &1966123671 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1966123667} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_Children: - - {fileID: 466104547} - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} ---- !u!1 &2023087857 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2023087858} - - component: {fileID: 2023087860} - - component: {fileID: 2023087859} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2023087858 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2023087857} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 466104547} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &2023087859 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2023087857} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 18 - m_FontStyle: 0 - m_BestFit: 1 - m_MinSize: 1 - m_MaxSize: 28 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Requesting and Loading Render... ---- !u!222 &2023087860 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2023087857} - m_CullTransparentMesh: 0 ---- !u!1 &2036660856 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2036660859} - - component: {fileID: 2036660858} - - component: {fileID: 2036660857} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &2036660857 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2036660856} - m_Enabled: 1 ---- !u!20 &2036660858 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2036660856} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &2036660859 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2036660856} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Samples~/AvatarRenderSamples/SingleRender/AvatarRenderExample.unity.meta b/Samples~/AvatarRenderSamples/SingleRender/AvatarRenderExample.unity.meta deleted file mode 100644 index e393082d..00000000 --- a/Samples~/AvatarRenderSamples/SingleRender/AvatarRenderExample.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 6a938d18afe2d4495be4025f1e367c15 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: