diff --git a/Assets/Mirror/Examples/TestNT/Prefabs/PlayerNPC Variant.prefab b/Assets/Mirror/Examples/TestNT/Prefabs/PlayerNPC Variant.prefab new file mode 100644 index 000000000..39deea9ea --- /dev/null +++ b/Assets/Mirror/Examples/TestNT/Prefabs/PlayerNPC Variant.prefab @@ -0,0 +1,67 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &57158865832913047 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2033010110135952297, guid: 10f39bef276942448bfdfba062b6b6e0, type: 3} + propertyPath: m_Name + value: PlayerNPC + objectReference: {fileID: 0} + - target: {fileID: 2415462970743521564, guid: 10f39bef276942448bfdfba062b6b6e0, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2415462970743521564, guid: 10f39bef276942448bfdfba062b6b6e0, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2415462970743521564, guid: 10f39bef276942448bfdfba062b6b6e0, type: 3} + propertyPath: m_LocalPosition.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2415462970743521564, guid: 10f39bef276942448bfdfba062b6b6e0, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2415462970743521564, guid: 10f39bef276942448bfdfba062b6b6e0, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2415462970743521564, guid: 10f39bef276942448bfdfba062b6b6e0, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2415462970743521564, guid: 10f39bef276942448bfdfba062b6b6e0, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2415462970743521564, guid: 10f39bef276942448bfdfba062b6b6e0, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2415462970743521564, guid: 10f39bef276942448bfdfba062b6b6e0, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2415462970743521564, guid: 10f39bef276942448bfdfba062b6b6e0, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2415462970743521564, guid: 10f39bef276942448bfdfba062b6b6e0, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4314596929967491211, guid: 10f39bef276942448bfdfba062b6b6e0, type: 3} + propertyPath: sceneId + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7264761320023842541, guid: 10f39bef276942448bfdfba062b6b6e0, type: 3} + propertyPath: syncDirection + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 10f39bef276942448bfdfba062b6b6e0, type: 3} diff --git a/Assets/Mirror/Examples/TestNT/Prefabs/PlayerNPC Variant.prefab.meta b/Assets/Mirror/Examples/TestNT/Prefabs/PlayerNPC Variant.prefab.meta new file mode 100644 index 000000000..affa991fd --- /dev/null +++ b/Assets/Mirror/Examples/TestNT/Prefabs/PlayerNPC Variant.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 808159c2b19eadb45bb9255c2bd30ec9 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirror/Examples/TestNT/Scenes/OfflineKcp.unity b/Assets/Mirror/Examples/TestNT/Scenes/OfflineKcp.unity index 530ba547b..a49a88c99 100644 --- a/Assets/Mirror/Examples/TestNT/Scenes/OfflineKcp.unity +++ b/Assets/Mirror/Examples/TestNT/Scenes/OfflineKcp.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657815, g: 0.49641192, b: 0.57481617, a: 1} + m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -1567,12 +1567,11 @@ MonoBehaviour: networkAddress: mirror.clevertech.net maxConnections: 100 authenticator: {fileID: 821201138} - playerPrefab: {fileID: 2033010110135952297, guid: 10f39bef276942448bfdfba062b6b6e0, - type: 3} + playerPrefab: {fileID: 2033010110135952297, guid: 10f39bef276942448bfdfba062b6b6e0, type: 3} autoCreatePlayer: 1 playerSpawnMethod: 0 spawnPrefabs: - - {fileID: 4470997041528829651, guid: 41c8421bf1d0d854cacb6d12f1af1567, type: 3} + - {fileID: 2089004215024372542, guid: 808159c2b19eadb45bb9255c2bd30ec9, type: 3} timeInterpolationGui: 1 --- !u!114 &821201136 MonoBehaviour: diff --git a/Assets/Mirror/Examples/TestNT/Scenes/OfflineWeb.unity b/Assets/Mirror/Examples/TestNT/Scenes/OfflineWeb.unity index 84b7b179c..c1c5ca84a 100644 --- a/Assets/Mirror/Examples/TestNT/Scenes/OfflineWeb.unity +++ b/Assets/Mirror/Examples/TestNT/Scenes/OfflineWeb.unity @@ -1598,7 +1598,7 @@ MonoBehaviour: autoCreatePlayer: 1 playerSpawnMethod: 0 spawnPrefabs: - - {fileID: 4470997041528829651, guid: 41c8421bf1d0d854cacb6d12f1af1567, type: 3} + - {fileID: 2089004215024372542, guid: 808159c2b19eadb45bb9255c2bd30ec9, type: 3} timeInterpolationGui: 1 --- !u!114 &821201136 MonoBehaviour: diff --git a/Assets/Mirror/Examples/TestNT/Scripts/NPCHandler.cs b/Assets/Mirror/Examples/TestNT/Scripts/NPCHandler.cs index 4973d0201..36ba18668 100644 --- a/Assets/Mirror/Examples/TestNT/Scripts/NPCHandler.cs +++ b/Assets/Mirror/Examples/TestNT/Scripts/NPCHandler.cs @@ -36,7 +36,7 @@ void Update() void CmdSpawnNPC() { Vector3 spawnPos = transform.position + Vector3.forward; - GameObject npc = Instantiate(NetworkManager.singleton.playerPrefab, spawnPos, Quaternion.identity); + GameObject npc = Instantiate(NetworkManager.singleton.spawnPrefabs[0], spawnPos, Quaternion.identity); npc.GetComponent().playerName = "NPC"; npc.GetComponent().syncDirection = SyncDirection.ServerToClient; npc.GetComponent().enabled = true;