diff --git a/Assets/Example/ExamplePlayer.cs b/Assets/Example/ExamplePlayer.cs index b6532b7..871f84b 100644 --- a/Assets/Example/ExamplePlayer.cs +++ b/Assets/Example/ExamplePlayer.cs @@ -5,7 +5,7 @@ namespace Mirage.NetworkProfiler.Example { [RequireComponent(typeof(NetworkIdentity))] - [RequireComponent(typeof(NetworkTransform))] + [RequireComponent(typeof(NetworkTransformUnreliable))] public class ExamplePlayer : NetworkBehaviour { [SerializeField] private float _moveSpeed = 10; diff --git a/Assets/Example/Player.prefab b/Assets/Example/Player.prefab index fed8971..c5ede69 100644 --- a/Assets/Example/Player.prefab +++ b/Assets/Example/Player.prefab @@ -48,9 +48,9 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: sceneId: 0 + _assetId: 2973684376 serverOnly: 0 visible: 0 - m_AssetId: 56008f2ead63c5b449565c779ca6d655 hasSpawned: 0 --- !u!114 &2323629024606040365 MonoBehaviour: @@ -61,31 +61,31 @@ MonoBehaviour: m_GameObject: {fileID: 722945615397717584} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2f74aedd71d9a4f55b3ce499326d45fb, type: 3} + m_Script: {fileID: 11500000, guid: a553cb17010b2403e8523b558bffbc14, type: 3} m_Name: m_EditorClassIdentifier: + syncDirection: 0 syncMode: 0 - syncInterval: 0.1 + syncInterval: 0 + target: {fileID: 8833559844984716782} clientAuthority: 0 - sendInterval: 0.05 syncPosition: 1 syncRotation: 1 syncScale: 0 interpolatePosition: 1 interpolateRotation: 1 interpolateScale: 0 - bufferTimeMultiplier: 1 - bufferSizeLimit: 64 - catchupThreshold: 4 - catchupMultiplier: 0.1 + coordinateSpace: 0 + sendIntervalMultiplier: 1 + timelineOffset: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} onlySyncOnChange: 1 bufferResetMultiplier: 5 positionSensitivity: 0.01 rotationSensitivity: 0.01 scaleSensitivity: 0.01 - showGizmos: 0 - showOverlay: 0 - overlayColor: {r: 0, g: 0, b: 0, a: 0.5} --- !u!114 &3245701489431678148 MonoBehaviour: m_ObjectHideFlags: 0 @@ -98,6 +98,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 0b65055561345344a819a75fc3f18135, type: 3} m_Name: m_EditorClassIdentifier: + syncDirection: 0 syncMode: 0 syncInterval: 0.1 _moveSpeed: 10 diff --git a/Assets/Mirage.Profiler/Runtime/NetworkInfoProvider.cs b/Assets/Mirage.Profiler/Runtime/NetworkInfoProvider.cs index 00808b9..89efe74 100644 --- a/Assets/Mirage.Profiler/Runtime/NetworkInfoProvider.cs +++ b/Assets/Mirage.Profiler/Runtime/NetworkInfoProvider.cs @@ -1,3 +1,10 @@ +// mirror removes defines (for some reason) so need to check if any of the defines exist +// if they any do it is new version so set MIRROR_RPC_USHORT so the code below can use it +#if MIRROR_2022_9_OR_NEWER || MIRROR_70_OR_NEWER || MIRROR_85_OR_NEWER +#define MIRROR_RPC_USHORT +#endif + + using System.Text.RegularExpressions; using Mirror; using Mirror.RemoteCalls; @@ -65,10 +72,10 @@ public string GetRpcName(NetworkDiagnostics.MessageInfo info) } } -#if !MIRROR_2022_9_OR_NEWER - private string GetRpcName(uint netId, int componentIndex, int functionIndex) -#else +#if MIRROR_RPC_USHORT private string GetRpcName(uint netId, int componentIndex, ushort functionIndex) +#else + private string GetRpcName(uint netId, int componentIndex, int functionIndex) #endif { var hash = functionIndex; diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 7d82e56..3af2e12 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -709,7 +709,7 @@ PlayerSettings: webGLDecompressionFallback: 0 webGLPowerPreference: 2 scriptingDefineSymbols: - Standalone: MIRROR;MIRROR_17_0_OR_NEWER;MIRROR_18_0_OR_NEWER;MIRROR_24_0_OR_NEWER;MIRROR_26_0_OR_NEWER;MIRROR_27_0_OR_NEWER;MIRROR_28_0_OR_NEWER;MIRROR_29_0_OR_NEWER;MIRROR_30_0_OR_NEWER;MIRROR_30_5_2_OR_NEWER;MIRROR_32_1_2_OR_NEWER;MIRROR_32_1_4_OR_NEWER;MIRROR_35_0_OR_NEWER;MIRROR_35_1_OR_NEWER;MIRROR_37_0_OR_NEWER;MIRROR_38_0_OR_NEWER;MIRROR_39_0_OR_NEWER;MIRROR_40_0_OR_NEWER;MIRROR_41_0_OR_NEWER;MIRROR_42_0_OR_NEWER;MIRROR_43_0_OR_NEWER;MIRROR_44_0_OR_NEWER;MIRROR_46_0_OR_NEWER;MIRROR_47_0_OR_NEWER;MIRROR_53_0_OR_NEWER;MIRROR_55_0_OR_NEWER;MIRROR_57_0_OR_NEWER;MIRROR_58_0_OR_NEWER;MIRROR_65_0_OR_NEWER;MIRROR_66_0_OR_NEWER;MIRROR_2022_9_OR_NEWER;MIRROR_2022_10_OR_NEWER;MIRROR_70_0_OR_NEWER;MIRROR_71_0_OR_NEWER;MIRROR_73_OR_NEWER;MIRROR_78_OR_NEWER;MIRROR_79_OR_NEWER + Standalone: MIRROR_70_OR_NEWER;MIRROR;MIRROR_57_0_OR_NEWER;MIRROR_58_0_OR_NEWER;MIRROR_65_0_OR_NEWER;MIRROR_66_0_OR_NEWER;MIRROR_2022_9_OR_NEWER;MIRROR_2022_10_OR_NEWER;MIRROR_70_0_OR_NEWER;MIRROR_71_0_OR_NEWER;MIRROR_73_OR_NEWER;MIRROR_78_OR_NEWER;MIRROR_79_OR_NEWER additionalCompilerArguments: {} platformArchitecture: {} scriptingBackend: {}