mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
NPC Variant
This commit is contained in:
parent
b791061331
commit
f5d28334ee
@ -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}
|
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 808159c2b19eadb45bb9255c2bd30ec9
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -38,7 +38,7 @@ RenderSettings:
|
|||||||
m_ReflectionIntensity: 1
|
m_ReflectionIntensity: 1
|
||||||
m_CustomReflection: {fileID: 0}
|
m_CustomReflection: {fileID: 0}
|
||||||
m_Sun: {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
|
m_UseRadianceAmbientProbe: 0
|
||||||
--- !u!157 &3
|
--- !u!157 &3
|
||||||
LightmapSettings:
|
LightmapSettings:
|
||||||
@ -1567,12 +1567,11 @@ MonoBehaviour:
|
|||||||
networkAddress: mirror.clevertech.net
|
networkAddress: mirror.clevertech.net
|
||||||
maxConnections: 100
|
maxConnections: 100
|
||||||
authenticator: {fileID: 821201138}
|
authenticator: {fileID: 821201138}
|
||||||
playerPrefab: {fileID: 2033010110135952297, guid: 10f39bef276942448bfdfba062b6b6e0,
|
playerPrefab: {fileID: 2033010110135952297, guid: 10f39bef276942448bfdfba062b6b6e0, type: 3}
|
||||||
type: 3}
|
|
||||||
autoCreatePlayer: 1
|
autoCreatePlayer: 1
|
||||||
playerSpawnMethod: 0
|
playerSpawnMethod: 0
|
||||||
spawnPrefabs:
|
spawnPrefabs:
|
||||||
- {fileID: 4470997041528829651, guid: 41c8421bf1d0d854cacb6d12f1af1567, type: 3}
|
- {fileID: 2089004215024372542, guid: 808159c2b19eadb45bb9255c2bd30ec9, type: 3}
|
||||||
timeInterpolationGui: 1
|
timeInterpolationGui: 1
|
||||||
--- !u!114 &821201136
|
--- !u!114 &821201136
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
@ -1598,7 +1598,7 @@ MonoBehaviour:
|
|||||||
autoCreatePlayer: 1
|
autoCreatePlayer: 1
|
||||||
playerSpawnMethod: 0
|
playerSpawnMethod: 0
|
||||||
spawnPrefabs:
|
spawnPrefabs:
|
||||||
- {fileID: 4470997041528829651, guid: 41c8421bf1d0d854cacb6d12f1af1567, type: 3}
|
- {fileID: 2089004215024372542, guid: 808159c2b19eadb45bb9255c2bd30ec9, type: 3}
|
||||||
timeInterpolationGui: 1
|
timeInterpolationGui: 1
|
||||||
--- !u!114 &821201136
|
--- !u!114 &821201136
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
@ -36,7 +36,7 @@ void Update()
|
|||||||
void CmdSpawnNPC()
|
void CmdSpawnNPC()
|
||||||
{
|
{
|
||||||
Vector3 spawnPos = transform.position + Vector3.forward;
|
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>().playerName = "NPC";
|
npc.GetComponent<PlayerName>().playerName = "NPC";
|
||||||
npc.GetComponent<NetworkTransformReliable>().syncDirection = SyncDirection.ServerToClient;
|
npc.GetComponent<NetworkTransformReliable>().syncDirection = SyncDirection.ServerToClient;
|
||||||
npc.GetComponent<CharacterController>().enabled = true;
|
npc.GetComponent<CharacterController>().enabled = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user