This commit is contained in:
2026-06-11 22:49:50 +07:00
parent 458c338b27
commit e85e66002f
4105 changed files with 1435727 additions and 11 deletions

View File

@@ -0,0 +1,482 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4058646450008586776
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4058646450008586779}
- component: {fileID: 4058646450008586781}
- component: {fileID: 4058646450008586778}
m_Layer: 8
m_Name: Cylinder
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &4058646450008586779
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4058646450008586776}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.5, z: 0}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4058646450681529834}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &4058646450008586781
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4058646450008586776}
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &4058646450008586778
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4058646450008586776}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 257
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 99dbb3f3abc3c4845a9b650ff678e7c1, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!1 &4058646450681529835
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4058646450681529834}
- component: {fileID: 4058646450681529836}
- component: {fileID: 4058646450681529837}
- component: {fileID: 4169833878024293418}
m_Layer: 8
m_Name: BotEntity
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4058646450681529834
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4058646450681529835}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -11.459311, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4058646450008586779}
- {fileID: 3871847004003071356}
- {fileID: 1063989041963613977}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &4058646450681529836
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4058646450681529835}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c9679e68a0f1144e79c664d9a11ca121, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 1073741824
target: {fileID: 0}
useRotation: 0
--- !u!114 &4058646450681529837
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4058646450681529835}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cfe9431ea8ad072f2aecd3041b1524dd, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 1073741831
shape:
radius: 0.35
height: 1
movement:
follower:
rotationSpeed: 600
speed: 5
maxRotationSpeed: 600
maxOnSpotRotationSpeed: Infinity
slowdownTime: 0.5
slowdownTimeWhenTurningOnSpot: 0
desiredWallDistance: 0.35
leadInRadiusWhenApproachingDestination: 1
allowRotatingOnSpotBacking: 1
debugFlags: 0
stopDistance: 0.2
rotationSmoothing: 0
positionSmoothing: 0
groundMask:
serializedVersion: 2
m_Bits: 4294967295
isStopped: 0
managedState:
rvoSettings:
agentTimeHorizon: 1
obstacleTimeHorizon: 0.2
maxNeighbours: 10
layer: 1
collidesWith: -1
priority: 0.5
debug: 0
locked: 0
pathfindingSettings:
graphMask:
value: -1
tagPenalties: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
traversableTags: -1
enableLocalAvoidance: 1
enableGravity: 1
autoRepathBacking:
mode: 2
period: 2
orientationBacking: 0
movementPlaneSourceBacking: 0
syncPosition: 1
syncRotation: 1
--- !u!114 &4169833878024293418
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4058646450681529835}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8503d71a898994d3288ce1708e2707fe, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 1073741824
anim: {fileID: 1063989041972695287}
endOfPathEffect: {fileID: 0}
naturalSpeed: 2.8571
--- !u!1 &7971476288746451723
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3871847004003071356}
- component: {fileID: 9112166881663351150}
- component: {fileID: 5390637690837143771}
- component: {fileID: 1936508073779893737}
m_Layer: 8
m_Name: Cube (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &3871847004003071356
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7971476288746451723}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0.38268343, z: 0, w: 0.92387956}
m_LocalPosition: {x: 0, y: 0.5, z: 0.176}
m_LocalScale: {x: 0.25, y: 1, z: 0.25}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 4058646450681529834}
m_LocalEulerAnglesHint: {x: 0, y: 45, z: 0}
--- !u!33 &9112166881663351150
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7971476288746451723}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &5390637690837143771
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7971476288746451723}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_RenderingLayerMask: 257
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 99dbb3f3abc3c4845a9b650ff678e7c1, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &1936508073779893737
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7971476288746451723}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1001 &1063989041963214231
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 4058646450681529834}
m_Modifications:
- target: {fileID: -7519004450640146648, guid: caeffedc34d9f4161b7694ad0d84bbd3,
type: 3}
propertyPath: m_Layer
value: 8
objectReference: {fileID: 0}
- target: {fileID: 100000, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_Layer
value: 8
objectReference: {fileID: 0}
- target: {fileID: 100004, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_Layer
value: 8
objectReference: {fileID: 0}
- target: {fileID: 100006, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_Layer
value: 8
objectReference: {fileID: 0}
- target: {fileID: 100008, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_Layer
value: 8
objectReference: {fileID: 0}
- target: {fileID: 100010, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_Layer
value: 8
objectReference: {fileID: 0}
- target: {fileID: 100012, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_Layer
value: 8
objectReference: {fileID: 0}
- target: {fileID: 100014, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_Name
value: mine_bot
objectReference: {fileID: 0}
- target: {fileID: 100014, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_Layer
value: 8
objectReference: {fileID: 0}
- target: {fileID: 100016, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_Layer
value: 8
objectReference: {fileID: 0}
- target: {fileID: 100018, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_Layer
value: 8
objectReference: {fileID: 0}
- target: {fileID: 100020, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_Layer
value: 8
objectReference: {fileID: 0}
- target: {fileID: 400014, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400014, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400014, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400014, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 400014, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_LocalRotation.x
value: -0.7071068
objectReference: {fileID: 0}
- target: {fileID: 400014, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 400014, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 400014, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400014, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400014, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2300000, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: 'm_Materials.Array.data[0]'
value:
objectReference: {fileID: 2100000, guid: 0f239eb41e29343e28970d1c5e9adede, type: 2}
- target: {fileID: 2300004, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: 'm_Materials.Array.data[0]'
value:
objectReference: {fileID: 2100000, guid: 0f239eb41e29343e28970d1c5e9adede, type: 2}
- target: {fileID: 2300006, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: 'm_Materials.Array.data[0]'
value:
objectReference: {fileID: 2100000, guid: 0f239eb41e29343e28970d1c5e9adede, type: 2}
- target: {fileID: 2300008, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: 'm_Materials.Array.data[0]'
value:
objectReference: {fileID: 2100000, guid: 0f239eb41e29343e28970d1c5e9adede, type: 2}
- target: {fileID: 2300010, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: 'm_Materials.Array.data[0]'
value:
objectReference: {fileID: 2100000, guid: 0f239eb41e29343e28970d1c5e9adede, type: 2}
- target: {fileID: 2300012, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: 'm_Materials.Array.data[0]'
value:
objectReference: {fileID: 2100000, guid: 0f239eb41e29343e28970d1c5e9adede, type: 2}
- target: {fileID: 2300014, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: 'm_Materials.Array.data[0]'
value:
objectReference: {fileID: 2100000, guid: 0f239eb41e29343e28970d1c5e9adede, type: 2}
- target: {fileID: 2300016, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: 'm_Materials.Array.data[0]'
value:
objectReference: {fileID: 2100000, guid: 0f239eb41e29343e28970d1c5e9adede, type: 2}
- target: {fileID: 2300018, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: 'm_Materials.Array.data[0]'
value:
objectReference: {fileID: 2100000, guid: 0f239eb41e29343e28970d1c5e9adede, type: 2}
- target: {fileID: 9500000, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
propertyPath: m_Controller
value:
objectReference: {fileID: 9100000, guid: 75b096e6c847f4e22be41113329a0693, type: 2}
- target: {fileID: 7621389643486796682, guid: caeffedc34d9f4161b7694ad0d84bbd3,
type: 3}
propertyPath: 'm_Materials.Array.data[0]'
value:
objectReference: {fileID: 2100000, guid: 0f239eb41e29343e28970d1c5e9adede, type: 2}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: caeffedc34d9f4161b7694ad0d84bbd3, type: 3}
--- !u!4 &1063989041963613977 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 400014, guid: caeffedc34d9f4161b7694ad0d84bbd3,
type: 3}
m_PrefabInstance: {fileID: 1063989041963214231}
m_PrefabAsset: {fileID: 0}
--- !u!95 &1063989041972695287 stripped
Animator:
m_CorrespondingSourceObject: {fileID: 9500000, guid: caeffedc34d9f4161b7694ad0d84bbd3,
type: 3}
m_PrefabInstance: {fileID: 1063989041963214231}
m_PrefabAsset: {fileID: 0}

View File

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

View File

@@ -0,0 +1,197 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &100000
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 400000}
m_Layer: 8
m_Name: Debris
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &400000
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 100000}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -4.2824173, y: 0.6453886, z: -2.8964014}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 400002}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &100002
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 400002}
- component: {fileID: 3300000}
- component: {fileID: 6500000}
- component: {fileID: 2300000}
- component: {fileID: 11400000}
- component: {fileID: 5400000}
m_Layer: 8
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &400002
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 100002}
m_LocalRotation: {x: -0.14136437, y: -0.2376695, z: -0.16778171, w: 0.94624454}
m_LocalPosition: {x: 0, y: 7.199627, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 400000}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &3300000
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 100002}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!65 &6500000
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 100002}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &2300000
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 100002}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: b71b71b0a1f9a48768a27ca6eefcfbdf, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 100002}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6bee0a6fa1f5d4f4db481219040523c4, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 2
graphMask:
value: 2147483647
type: 4
mesh: {fileID: 0}
rectangleSize: {x: 1, y: 1}
circleRadius: 0.71
circleResolution: 6
height: 1
meshScale: 1
center: {x: 0, y: 0, z: 0}
updateDistance: 0.5
isDual: 0
radiusExpansionMode: 1
cutsAddedGeom: 1
updateRotationDistance: 10
useRotationAndScale: 1
--- !u!54 &5400000
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 100002}
serializedVersion: 4
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_CenterOfMass: {x: 0, y: 0, z: 0}
m_InertiaTensor: {x: 1, y: 1, z: 1}
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0

View File

@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: deba0a6f7ec514207b7e850591a6f942
NativeFormatImporter:
userData:

View File

@@ -0,0 +1,272 @@
using UnityEngine;
namespace Pathfinding.Examples {
#if MODULE_ENTITIES
using Pathfinding.ECS;
using Unity.Entities;
using Unity.Mathematics;
using Unity.Transforms;
#endif
/// <summary>
/// Example of how to use Mecanim with the included movement scripts.
///
/// This script will use Mecanim to apply root motion to move the character
/// instead of allowing the movement script to do the movement.
///
/// It assumes that the Mecanim controller uses 3 input variables
/// - InputMagnitude which is simply 1 when the character should be moving and 0 when it should stop. Or, for the FollowerEntity component, 1 when it is moving at its natural speed, and less than 1 when it is moving slower.
/// - X which is component of the desired movement along the left/right axis. For the AIPath and RichAI movement scripts, this will be a velocity in meters/second, while for the FollowerEntity movement script, this will be an angular velocity in radians/second.
/// - Y which is component of the desired movement direction along the forward/backward axis. This is a velocity in meters/second.
///
/// It works with the <see cref="AIPath"/>, <see cref="RichAI"/> and <see cref="FollowerEntity"/> movement scripts.
///
/// See: https://docs.unity3d.com/Manual/RootMotion.html
/// See: <see cref="IAstarAI"/>
/// See: <see cref="AIPath"/>
/// See: <see cref="RichAI"/>
/// See: <see cref="FollowerEntity"/>
/// </summary>
[HelpURL("https://arongranberg.com/astar/documentation/stable/mecanimbridge.html")]
public class MecanimBridge : VersionedMonoBehaviour {
/// <summary>Smoothing factor for the velocity, in seconds.</summary>
public float velocitySmoothing = 1;
/// <summary>
/// Smoothing factor for the angular velocity, in seconds.
///
/// Note: This is only used with the <see cref="FollowerEntity"/> movement script.
/// </summary>
public float angularVelocitySmoothing = 1;
public float naturalSpeed = 5;
#if MODULE_ENTITIES
float smoothedRotationSpeed;
#endif
/// <summary>Cached reference to the movement script</summary>
IAstarAI ai;
/// <summary>Cached Animator component</summary>
Animator anim;
/// <summary>Cached Transform component</summary>
Transform tr;
Vector3 smoothedVelocity;
/// <summary>Position of the left and right feet during the previous frame</summary>
Vector3[] prevFootPos = new Vector3[2];
/// <summary>Cached reference to the left and right feet</summary>
Transform[] footTransforms;
const string InputMagnitudeKey = "InputMagnitude";
static int InputMagnitudeKeyHash = Animator.StringToHash(InputMagnitudeKey);
const string NormalizedSpeedKey = "NormalizedSpeed";
static int NormalizedSpeedKeyHash = Animator.StringToHash(NormalizedSpeedKey);
const string XAxisKey = "X";
static int XAxisKeyHash = Animator.StringToHash(XAxisKey);
const string YAxisKey = "Y";
static int YAxisKeyHash = Animator.StringToHash(YAxisKey);
protected override void Awake () {
base.Awake();
ai = GetComponent<IAstarAI>();
anim = GetComponent<Animator>();
tr = transform;
// Find the feet of the character
footTransforms = new [] { anim.GetBoneTransform(HumanBodyBones.LeftFoot), anim.GetBoneTransform(HumanBodyBones.RightFoot) };
if (anim != null) {
if (!HasParameter(anim, InputMagnitudeKey)) {
Debug.LogError($"No '{InputMagnitudeKey}' parameter found on the animator. The animator must have a float parameter called '{InputMagnitudeKey}'", this);
enabled = false;
}
if (!HasParameter(anim, XAxisKey)) {
Debug.LogError($"No '{XAxisKey}' parameter found on the animator. The animator must have a float parameter called '{XAxisKey}'", this);
enabled = false;
}
if (!HasParameter(anim, YAxisKey)) {
Debug.LogError($"No '{YAxisKey}' parameter found on the animator. The animator must have a float parameter called '{YAxisKey}'", this);
enabled = false;
}
}
}
static bool HasParameter (Animator animator, string paramName) {
foreach (AnimatorControllerParameter param in animator.parameters) if (param.name == paramName) return true;
return false;
}
#if MODULE_ENTITIES
void OnEnable () {
if (ai is FollowerEntity followerEntity) {
followerEntity.movementOverrides.AddBeforeMovementCallback(MovementOverride);
}
}
void OnDisable () {
if (ai is FollowerEntity followerEntity) {
followerEntity.movementOverrides.RemoveBeforeMovementCallback(MovementOverride);
}
}
void MovementOverride (Entity entity, float dt, ref LocalTransform localTransform, ref AgentCylinderShape shape, ref AgentMovementPlane movementPlane, ref DestinationPoint destination, ref MovementState movementState, ref MovementSettings movementSettings, ref MovementControl movementControl, ref ResolvedMovement resolvedMovement) {
var desiredVelocity = math.normalizesafe(resolvedMovement.targetPoint - localTransform.Position) * resolvedMovement.speed;
var currentRotation = movementPlane.value.ToPlane(localTransform.Rotation);
var deltaRotationSpeed = AstarMath.DeltaAngle(currentRotation, resolvedMovement.targetRotation);
deltaRotationSpeed = Mathf.Sign(deltaRotationSpeed) * Mathf.Clamp01(Mathf.Abs(deltaRotationSpeed) / math.max(0.001f, dt * resolvedMovement.rotationSpeed));
deltaRotationSpeed = -deltaRotationSpeed * resolvedMovement.rotationSpeed;
smoothedRotationSpeed = Mathf.Lerp(smoothedRotationSpeed, deltaRotationSpeed, angularVelocitySmoothing > 0 ? dt / angularVelocitySmoothing : 1);
// Calculate the desired velocity relative to the character (+Z = forward, +X = right)
var localDesiredVelocity = localTransform.InverseTransformDirection(desiredVelocity);
localDesiredVelocity.y = 0;
smoothedVelocity = Vector3.Lerp(smoothedVelocity, localDesiredVelocity, velocitySmoothing > 0 ? dt / velocitySmoothing : 1);
if (smoothedVelocity.magnitude < 0.4f) {
smoothedVelocity = smoothedVelocity.normalized * 0.4f;
}
var normalizedRotationSpeed = movementSettings.follower.maxRotationSpeed > 0 ? Mathf.Rad2Deg * Mathf.Abs(resolvedMovement.rotationSpeed) / movementSettings.follower.maxRotationSpeed : 0;
var normalizedSpeed = movementSettings.follower.speed * naturalSpeed > 0 ? resolvedMovement.speed / naturalSpeed : 0;
// Combine the normalized rotation speed and normalized speed such that either of them being large, results in the input magnitude being large.
// This is to ensure that even if the agent wants to almost rotate on the spot, the input magnitude will still be large.
var inputMagnitude = Mathf.Min(1, Mathf.Sqrt(normalizedSpeed*normalizedSpeed + normalizedRotationSpeed*normalizedRotationSpeed));
anim.SetFloat(InputMagnitudeKeyHash, inputMagnitude);
anim.SetFloat(XAxisKeyHash, smoothedRotationSpeed);
anim.SetFloat(YAxisKeyHash, smoothedVelocity.z);
// Calculate how much the agent should rotate during this frame
var nextPosition = localTransform.Position;
var nextRotation = localTransform.Rotation;
// Apply rotational root motion
nextRotation = anim.deltaRotation * nextRotation;
nextPosition += (float3)anim.deltaPosition;
resolvedMovement.targetPoint = nextPosition;
resolvedMovement.targetRotation = movementPlane.value.ToPlane(nextRotation);
// target rotation speed?
resolvedMovement.speed = math.length(nextPosition - localTransform.Position) / math.max(0.001f, dt);
}
#endif
/// <summary>Update is called once per frame</summary>
void Update () {
if (ai is AIBase aiBase) {
aiBase.canMove = false;
// aiBase.updatePosition = false;
// aiBase.updateRotation = false;
}
}
/// <summary>Calculate position of the currently grounded foot</summary>
Vector3 CalculateBlendPoint () {
// Fall back to rotating around the transform position if no feet could be found
if (footTransforms[0] == null || footTransforms[1] == null) return tr.position;
var leftFootPos = footTransforms[0].position;
var rightFootPos = footTransforms[1].position;
// This is the same calculation that Unity uses for
// Animator.pivotWeight and Animator.pivotPosition
// but those properties do not work for all animations apparently.
var footVelocity1 = (leftFootPos - prevFootPos[0]) / Time.deltaTime;
var footVelocity2 = (rightFootPos - prevFootPos[1]) / Time.deltaTime;
float denominator = footVelocity1.magnitude + footVelocity2.magnitude;
var pivotWeight = denominator > 0 ? footVelocity1.magnitude / denominator : 0.5f;
prevFootPos[0] = leftFootPos;
prevFootPos[1] = rightFootPos;
var pivotPosition = Vector3.Lerp(leftFootPos, rightFootPos, pivotWeight);
return pivotPosition;
}
void OnAnimatorMove () {
#if MODULE_ENTITIES
if (ai is FollowerEntity) return;
#endif
Vector3 nextPosition;
Quaternion nextRotation;
ai.MovementUpdate(Time.deltaTime, out nextPosition, out nextRotation);
//var desiredVelocity = (ai.steeringTarget - tr.position).normalized * 2;//ai.desiredVelocity;
var desiredVelocity = ai.desiredVelocity;
// Calculate the desired velocity relative to the character (+Z = forward, +X = right)
var localDesiredVelocity = tr.InverseTransformDirection(desiredVelocity);
localDesiredVelocity.y = 0;
var desiredVelocityWithoutGrav = tr.TransformDirection(localDesiredVelocity);
anim.SetFloat(InputMagnitudeKeyHash, ai.reachedEndOfPath || localDesiredVelocity.magnitude < 0.1f ? 0f : 1f);
smoothedVelocity = Vector3.Lerp(smoothedVelocity, localDesiredVelocity, velocitySmoothing > 0 ? Time.deltaTime / velocitySmoothing : 1);
if (smoothedVelocity.magnitude < 0.4f) {
smoothedVelocity = smoothedVelocity.normalized * 0.4f;
}
anim.SetFloat(XAxisKeyHash, smoothedVelocity.x);
anim.SetFloat(YAxisKeyHash, smoothedVelocity.z);
// The IAstarAI interface doesn't expose rotation speeds right now, so we have to do this ugly thing.
// In case this is an unknown movement script, we fall back to a reasonable value.
var rotationSpeed = 360f;
if (ai is AIPath aipath) {
rotationSpeed = aipath.rotationSpeed;
} else if (ai is RichAI richai) {
rotationSpeed = richai.rotationSpeed;
}
// Calculate how much the agent should rotate during this frame
var newRot = RotateTowards(desiredVelocityWithoutGrav, Time.deltaTime * rotationSpeed);
// Rotate the character around the currently grounded foot to prevent foot sliding
nextPosition = ai.position;
nextRotation = ai.rotation;
nextPosition = RotatePointAround(nextPosition, CalculateBlendPoint(), newRot * Quaternion.Inverse(nextRotation));
nextRotation = newRot;
// Apply rotational root motion
nextRotation = anim.deltaRotation * nextRotation;
// Use gravity from the movement script, not from animation
var deltaPos = anim.deltaPosition;
deltaPos.y = desiredVelocity.y * Time.deltaTime;
nextPosition += deltaPos;
// Call the movement script to perform the final movement
ai.FinalizeMovement(nextPosition, nextRotation);
}
static Vector3 RotatePointAround (Vector3 point, Vector3 around, Quaternion rotation) {
return rotation * (point - around) + around;
}
/// <summary>
/// Calculates a rotation closer to the desired direction.
/// Returns: The new rotation for the character
/// </summary>
/// <param name="direction">Direction in the movement plane to rotate toward.</param>
/// <param name="maxDegrees">Maximum number of degrees to rotate this frame.</param>
protected virtual Quaternion RotateTowards (Vector3 direction, float maxDegrees) {
if (direction != Vector3.zero) {
Quaternion targetRotation = Quaternion.LookRotation(direction);
return Quaternion.RotateTowards(tr.rotation, targetRotation, maxDegrees);
} else {
return tr.rotation;
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 50c378ba3baff4dbba6f2a814ab1c489
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 5000
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: d90ceba0148a049e3b56fcde2b55cec1
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,64 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!850595691 &4890085278179872738
LightingSettings:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: RecastExampleSettings
serializedVersion: 4
m_GIWorkflowMode: 1
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_RealtimeEnvironmentLighting: 1
m_BounceScale: 1
m_AlbedoBoost: 1
m_IndirectOutputScale: 1
m_UsingShadowmask: 0
m_BakeBackend: 0
m_LightmapMaxSize: 1024
m_BakeResolution: 10
m_Padding: 2
m_LightmapCompression: 0
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 0
m_CompAOExponentDirect: 0
m_ExtractAO: 0
m_MixedBakeMode: 1
m_LightmapsBakeMode: 0
m_FilterMode: 1
m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0}
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_RealtimeResolution: 1
m_ForceWhiteAlbedo: 0
m_ForceUpdates: 0
m_FinalGather: 0
m_FinalGatherRayCount: 1024
m_FinalGatherFiltering: 1
m_PVRCulling: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVREnvironmentSampleCount: 500
m_PVREnvironmentReferencePointCount: 2048
m_LightProbeSampleCountMultiplier: 4
m_PVRBounces: 2
m_PVRMinBounces: 1
m_PVREnvironmentMIS: 0
m_PVRFilteringMode: 0
m_PVRDenoiserTypeDirect: 0
m_PVRDenoiserTypeIndirect: 0
m_PVRDenoiserTypeAO: 0
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_PVRTiledBaking: 0

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 20ef80d0bfd2a12dfa16119d75b010a9
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant: