몬스터 이동 AI

- 코어로의 경로가 막혀있을 경우 장애물을 파괴하여 경로 확보

몬스터를 소환하는 EnemyPortal 생성
This commit is contained in:
2026-01-29 14:39:10 +09:00
parent 3779ea9f3b
commit ada6aae8bc
16 changed files with 1201 additions and 513 deletions

View File

@@ -0,0 +1,127 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3432047510330746227
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 228462577495887354}
- component: {fileID: 6859825394817103090}
m_Layer: 0
m_Name: EnemyPortal
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &228462577495887354
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3432047510330746227}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -19.4593, y: 1.00002, z: -58.8717}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1144932316349886388}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &6859825394817103090
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3432047510330746227}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cb91abd3aae74d941a739a48aefb74a1, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::EnemyPortal
Enemies:
- {fileID: 5176576196123937037, guid: 951b69041a2ace947afd721fefb3eaba, type: 3}
--- !u!1001 &606055883085645919
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 228462577495887354}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
propertyPath: m_LocalScale.x
value: 10
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
propertyPath: m_LocalScale.y
value: 10
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
propertyPath: m_LocalScale.z
value: 10
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
propertyPath: m_LocalRotation.x
value: 0.00000008146034
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -7511558181221131132, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
propertyPath: 'm_Materials.Array.data[0]'
value:
objectReference: {fileID: 2100000, guid: 6a8d9e46e46bff3418a222db6f5786a5, type: 2}
- target: {fileID: 919132149155446097, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
propertyPath: m_Name
value: wall_straight_gate
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
--- !u!4 &1144932316349886388 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
m_PrefabInstance: {fileID: 606055883085645919}
m_PrefabAsset: {fileID: 0}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 11e3760dda2c0164abf759c18d918893
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -9,7 +9,7 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 9184257640407244267}
m_Layer: 0
m_Layer: 9
m_Name: FrontExitPoint
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -40,7 +40,7 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 1475778514072803484}
m_Layer: 0
m_Layer: 9
m_Name: BackExitPoint
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -78,8 +78,7 @@ GameObject:
- component: {fileID: 6336968390548483685}
- component: {fileID: 1893682255695519596}
- component: {fileID: 2622677457934171119}
- component: {fileID: 2624539771375861302}
m_Layer: 0
m_Layer: 9
m_Name: Gate
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -137,7 +136,7 @@ NavMeshObstacle:
m_Shape: 1
m_Extents: {x: 4, y: 4, z: 1.5}
m_MoveThreshold: 0.1
m_Carve: 0
m_Carve: 1
m_CarveOnlyStationary: 1
m_Center: {x: 0, y: 0, z: 0}
m_TimeToStationary: 0.5
@@ -205,7 +204,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::Northbound.Building
ShowTopMostFoldoutHeaderGroup: 1
buildingData: {fileID: 0}
buildingData: {fileID: 11400000, guid: 0e495d169ee3bce449f4b1aea83d6818, type: 2}
gridPosition: {x: 0, y: 0, z: 0}
rotation: 0
initialTeam: 1
@@ -260,31 +259,6 @@ BoxCollider:
serializedVersion: 3
m_Size: {x: 8, y: 8, z: 1}
m_Center: {x: 0, y: 0, z: 2}
--- !u!114 &2624539771375861302
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2998551506809628252}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6eeb5dc026fdf4b488bc7ae0138ab719, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.AI.Navigation::Unity.AI.Navigation.NavMeshLink
m_SerializedVersion: 1
m_AgentTypeID: 0
m_StartPoint: {x: 0, y: 0, z: -2.5}
m_EndPoint: {x: 0, y: 0, z: 2.5}
m_StartTransform: {fileID: 0}
m_EndTransform: {fileID: 0}
m_Activated: 1
m_Width: 0
m_CostModifier: 1
m_IsOverridingCost: 0
m_Bidirectional: 1
m_AutoUpdatePosition: 0
m_Area: 0
--- !u!1001 &665699090875585891
PrefabInstance:
m_ObjectHideFlags: 0
@@ -349,10 +323,22 @@ PrefabInstance:
propertyPath: 'm_Materials.Array.data[0]'
value:
objectReference: {fileID: 2100000, guid: 91e05bbf1e5cbfb4d865c8e2febc4673, type: 2}
- target: {fileID: -4677237296440866189, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
propertyPath: m_Layer
value: 9
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
propertyPath: m_Name
value: wall_straight_gate
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
propertyPath: m_Layer
value: 9
objectReference: {fileID: 0}
- target: {fileID: 1046628172763319773, guid: 15f5826a4fa224044bdf0c1c6bc4685b, type: 3}
propertyPath: m_Layer
value: 9
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []

View File

@@ -32,7 +32,7 @@ Transform:
m_GameObject: {fileID: 5176576196123937037}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -20.95}
m_LocalPosition: {x: 0, y: 1, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
@@ -107,7 +107,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
GlobalObjectIdHash: 1957460564
GlobalObjectIdHash: 1279840896
InScenePlacedSourceGlobalObjectIdHash: 0
DeferredDespawnTick: 0
Ownership: 1
@@ -148,7 +148,7 @@ NavMeshAgent:
m_Enabled: 1
m_AgentTypeID: 0
m_Radius: 3.2048812
m_Speed: 7.93
m_Speed: 5
m_Acceleration: 8
avoidancePriority: 50
m_AngularSpeed: 120
@@ -174,20 +174,20 @@ MonoBehaviour:
m_EditorClassIdentifier: Assembly-CSharp::Northbound.EnemyAIController
ShowTopMostFoldoutHeaderGroup: 1
aiType: 3
detectionRange: 10
detectionRange: 6
detectionAngle: 360
playerLayer:
serializedVersion: 2
m_Bits: 512
obstacleLayer:
serializedVersion: 2
m_Bits: 4294967295
m_Bits: 640
maxChaseDistance: 30
chaseGiveUpDistance: 25
attackRange: 5
attackInterval: 1.5
attackDamage: 10
moveSpeed: 3.5
attackDamage: 50
moveSpeed: 5
chaseSpeedMultiplier: 1.2
showDebugInfo: 1
--- !u!136 &795251864369751459

View File

@@ -11,7 +11,9 @@ GameObject:
- component: {fileID: 5749230937810543840}
- component: {fileID: 4564973829688190844}
- component: {fileID: 2599592318476693256}
m_Layer: 0
- component: {fileID: 1907881863544148932}
- component: {fileID: 3214893598090363914}
m_Layer: 9
m_Name: Wall
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -67,10 +69,61 @@ NavMeshObstacle:
m_Shape: 1
m_Extents: {x: 4, y: 4, z: 1.5}
m_MoveThreshold: 0.1
m_Carve: 0
m_Carve: 1
m_CarveOnlyStationary: 1
m_Center: {x: 0, y: 0, z: 0}
m_TimeToStationary: 0.5
m_TimeToStationary: 0
--- !u!114 &1907881863544148932
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 351020651857757465}
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: 1061286994
InScenePlacedSourceGlobalObjectIdHash: 1061286994
DeferredDespawnTick: 0
Ownership: 1
AlwaysReplicateAsRoot: 0
SynchronizeTransform: 1
ActiveSceneSynchronization: 0
SceneMigrationSynchronization: 0
SpawnWithObservers: 1
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
SyncOwnerTransformWhenParented: 1
AllowOwnerToParent: 0
--- !u!114 &3214893598090363914
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 351020651857757465}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0ceedb9b012d848478813136b65738ae, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::Northbound.Building
ShowTopMostFoldoutHeaderGroup: 1
buildingData: {fileID: 11400000, guid: 0e495d169ee3bce449f4b1aea83d6818, type: 2}
gridPosition: {x: 0, y: 0, z: 0}
rotation: 0
initialTeam: 1
initialOwnerId: 1
useInitialOwner: 1
showHealthBar: 1
healthBarPrefab: {fileID: 0}
destroyEffectPrefab: {fileID: 0}
damageEffectPrefab: {fileID: 0}
effectSpawnPoint: {fileID: 0}
showGridBounds: 1
gridBoundsColor: {r: 0, g: 1, b: 1, a: 1}
--- !u!1001 &8926581783111832504
PrefabInstance:
m_ObjectHideFlags: 0
@@ -139,6 +192,10 @@ PrefabInstance:
propertyPath: m_Name
value: wall_straight
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 19a9a3527b4bd784f9c2c298374a843d, type: 3}
propertyPath: m_Layer
value: 9
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []