Skip to content

Commit

Permalink
Merge branch 'hotfix/v6.2.3' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisonHough committed Apr 29, 2024
2 parents 781bb4e + d794929 commit fa64900
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 19 deletions.
7 changes: 1 addition & 6 deletions .github/latest.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@

## Changelog

### Updated

- Updated XR template avatar to have separated head mesh [#261](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/261)
- Improved GetMeshRenderer() method to exclude invalid mesh renderers [#261](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/261)

### Fixed

- Fixed issue with XR animation avatars
- reverted update to GetMeshRenderer method [#264](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/264)
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [6.2.3] - 2024.04.29

### Fixed

- reverted update to GetMeshRenderer method [#264](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/264)

## [6.2.2] - 2024.04.29

### Updated
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Core/Scripts/Data/ApplicationData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace ReadyPlayerMe.Core
{
public static class ApplicationData
{
public const string SDK_VERSION = "v6.2.2";
public const string SDK_VERSION = "v6.2.3";
private const string TAG = "ApplicationData";
private const string DEFAULT_RENDER_PIPELINE = "Built-In Render Pipeline";
private static readonly AppData Data;
Expand Down
20 changes: 9 additions & 11 deletions Runtime/Core/Scripts/Extensions/ExtensionMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,34 +59,32 @@ public static void SaveToFile(this AvatarMetadata metadata, string guid, string
/// <returns>The <see cref="SkinnedMeshRenderer" /> if found.</returns>
public static SkinnedMeshRenderer GetMeshRenderer(this GameObject gameObject, MeshType meshType)
{
SkinnedMeshRenderer meshRenderer;
var childMeshes = gameObject.GetComponentsInChildren<SkinnedMeshRenderer>()
.Where(mesh => mesh.sharedMesh != null) // Filter out any SkinnedMeshRenderer with no mesh
.ToArray();
if (childMeshes.Length == 0)
SkinnedMeshRenderer mesh;
List<SkinnedMeshRenderer> children = gameObject.GetComponentsInChildren<SkinnedMeshRenderer>().ToList();

if (children.Count == 0)
{

SDKLogger.AvatarLoaderLogger.Log(TAG, $"No SkinnedMeshRenderer found on the Game Object {gameObject.name}.");
return null;
}



switch (meshType)
{
case MeshType.BeardMesh:
meshRenderer = childMeshes.FirstOrDefault(child => BEARD_MESH_NAME_FILTER == child.name);
mesh = children.FirstOrDefault(child => BEARD_MESH_NAME_FILTER == child.name);
break;
case MeshType.TeethMesh:
meshRenderer = childMeshes.FirstOrDefault(child => TEETH_MESH_NAME_FILTER == child.name);
mesh = children.FirstOrDefault(child => TEETH_MESH_NAME_FILTER == child.name);
break;
case MeshType.HeadMesh:
meshRenderer = childMeshes.FirstOrDefault(child => HeadMeshNameFilter.Contains(child.name));
mesh = children.FirstOrDefault(child => HeadMeshNameFilter.Contains(child.name));
break;
default:
throw new ArgumentOutOfRangeException(nameof(meshType), meshType, null);
}

if (meshRenderer != null) return meshRenderer;
if (mesh != null) return mesh;

SDKLogger.AvatarLoaderLogger.Log(TAG, $"Mesh type {meshType} not found on the Game Object {gameObject.name}.");

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.readyplayerme.core",
"version": "6.2.2",
"version": "6.2.3",
"displayName": "Ready Player Me Core",
"description": "This Module contains all the core functionality required for using Ready Player Me avatars in Unity, including features such as: \n - Module management and automatic package setup logic\n - Avatar loading from .glb files \n - Avatar creation \n - Avatar and 2D render requests \n - Optional Analytics\n - Custom editor windows\n - Sample scenes and assets",
"unity": "2020.3",
Expand Down

0 comments on commit fa64900

Please sign in to comment.