Skip to content

Commit 20f2cbd

Browse files
committed
Merge branch 'release/v7.1.0' into develop
2 parents dbe476e + aa457c7 commit 20f2cbd

File tree

5 files changed

+44
-38
lines changed

5 files changed

+44
-38
lines changed

.github/latest.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,7 @@
22
## Changelog
33

44
## Updated
5+
- Reworked shader overrides to support mapping of other property types [#306](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/306)
56

6-
- loading circle animation now using MMecanim animation [#302](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/302)
7-
- removed unnecessary assets from Resources folder [#303](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/303)
8-
- updated Template avatar assets [#300](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/300)
9-
- Avatar Body type now moved to CoreSettings [#290](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/290)
10-
11-
### Added
12-
13-
- Added support for hero customization assets (costumes) [#301](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/301)
14-
- templates can now be filtered by Bodytype [#296](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/296)
15-
16-
### Fixed
17-
18-
- fixed an issue causing invalid load settings in Avatar Loader window [#298](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/298)
7+
## Fixed
8+
- Fixed an issue caused by missing bones on avatar template prefabs [#310](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/310/)

CHANGELOG.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,37 @@
33
All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](http://semver.org/).
55

6+
## [7.1.0] - 2024.07.16
7+
8+
## Updated
9+
- Reworked shader overrides to support mapping of other property types [#306](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/306)
10+
11+
## Fixed
12+
- Fixed an issue caused by missing bones on avatar template prefabs [#310](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/310/)
13+
614
## [7.0.0] - 2024.07.01
715

816
## Updated
917

10-
- loading circle animation now using MMecanim animation [#302](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/302)
11-
- removed unnecessary assets from Resources folder [#303](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/303)
12-
- updated Template avatar assets [#300](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/300)
18+
- Loading circle animation now using MMecanim animation [#302](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/302)
19+
- Removed unnecessary assets from Resources folder [#303](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/303)
20+
- Updated Template avatar assets [#300](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/300)
1321
- Avatar Body type now moved to CoreSettings [#290](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/290)
1422

1523
### Added
1624

1725
- Added support for hero customization assets (costumes) [#301](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/301)
18-
- templates can now be filtered by Bodytype [#296](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/296)
26+
- Templates can now be filtered by Bodytype [#296](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/296)
1927

2028
### Fixed
2129

22-
- fixed an issue causing invalid load settings in Avatar Loader window [#298](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/298)
30+
- Fixed an issue causing invalid load settings in Avatar Loader window [#298](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/298)
2331

2432
## [6.3.1] - 2024.06.18
2533

2634
### Fixed
2735

28-
- allow cache to be loaded from previous versions, where bodyType was stored as an integer [#293](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/293)
36+
- Allow cache to be loaded from previous versions, where bodyType was stored as an integer [#293](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/293)
2937

3038
## [6.3.0] - 2024.06.11
3139

@@ -55,7 +63,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
5563

5664
### Fixed
5765

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

6068
## [6.2.2] - 2024.04.29
6169

@@ -86,19 +94,19 @@ This project adheres to [Semantic Versioning](http://semver.org/).
8694

8795
## Updated
8896

89-
- removed use of tuples and deprecated old methods [#257](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/257)
97+
- Removed use of tuples and deprecated old methods [#257](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/257)
9098

9199
## [6.1.2] - 2024.04.03
92100

93101
### Updated
94102

95-
- xr animation avatars updated to support with latest xr avatar updates
103+
- XR animation avatars updated to support with latest xr avatar updates
96104

97105
## [6.1.1] - 2024.04.03
98106

99107
### Updated
100108

101-
- avatars done with a photo are now added as a draft avatars [#254](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/254)
109+
- Avatars done with a photo are now added as a draft avatars [#254](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/254)
102110

103111
## [6.1.0] - 2024.03.04
104112

@@ -113,7 +121,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
113121

114122
### Updated
115123

116-
- updated default render settings to fix an issue causing incorrect halfbody avatar renders [#238](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/238)
124+
- Updated default render settings to fix an issue causing incorrect halfbody avatar renders [#238](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/238)
117125

118126
## [6.0.0] - 2024.02.19
119127

Runtime/Core/Scripts/Data/ApplicationData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace ReadyPlayerMe.Core
66
{
77
public static class ApplicationData
88
{
9-
public const string SDK_VERSION = "v7.0.0";
9+
public const string SDK_VERSION = "v7.1.0";
1010
private const string TAG = "ApplicationData";
1111
private const string DEFAULT_RENDER_PIPELINE = "Built-In Render Pipeline";
1212
private static readonly AppData Data;

Runtime/Core/Scripts/Utils/AvatarMeshHelper.cs

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ namespace ReadyPlayerMe.Core
77
{
88
public static class AvatarMeshHelper
99
{
10-
private static readonly string[] headMeshNames = {
10+
private static readonly string[] headMeshNames =
11+
{
1112
"Renderer_Head",
1213
"Renderer_Hair",
1314
"Renderer_Beard",
@@ -16,15 +17,15 @@ public static class AvatarMeshHelper
1617
"Renderer_EyeLeft",
1718
"Renderer_EyeRight",
1819
"Renderer_Headwear",
19-
"Renderer_Facewear",
20+
"Renderer_Facewear"
2021
};
2122

2223
[Obsolete("Use TransferMesh(GameObject source, GameObject target) instead.")]
2324
public static void TransferMesh(GameObject source, SkinnedMeshRenderer[] targetMeshes, Animator targetAnimator)
2425
{
2526
TransferMesh(source, targetMeshes[0].transform.parent.gameObject);
2627
}
27-
28+
2829
/// <summary>
2930
/// Transfers the mesh and material data from the source to the target avatar.
3031
/// </summary>
@@ -34,23 +35,30 @@ public static void TransferMesh(GameObject source, GameObject target)
3435
{
3536
// store the relevant data of the source (downloaded) avatar
3637
var rendererDict = new Dictionary<string, SkinnedMeshRenderer>();
37-
38+
3839
var sourceRenderers = source.GetComponentsInChildren<SkinnedMeshRenderer>();
3940
var targetRenderers = target.GetComponentsInChildren<SkinnedMeshRenderer>();
40-
41+
4142
foreach (var renderer in sourceRenderers)
4243
{
4344
rendererDict.Add(renderer.name, renderer);
4445
}
45-
46+
47+
var meshWithBones = targetRenderers.DefaultIfEmpty(null).FirstOrDefault((renderer) => renderer.bones.Length != 0);
48+
4649
// transfer the data to the target skinning mesh renderers
4750
foreach (var renderer in targetRenderers)
4851
{
4952
if (rendererDict.TryGetValue(renderer.name, out var sourceRenderer))
5053
{
5154
renderer.sharedMesh = sourceRenderer.sharedMesh;
5255
renderer.sharedMaterial = sourceRenderer.sharedMaterial;
53-
56+
57+
if (renderer.bones.Length == 0 && meshWithBones != null)
58+
{
59+
renderer.bones = meshWithBones.bones;
60+
continue;
61+
}
5462
// transfer the bone data
5563
foreach (var targetBone in renderer.bones)
5664
{
@@ -61,7 +69,7 @@ public static void TransferMesh(GameObject source, GameObject target)
6169
targetBone.position = sourceBone.position;
6270
targetBone.rotation = sourceBone.rotation;
6371
targetBone.localScale = sourceBone.localScale;
64-
break;
72+
break;
6573
}
6674
}
6775
}
@@ -72,13 +80,13 @@ public static void TransferMesh(GameObject source, GameObject target)
7280
renderer.material = null;
7381
}
7482
}
75-
83+
7684
// transfer the animation avatar
7785
var sourceAnimator = source.GetComponentInChildren<Animator>();
7886
var targetAnimator = target.GetComponentInChildren<Animator>();
7987
targetAnimator.avatar = sourceAnimator.avatar;
8088
}
81-
89+
8290
/// <summary>
8391
/// Returns the meshes of the head of the avatar, such as glasses, hair, teeth, etc.
8492
/// </summary>
@@ -88,15 +96,15 @@ public static GameObject[] GetHeadMeshes(GameObject avatar)
8896
{
8997
var renderers = avatar.GetComponentsInChildren<SkinnedMeshRenderer>();
9098
var headMeshes = new List<GameObject>();
91-
99+
92100
foreach (var renderer in renderers)
93101
{
94102
if (headMeshNames.Contains(renderer.name))
95103
{
96104
headMeshes.Add(renderer.gameObject);
97105
}
98106
}
99-
107+
100108
return headMeshes.ToArray();
101109
}
102110
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.readyplayerme.core",
3-
"version": "7.0.0",
3+
"version": "7.1.0",
44
"displayName": "Ready Player Me Core",
55
"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",
66
"unity": "2020.3",

0 commit comments

Comments
 (0)