Skip to content

Commit

Permalink
Merge branch 'hotfix/v0.2.2' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisonHough committed Oct 25, 2024
2 parents 19631df + 7cd863b commit a9009ec
Show file tree
Hide file tree
Showing 18 changed files with 4,908 additions and 27 deletions.
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [0.2.1] - 2024.MM.DD
## [0.2.1] - 2024.10.25

### Updated
- Updated assembly name to prevent naming conflicts
- File menu path updated to match other RPM packages

### Fixed
- Fixed an issue with missing materials in the scene

## [0.2.1] - 2024.03.04

### Updated
- Netcode Character Prefab updated with multimesh support
Expand All @@ -13,7 +22,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Variable name typos

### Removed
- Figtihng Game Sample removed
- Fighting Game Sample removed

## [0.2.0] - 2023.08.14

Expand Down
2 changes: 1 addition & 1 deletion Editor/TransferPrefab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public static class TransferPrefab
private const string NEW_PREFAB_PATH = "Assets/Ready Player Me/Resources/RPM_Netcode_Character.prefab";
private const string PREFAB_ASSET_NAME = "t:prefab RPM_Netcode_Character";

[MenuItem("Ready Player Me/Transfer Netcode Prefab", priority = 34)]
[MenuItem("Tools/Ready Player Me/Transfer Netcode Prefab", priority = 34)]
public static void Transfer()
{
var guids = AssetDatabase.FindAssets(PREFAB_ASSET_NAME);
Expand Down
16 changes: 11 additions & 5 deletions Runtime/NetworkPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Unity.Netcode;
using Unity.Collections;
using ReadyPlayerMe.Core;
using UnityEngine.Events;

namespace ReadyPlayerMe.NetcodeSupport
{
Expand All @@ -19,8 +20,9 @@ public class NetworkPlayer : NetworkBehaviour

public static string InputUrl = string.Empty;
public NetworkVariable<FixedString64Bytes> avatarUrl = new NetworkVariable<FixedString64Bytes>(writePerm: NetworkVariableWritePermission.Owner);
public event Action OnPlayerLoadComplete;

[Space(10)]
public UnityEvent OnPlayerLoadComplete;

private Transform leftEye;
private Transform rightEye;

Expand Down Expand Up @@ -53,16 +55,20 @@ public override void OnNetworkSpawn()
};
}

private void FixEyePositions(GameObject newAvatar)
{
leftEye.transform.localPosition = newAvatar.transform.Find(FULL_BODY_LEFT_EYE_BONE_NAME).localPosition;
rightEye.transform.localPosition = newAvatar.transform.Find(FULL_BODY_RIGHT_EYE_BONE_NAME).localPosition;
}

private void LoadAvatar(string url)
{
var loader = new AvatarObjectLoader();
loader.LoadAvatar(url);
loader.AvatarConfig = config;
loader.OnCompleted += (sender, args) =>
{
leftEye.transform.localPosition = args.Avatar.transform.Find(FULL_BODY_LEFT_EYE_BONE_NAME).localPosition;
rightEye.transform.localPosition = args.Avatar.transform.Find(FULL_BODY_RIGHT_EYE_BONE_NAME).localPosition;

FixEyePositions(args.Avatar);
AvatarMeshHelper.TransferMesh(args.Avatar, gameObject);
Destroy(args.Avatar);
OnPlayerLoadComplete?.Invoke();
Expand Down
3 changes: 1 addition & 2 deletions Runtime/ReadyPlayerMe.NetcodeSupport.asmdef
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"name": "NewAssembly",
"name": "ReadyPlayerMe.NetcodeSupport",
"rootNamespace": "",
"references": [
"GUID:1491147abca9d7d4bb7105af628b223e",
"GUID:e0cd26848372d4e5c891c569017e11f1",
"GUID:69ab3f10cf42d0b42a6cd1353c374377",
"GUID:96af4ea235d92d245a095007c6ca3701"
],
"includePlatforms": [],
Expand Down
6 changes: 2 additions & 4 deletions Samples~/AvatarControl/Materials/Box.mat
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ Material:
m_PrefabAsset: {fileID: 0}
m_Name: Box
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ValidKeywords:
- _EMISSION
- _NORMALMAP
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 2
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
Expand Down
6 changes: 2 additions & 4 deletions Samples~/AvatarControl/Materials/Floor.mat
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ Material:
m_PrefabAsset: {fileID: 0}
m_Name: Floor
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ValidKeywords:
- _EMISSION
- _NORMALMAP
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 2
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
Expand Down
2 changes: 1 addition & 1 deletion Samples~/AvatarControl/Materials/Floor.mat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 705507994}
m_IndirectSpecularColor: {r: 0.18028353, g: 0.2257137, b: 0.30692255, a: 1}
m_IndirectSpecularColor: {r: 0.4465791, g: 0.49641317, b: 0.57481784, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
Expand Down Expand Up @@ -1262,7 +1262,8 @@ MonoBehaviour:
NetworkConfig:
ProtocolVersion: 0
NetworkTransport: {fileID: 1754146316}
PlayerPrefab: {fileID: 918681697409016310, guid: 39bfa80ee51e22c4b9b3847156eb4def, type: 3}
PlayerPrefab: {fileID: 918681697409016310, guid: 39bfa80ee51e22c4b9b3847156eb4def,
type: 3}
Prefabs:
NetworkPrefabsLists:
- {fileID: 11400000, guid: 8c66e821e14565f40a0c65c9a7bac000, type: 2}
Expand Down Expand Up @@ -1637,7 +1638,7 @@ GameObject:
- component: {fileID: 5634591147473430356}
- component: {fileID: 5634591147473430357}
m_Layer: 0
m_Name: Plane
m_Name: Floor
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
Expand All @@ -1663,7 +1664,7 @@ MeshRenderer:
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 13818617b2642f8458614799effcd782, type: 2}
- {fileID: 2100000, guid: 307421f4d1c6ec94f94579be6b8b8a6e, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Samples~/AvatarControl/Texture/Grid_BaseMap.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Samples~/AvatarControl/Texture/Grid_Emissive.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Samples~/AvatarControl/Texture/Grid_Normal.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Samples~/FightingGame.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Samples~/FightingGame/Scenes.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a9009ec

Please sign in to comment.