네트워크 멀티플레이 환경 문제 수정
관련 문제가 다시 발생하면 이 커밋으로 돌아올 것
This commit is contained in:
@@ -104,3 +104,13 @@ MonoBehaviour:
|
||||
SourcePrefabToOverride: {fileID: 0}
|
||||
SourceHashToOverride: 0
|
||||
OverridingTargetPrefab: {fileID: 0}
|
||||
- Override: 0
|
||||
Prefab: {fileID: 7603736553692962085, guid: f03e71a1b147c77498145a41db9d5c6e, type: 3}
|
||||
SourcePrefabToOverride: {fileID: 0}
|
||||
SourceHashToOverride: 0
|
||||
OverridingTargetPrefab: {fileID: 0}
|
||||
- Override: 0
|
||||
Prefab: {fileID: 8294708185945415980, guid: eda89876457aa6143b1bef3330e8f7fb, type: 3}
|
||||
SourcePrefabToOverride: {fileID: 0}
|
||||
SourceHashToOverride: 0
|
||||
OverridingTargetPrefab: {fileID: 0}
|
||||
|
||||
@@ -280,6 +280,24 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""StartAsClient"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""3cdb7b19-b155-4d50-bd36-d132b9290400"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""DebugPanel"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""2d93558e-a811-4563-9591-6ef734155d8d"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
}
|
||||
],
|
||||
""bindings"": [
|
||||
@@ -799,6 +817,28 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
|
||||
""action"": ""Cancel"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""492d997c-1c69-463e-a63f-dd327d7881b8"",
|
||||
""path"": ""<Keyboard>/c"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": "";Keyboard&Mouse"",
|
||||
""action"": ""StartAsClient"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""c286789c-b46b-4160-8724-23412c73cb67"",
|
||||
""path"": ""<Keyboard>/backquote"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": "";Keyboard&Mouse"",
|
||||
""action"": ""DebugPanel"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1405,6 +1445,8 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
|
||||
m_Player_QuickSlot7 = m_Player.FindAction("QuickSlot7", throwIfNotFound: true);
|
||||
m_Player_QuickSlot8 = m_Player.FindAction("QuickSlot8", throwIfNotFound: true);
|
||||
m_Player_Cancel = m_Player.FindAction("Cancel", throwIfNotFound: true);
|
||||
m_Player_StartAsClient = m_Player.FindAction("StartAsClient", throwIfNotFound: true);
|
||||
m_Player_DebugPanel = m_Player.FindAction("DebugPanel", throwIfNotFound: true);
|
||||
// UI
|
||||
m_UI = asset.FindActionMap("UI", throwIfNotFound: true);
|
||||
m_UI_Navigate = m_UI.FindAction("Navigate", throwIfNotFound: true);
|
||||
@@ -1519,6 +1561,8 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
|
||||
private readonly InputAction m_Player_QuickSlot7;
|
||||
private readonly InputAction m_Player_QuickSlot8;
|
||||
private readonly InputAction m_Player_Cancel;
|
||||
private readonly InputAction m_Player_StartAsClient;
|
||||
private readonly InputAction m_Player_DebugPanel;
|
||||
/// <summary>
|
||||
/// Provides access to input actions defined in input action map "Player".
|
||||
/// </summary>
|
||||
@@ -1615,6 +1659,14 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
|
||||
/// </summary>
|
||||
public InputAction @Cancel => m_Wrapper.m_Player_Cancel;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "Player/StartAsClient".
|
||||
/// </summary>
|
||||
public InputAction @StartAsClient => m_Wrapper.m_Player_StartAsClient;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "Player/DebugPanel".
|
||||
/// </summary>
|
||||
public InputAction @DebugPanel => m_Wrapper.m_Player_DebugPanel;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action map instance.
|
||||
/// </summary>
|
||||
public InputActionMap Get() { return m_Wrapper.m_Player; }
|
||||
@@ -1703,6 +1755,12 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
|
||||
@Cancel.started += instance.OnCancel;
|
||||
@Cancel.performed += instance.OnCancel;
|
||||
@Cancel.canceled += instance.OnCancel;
|
||||
@StartAsClient.started += instance.OnStartAsClient;
|
||||
@StartAsClient.performed += instance.OnStartAsClient;
|
||||
@StartAsClient.canceled += instance.OnStartAsClient;
|
||||
@DebugPanel.started += instance.OnDebugPanel;
|
||||
@DebugPanel.performed += instance.OnDebugPanel;
|
||||
@DebugPanel.canceled += instance.OnDebugPanel;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1777,6 +1835,12 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
|
||||
@Cancel.started -= instance.OnCancel;
|
||||
@Cancel.performed -= instance.OnCancel;
|
||||
@Cancel.canceled -= instance.OnCancel;
|
||||
@StartAsClient.started -= instance.OnStartAsClient;
|
||||
@StartAsClient.performed -= instance.OnStartAsClient;
|
||||
@StartAsClient.canceled -= instance.OnStartAsClient;
|
||||
@DebugPanel.started -= instance.OnDebugPanel;
|
||||
@DebugPanel.performed -= instance.OnDebugPanel;
|
||||
@DebugPanel.canceled -= instance.OnDebugPanel;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2224,6 +2288,20 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnCancel(InputAction.CallbackContext context);
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "StartAsClient" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnStartAsClient(InputAction.CallbackContext context);
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "DebugPanel" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnDebugPanel(InputAction.CallbackContext context);
|
||||
}
|
||||
/// <summary>
|
||||
/// Interface to implement callback methods for all input action callbacks associated with input actions defined by "UI" which allows adding and removing callbacks.
|
||||
|
||||
@@ -194,6 +194,24 @@
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "StartAsClient",
|
||||
"type": "Button",
|
||||
"id": "3cdb7b19-b155-4d50-bd36-d132b9290400",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "DebugPanel",
|
||||
"type": "Button",
|
||||
"id": "2d93558e-a811-4563-9591-6ef734155d8d",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
@@ -713,6 +731,28 @@
|
||||
"action": "Cancel",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "492d997c-1c69-463e-a63f-dd327d7881b8",
|
||||
"path": "<Keyboard>/c",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "StartAsClient",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "c286789c-b46b-4160-8724-23412c73cb67",
|
||||
"path": "<Keyboard>/backquote",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "DebugPanel",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
122
Assets/Prefabs/Bat.prefab
Normal file
122
Assets/Prefabs/Bat.prefab
Normal file
@@ -0,0 +1,122 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &7603736553692962085
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1194557353959628612}
|
||||
- component: {fileID: 6659565122963588399}
|
||||
m_Layer: 0
|
||||
m_Name: Bat
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1194557353959628612
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7603736553692962085}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -1.57958, y: 1.00001, z: -1.56753}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 3616642548623739450}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &6659565122963588399
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7603736553692962085}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
|
||||
GlobalObjectIdHash: 4268566319
|
||||
InScenePlacedSourceGlobalObjectIdHash: 0
|
||||
DeferredDespawnTick: 0
|
||||
Ownership: 1
|
||||
AlwaysReplicateAsRoot: 0
|
||||
SynchronizeTransform: 1
|
||||
ActiveSceneSynchronization: 0
|
||||
SceneMigrationSynchronization: 0
|
||||
SpawnWithObservers: 1
|
||||
DontDestroyWithOwner: 0
|
||||
AutoObjectParentSync: 1
|
||||
SyncOwnerTransformWhenParented: 1
|
||||
AllowOwnerToParent: 0
|
||||
--- !u!1001 &3871508264071294417
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 1194557353959628612}
|
||||
m_Modifications:
|
||||
- target: {fileID: -8679921383154817045, guid: 1261145a64d4f3e43bee728a02c1b5e3, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 1261145a64d4f3e43bee728a02c1b5e3, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 1261145a64d4f3e43bee728a02c1b5e3, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 1261145a64d4f3e43bee728a02c1b5e3, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 1261145a64d4f3e43bee728a02c1b5e3, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0.000000021855694
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 1261145a64d4f3e43bee728a02c1b5e3, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 1261145a64d4f3e43bee728a02c1b5e3, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 1261145a64d4f3e43bee728a02c1b5e3, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 1261145a64d4f3e43bee728a02c1b5e3, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 1261145a64d4f3e43bee728a02c1b5e3, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 919132149155446097, guid: 1261145a64d4f3e43bee728a02c1b5e3, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Bat
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 1261145a64d4f3e43bee728a02c1b5e3, type: 3}
|
||||
--- !u!4 &3616642548623739450 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 1261145a64d4f3e43bee728a02c1b5e3, type: 3}
|
||||
m_PrefabInstance: {fileID: 3871508264071294417}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
7
Assets/Prefabs/Bat.prefab.meta
Normal file
7
Assets/Prefabs/Bat.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f03e71a1b147c77498145a41db9d5c6e
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
122
Assets/Prefabs/Pickaxe.prefab
Normal file
122
Assets/Prefabs/Pickaxe.prefab
Normal file
@@ -0,0 +1,122 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &8294708185945415980
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4786869462106053255}
|
||||
- component: {fileID: 7258747535635499414}
|
||||
m_Layer: 0
|
||||
m_Name: Pickaxe
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4786869462106053255
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8294708185945415980}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -1.57958, y: 1.00001, z: -1.56753}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 5490866329018943490}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &7258747535635499414
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8294708185945415980}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
|
||||
GlobalObjectIdHash: 1911485989
|
||||
InScenePlacedSourceGlobalObjectIdHash: 0
|
||||
DeferredDespawnTick: 0
|
||||
Ownership: 1
|
||||
AlwaysReplicateAsRoot: 0
|
||||
SynchronizeTransform: 1
|
||||
ActiveSceneSynchronization: 0
|
||||
SceneMigrationSynchronization: 0
|
||||
SpawnWithObservers: 1
|
||||
DontDestroyWithOwner: 0
|
||||
AutoObjectParentSync: 1
|
||||
SyncOwnerTransformWhenParented: 1
|
||||
AllowOwnerToParent: 0
|
||||
--- !u!1001 &5456604255163953129
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 4786869462106053255}
|
||||
m_Modifications:
|
||||
- target: {fileID: -8679921383154817045, guid: 804d477fc7f114c498aa6f95452be893, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 804d477fc7f114c498aa6f95452be893, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 804d477fc7f114c498aa6f95452be893, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 804d477fc7f114c498aa6f95452be893, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 804d477fc7f114c498aa6f95452be893, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0.00000008146034
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 804d477fc7f114c498aa6f95452be893, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 804d477fc7f114c498aa6f95452be893, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 804d477fc7f114c498aa6f95452be893, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 804d477fc7f114c498aa6f95452be893, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 804d477fc7f114c498aa6f95452be893, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 919132149155446097, guid: 804d477fc7f114c498aa6f95452be893, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: pickaxe
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 804d477fc7f114c498aa6f95452be893, type: 3}
|
||||
--- !u!4 &5490866329018943490 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 804d477fc7f114c498aa6f95452be893, type: 3}
|
||||
m_PrefabInstance: {fileID: 5456604255163953129}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
7
Assets/Prefabs/Pickaxe.prefab.meta
Normal file
7
Assets/Prefabs/Pickaxe.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eda89876457aa6143b1bef3330e8f7fb
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -11,7 +11,6 @@ GameObject:
|
||||
- component: {fileID: 5887522270574905679}
|
||||
- component: {fileID: 2636831972010436653}
|
||||
- component: {fileID: 3792365921352178844}
|
||||
- component: {fileID: 1698609800605343773}
|
||||
- component: {fileID: 3007098678582223509}
|
||||
- component: {fileID: 1883169379180791275}
|
||||
- component: {fileID: 8729870597719024730}
|
||||
@@ -20,6 +19,9 @@ GameObject:
|
||||
- component: {fileID: 6066313428661204362}
|
||||
- component: {fileID: 2443072964133329520}
|
||||
- component: {fileID: 2148255267416253297}
|
||||
- component: {fileID: 1698609800605343773}
|
||||
- component: {fileID: -4348726977448206869}
|
||||
- component: {fileID: 7148704114816793672}
|
||||
m_Layer: 9
|
||||
m_Name: Player
|
||||
m_TagString: Untagged
|
||||
@@ -55,7 +57,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
|
||||
GlobalObjectIdHash: 1360081626
|
||||
GlobalObjectIdHash: 4211758632
|
||||
InScenePlacedSourceGlobalObjectIdHash: 4211758632
|
||||
DeferredDespawnTick: 0
|
||||
Ownership: 1
|
||||
@@ -88,28 +90,6 @@ MonoBehaviour:
|
||||
showHealthBar: 1
|
||||
damageEffectPrefab: {fileID: 0}
|
||||
deathEffectPrefab: {fileID: 0}
|
||||
--- !u!95 &1698609800605343773
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1314983689436087486}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 9000000, guid: 2632f2cc035d62d41bca411a318fbe36, type: 3}
|
||||
m_Controller: {fileID: 9100000, guid: bb242bb2298e65941bcb502d7ae219cd, type: 2}
|
||||
m_CullingMode: 0
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_StabilizeFeet: 0
|
||||
m_AnimatePhysics: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorStateOnDisable: 0
|
||||
m_WriteDefaultValuesOnDisable: 0
|
||||
--- !u!143 &3007098678582223509
|
||||
CharacterController:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -175,6 +155,7 @@ MonoBehaviour:
|
||||
interactableLayer:
|
||||
serializedVersion: 2
|
||||
m_Bits: 128
|
||||
workPower: 10
|
||||
rayOrigin: {fileID: 0}
|
||||
useForwardDirection: 1
|
||||
playAnimations: 1
|
||||
@@ -182,6 +163,7 @@ MonoBehaviour:
|
||||
blockDuringAnimation: 1
|
||||
useEquipment: 1
|
||||
showDebugRay: 1
|
||||
assignedWorker: {fileID: 0}
|
||||
--- !u!114 &5217638038410020423
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -243,10 +225,14 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: ac908541bf903c745a1794d409a5f048, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Northbound.EquipmentSocket
|
||||
ShowTopMostFoldoutHeaderGroup: 1
|
||||
sockets:
|
||||
- socketName: handslot.r
|
||||
socketTransform: {fileID: 2844947653216056832}
|
||||
currentEquipment: {fileID: 0}
|
||||
equipmentPrefabs:
|
||||
- {fileID: 7603736553692962085, guid: f03e71a1b147c77498145a41db9d5c6e, type: 3}
|
||||
- {fileID: 8294708185945415980, guid: eda89876457aa6143b1bef3330e8f7fb, type: 3}
|
||||
--- !u!114 &2443072964133329520
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -275,6 +261,106 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Northbound.PlayerVisionProvider
|
||||
ShowTopMostFoldoutHeaderGroup: 1
|
||||
visionRange: 20
|
||||
--- !u!95 &1698609800605343773
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1314983689436087486}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 9000000, guid: 2632f2cc035d62d41bca411a318fbe36, type: 3}
|
||||
m_Controller: {fileID: 9100000, guid: bb242bb2298e65941bcb502d7ae219cd, type: 2}
|
||||
m_CullingMode: 0
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_StabilizeFeet: 0
|
||||
m_AnimatePhysics: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorStateOnDisable: 0
|
||||
m_WriteDefaultValuesOnDisable: 0
|
||||
--- !u!114 &-4348726977448206869
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1314983689436087486}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e8d0727d5ae3244e3b569694d3912374, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkAnimator
|
||||
ShowTopMostFoldoutHeaderGroup: 1
|
||||
NetworkAnimatorExpanded: 0
|
||||
AuthorityMode: 0
|
||||
m_Animator: {fileID: 1698609800605343773}
|
||||
TransitionStateInfoList: []
|
||||
AnimatorParameterEntries:
|
||||
ParameterEntries:
|
||||
- name: MoveSpeed
|
||||
NameHash: 526065662
|
||||
Synchronize: 1
|
||||
ParameterType: 1
|
||||
- name: Mining
|
||||
NameHash: 577859424
|
||||
Synchronize: 1
|
||||
ParameterType: 9
|
||||
- name: Attack
|
||||
NameHash: 1080829965
|
||||
Synchronize: 1
|
||||
ParameterType: 9
|
||||
AnimatorParametersExpanded: 0
|
||||
--- !u!114 &7148704114816793672
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1314983689436087486}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.Components.NetworkTransform
|
||||
ShowTopMostFoldoutHeaderGroup: 1
|
||||
NetworkTransformExpanded: 0
|
||||
AutoOwnerAuthorityTickOffset: 1
|
||||
PositionInterpolationType: 0
|
||||
RotationInterpolationType: 0
|
||||
ScaleInterpolationType: 0
|
||||
PositionLerpSmoothing: 1
|
||||
PositionMaxInterpolationTime: 0.1
|
||||
RotationLerpSmoothing: 1
|
||||
RotationMaxInterpolationTime: 0.1
|
||||
ScaleLerpSmoothing: 1
|
||||
ScaleMaxInterpolationTime: 0.1
|
||||
AuthorityMode: 0
|
||||
TickSyncChildren: 0
|
||||
UseUnreliableDeltas: 0
|
||||
SyncPositionX: 1
|
||||
SyncPositionY: 1
|
||||
SyncPositionZ: 1
|
||||
SyncRotAngleX: 1
|
||||
SyncRotAngleY: 1
|
||||
SyncRotAngleZ: 1
|
||||
SyncScaleX: 1
|
||||
SyncScaleY: 1
|
||||
SyncScaleZ: 1
|
||||
PositionThreshold: 0.001
|
||||
RotAngleThreshold: 0.01
|
||||
ScaleThreshold: 0.01
|
||||
UseQuaternionSynchronization: 0
|
||||
UseQuaternionCompression: 0
|
||||
UseHalfFloatPrecision: 0
|
||||
InLocalSpace: 0
|
||||
SwitchTransformSpaceWhenParented: 0
|
||||
Interpolate: 1
|
||||
SlerpPosition: 0
|
||||
--- !u!1001 &1445453803682481668
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
8
Assets/Resources.meta
Normal file
8
Assets/Resources.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 963daf2309f087a4192afcb548328e22
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1799,7 +1799,7 @@ MonoBehaviour:
|
||||
EnableNetworkLogs: 1
|
||||
NetworkTopology: 1
|
||||
UseCMBService: 0
|
||||
AutoSpawnPlayerPrefabClientSide: 1
|
||||
AutoSpawnPlayerPrefabClientSide: 0
|
||||
NetworkMessageMetrics: 1
|
||||
NetworkProfilingMetrics: 1
|
||||
OldPrefabList: []
|
||||
|
||||
@@ -259,19 +259,14 @@ namespace Northbound
|
||||
if (!CanInteract(playerId))
|
||||
return;
|
||||
|
||||
// 플레이어 인벤토리 가져오기
|
||||
var playerObject = NetworkManager.Singleton.ConnectedClients[playerId].PlayerObject;
|
||||
if (playerObject == null)
|
||||
return;
|
||||
|
||||
var playerInventory = playerObject.GetComponent<PlayerResourceInventory>();
|
||||
if (playerInventory == null)
|
||||
var resourceManager = ServerResourceManager.Instance;
|
||||
if (resourceManager == null)
|
||||
{
|
||||
Debug.LogWarning($"플레이어 {playerId}에게 PlayerResourceInventory 컴포넌트가 없습니다.");
|
||||
Debug.LogWarning("ServerResourceManager 인스턴스를 찾을 수 없습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
int playerResourceAmount = playerInventory.CurrentResourceAmount;
|
||||
int playerResourceAmount = resourceManager.GetPlayerResourceAmount(playerId);
|
||||
if (playerResourceAmount <= 0)
|
||||
{
|
||||
Debug.Log($"플레이어 {playerId}가 건낼 자원이 없습니다.");
|
||||
@@ -282,16 +277,13 @@ namespace Northbound
|
||||
|
||||
if (depositAll)
|
||||
{
|
||||
// 전부 건네기
|
||||
depositAmount = playerResourceAmount;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 일부만 건네기
|
||||
depositAmount = Mathf.Min(depositAmountPerInteraction, playerResourceAmount);
|
||||
}
|
||||
|
||||
// 무제한 저장소가 아니면 용량 제한 확인
|
||||
if (!unlimitedStorage)
|
||||
{
|
||||
int availableSpace = maxStorageCapacity - _totalResources.Value;
|
||||
@@ -304,10 +296,8 @@ namespace Northbound
|
||||
return;
|
||||
}
|
||||
|
||||
// 플레이어로부터 자원 차감
|
||||
playerInventory.RemoveResourceServerRpc(depositAmount);
|
||||
|
||||
// 코어에 자원 추가
|
||||
resourceManager.RemoveResource(playerId, depositAmount);
|
||||
UpdatePlayerResourcesClientRpc(playerId);
|
||||
_totalResources.Value += depositAmount;
|
||||
|
||||
Debug.Log($"<color=green>[Core] 플레이어 {playerId}가 {depositAmount} 자원을 건넸습니다. 코어 총 자원: {_totalResources.Value}" +
|
||||
@@ -316,6 +306,20 @@ namespace Northbound
|
||||
ShowDepositEffectClientRpc();
|
||||
}
|
||||
|
||||
[Rpc(SendTo.ClientsAndHost)]
|
||||
private void UpdatePlayerResourcesClientRpc(ulong playerId)
|
||||
{
|
||||
var playerObject = NetworkManager.Singleton.ConnectedClients[playerId].PlayerObject;
|
||||
if (playerObject != null)
|
||||
{
|
||||
var playerInventory = playerObject.GetComponent<PlayerResourceInventory>();
|
||||
if (playerInventory != null)
|
||||
{
|
||||
playerInventory.RequestResourceUpdateServerRpc();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Rpc(SendTo.ClientsAndHost)]
|
||||
private void ShowDepositEffectClientRpc()
|
||||
{
|
||||
|
||||
160
Assets/Scripts/DebugLogUI.cs
Normal file
160
Assets/Scripts/DebugLogUI.cs
Normal file
@@ -0,0 +1,160 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Northbound
|
||||
{
|
||||
public class DebugLogUI : MonoBehaviour
|
||||
{
|
||||
[Header("Settings")]
|
||||
public int maxLogMessages = 50;
|
||||
public float logDisplayDuration = 5f;
|
||||
public KeyCode toggleKey = KeyCode.BackQuote;
|
||||
|
||||
[Header("UI References")]
|
||||
public GameObject logPanel;
|
||||
public Text logText;
|
||||
public GameObject scrollContent;
|
||||
public ScrollRect scrollRect;
|
||||
|
||||
private Queue<string> _logMessages = new Queue<string>();
|
||||
private bool _isVisible = true;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// 이미 씬에 있는지 확인
|
||||
if (logPanel != null)
|
||||
{
|
||||
logPanel = CreateLogPanel();
|
||||
_isVisible = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(toggleKey))
|
||||
{
|
||||
ToggleLogPanel();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
if (logPanel != null)
|
||||
{
|
||||
Application.logMessageReceived += HandleLog;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
if (logPanel != null)
|
||||
{
|
||||
Application.logMessageReceived -= HandleLog;
|
||||
}
|
||||
}
|
||||
|
||||
private GameObject CreateLogPanel()
|
||||
{
|
||||
GameObject panel = new GameObject("DebugLogPanel");
|
||||
panel.AddComponent<Canvas>();
|
||||
Canvas canvas = panel.GetComponent<Canvas>();
|
||||
canvas.renderMode = RenderMode.ScreenSpaceOverlay;
|
||||
canvas.sortingOrder = 9999;
|
||||
|
||||
RectTransform canvasRect = canvas.GetComponent<RectTransform>();
|
||||
canvasRect.anchorMin = Vector2.zero;
|
||||
canvasRect.anchorMax = new Vector2(Screen.width, Screen.height);
|
||||
canvasRect.sizeDelta = Vector2.zero;
|
||||
canvasRect.localScale = Vector3.one;
|
||||
|
||||
// 배경
|
||||
GameObject background = new GameObject("Background");
|
||||
background.transform.SetParent(canvas.transform, false);
|
||||
Image bgImage = background.AddComponent<Image>();
|
||||
bgImage.color = new Color(0, 0, 0, 0.8f);
|
||||
|
||||
RectTransform bgRect = background.AddComponent<RectTransform>();
|
||||
bgRect.anchorMin = Vector2.zero;
|
||||
bgRect.anchorMax = Vector2.one;
|
||||
bgRect.sizeDelta = new Vector2(600, 300);
|
||||
bgRect.localPosition = new Vector2(-300, -150);
|
||||
|
||||
// 로그 내용
|
||||
GameObject content = new GameObject("Content");
|
||||
content.transform.SetParent(background.transform, false);
|
||||
|
||||
RectTransform contentRect = content.AddComponent<RectTransform>();
|
||||
contentRect.anchorMin = Vector2.zero;
|
||||
contentRect.anchorMax = Vector2.one;
|
||||
contentRect.sizeDelta = new Vector2(580, 280);
|
||||
contentRect.localPosition = new Vector2(-290, -140);
|
||||
|
||||
// 텍스트
|
||||
Text logTextComponent = content.AddComponent<Text>();
|
||||
logTextComponent.fontSize = 14;
|
||||
logTextComponent.alignment = TextAnchor.UpperLeft;
|
||||
logTextComponent.color = Color.white;
|
||||
|
||||
// 스크롤뷰
|
||||
GameObject scrollView = new GameObject("ScrollView");
|
||||
scrollView.transform.SetParent(content.transform, false);
|
||||
scrollRect = scrollView.AddComponent<ScrollRect>();
|
||||
scrollRect.content = contentRect;
|
||||
scrollRect.viewport = new RectTransform();
|
||||
scrollRect.horizontal = false;
|
||||
scrollRect.vertical = true;
|
||||
scrollRect.scrollSensitivity = 1;
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
private void HandleLog(string logString, string stackTrace, LogType type)
|
||||
{
|
||||
string timestamp = System.DateTime.Now.ToString("HH:mm:ss");
|
||||
string logMessage = $"[{timestamp}] {logString}";
|
||||
|
||||
_logMessages.Enqueue(logMessage);
|
||||
if (_logMessages.Count > maxLogMessages)
|
||||
{
|
||||
_logMessages.Dequeue();
|
||||
}
|
||||
|
||||
UpdateLogText();
|
||||
}
|
||||
|
||||
private void UpdateLogText()
|
||||
{
|
||||
if (logText == null) return;
|
||||
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
foreach (string msg in _logMessages)
|
||||
{
|
||||
sb.AppendLine(msg);
|
||||
}
|
||||
|
||||
logText.text = sb.ToString();
|
||||
}
|
||||
|
||||
public void ToggleLogPanel()
|
||||
{
|
||||
if (logPanel != null)
|
||||
{
|
||||
_isVisible = !_isVisible;
|
||||
logPanel.SetActive(_isVisible);
|
||||
}
|
||||
}
|
||||
|
||||
public void Log(string message)
|
||||
{
|
||||
if (logPanel != null)
|
||||
{
|
||||
logPanel.SetActive(true);
|
||||
_isVisible = true;
|
||||
}
|
||||
|
||||
Debug.Log($"[DebugLogUI] {message}");
|
||||
Debug.Log($"[DebugLogUI] 로그 패널 활성됨: {message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/DebugLogUI.cs.meta
Normal file
2
Assets/Scripts/DebugLogUI.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dd4b979683b78954bb4d9b224ec4c61d
|
||||
@@ -1,29 +1,34 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using Unity.Netcode;
|
||||
|
||||
namespace Northbound
|
||||
{
|
||||
/// <summary>
|
||||
/// 플레이어의 장비 소켓 관리 (손, 등, 허리 등)
|
||||
/// </summary>
|
||||
public class EquipmentSocket : MonoBehaviour
|
||||
public class EquipmentSocket : NetworkBehaviour
|
||||
{
|
||||
[System.Serializable]
|
||||
public class Socket
|
||||
{
|
||||
public string socketName; // "RightHand", "LeftHand", "Back" 등
|
||||
public Transform socketTransform; // 실제 본 Transform
|
||||
[HideInInspector] public GameObject currentEquipment; // 현재 장착된 장비
|
||||
public string socketName;
|
||||
public Transform socketTransform;
|
||||
[HideInInspector] public GameObject currentEquipment;
|
||||
}
|
||||
|
||||
[Header("Available Sockets")]
|
||||
public List<Socket> sockets = new List<Socket>();
|
||||
|
||||
[Header("Equipment Prefabs")]
|
||||
public GameObject[] equipmentPrefabs;
|
||||
|
||||
private Dictionary<string, Socket> _socketDict = new Dictionary<string, Socket>();
|
||||
private Dictionary<string, GameObject> _prefabDict = new Dictionary<string, GameObject>();
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
// 빠른 검색을 위한 딕셔너리 생성
|
||||
_socketDict.Clear();
|
||||
foreach (var socket in sockets)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(socket.socketName))
|
||||
@@ -31,82 +36,124 @@ namespace Northbound
|
||||
_socketDict[socket.socketName] = socket;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 소켓에 장비 부착
|
||||
/// </summary>
|
||||
public GameObject AttachToSocket(string socketName, GameObject equipmentPrefab)
|
||||
{
|
||||
if (!_socketDict.TryGetValue(socketName, out Socket socket))
|
||||
_prefabDict.Clear();
|
||||
if (equipmentPrefabs != null)
|
||||
{
|
||||
Debug.LogWarning($"소켓을 찾을 수 없습니다: {socketName}");
|
||||
return null;
|
||||
}
|
||||
|
||||
if (socket.socketTransform == null)
|
||||
{
|
||||
Debug.LogWarning($"소켓 Transform이 없습니다: {socketName}");
|
||||
return null;
|
||||
}
|
||||
|
||||
// 기존 장비 제거
|
||||
DetachFromSocket(socketName);
|
||||
|
||||
// 새 장비 생성
|
||||
if (equipmentPrefab != null)
|
||||
{
|
||||
GameObject equipment = Instantiate(equipmentPrefab, socket.socketTransform);
|
||||
equipment.transform.localPosition = Vector3.zero;
|
||||
equipment.transform.localRotation = Quaternion.identity;
|
||||
socket.currentEquipment = equipment;
|
||||
|
||||
return equipment;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 소켓에서 장비 제거
|
||||
/// </summary>
|
||||
public void DetachFromSocket(string socketName)
|
||||
{
|
||||
if (!_socketDict.TryGetValue(socketName, out Socket socket))
|
||||
return;
|
||||
|
||||
if (socket.currentEquipment != null)
|
||||
{
|
||||
Destroy(socket.currentEquipment);
|
||||
socket.currentEquipment = null;
|
||||
foreach (var prefab in equipmentPrefabs)
|
||||
{
|
||||
if (prefab != null)
|
||||
{
|
||||
_prefabDict[prefab.name] = prefab;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 모든 소켓에서 장비 제거
|
||||
/// </summary>
|
||||
public void DetachAll()
|
||||
public override void OnNetworkDespawn()
|
||||
{
|
||||
foreach (var socket in sockets)
|
||||
{
|
||||
if (socket.currentEquipment != null)
|
||||
{
|
||||
Destroy(socket.currentEquipment);
|
||||
Object.Destroy(socket.currentEquipment);
|
||||
socket.currentEquipment = null;
|
||||
}
|
||||
}
|
||||
base.OnNetworkDespawn();
|
||||
}
|
||||
|
||||
public GameObject AttachToSocket(string socketName, GameObject equipmentPrefab)
|
||||
{
|
||||
if (equipmentPrefab != null)
|
||||
{
|
||||
AttachToSocketServerRpc(socketName, equipmentPrefab.name);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
[Rpc(SendTo.Server)]
|
||||
private void AttachToSocketServerRpc(string socketName, string prefabName)
|
||||
{
|
||||
AttachToSocketClientRpc(socketName, prefabName);
|
||||
}
|
||||
|
||||
[Rpc(SendTo.ClientsAndHost)]
|
||||
private void AttachToSocketClientRpc(string socketName, string prefabName)
|
||||
{
|
||||
if (!_socketDict.ContainsKey(socketName))
|
||||
return;
|
||||
|
||||
var socket = sockets.Find(s => s.socketName == socketName);
|
||||
if (socket == null || socket.socketTransform == null)
|
||||
return;
|
||||
|
||||
DetachFromSocketInternal(socketName);
|
||||
|
||||
GameObject prefab = FindPrefab(prefabName);
|
||||
if (prefab != null)
|
||||
{
|
||||
GameObject equipment = Object.Instantiate(prefab, socket.socketTransform);
|
||||
equipment.transform.localPosition = Vector3.zero;
|
||||
equipment.transform.localRotation = Quaternion.identity;
|
||||
socket.currentEquipment = equipment;
|
||||
}
|
||||
}
|
||||
|
||||
public void DetachFromSocket(string socketName)
|
||||
{
|
||||
DetachFromSocketServerRpc(socketName);
|
||||
}
|
||||
|
||||
[Rpc(SendTo.Server)]
|
||||
private void DetachFromSocketServerRpc(string socketName)
|
||||
{
|
||||
DetachFromSocketClientRpc(socketName);
|
||||
}
|
||||
|
||||
[Rpc(SendTo.ClientsAndHost)]
|
||||
private void DetachFromSocketClientRpc(string socketName)
|
||||
{
|
||||
DetachFromSocketInternal(socketName);
|
||||
}
|
||||
|
||||
private void DetachFromSocketInternal(string socketName)
|
||||
{
|
||||
var socket = sockets.Find(s => s.socketName == socketName);
|
||||
if (socket == null) return;
|
||||
|
||||
if (socket.currentEquipment != null)
|
||||
{
|
||||
Object.Destroy(socket.currentEquipment);
|
||||
socket.currentEquipment = null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 특정 소켓에 장비가 있는지 확인
|
||||
/// </summary>
|
||||
public bool HasEquipment(string socketName)
|
||||
{
|
||||
if (_socketDict.TryGetValue(socketName, out Socket socket))
|
||||
var socket = sockets.Find(s => s.socketName == socketName);
|
||||
return socket != null && socket.currentEquipment != null;
|
||||
}
|
||||
|
||||
public GameObject GetEquipment(string socketName)
|
||||
{
|
||||
var socket = sockets.Find(s => s.socketName == socketName);
|
||||
return socket != null ? socket.currentEquipment : null;
|
||||
}
|
||||
|
||||
private GameObject FindPrefab(string name)
|
||||
{
|
||||
if (_prefabDict.TryGetValue(name, out var prefab))
|
||||
{
|
||||
return socket.currentEquipment != null;
|
||||
return prefab;
|
||||
}
|
||||
return false;
|
||||
|
||||
prefab = Resources.Load<GameObject>($"Prefabs/{name}");
|
||||
if (prefab != null)
|
||||
{
|
||||
return prefab;
|
||||
}
|
||||
return Resources.Load<GameObject>(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
0
Assets/Scripts/ForceRecompile.txt
Normal file
0
Assets/Scripts/ForceRecompile.txt
Normal file
7
Assets/Scripts/ForceRecompile.txt.meta
Normal file
7
Assets/Scripts/ForceRecompile.txt.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 871f9f40b5b3cb54ab7c0a76b592bc47
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -32,6 +32,7 @@ namespace Northbound
|
||||
{
|
||||
NetworkManager.Singleton.ConnectionApprovalCallback = ApprovalCheck;
|
||||
NetworkManager.Singleton.OnServerStarted += OnServerStarted;
|
||||
NetworkManager.Singleton.OnClientConnectedCallback += OnClientConnected;
|
||||
Debug.Log("<color=cyan>[Connection] ConnectionApprovalCallback 등록됨</color>");
|
||||
}
|
||||
else
|
||||
@@ -50,7 +51,7 @@ namespace Northbound
|
||||
spawnPoints.Clear();
|
||||
foreach (var point in sortedPoints)
|
||||
{
|
||||
if (point.isAvailable)
|
||||
if (point != null && point.transform != null && point.isAvailable)
|
||||
{
|
||||
spawnPoints.Add(point.transform);
|
||||
}
|
||||
@@ -62,30 +63,92 @@ namespace Northbound
|
||||
private void OnServerStarted()
|
||||
{
|
||||
Debug.Log("<color=green>[Connection] 서버 시작됨</color>");
|
||||
|
||||
if (ServerResourceManager.Instance == null)
|
||||
{
|
||||
GameObject resourceManagerObj = new GameObject("ServerResourceManager");
|
||||
ServerResourceManager manager = resourceManagerObj.AddComponent<ServerResourceManager>();
|
||||
|
||||
NetworkObject networkObject = resourceManagerObj.GetComponent<NetworkObject>();
|
||||
if (networkObject == null)
|
||||
{
|
||||
networkObject = resourceManagerObj.AddComponent<NetworkObject>();
|
||||
}
|
||||
|
||||
networkObject.Spawn();
|
||||
Debug.Log("[Connection] ServerResourceManager spawned.");
|
||||
}
|
||||
|
||||
if (NetworkManager.Singleton.IsHost)
|
||||
{
|
||||
SpawnPlayer(NetworkManager.Singleton.LocalClientId);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnClientConnected(ulong clientId)
|
||||
{
|
||||
if (!NetworkManager.Singleton.IsServer) return;
|
||||
if (clientId == NetworkManager.Singleton.LocalClientId) return;
|
||||
|
||||
Debug.Log($"<color=cyan>[Connection] 클라이언트 {clientId} 연결됨</color>");
|
||||
|
||||
if (!NetworkManager.Singleton.ConnectedClients.TryGetValue(clientId, out var client) || client.PlayerObject != null)
|
||||
{
|
||||
Debug.Log($"<color=yellow>[Connection] 클라이언트 {clientId}의 플레이어가 이미 존재합니다.</color>");
|
||||
return;
|
||||
}
|
||||
|
||||
SpawnPlayer(clientId);
|
||||
}
|
||||
|
||||
private void SpawnPlayer(ulong clientId)
|
||||
{
|
||||
Vector3 spawnPosition = GetSpawnPosition(clientId);
|
||||
Quaternion spawnRotation = GetSpawnRotation(clientId);
|
||||
|
||||
GameObject playerPrefab = NetworkManager.Singleton.NetworkConfig.PlayerPrefab;
|
||||
if (playerPrefab == null)
|
||||
{
|
||||
Debug.LogError("[Connection] PlayerPrefab이 null입니다!");
|
||||
return;
|
||||
}
|
||||
|
||||
GameObject playerObject = Instantiate(playerPrefab, spawnPosition, spawnRotation);
|
||||
NetworkObject networkObject = playerObject.GetComponent<NetworkObject>();
|
||||
if (networkObject == null)
|
||||
{
|
||||
Debug.LogError("[Connection] PlayerPrefab에 NetworkObject가 없습니다!");
|
||||
return;
|
||||
}
|
||||
|
||||
networkObject.SpawnAsPlayerObject(clientId);
|
||||
|
||||
Debug.Log($"<color=green>[Connection] 플레이어 {clientId} 스폰됨: {spawnPosition}</color>");
|
||||
}
|
||||
|
||||
private void ApprovalCheck(
|
||||
NetworkManager.ConnectionApprovalRequest request,
|
||||
NetworkManager.ConnectionApprovalResponse response)
|
||||
{
|
||||
// 🔍 디버깅: 스폰 포인트 상태 확인
|
||||
spawnPoints.RemoveAll(p => p == null);
|
||||
|
||||
if (spawnPoints.Count == 0)
|
||||
{
|
||||
Debug.LogError($"<color=red>[Connection] 스폰 포인트가 없습니다! 씬에 PlayerSpawnPoint가 있는지 확인하세요.</color>");
|
||||
}
|
||||
|
||||
response.Approved = true;
|
||||
response.CreatePlayerObject = true;
|
||||
|
||||
// 스폰 위치 설정
|
||||
response.Position = GetSpawnPosition(request.ClientNetworkId);
|
||||
response.Rotation = GetSpawnRotation(request.ClientNetworkId);
|
||||
|
||||
Debug.Log($"<color=green>[Connection] 클라이언트 {request.ClientNetworkId} 승인됨. 스폰 위치: {response.Position}</color>");
|
||||
response.CreatePlayerObject = false;
|
||||
response.Position = Vector3.zero;
|
||||
response.Rotation = Quaternion.identity;
|
||||
|
||||
Debug.Log($"<color=green>[Connection] 클라이언트 {request.ClientNetworkId} 승인됨. 수동 스폰으로 대기.</color>");
|
||||
}
|
||||
|
||||
private Vector3 GetSpawnPosition(ulong clientId)
|
||||
{
|
||||
spawnPoints.RemoveAll(p => p == null);
|
||||
|
||||
if (spawnPoints.Count == 0)
|
||||
{
|
||||
Debug.LogWarning("[Connection] 스폰 포인트가 없습니다. 기본 위치 반환.");
|
||||
@@ -106,6 +169,12 @@ namespace Northbound
|
||||
_nextSpawnIndex = (_nextSpawnIndex + 1) % spawnPoints.Count;
|
||||
}
|
||||
spawnIndex = _clientSpawnIndices[clientId];
|
||||
|
||||
if (spawnIndex >= spawnPoints.Count)
|
||||
{
|
||||
Debug.LogWarning($"<color=yellow>[Connection] 스폰 인덱스 {spawnIndex}가 범위를 벗어났습니다. 기본값으로 조정.</color>");
|
||||
spawnIndex = spawnIndex % spawnPoints.Count;
|
||||
}
|
||||
}
|
||||
|
||||
Debug.Log($"<color=yellow>[Connection] 클라이언트 {clientId}에게 스폰 인덱스 {spawnIndex} 할당</color>");
|
||||
@@ -114,12 +183,19 @@ namespace Northbound
|
||||
|
||||
private Quaternion GetSpawnRotation(ulong clientId)
|
||||
{
|
||||
spawnPoints.RemoveAll(p => p == null);
|
||||
|
||||
if (spawnPoints.Count == 0)
|
||||
return Quaternion.identity;
|
||||
|
||||
int spawnIndex = _clientSpawnIndices.ContainsKey(clientId)
|
||||
? _clientSpawnIndices[clientId]
|
||||
: 0;
|
||||
|
||||
if (spawnIndex >= spawnPoints.Count)
|
||||
{
|
||||
spawnIndex = spawnIndex % spawnPoints.Count;
|
||||
}
|
||||
|
||||
return spawnPoints[spawnIndex].rotation;
|
||||
}
|
||||
@@ -130,6 +206,7 @@ namespace Northbound
|
||||
{
|
||||
NetworkManager.Singleton.ConnectionApprovalCallback = null;
|
||||
NetworkManager.Singleton.OnServerStarted -= OnServerStarted;
|
||||
NetworkManager.Singleton.OnClientConnectedCallback -= OnClientConnected;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
86
Assets/Scripts/NetworkDebug.cs
Normal file
86
Assets/Scripts/NetworkDebug.cs
Normal file
@@ -0,0 +1,86 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using Unity.Netcode;
|
||||
using Northbound;
|
||||
|
||||
public class NetworkDebug : MonoBehaviour
|
||||
{
|
||||
private void Start()
|
||||
{
|
||||
Debug.Log("=== NETWORK DEBUG INFO ===");
|
||||
|
||||
// 1. NetworkManager 상태
|
||||
if (NetworkManager.Singleton != null)
|
||||
{
|
||||
Debug.Log($"NetworkManager: IsServer={NetworkManager.Singleton.IsServer}, IsClient={NetworkManager.Singleton.IsClient}, IsHost={NetworkManager.Singleton.IsHost}");
|
||||
}
|
||||
|
||||
// 2. 스폰 포인트 검색
|
||||
PlayerSpawnPoint[] spawnPoints = FindObjectsByType<PlayerSpawnPoint>(FindObjectsSortMode.None);
|
||||
Debug.Log($"PlayerSpawnPoints: Found {spawnPoints.Length} objects");
|
||||
foreach (var sp in spawnPoints)
|
||||
{
|
||||
Debug.Log($" - {sp.name} at {sp.transform.position}, isAvailable={sp.isAvailable}, spawnIndex={sp.spawnIndex}");
|
||||
}
|
||||
|
||||
// 3. NetworkConnectionHandler 확인
|
||||
var connectionHandler = FindObjectOfType<NetworkConnectionHandler>();
|
||||
if (connectionHandler != null)
|
||||
{
|
||||
Debug.Log($"NetworkConnectionHandler: spawnPoints.Count={connectionHandler.spawnPoints.Count}, findAuto={connectionHandler.findSpawnPointsAutomatically}");
|
||||
}
|
||||
|
||||
// 4. NetworkSpawnManager 확인
|
||||
var spawnManager = FindObjectOfType<Northbound.NetworkSpawnManager>();
|
||||
if (spawnManager != null)
|
||||
{
|
||||
Debug.Log($"NetworkSpawnManager: spawnPoints.Count={spawnManager.spawnPoints.Count}, findAuto={spawnManager.findSpawnPointsAutomatically}");
|
||||
}
|
||||
|
||||
// 플레이어가 스폰될 때까지 대기
|
||||
StartCoroutine(CheckPlayerAfterSpawn());
|
||||
}
|
||||
|
||||
private IEnumerator CheckPlayerAfterSpawn()
|
||||
{
|
||||
// 플레이어가 스폰될 때까지 최대 5초 대기
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
yield return new WaitForSeconds(0.1f);
|
||||
|
||||
var players = GameObject.FindObjectsByType<NetworkPlayerController>(FindObjectsSortMode.None);
|
||||
if (players != null && players.Length > 0)
|
||||
{
|
||||
Debug.Log($"Found {players.Length} player(s) - checking equipment...");
|
||||
|
||||
foreach (var playerCtrl in players)
|
||||
{
|
||||
Debug.Log($"Player found: {playerCtrl.name}, IsOwner={playerCtrl.IsOwner}");
|
||||
|
||||
var equipmentSocketOnPlayer = playerCtrl.GetComponent<Northbound.EquipmentSocket>();
|
||||
var networkEquipSocketOnPlayer = playerCtrl.GetComponent<Northbound.NetworkEquipmentSocket>();
|
||||
|
||||
if (equipmentSocketOnPlayer != null)
|
||||
Debug.Log($"Player has EquipmentSocket: YES");
|
||||
else
|
||||
Debug.LogWarning($"Player has EquipmentSocket: NO");
|
||||
|
||||
if (networkEquipSocketOnPlayer != null)
|
||||
Debug.Log($"Player has NetworkEquipmentSocket: YES");
|
||||
else
|
||||
Debug.LogWarning($"Player has NetworkEquipmentSocket: NO");
|
||||
}
|
||||
|
||||
Debug.Log("=== DEBUG INFO END ===");
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
// 5초 후에도 플레이어가 없는지 확인
|
||||
var finalCheck = GameObject.FindObjectsByType<NetworkPlayerController>(FindObjectsSortMode.None);
|
||||
if (finalCheck == null || finalCheck.Length == 0)
|
||||
{
|
||||
Debug.LogWarning($"Player did not spawn within 5 seconds!");
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/NetworkDebug.cs.meta
Normal file
2
Assets/Scripts/NetworkDebug.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c4d562c43da292a4082bb22cb0d3e361
|
||||
162
Assets/Scripts/NetworkEquipmentSocket.cs
Normal file
162
Assets/Scripts/NetworkEquipmentSocket.cs
Normal file
@@ -0,0 +1,162 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using Unity.Netcode;
|
||||
|
||||
namespace Northbound
|
||||
{
|
||||
/// <summary>
|
||||
/// 네트워크 환경에서 작동하는 장비 소켓 관리
|
||||
/// </summary>
|
||||
public class NetworkEquipmentSocket : NetworkBehaviour
|
||||
{
|
||||
[System.Serializable]
|
||||
public class Socket
|
||||
{
|
||||
public string socketName; // "RightHand", "LeftHand", "Back" 등
|
||||
public Transform socketTransform; // 실제 본 Transform
|
||||
[HideInInspector] public NetworkObject currentEquipmentNetworkObj; // 현재 장착된 장비 NetworkObject
|
||||
[HideInInspector] public GameObject currentEquipment; // 현재 장착된 장비 GameObject
|
||||
}
|
||||
|
||||
[Header("Available Sockets")]
|
||||
public List<Socket> sockets = new List<Socket>();
|
||||
|
||||
private Dictionary<string, Socket> _socketDict = new Dictionary<string, Socket>();
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
// 빠른 검색을 위한 딕셔너리 생성
|
||||
foreach (var socket in sockets)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(socket.socketName))
|
||||
{
|
||||
_socketDict[socket.socketName] = socket;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 소켓에 장비 부착 (네트워크 스폰)
|
||||
/// </summary>
|
||||
public GameObject AttachToSocket(string socketName, GameObject equipmentPrefab)
|
||||
{
|
||||
if (!IsServer)
|
||||
{
|
||||
Debug.LogWarning("[NetworkEquipmentSocket] 서버에서만 장비를 장착할 수 있습니다.");
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!_socketDict.TryGetValue(socketName, out Socket socket))
|
||||
{
|
||||
Debug.LogWarning($"[NetworkEquipmentSocket] 소켓을 찾을 수 없습니다: {socketName}");
|
||||
return null;
|
||||
}
|
||||
|
||||
if (socket.socketTransform == null)
|
||||
{
|
||||
Debug.LogWarning($"[NetworkEquipmentSocket] 소켓 Transform이 없습니다: {socketName}");
|
||||
return null;
|
||||
}
|
||||
|
||||
// 기존 장비 제거
|
||||
DetachFromSocket(socketName);
|
||||
|
||||
// 새 장비 생성
|
||||
if (equipmentPrefab != null)
|
||||
{
|
||||
GameObject equipment = Instantiate(equipmentPrefab, socket.socketTransform);
|
||||
equipment.transform.localPosition = Vector3.zero;
|
||||
equipment.transform.localRotation = Quaternion.identity;
|
||||
|
||||
// NetworkObject 확인
|
||||
NetworkObject netObj = equipment.GetComponent<NetworkObject>();
|
||||
if (netObj == null)
|
||||
{
|
||||
Debug.LogWarning($"[NetworkEquipmentSocket] 장비 프리팹에 NetworkObject가 없습니다: {equipmentPrefab.name}");
|
||||
Destroy(equipment);
|
||||
return null;
|
||||
}
|
||||
|
||||
// 네트워크에 스폰
|
||||
netObj.Spawn(true); // true = 소유자가 파괴되면 장비도 파괴
|
||||
socket.currentEquipment = equipment;
|
||||
socket.currentEquipmentNetworkObj = netObj;
|
||||
|
||||
Debug.Log($"<color=green>[NetworkEquipmentSocket] 장비 장착됨: {socketName} -> {equipmentPrefab.name}</color>");
|
||||
return equipment;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 소켓에서 장비 제거 (네트워크 디스폰)
|
||||
/// </summary>
|
||||
public void DetachFromSocket(string socketName)
|
||||
{
|
||||
if (!IsServer)
|
||||
{
|
||||
Debug.LogWarning("[NetworkEquipmentSocket] 서버에서만 장비를 제거할 수 있습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_socketDict.TryGetValue(socketName, out Socket socket))
|
||||
return;
|
||||
|
||||
if (socket.currentEquipment != null)
|
||||
{
|
||||
// 네트워크에서 디스폰
|
||||
if (socket.currentEquipmentNetworkObj != null && socket.currentEquipmentNetworkObj.IsSpawned)
|
||||
{
|
||||
socket.currentEquipmentNetworkObj.Despawn(true);
|
||||
}
|
||||
|
||||
// 로컬 파괴
|
||||
if (socket.currentEquipment != null)
|
||||
{
|
||||
Destroy(socket.currentEquipment);
|
||||
}
|
||||
|
||||
socket.currentEquipment = null;
|
||||
socket.currentEquipmentNetworkObj = null;
|
||||
|
||||
Debug.Log($"<color=yellow>[NetworkEquipmentSocket] 장비 제거됨: {socketName}</color>");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 모든 소켓에서 장비 제거
|
||||
/// </summary>
|
||||
public void DetachAll()
|
||||
{
|
||||
if (!IsServer) return;
|
||||
|
||||
foreach (var socket in sockets)
|
||||
{
|
||||
if (socket.currentEquipment != null)
|
||||
{
|
||||
if (socket.currentEquipmentNetworkObj != null && socket.currentEquipmentNetworkObj.IsSpawned)
|
||||
{
|
||||
socket.currentEquipmentNetworkObj.Despawn(true);
|
||||
}
|
||||
|
||||
Destroy(socket.currentEquipment);
|
||||
socket.currentEquipment = null;
|
||||
socket.currentEquipmentNetworkObj = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 특정 소켓에 장비가 있는지 확인
|
||||
/// </summary>
|
||||
public bool HasEquipment(string socketName)
|
||||
{
|
||||
if (_socketDict.TryGetValue(socketName, out Socket socket))
|
||||
{
|
||||
return socket.currentEquipment != null;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/NetworkEquipmentSocket.cs.meta
Normal file
2
Assets/Scripts/NetworkEquipmentSocket.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58c239d2e984593429db90ada66cbdcf
|
||||
@@ -1,35 +1,30 @@
|
||||
using Unity.Netcode;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class NetworkManagerUI : MonoBehaviour
|
||||
namespace Northbound
|
||||
{
|
||||
[Header("UI Buttons")]
|
||||
[SerializeField] private Button hostButton;
|
||||
[SerializeField] private Button clientButton;
|
||||
[SerializeField] private Button serverButton;
|
||||
|
||||
private void Start()
|
||||
/// <summary>
|
||||
/// 키보드 단축키로 클라이언트/호스트 모드 시작
|
||||
/// </summary>
|
||||
public class ShortcutNetworkStarterUI : MonoBehaviour
|
||||
{
|
||||
if (hostButton != null)
|
||||
hostButton.onClick.AddListener(() => NetworkManager.Singleton.StartHost());
|
||||
[Header("UI Reference")]
|
||||
[SerializeField] private Text statusText;
|
||||
|
||||
if (clientButton != null)
|
||||
clientButton.onClick.AddListener(() => NetworkManager.Singleton.StartClient());
|
||||
private void Start()
|
||||
{
|
||||
if (statusText != null)
|
||||
{
|
||||
statusText.text = "'C' 키를 누르면 클라이언트 모드 시작";
|
||||
}
|
||||
}
|
||||
|
||||
if (serverButton != null)
|
||||
serverButton.onClick.AddListener(() => NetworkManager.Singleton.StartServer());
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (hostButton != null)
|
||||
hostButton.onClick.RemoveAllListeners();
|
||||
|
||||
if (clientButton != null)
|
||||
clientButton.onClick.RemoveAllListeners();
|
||||
|
||||
if (serverButton != null)
|
||||
serverButton.onClick.RemoveAllListeners();
|
||||
private void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.BackQuote))
|
||||
{
|
||||
statusText.gameObject.SetActive(!statusText.gameObject.activeSelf);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,13 +194,15 @@ namespace Northbound
|
||||
|
||||
public void OnInteractionComplete()
|
||||
{
|
||||
if (!IsOwner) return;
|
||||
|
||||
if (_interactionTimeoutCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_interactionTimeoutCoroutine);
|
||||
_interactionTimeoutCoroutine = null;
|
||||
}
|
||||
_isInteracting = false;
|
||||
Debug.Log("[PlayerInteraction] 상호작용 완료");
|
||||
Debug.Log($"[PlayerInteraction] Owner {OwnerClientId} - 상호작용 완료");
|
||||
}
|
||||
|
||||
// ========================================
|
||||
|
||||
@@ -3,74 +3,57 @@ using UnityEngine;
|
||||
|
||||
namespace Northbound
|
||||
{
|
||||
/// <summary>
|
||||
/// 플레이어의 자원 인벤토리 관리
|
||||
/// </summary>
|
||||
public class PlayerResourceInventory : NetworkBehaviour
|
||||
{
|
||||
[Header("Inventory Settings")]
|
||||
public int maxResourceCapacity = 100; // 최대 자원 보유량
|
||||
public int maxResourceCapacity = 100;
|
||||
private int _displayAmount = 0;
|
||||
|
||||
private NetworkVariable<int> _currentResourceAmount = new NetworkVariable<int>(
|
||||
0,
|
||||
NetworkVariableReadPermission.Everyone,
|
||||
NetworkVariableWritePermission.Server
|
||||
);
|
||||
|
||||
public int CurrentResourceAmount => _currentResourceAmount.Value;
|
||||
public int CurrentResourceAmount => _displayAmount;
|
||||
public int MaxResourceCapacity => maxResourceCapacity;
|
||||
|
||||
/// <summary>
|
||||
/// 자원을 추가할 수 있는지 확인
|
||||
/// </summary>
|
||||
public override void OnNetworkSpawn()
|
||||
{
|
||||
if (IsClient && IsOwner)
|
||||
{
|
||||
RequestResourceUpdateServerRpc();
|
||||
}
|
||||
}
|
||||
|
||||
[Rpc(SendTo.Server)]
|
||||
public void RequestResourceUpdateServerRpc()
|
||||
{
|
||||
var resourceManager = ServerResourceManager.Instance;
|
||||
if (resourceManager != null)
|
||||
{
|
||||
int amount = resourceManager.GetPlayerResourceAmount(OwnerClientId);
|
||||
UpdateResourceAmountClientRpc(amount);
|
||||
}
|
||||
}
|
||||
|
||||
[Rpc(SendTo.ClientsAndHost)]
|
||||
private void UpdateResourceAmountClientRpc(int amount)
|
||||
{
|
||||
_displayAmount = amount;
|
||||
}
|
||||
|
||||
public bool CanAddResource(int amount)
|
||||
{
|
||||
return _currentResourceAmount.Value + amount <= maxResourceCapacity;
|
||||
var resourceManager = ServerResourceManager.Instance;
|
||||
if (resourceManager != null)
|
||||
{
|
||||
return resourceManager.CanAddResource(OwnerClientId, amount);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 추가 가능한 최대 자원량 계산
|
||||
/// </summary>
|
||||
public int GetAvailableSpace()
|
||||
{
|
||||
return maxResourceCapacity - _currentResourceAmount.Value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 자원 추가 (서버에서만 호출)
|
||||
/// </summary>
|
||||
[Rpc(SendTo.Server, InvokePermission = RpcInvokePermission.Everyone)]
|
||||
public void AddResourceServerRpc(int amount)
|
||||
{
|
||||
if (amount <= 0) return;
|
||||
|
||||
int actualAmount = Mathf.Min(amount, maxResourceCapacity - _currentResourceAmount.Value);
|
||||
_currentResourceAmount.Value += actualAmount;
|
||||
|
||||
Debug.Log($"플레이어 {OwnerClientId} - 자원 추가: +{actualAmount}, 현재: {_currentResourceAmount.Value}/{maxResourceCapacity}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 자원 제거 (서버에서만 호출)
|
||||
/// </summary>
|
||||
[Rpc(SendTo.Server, InvokePermission = RpcInvokePermission.Everyone)]
|
||||
public void RemoveResourceServerRpc(int amount)
|
||||
{
|
||||
if (amount <= 0) return;
|
||||
|
||||
int actualAmount = Mathf.Min(amount, _currentResourceAmount.Value);
|
||||
_currentResourceAmount.Value -= actualAmount;
|
||||
|
||||
Debug.Log($"플레이어 {OwnerClientId} - 자원 사용: -{actualAmount}, 현재: {_currentResourceAmount.Value}/{maxResourceCapacity}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 자원 설정 (서버에서만 호출)
|
||||
/// </summary>
|
||||
[Rpc(SendTo.Server, InvokePermission = RpcInvokePermission.Everyone)]
|
||||
public void SetResourceServerRpc(int amount)
|
||||
{
|
||||
_currentResourceAmount.Value = Mathf.Clamp(amount, 0, maxResourceCapacity);
|
||||
var resourceManager = ServerResourceManager.Instance;
|
||||
if (resourceManager != null)
|
||||
{
|
||||
return resourceManager.GetAvailableSpace(OwnerClientId);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Unity.Netcode;
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Northbound
|
||||
{
|
||||
@@ -112,6 +113,7 @@ namespace Northbound
|
||||
{
|
||||
_currentResources.Value = maxResources;
|
||||
_lastRechargeTime = Time.time;
|
||||
_lastGatheringTime = Time.time - gatheringCooldown;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,28 +139,17 @@ namespace Northbound
|
||||
|
||||
public bool CanInteract(ulong playerId)
|
||||
{
|
||||
// 자원 노드에 자원이 없으면 상호작용 불가
|
||||
if (_currentResources.Value <= 0)
|
||||
return false;
|
||||
|
||||
// 쿨다운 확인
|
||||
if (Time.time - _lastGatheringTime < gatheringCooldown)
|
||||
return false;
|
||||
|
||||
// 플레이어 인벤토리 확인
|
||||
if (NetworkManager.Singleton != null &&
|
||||
NetworkManager.Singleton.ConnectedClients.TryGetValue(playerId, out var client))
|
||||
var resourceManager = ServerResourceManager.Instance;
|
||||
if (resourceManager != null)
|
||||
{
|
||||
if (client.PlayerObject != null)
|
||||
{
|
||||
var playerInventory = client.PlayerObject.GetComponent<PlayerResourceInventory>();
|
||||
if (playerInventory != null)
|
||||
{
|
||||
// 플레이어가 받을 수 있는 공간이 없으면 상호작용 불가
|
||||
if (playerInventory.GetAvailableSpace() <= 0)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (resourceManager.GetAvailableSpace(playerId) <= 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -211,17 +202,11 @@ namespace Northbound
|
||||
if (!CanInteract(playerId))
|
||||
return;
|
||||
|
||||
var playerObject = NetworkManager.Singleton.ConnectedClients[playerId].PlayerObject;
|
||||
if (playerObject == null)
|
||||
var resourceManager = ServerResourceManager.Instance;
|
||||
if (resourceManager == null)
|
||||
return;
|
||||
|
||||
var playerInventory = playerObject.GetComponent<PlayerResourceInventory>();
|
||||
if (playerInventory == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int playerAvailableSpace = playerInventory.GetAvailableSpace();
|
||||
int playerAvailableSpace = resourceManager.GetAvailableSpace(playerId);
|
||||
|
||||
int gatheredAmount = Mathf.Min(
|
||||
resourcesPerGathering,
|
||||
@@ -237,12 +222,27 @@ namespace Northbound
|
||||
_currentResources.Value -= gatheredAmount;
|
||||
_lastGatheringTime = Time.time;
|
||||
|
||||
playerInventory.AddResourceServerRpc(gatheredAmount);
|
||||
resourceManager.AddResource(playerId, gatheredAmount);
|
||||
UpdatePlayerResourcesClientRpc(playerId);
|
||||
|
||||
ShowGatheringEffectClientRpc();
|
||||
}
|
||||
|
||||
[Rpc(SendTo.ClientsAndHost)]
|
||||
private void UpdatePlayerResourcesClientRpc(ulong playerId)
|
||||
{
|
||||
var playerObject = NetworkManager.Singleton.ConnectedClients[playerId].PlayerObject;
|
||||
if (playerObject != null)
|
||||
{
|
||||
var playerInventory = playerObject.GetComponent<PlayerResourceInventory>();
|
||||
if (playerInventory != null)
|
||||
{
|
||||
playerInventory.RequestResourceUpdateServerRpc();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Rpc(SendTo.NotServer)]
|
||||
private void ShowGatheringEffectClientRpc()
|
||||
{
|
||||
if (gatheringEffectPrefab != null && effectSpawnPoint != null)
|
||||
@@ -275,4 +275,4 @@ namespace Northbound
|
||||
return transform;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,24 +32,14 @@ namespace Northbound
|
||||
|
||||
public bool CanInteract(ulong playerId)
|
||||
{
|
||||
// 이미 수집됨
|
||||
if (_isCollected)
|
||||
return false;
|
||||
|
||||
// 플레이어 인벤토리 확인
|
||||
if (NetworkManager.Singleton != null &&
|
||||
NetworkManager.Singleton.ConnectedClients.TryGetValue(playerId, out var client))
|
||||
var resourceManager = ServerResourceManager.Instance;
|
||||
if (resourceManager != null)
|
||||
{
|
||||
if (client.PlayerObject != null)
|
||||
{
|
||||
var playerInventory = client.PlayerObject.GetComponent<PlayerResourceInventory>();
|
||||
if (playerInventory != null)
|
||||
{
|
||||
// 플레이어가 받을 수 있는 공간이 없으면 상호작용 불가
|
||||
if (playerInventory.GetAvailableSpace() <= 0)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (resourceManager.GetAvailableSpace(playerId) <= 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -69,49 +59,52 @@ namespace Northbound
|
||||
if (!CanInteract(playerId))
|
||||
return;
|
||||
|
||||
// 중복 수집 방지
|
||||
if (_isCollected)
|
||||
return;
|
||||
|
||||
_isCollected = true;
|
||||
|
||||
// 플레이어의 인벤토리 확인
|
||||
var playerObject = NetworkManager.Singleton.ConnectedClients[playerId].PlayerObject;
|
||||
if (playerObject == null)
|
||||
return;
|
||||
|
||||
var playerInventory = playerObject.GetComponent<PlayerResourceInventory>();
|
||||
if (playerInventory == null)
|
||||
var resourceManager = ServerResourceManager.Instance;
|
||||
if (resourceManager == null)
|
||||
{
|
||||
Debug.LogWarning($"플레이어 {playerId}에게 PlayerResourceInventory 컴포넌트가 없습니다.");
|
||||
Debug.LogWarning("ServerResourceManager 인스턴스를 찾을 수 없습니다.");
|
||||
_isCollected = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// 플레이어가 받을 수 있는 최대량 계산
|
||||
int playerAvailableSpace = playerInventory.GetAvailableSpace();
|
||||
|
||||
// 실제 지급할 양 계산
|
||||
int playerAvailableSpace = resourceManager.GetAvailableSpace(playerId);
|
||||
int collectedAmount = Mathf.Min(resourceAmount, playerAvailableSpace);
|
||||
|
||||
if (collectedAmount <= 0)
|
||||
{
|
||||
Debug.Log($"플레이어 {playerId}의 인벤토리가 가득 찼습니다.");
|
||||
_isCollected = false; // 수집 실패 시 다시 시도 가능하도록
|
||||
_isCollected = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// 플레이어에게 자원 추가
|
||||
playerInventory.AddResourceServerRpc(collectedAmount);
|
||||
resourceManager.AddResource(playerId, collectedAmount);
|
||||
UpdatePlayerResourcesClientRpc(playerId);
|
||||
|
||||
Debug.Log($"플레이어 {playerId}가 {collectedAmount} {resourceName}을(를) 획득했습니다.");
|
||||
|
||||
// 이펙트 표시 및 오브젝트 제거
|
||||
ShowPickupEffectClientRpc();
|
||||
|
||||
// 짧은 딜레이 후 제거 (이펙트를 위해)
|
||||
Invoke(nameof(DestroyPickup), 0.1f);
|
||||
}
|
||||
|
||||
[Rpc(SendTo.ClientsAndHost)]
|
||||
private void UpdatePlayerResourcesClientRpc(ulong playerId)
|
||||
{
|
||||
var playerObject = NetworkManager.Singleton.ConnectedClients[playerId].PlayerObject;
|
||||
if (playerObject != null)
|
||||
{
|
||||
var playerInventory = playerObject.GetComponent<PlayerResourceInventory>();
|
||||
if (playerInventory != null)
|
||||
{
|
||||
playerInventory.RequestResourceUpdateServerRpc();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Rpc(SendTo.ClientsAndHost)]
|
||||
private void ShowPickupEffectClientRpc()
|
||||
{
|
||||
|
||||
101
Assets/Scripts/ServerResourceManager.cs
Normal file
101
Assets/Scripts/ServerResourceManager.cs
Normal file
@@ -0,0 +1,101 @@
|
||||
using Unity.Netcode;
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Northbound
|
||||
{
|
||||
public class ServerResourceManager : NetworkBehaviour
|
||||
{
|
||||
public static ServerResourceManager Instance { get; private set; }
|
||||
|
||||
private Dictionary<ulong, int> _playerResources = new Dictionary<ulong, int>();
|
||||
private NetworkVariable<int> _resourcesData = new NetworkVariable<int>();
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (Instance != null && Instance != this)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
public override void OnNetworkSpawn()
|
||||
{
|
||||
if (IsServer)
|
||||
{
|
||||
Instance = this;
|
||||
NetworkManager.Singleton.OnClientConnectedCallback += OnClientConnected;
|
||||
NetworkManager.Singleton.OnClientDisconnectCallback += OnClientDisconnected;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnNetworkDespawn()
|
||||
{
|
||||
if (IsServer)
|
||||
{
|
||||
if (NetworkManager.Singleton != null)
|
||||
{
|
||||
NetworkManager.Singleton.OnClientConnectedCallback -= OnClientConnected;
|
||||
NetworkManager.Singleton.OnClientDisconnectCallback -= OnClientDisconnected;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnClientConnected(ulong clientId)
|
||||
{
|
||||
_playerResources[clientId] = 0;
|
||||
}
|
||||
|
||||
private void OnClientDisconnected(ulong clientId)
|
||||
{
|
||||
_playerResources.Remove(clientId);
|
||||
}
|
||||
|
||||
public int GetPlayerResourceAmount(ulong clientId)
|
||||
{
|
||||
if (_playerResources.TryGetValue(clientId, out var resource))
|
||||
{
|
||||
return resource;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public bool CanAddResource(ulong clientId, int amount)
|
||||
{
|
||||
if (_playerResources.TryGetValue(clientId, out var resource))
|
||||
{
|
||||
return resource + amount <= 100;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int GetAvailableSpace(ulong clientId)
|
||||
{
|
||||
if (_playerResources.TryGetValue(clientId, out var resource))
|
||||
{
|
||||
return 100 - resource;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void AddResource(ulong clientId, int amount)
|
||||
{
|
||||
if (_playerResources.TryGetValue(clientId, out var resource))
|
||||
{
|
||||
int actualAmount = Mathf.Min(amount, 100 - resource);
|
||||
_playerResources[clientId] = resource + actualAmount;
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveResource(ulong clientId, int amount)
|
||||
{
|
||||
if (_playerResources.TryGetValue(clientId, out var resource))
|
||||
{
|
||||
int actualAmount = Mathf.Min(amount, resource);
|
||||
_playerResources[clientId] = resource - actualAmount;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/ServerResourceManager.cs.meta
Normal file
2
Assets/Scripts/ServerResourceManager.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1cf781ac9fc26344a883a69b98104373
|
||||
50
Assets/Scripts/ShortcutNetworkStarter.cs
Normal file
50
Assets/Scripts/ShortcutNetworkStarter.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using Unity.Netcode;
|
||||
|
||||
namespace Northbound
|
||||
{
|
||||
public class ShortcutNetworkStarter : MonoBehaviour
|
||||
{
|
||||
[Header("Input Actions")]
|
||||
[SerializeField] private InputActionReference startAsClientAction;
|
||||
|
||||
private bool _isClientStarted = false;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if (startAsClientAction != null && startAsClientAction.action != null)
|
||||
{
|
||||
startAsClientAction.action.performed += StartAsClient;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (startAsClientAction != null && startAsClientAction.action != null)
|
||||
{
|
||||
startAsClientAction.action.performed -= StartAsClient;
|
||||
}
|
||||
}
|
||||
|
||||
private void StartAsClient(InputAction.CallbackContext context)
|
||||
{
|
||||
if (NetworkManager.Singleton == null)
|
||||
{
|
||||
Debug.LogError("[ShortcutNetworkStarter] NetworkManager.Singleton이 null입니다!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (NetworkManager.Singleton.IsClient)
|
||||
{
|
||||
Debug.Log("[ShortcutNetworkStarter] 이미 클라이언트 모드입니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
_isClientStarted = true;
|
||||
|
||||
Debug.Log("[ShortcutNetworkStarter] 클라이언트 모드로 시작합니다...");
|
||||
NetworkManager.Singleton.StartClient();
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/ShortcutNetworkStarter.cs.meta
Normal file
2
Assets/Scripts/ShortcutNetworkStarter.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c83db7812a3e91149a9626a2302f43cd
|
||||
8
Assets/Settings/Build Profiles.meta
Normal file
8
Assets/Settings/Build Profiles.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7231ff870d55b254384c1a74dbeaf7f6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
94
Assets/Settings/Build Profiles/Windows.asset
Normal file
94
Assets/Settings/Build Profiles/Windows.asset
Normal file
@@ -0,0 +1,94 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 15003, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name: Windows
|
||||
m_EditorClassIdentifier: UnityEditor.dll::UnityEditor.Build.Profile.BuildProfile
|
||||
m_AssetVersion: 1
|
||||
m_BuildTarget: 19
|
||||
m_Subtarget: 2
|
||||
m_PlatformId: 4e3c793746204150860bf175a9a41a05
|
||||
m_PlatformBuildProfile:
|
||||
rid: 4349351379921797208
|
||||
m_OverrideGlobalSceneList: 0
|
||||
m_Scenes: []
|
||||
m_HasScriptingDefines: 0
|
||||
m_ScriptingDefines: []
|
||||
m_PlayerSettingsYaml:
|
||||
m_Settings: []
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
- rid: 4349351379921797208
|
||||
type: {class: WindowsPlatformSettings, ns: UnityEditor.WindowsStandalone, asm: UnityEditor.WindowsStandalone.Extensions}
|
||||
data:
|
||||
m_Development: 0
|
||||
m_ConnectProfiler: 0
|
||||
m_BuildWithDeepProfilingSupport: 0
|
||||
m_AllowDebugging: 0
|
||||
m_WaitForManagedDebugger: 0
|
||||
m_ManagedDebuggerFixedPort: 0
|
||||
m_ExplicitNullChecks: 0
|
||||
m_ExplicitDivideByZeroChecks: 0
|
||||
m_ExplicitArrayBoundsChecks: 0
|
||||
m_CompressionType: 0
|
||||
m_InstallInBuildFolder: 0
|
||||
m_InsightsSettingsContainer:
|
||||
m_BuildProfileEngineDiagnosticsState: 2
|
||||
m_AdaptivePerformanceEnabled: 0
|
||||
m_WindowsBuildAndRunDeployTarget: 0
|
||||
m_Architecture: 0
|
||||
m_CreateSolution: 0
|
||||
m_CopyPDBFiles: 0
|
||||
m_WindowsDevicePortalAddress:
|
||||
m_WindowsDevicePortalUsername:
|
||||
--- !u!114 &5293933444619661119
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 3
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 15009, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name: Graphics Settings
|
||||
m_EditorClassIdentifier: UnityEditor.dll::UnityEditor.Build.Profile.BuildProfileGraphicsSettings
|
||||
m_LightmapStripping: 0
|
||||
m_LightmapKeepPlain: 1
|
||||
m_LightmapKeepDirCombined: 1
|
||||
m_LightmapKeepDynamicPlain: 1
|
||||
m_LightmapKeepDynamicDirCombined: 1
|
||||
m_LightmapKeepShadowMask: 1
|
||||
m_LightmapKeepSubtractive: 1
|
||||
m_FogStripping: 0
|
||||
m_FogKeepLinear: 1
|
||||
m_FogKeepExp: 1
|
||||
m_FogKeepExp2: 1
|
||||
m_InstancingStripping: 0
|
||||
m_BrgStripping: 0
|
||||
m_LogWhenShaderIsCompiled: 0
|
||||
m_CameraRelativeLightCulling: 0
|
||||
m_CameraRelativeShadowCulling: 0
|
||||
m_VideoShadersIncludeMode: 2
|
||||
m_AlwaysIncludedShaders:
|
||||
- {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LightProbeOutsideHullStrategy: 0
|
||||
m_PreloadedShaders: []
|
||||
m_PreloadShadersBatchTimeLimit: -1
|
||||
m_ShaderBuildSettings:
|
||||
keywordDeclarationOverrides: []
|
||||
8
Assets/Settings/Build Profiles/Windows.asset.meta
Normal file
8
Assets/Settings/Build Profiles/Windows.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b278d7bcf7e5c5b46ae41f7fa05f9d49
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -15,7 +15,7 @@ MonoBehaviour:
|
||||
k_AssetVersion: 13
|
||||
k_AssetPreviousVersion: 13
|
||||
m_RendererType: 1
|
||||
m_RendererData: {fileID: 11400000, guid: 618d298269e66c542b306de85db1faea, type: 2}
|
||||
m_RendererData: {fileID: 0}
|
||||
m_RendererDataList:
|
||||
- {fileID: 11400000, guid: 569816eb300be8149adcef0c7c162f8c, type: 2}
|
||||
m_DefaultRendererIndex: 0
|
||||
@@ -128,14 +128,14 @@ MonoBehaviour:
|
||||
m_PrefilterSoftShadowsQualityHigh: 1
|
||||
m_PrefilterSoftShadows: 0
|
||||
m_PrefilterScreenCoord: 1
|
||||
m_PrefilterScreenSpaceIrradiance: 0
|
||||
m_PrefilterScreenSpaceIrradiance: 1
|
||||
m_PrefilterNativeRenderPass: 1
|
||||
m_PrefilterUseLegacyLightmaps: 0
|
||||
m_PrefilterBicubicLightmapSampling: 1
|
||||
m_PrefilterReflectionProbeRotation: 0
|
||||
m_PrefilterReflectionProbeBlending: 0
|
||||
m_PrefilterReflectionProbeBoxProjection: 0
|
||||
m_PrefilterReflectionProbeAtlas: 0
|
||||
m_PrefilterReflectionProbeRotation: 1
|
||||
m_PrefilterReflectionProbeBlending: 1
|
||||
m_PrefilterReflectionProbeBoxProjection: 1
|
||||
m_PrefilterReflectionProbeAtlas: 1
|
||||
m_ShaderVariantLogLevel: 0
|
||||
m_ShadowCascades: 2
|
||||
m_Textures:
|
||||
|
||||
@@ -66,7 +66,19 @@ MonoBehaviour:
|
||||
- rid: 235636870086918150
|
||||
- rid: 235636870086918151
|
||||
m_RuntimeSettings:
|
||||
m_List: []
|
||||
m_List:
|
||||
- rid: 7752762179098771456
|
||||
- rid: 7752762179098771459
|
||||
- rid: 7752762179098771461
|
||||
- rid: 7752762179098771462
|
||||
- rid: 7752762179098771463
|
||||
- rid: 7752762179098771464
|
||||
- rid: 7752762179098771466
|
||||
- rid: 7752762179098771468
|
||||
- rid: 7752762179098771472
|
||||
- rid: 7752762179098771476
|
||||
- rid: 3114554777721110529
|
||||
- rid: 3114554777721110530
|
||||
m_AssetVersion: 9
|
||||
m_ObsoleteDefaultVolumeProfile: {fileID: 0}
|
||||
m_RenderingLayerNames:
|
||||
|
||||
Reference in New Issue
Block a user