Added Behavior Graph asset for Unity

This commit is contained in:
2026-04-28 12:35:51 +02:00
parent a3c7859b18
commit 2b213f359b
34 changed files with 5079 additions and 9 deletions
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 78253cd1f5807437a80188d703b01cb0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 122a4de5c191b49cea41e945894460fa
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,930 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-1493939157129430043
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: 11500000, guid: db920e62f70f420bb33c771449926fa4, type: 3}
m_Name: FindPlayerByRaycastGraph
m_EditorClassIdentifier: Unity.Behavior::Unity.Behavior.BehaviorGraph
Graphs:
- rid: 8576900523871437353
m_DebugInfo: {fileID: 7325637932371291891}
m_WasCompileWithPlaceholderNode: 0
references:
version: 2
RefIds:
- rid: -2
type: {class: , ns: , asm: }
- rid: 8576900523871437353
type: {class: BehaviorGraphModule, ns: Unity.Behavior, asm: Unity.Behavior}
data:
AuthoringAssetID:
m_Value0: 230861749828949241
m_Value1: 3525292325085456569
m_DebugInfo: {fileID: 7325637932371291891}
BlackboardReference:
rid: 8576900523871437354
BlackboardGroupReferences: []
Root:
rid: 8576900523871437694
m_VersionTimestamp: 639129733835491520
- rid: 8576900523871437354
type: {class: BlackboardReference, ns: Unity.Behavior, asm: Unity.Behavior}
data:
m_Blackboard:
rid: 8576900523871437356
m_Source: {fileID: 5479930868502745292}
- rid: 8576900523871437356
type: {class: Blackboard, ns: Unity.Behavior, asm: Unity.Behavior}
data:
m_Variables:
- rid: 8576900523871437697
- rid: 8576900523871437698
- rid: 8576900523871437694
type: {class: ParallelAllComposite, ns: Unity.Behavior, asm: Unity.Behavior}
data:
ID:
m_Value0: 0
m_Value1: 0
Graph:
rid: 8576900523871437353
m_Parent:
rid: -2
m_Children:
- rid: 8576900523871437695
- rid: 8576900523871437696
m_RegisteredObservers: []
- rid: 8576900523871437695
type: {class: Start, ns: Unity.Behavior, asm: Unity.Behavior}
data:
ID:
m_Value0: 16855309696556554858
m_Value1: 10251516446001256432
Graph:
rid: 8576900523871437353
m_Parent:
rid: 8576900523871437694
m_Child:
rid: 8576900523871437699
Repeat: 1
AllowMultipleRepeatsPerTick: 0
- rid: 8576900523871437696
type: {class: Start, ns: Unity.Behavior, asm: Unity.Behavior}
data:
ID:
m_Value0: 13110388397852724414
m_Value1: 17886753401849469091
Graph:
rid: 8576900523871437353
m_Parent:
rid: 8576900523871437694
m_Child:
rid: 8576900523871437700
Repeat: 1
AllowMultipleRepeatsPerTick: 0
- rid: 8576900523871437697
type: {class: 'BlackboardVariable`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 1
m_Value1: 0
Name: Self
m_Value: {fileID: 0}
- rid: 8576900523871437698
type: {class: 'BlackboardVariable`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 7954098358782220523
m_Value1: 13137877019471802724
Name: Target
m_Value: {fileID: 0}
- rid: 8576900523871437699
type: {class: FindByRaycastAction, ns: , asm: Assembly-CSharp}
data:
ID:
m_Value0: 13205293334778155291
m_Value1: 10433641891337213130
Graph:
rid: 8576900523871437353
m_Parent:
rid: 8576900523871437695
Target:
rid: 8576900523871437698
Agent:
rid: 8576900523871437697
MaxDistance:
rid: 8576900523871437701
- rid: 8576900523871437700
type: {class: AbortModifier, ns: Unity.Behavior, asm: Unity.Behavior}
data:
ID:
m_Value0: 6286764960316687962
m_Value1: 15781687598675735827
Graph:
rid: 8576900523871437353
m_Parent:
rid: 8576900523871437696
m_Child:
rid: 8576900523871437702
m_Conditions:
- rid: 8576900523871437703
m_RequiresAllConditions: 0
m_ObserverType: 0
- rid: 8576900523871437701
type: {class: 'BlackboardVariable`1[[System.Single, mscorlib]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: 10
- rid: 8576900523871437702
type: {class: NavigateToTargetAction, ns: Unity.Behavior, asm: Unity.Behavior}
data:
ID:
m_Value0: 14808196635666052732
m_Value1: 14455697540166824285
Graph:
rid: 8576900523871437353
m_Parent:
rid: 8576900523871437700
Agent:
rid: 8576900523871437697
Target:
rid: 8576900523871437698
Speed:
rid: 8576900523871437704
DistanceThreshold:
rid: 8576900523871437705
AnimatorSpeedParam:
rid: 8576900523871437706
SlowDownDistance:
rid: 8576900523871437707
m_TargetPositionMode:
rid: 8576900523871437708
- rid: 8576900523871437703
type: {class: GameObjectNullCondition, ns: , asm: Assembly-CSharp}
data:
Graph:
rid: 8576900523871437353
Target:
rid: 8576900523871437698
Is:
rid: 8576900523871437709
- rid: 8576900523871437704
type: {class: 'BlackboardVariable`1[[System.Single, mscorlib]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: 1
- rid: 8576900523871437705
type: {class: 'BlackboardVariable`1[[System.Single, mscorlib]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: 0.2
- rid: 8576900523871437706
type: {class: 'BlackboardVariable`1[[System.String, mscorlib]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: SpeedMagnitude
- rid: 8576900523871437707
type: {class: 'BlackboardVariable`1[[System.Single, mscorlib]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: 1
- rid: 8576900523871437708
type: {class: 'BlackboardVariable`1[[Unity.Behavior.NavigateToTargetAction/TargetPositionMode, Unity.Behavior]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: 0
- rid: 8576900523871437709
type: {class: 'BlackboardVariable`1[[Unity.Behavior.ConditionOperator, Unity.Behavior]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: 0
--- !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: 11500000, guid: bad8f2220607dac4db5082ff333fafb8, type: 3}
m_Name: FindPlayerByRaycastGraph
m_EditorClassIdentifier: Unity.Behavior.Authoring::Unity.Behavior.BehaviorAuthoringGraph
Blackboard: {fileID: 7215205145831355363}
m_Description:
m_Nodes:
- rid: 8576900523871437358
- rid: 8576900523871437371
- rid: 8576900523871437388
- rid: 8576900523871437436
- rid: 8576900523871437484
m_VersionTimestamp: 639129733835491520
m_SerializedVersion: 2
m_DebugInfo: {fileID: 7325637932371291891}
m_RuntimeGraph: {fileID: -1493939157129430043}
AssetID:
m_Value0: 230861749828949241
m_Value1: 3525292325085456569
Story:
Story:
StoryVariableNames: []
Variables: []
m_NodeModelsInfo:
- Name: On Start
Story:
RuntimeTypeString: Unity.Behavior.Start, Unity.Behavior, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
RuntimeTypeID:
m_Value0: 3335272451348827663
m_Value1: 11549843281177505721
Variables: []
NamedChildren: []
IsPlaceholder: 0
- Name: Find By Raycast
Story: 'Find [Target] by Raycast from [Agent]'
RuntimeTypeString: FindByRaycastAction, Assembly-CSharp, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
RuntimeTypeID:
m_Value0: 14851045253187667268
m_Value1: 13828013303897562161
Variables:
- Name: Target
Type:
m_SerializableType: UnityEngine.GameObject, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
Tooltip:
- Name: Agent
Type:
m_SerializableType: UnityEngine.GameObject, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
Tooltip:
- Name: MaxDistance
Type:
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
Tooltip:
NamedChildren: []
IsPlaceholder: 0
- Name: Navigate To Target
Story: '[Agent] navigates to [Target]'
RuntimeTypeString: Unity.Behavior.NavigateToTargetAction, Unity.Behavior, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
RuntimeTypeID:
m_Value0: 14505029119854362939
m_Value1: 1167385928027178409
Variables:
- Name: Agent
Type:
m_SerializableType: UnityEngine.GameObject, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
Tooltip:
- Name: Target
Type:
m_SerializableType: UnityEngine.GameObject, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
Tooltip:
- Name: Speed
Type:
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
Tooltip:
- Name: DistanceThreshold
Type:
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
Tooltip:
- Name: AnimatorSpeedParam
Type:
m_SerializableType: System.String, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
Tooltip:
- Name: SlowDownDistance
Type:
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
Tooltip:
- Name: m_TargetPositionMode
Type:
m_SerializableType: Unity.Behavior.NavigateToTargetAction+TargetPositionMode,
Unity.Behavior, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Tooltip:
NamedChildren: []
IsPlaceholder: 0
- Name: Fail
Story:
RuntimeTypeString: Unity.Behavior.AbortModifier, Unity.Behavior, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
RuntimeTypeID:
m_Value0: 11694760734451091187
m_Value1: 13156989698943900053
Variables: []
NamedChildren: []
IsPlaceholder: 0
m_Blackboards: []
m_MainBlackboardAuthoringAsset: {fileID: 7215205145831355363}
m_CommandBuffer:
m_Commands: []
m_SubgraphsInfo: []
m_BlackboardMissingManagedRef: 0
m_GraphMissingManagedRef: 0
m_HasMissingTypeInManagedRef: 0
references:
version: 2
RefIds:
- rid: -2
type: {class: , ns: , asm: }
- rid: 8576900523871437358
type: {class: StartNodeModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
Position: {x: 0, y: 0}
ID:
m_Value0: 16855309696556554858
m_Value1: 10251516446001256432
Parents: []
PortModels:
- rid: 8576900523871437359
NodeType:
m_SerializableType: Unity.Behavior.Start, Unity.Behavior, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
NodeTypeID:
m_Value0: 3335272451348827663
m_Value1: 11549843281177505721
m_FieldValues: []
Repeat: 1
AllowMultipleRepeatsPerTick: 0
- rid: 8576900523871437359
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: OutputPort
m_PortDataFlowType: 1
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437358
m_Connections:
- rid: 8576900523871437372
- rid: 8576900523871437371
type: {class: ActionNodeModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
Position: {x: 0.29990453, y: 161.69987}
ID:
m_Value0: 13205293334778155291
m_Value1: 10433641891337213130
Parents: []
PortModels:
- rid: 8576900523871437372
- rid: 8576900523871437373
NodeType:
m_SerializableType: FindByRaycastAction, Assembly-CSharp, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
NodeTypeID:
m_Value0: 14851045253187667268
m_Value1: 13828013303897562161
m_FieldValues:
- rid: 8576900523871437374
- rid: 8576900523871437375
- rid: 8576900523871437382
- rid: 8576900523871437372
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: InputPort
m_PortDataFlowType: 0
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437371
m_Connections:
- rid: 8576900523871437359
- rid: 8576900523871437373
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: OutputPort
m_PortDataFlowType: 1
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437371
m_Connections: []
- rid: 8576900523871437374
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: Target
Type:
m_SerializableType: UnityEngine.GameObject, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
LocalValue:
rid: 8576900523871437376
LinkedVariable:
rid: 8576900523871437377
- rid: 8576900523871437375
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: Agent
Type:
m_SerializableType: UnityEngine.GameObject, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
LocalValue:
rid: 8576900523871437378
LinkedVariable:
rid: 8576900523871437423
- rid: 8576900523871437376
type: {class: 'BlackboardVariable`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: {fileID: 0}
- rid: 8576900523871437377
type: {class: 'TypedVariableModel`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
ID:
m_Value0: 7954098358782220523
m_Value1: 13137877019471802724
Name: Target
IsExposed: 0
m_IsShared: 0
m_Value: {fileID: 0}
- rid: 8576900523871437378
type: {class: 'BlackboardVariable`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: {fileID: 0}
- rid: 8576900523871437382
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: MaxDistance
Type:
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
LocalValue:
rid: 8576900523871437383
LinkedVariable:
rid: -2
- rid: 8576900523871437383
type: {class: 'BlackboardVariable`1[[System.Single, mscorlib]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: 10
- rid: 8576900523871437388
type: {class: ActionNodeModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
Position: {x: 351.6862, y: 298.89978}
ID:
m_Value0: 14808196635666052732
m_Value1: 14455697540166824285
Parents: []
PortModels:
- rid: 8576900523871437389
- rid: 8576900523871437390
NodeType:
m_SerializableType: Unity.Behavior.NavigateToTargetAction, Unity.Behavior,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
NodeTypeID:
m_Value0: 14505029119854362939
m_Value1: 1167385928027178409
m_FieldValues:
- rid: 8576900523871437391
- rid: 8576900523871437392
- rid: 8576900523871437393
- rid: 8576900523871437394
- rid: 8576900523871437395
- rid: 8576900523871437396
- rid: 8576900523871437397
- rid: 8576900523871437389
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: InputPort
m_PortDataFlowType: 0
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437388
m_Connections:
- rid: 8576900523871437486
- rid: 8576900523871437390
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: OutputPort
m_PortDataFlowType: 1
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437388
m_Connections: []
- rid: 8576900523871437391
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: Agent
Type:
m_SerializableType: UnityEngine.GameObject, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
LocalValue:
rid: 8576900523871437398
LinkedVariable:
rid: 8576900523871437423
- rid: 8576900523871437392
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: Target
Type:
m_SerializableType: UnityEngine.GameObject, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
LocalValue:
rid: 8576900523871437399
LinkedVariable:
rid: 8576900523871437400
- rid: 8576900523871437393
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: Speed
Type:
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
LocalValue:
rid: 8576900523871437401
LinkedVariable:
rid: -2
- rid: 8576900523871437394
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: DistanceThreshold
Type:
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
LocalValue:
rid: 8576900523871437402
LinkedVariable:
rid: -2
- rid: 8576900523871437395
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: AnimatorSpeedParam
Type:
m_SerializableType: System.String, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
LocalValue:
rid: 8576900523871437403
LinkedVariable:
rid: -2
- rid: 8576900523871437396
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: SlowDownDistance
Type:
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
LocalValue:
rid: 8576900523871437404
LinkedVariable:
rid: -2
- rid: 8576900523871437397
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: m_TargetPositionMode
Type:
m_SerializableType: Unity.Behavior.NavigateToTargetAction+TargetPositionMode,
Unity.Behavior, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
LocalValue:
rid: 8576900523871437405
LinkedVariable:
rid: -2
- rid: 8576900523871437398
type: {class: 'BlackboardVariable`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: {fileID: 0}
- rid: 8576900523871437399
type: {class: 'BlackboardVariable`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: {fileID: 0}
- rid: 8576900523871437400
type: {class: 'TypedVariableModel`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
ID:
m_Value0: 7954098358782220523
m_Value1: 13137877019471802724
Name: Target
IsExposed: 0
m_IsShared: 0
m_Value: {fileID: 0}
- rid: 8576900523871437401
type: {class: 'BlackboardVariable`1[[System.Single, mscorlib]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: 1
- rid: 8576900523871437402
type: {class: 'BlackboardVariable`1[[System.Single, mscorlib]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: 0.2
- rid: 8576900523871437403
type: {class: 'BlackboardVariable`1[[System.String, mscorlib]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: SpeedMagnitude
- rid: 8576900523871437404
type: {class: 'BlackboardVariable`1[[System.Single, mscorlib]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: 1
- rid: 8576900523871437405
type: {class: 'BlackboardVariable`1[[Unity.Behavior.NavigateToTargetAction/TargetPositionMode, Unity.Behavior]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: 0
- rid: 8576900523871437423
type: {class: 'TypedVariableModel`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
ID:
m_Value0: 1
m_Value1: 0
Name: Self
IsExposed: 1
m_IsShared: 0
m_Value: {fileID: 0}
- rid: 8576900523871437436
type: {class: StartNodeModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
Position: {x: 352.30023, y: -15.8999815}
ID:
m_Value0: 13110388397852724414
m_Value1: 17886753401849469091
Parents: []
PortModels:
- rid: 8576900523871437437
NodeType:
m_SerializableType: Unity.Behavior.Start, Unity.Behavior, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
NodeTypeID:
m_Value0: 3335272451348827663
m_Value1: 11549843281177505721
m_FieldValues: []
Repeat: 1
AllowMultipleRepeatsPerTick: 0
- rid: 8576900523871437437
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: OutputPort
m_PortDataFlowType: 1
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437436
m_Connections:
- rid: 8576900523871437485
- rid: 8576900523871437484
type: {class: AbortNodeModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
Position: {x: 352.29987, y: 148.8999}
ID:
m_Value0: 6286764960316687962
m_Value1: 15781687598675735827
Parents: []
PortModels:
- rid: 8576900523871437485
- rid: 8576900523871437486
NodeType:
m_SerializableType: Unity.Behavior.AbortModifier, Unity.Behavior, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
NodeTypeID:
m_Value0: 11694760734451091187
m_Value1: 13156989698943900053
m_FieldValues: []
m_ModelAbortType: 0
<ConditionModels>k__BackingField:
- rid: 8576900523871437677
<RequiresAllConditionsTrue>k__BackingField: 0
<ShouldTruncateNodeUI>k__BackingField: 0
<ObserverType>k__BackingField: 0
- rid: 8576900523871437485
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: InputPort
m_PortDataFlowType: 0
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437484
m_Connections:
- rid: 8576900523871437437
- rid: 8576900523871437486
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: OutputPort
m_PortDataFlowType: 1
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437484
m_Connections:
- rid: 8576900523871437389
- rid: 8576900523871437677
type: {class: ConditionModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
ConditionType:
m_SerializableType: GameObjectNullCondition, Assembly-CSharp, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
ConditionTypeID:
m_Value0: 7522678097398984323
m_Value1: 7597025238105957032
NodeModel:
rid: 8576900523871437484
m_FieldValues:
- rid: 8576900523871437679
- rid: 8576900523871437691
OperatorFieldModel:
rid: 8576900523871437679
- rid: 8576900523871437679
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: Is
Type:
m_SerializableType: Unity.Behavior.ConditionOperator, Unity.Behavior, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
LocalValue:
rid: 8576900523871437681
LinkedVariable:
rid: -2
- rid: 8576900523871437681
type: {class: 'BlackboardVariable`1[[Unity.Behavior.ConditionOperator, Unity.Behavior]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: 0
- rid: 8576900523871437691
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: Target
Type:
m_SerializableType: UnityEngine.GameObject, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
LocalValue:
rid: 8576900523871437692
LinkedVariable:
rid: 8576900523871437693
- rid: 8576900523871437692
type: {class: 'BlackboardVariable`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: {fileID: 0}
- rid: 8576900523871437693
type: {class: 'TypedVariableModel`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
ID:
m_Value0: 7954098358782220523
m_Value1: 13137877019471802724
Name: Target
IsExposed: 0
m_IsShared: 0
m_Value: {fileID: 0}
--- !u!114 &5479930868502745292
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: 11500000, guid: 5c02bb70996b49eba31d0c206e28da24, type: 3}
m_Name: FindPlayerByRaycastGraph Blackboard
m_EditorClassIdentifier: Unity.Behavior::Unity.Behavior.RuntimeBlackboardAsset
VersionTimestamp: 639129711421601490
AssetID:
m_Value0: 0
m_Value1: 0
m_Blackboard:
m_Variables:
- rid: 8576900523871437360
- rid: 8576900523871437366
m_SharedBlackboardVariableGuids: []
references:
version: 2
RefIds:
- rid: 8576900523871437360
type: {class: 'BlackboardVariable`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 1
m_Value1: 0
Name: Self
m_Value: {fileID: 0}
- rid: 8576900523871437366
type: {class: 'BlackboardVariable`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 7954098358782220523
m_Value1: 13137877019471802724
Name: Target
m_Value: {fileID: 0}
--- !u!114 &7215205145831355363
MonoBehaviour:
m_ObjectHideFlags: 1
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: 11500000, guid: 2dd922ae02c94c87a66e46a10a7319b9, type: 3}
m_Name: FindPlayerByRaycastGraph Blackboard
m_EditorClassIdentifier: Unity.Behavior.Authoring::Unity.Behavior.BehaviorBlackboardAuthoringAsset
AssetID:
m_Value0: 230861749828949241
m_Value1: 3525292325085456569
m_Variables:
- rid: 8576900523871437361
- rid: 8576900523871437362
m_VersionTimestamp: 639129711421601490
m_CommandBuffer:
m_Commands: []
m_RuntimeBlackboardAsset: {fileID: 5479930868502745292}
references:
version: 2
RefIds:
- rid: 8576900523871437361
type: {class: 'TypedVariableModel`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
ID:
m_Value0: 1
m_Value1: 0
Name: Self
IsExposed: 1
m_IsShared: 0
m_Value: {fileID: 0}
- rid: 8576900523871437362
type: {class: 'TypedVariableModel`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
ID:
m_Value0: 7954098358782220523
m_Value1: 13137877019471802724
Name: Target
IsExposed: 0
m_IsShared: 0
m_Value: {fileID: 0}
--- !u!114 &7325637932371291891
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: 11500000, guid: 5b27bb6d9a2c8d540a10dff10acc543e, type: 3}
m_Name: FindPlayerByRaycastGraph Debug Info
m_EditorClassIdentifier: Unity.Behavior::Unity.Behavior.BehaviorGraphDebugInfo
m_CodeBreakPointsList: []
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f994c7ce892f3403b928211eb15aec30
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,779 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-7526900791162218060
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: 11500000, guid: 5b27bb6d9a2c8d540a10dff10acc543e, type: 3}
m_Name: FindPlayerByTagGraph Debug Info
m_EditorClassIdentifier: Unity.Behavior::Unity.Behavior.BehaviorGraphDebugInfo
m_CodeBreakPointsList: []
--- !u!114 &-7521308335521170377
MonoBehaviour:
m_ObjectHideFlags: 1
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: 11500000, guid: 2dd922ae02c94c87a66e46a10a7319b9, type: 3}
m_Name: FindPlayerByTagGraph Blackboard
m_EditorClassIdentifier: Unity.Behavior.Authoring::Unity.Behavior.BehaviorBlackboardAuthoringAsset
AssetID:
m_Value0: 0
m_Value1: 0
m_Variables:
- rid: 8576900523871437188
- rid: 8576900523871437240
m_VersionTimestamp: 639129706401206080
m_CommandBuffer:
m_Commands: []
m_RuntimeBlackboardAsset: {fileID: 9145486027612759989}
references:
version: 2
RefIds:
- rid: 8576900523871437188
type: {class: 'TypedVariableModel`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
ID:
m_Value0: 1
m_Value1: 0
Name: Self
IsExposed: 1
m_IsShared: 0
m_Value: {fileID: 0}
- rid: 8576900523871437240
type: {class: 'TypedVariableModel`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
ID:
m_Value0: 9546023108006724255
m_Value1: 13139882300079034470
Name: Target
IsExposed: 0
m_IsShared: 0
m_Value: {fileID: 0}
--- !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: 11500000, guid: bad8f2220607dac4db5082ff333fafb8, type: 3}
m_Name: FindPlayerByTagGraph
m_EditorClassIdentifier: Unity.Behavior.Authoring::Unity.Behavior.BehaviorAuthoringGraph
Blackboard: {fileID: -7521308335521170377}
m_Description:
m_Nodes:
- rid: 8576900523871437189
- rid: 8576900523871437207
- rid: 8576900523871437231
- rid: 8576900523871437260
- rid: 8576900523871437307
- rid: 8576900523871437323
- rid: 8576900523871437332
m_VersionTimestamp: 639129709346051840
m_SerializedVersion: 2
m_DebugInfo: {fileID: -7526900791162218060}
m_RuntimeGraph: {fileID: 8526535084835872973}
AssetID:
m_Value0: 7459104701325772789
m_Value1: 7787421155746665098
Story:
Story:
StoryVariableNames: []
Variables: []
m_NodeModelsInfo:
- Name: On Start
Story:
RuntimeTypeString: Unity.Behavior.Start, Unity.Behavior, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null
RuntimeTypeID:
m_Value0: 3335272451348827663
m_Value1: 11549843281177505721
Variables: []
NamedChildren: []
IsPlaceholder: 0
- Name: Sequence
Story:
RuntimeTypeString: Unity.Behavior.SequenceComposite, Unity.Behavior, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
RuntimeTypeID:
m_Value0: 10181448252506100447
m_Value1: 8737116843063128493
Variables: []
NamedChildren: []
IsPlaceholder: 0
- Name: Log Variable
Story: Log [variable] to the console
RuntimeTypeString: Unity.Behavior.LogVariableToConsoleAction, Unity.Behavior,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
RuntimeTypeID:
m_Value0: 14362779694071371193
m_Value1: 7707181868946836709
Variables:
- Name: Variable
Type:
m_SerializableType: Unity.Behavior.BlackboardVariable, Unity.Behavior, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
Tooltip:
NamedChildren: []
IsPlaceholder: 0
- Name: Find Closest With Tag
Story: 'Find [Target] closest to [Agent] with tag: [Tag]'
RuntimeTypeString: Unity.Behavior.FindClosestWithTagAction, Unity.Behavior, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
RuntimeTypeID:
m_Value0: 1272391661889856870
m_Value1: 10362915794162135082
Variables:
- Name: Target
Type:
m_SerializableType: UnityEngine.GameObject, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
Tooltip:
- Name: Agent
Type:
m_SerializableType: UnityEngine.GameObject, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
Tooltip:
- Name: Tag
Type:
m_SerializableType: System.String, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
Tooltip:
NamedChildren: []
IsPlaceholder: 0
m_Blackboards: []
m_MainBlackboardAuthoringAsset: {fileID: -7521308335521170377}
m_CommandBuffer:
m_Commands: []
m_SubgraphsInfo: []
m_BlackboardMissingManagedRef: 0
m_GraphMissingManagedRef: 0
m_HasMissingTypeInManagedRef: 0
references:
version: 2
RefIds:
- rid: -2
type: {class: , ns: , asm: }
- rid: 8576900523871437189
type: {class: StartNodeModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
Position: {x: 159.09209, y: -9.419925}
ID:
m_Value0: 17422087895670303000
m_Value1: 13687843103871736289
Parents: []
PortModels:
- rid: 8576900523871437190
NodeType:
m_SerializableType: Unity.Behavior.Start, Unity.Behavior, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
NodeTypeID:
m_Value0: 3335272451348827663
m_Value1: 11549843281177505721
m_FieldValues: []
Repeat: 1
AllowMultipleRepeatsPerTick: 0
- rid: 8576900523871437190
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: OutputPort
m_PortDataFlowType: 1
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437189
m_Connections:
- rid: 8576900523871437333
- rid: 8576900523871437207
type: {class: CompositeNodeModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
Position: {x: 0.29998797, y: 158.09998}
ID:
m_Value0: 13114299730686394444
m_Value1: 1373003643343738620
Parents: []
PortModels:
- rid: 8576900523871437208
- rid: 8576900523871437209
NodeType:
m_SerializableType: Unity.Behavior.SequenceComposite, Unity.Behavior, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
NodeTypeID:
m_Value0: 10181448252506100447
m_Value1: 8737116843063128493
m_FieldValues: []
- rid: 8576900523871437208
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: InputPort
m_PortDataFlowType: 0
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437207
m_Connections: []
- rid: 8576900523871437209
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: OutputPort
m_PortDataFlowType: 1
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437207
m_Connections:
- rid: 8576900523871437261
- rid: 8576900523871437232
- rid: 8576900523871437231
type: {class: ActionNodeModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
Position: {x: 202.69986, y: 260.50015}
ID:
m_Value0: 9114055061091940472
m_Value1: 1545427064202251645
Parents: []
PortModels:
- rid: 8576900523871437232
- rid: 8576900523871437233
NodeType:
m_SerializableType: Unity.Behavior.LogVariableToConsoleAction, Unity.Behavior,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
NodeTypeID:
m_Value0: 14362779694071371193
m_Value1: 7707181868946836709
m_FieldValues:
- rid: 8576900523871437238
- rid: 8576900523871437232
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: InputPort
m_PortDataFlowType: 0
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437231
m_Connections:
- rid: 8576900523871437209
- rid: 8576900523871437233
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: OutputPort
m_PortDataFlowType: 1
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437231
m_Connections: []
- rid: 8576900523871437238
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: Variable
Type:
m_SerializableType: System.Object, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
LocalValue:
rid: 8576900523871437239
LinkedVariable:
rid: 8576900523871437267
- rid: 8576900523871437239
type: {class: 'BlackboardVariable`1[[System.Object, mscorlib]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
- rid: 8576900523871437260
type: {class: ActionNodeModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
Position: {x: -128.5, y: 264.5001}
ID:
m_Value0: 11850273287517387751
m_Value1: 6724361699015683724
Parents: []
PortModels:
- rid: 8576900523871437261
- rid: 8576900523871437262
NodeType:
m_SerializableType: Unity.Behavior.FindClosestWithTagAction, Unity.Behavior,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
NodeTypeID:
m_Value0: 1272391661889856870
m_Value1: 10362915794162135082
m_FieldValues:
- rid: 8576900523871437263
- rid: 8576900523871437264
- rid: 8576900523871437265
- rid: 8576900523871437261
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: InputPort
m_PortDataFlowType: 0
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437260
m_Connections:
- rid: 8576900523871437209
- rid: 8576900523871437262
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: OutputPort
m_PortDataFlowType: 1
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437260
m_Connections: []
- rid: 8576900523871437263
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: Target
Type:
m_SerializableType: UnityEngine.GameObject, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
LocalValue:
rid: 8576900523871437266
LinkedVariable:
rid: 8576900523871437267
- rid: 8576900523871437264
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: Agent
Type:
m_SerializableType: UnityEngine.GameObject, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
LocalValue:
rid: 8576900523871437268
LinkedVariable:
rid: 8576900523871437284
- rid: 8576900523871437265
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: Tag
Type:
m_SerializableType: System.String, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
LocalValue:
rid: 8576900523871437269
LinkedVariable:
rid: -2
- rid: 8576900523871437266
type: {class: 'BlackboardVariable`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: {fileID: 0}
- rid: 8576900523871437267
type: {class: 'TypedVariableModel`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
ID:
m_Value0: 9546023108006724255
m_Value1: 13139882300079034470
Name: Target
IsExposed: 0
m_IsShared: 0
m_Value: {fileID: 0}
- rid: 8576900523871437268
type: {class: 'BlackboardVariable`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: {fileID: 0}
- rid: 8576900523871437269
type: {class: 'BlackboardVariable`1[[System.String, mscorlib]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: Player
- rid: 8576900523871437284
type: {class: 'TypedVariableModel`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
ID:
m_Value0: 1
m_Value1: 0
Name: Self
IsExposed: 1
m_IsShared: 0
m_Value: {fileID: 0}
- rid: 8576900523871437307
type: {class: ActionNodeModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
Position: {x: 352.90918, y: 138.4585}
ID:
m_Value0: 5909309792806027897
m_Value1: 2497907566840704140
Parents:
- rid: 8576900523871437332
PortModels:
- rid: 8576900523871437308
- rid: 8576900523871437309
NodeType:
m_SerializableType: Unity.Behavior.FindClosestWithTagAction, Unity.Behavior,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
NodeTypeID:
m_Value0: 1272391661889856870
m_Value1: 10362915794162135082
m_FieldValues:
- rid: 8576900523871437310
- rid: 8576900523871437311
- rid: 8576900523871437312
- rid: 8576900523871437308
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: InputPort
m_PortDataFlowType: 0
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437307
m_Connections: []
- rid: 8576900523871437309
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: OutputPort
m_PortDataFlowType: 1
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437307
m_Connections: []
- rid: 8576900523871437310
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: Target
Type:
m_SerializableType: UnityEngine.GameObject, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
LocalValue:
rid: 8576900523871437313
LinkedVariable:
rid: 8576900523871437314
- rid: 8576900523871437311
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: Agent
Type:
m_SerializableType: UnityEngine.GameObject, UnityEngine.CoreModule, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=null
LocalValue:
rid: 8576900523871437315
LinkedVariable:
rid: 8576900523871437316
- rid: 8576900523871437312
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: Tag
Type:
m_SerializableType: System.String, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
LocalValue:
rid: 8576900523871437317
LinkedVariable:
rid: -2
- rid: 8576900523871437313
type: {class: 'BlackboardVariable`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: {fileID: 0}
- rid: 8576900523871437314
type: {class: 'TypedVariableModel`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
ID:
m_Value0: 9546023108006724255
m_Value1: 13139882300079034470
Name: Target
IsExposed: 0
m_IsShared: 0
m_Value: {fileID: 0}
- rid: 8576900523871437315
type: {class: 'BlackboardVariable`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: {fileID: 0}
- rid: 8576900523871437316
type: {class: 'TypedVariableModel`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
ID:
m_Value0: 1
m_Value1: 0
Name: Self
IsExposed: 1
m_IsShared: 0
m_Value: {fileID: 0}
- rid: 8576900523871437317
type: {class: 'BlackboardVariable`1[[System.String, mscorlib]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: Player
- rid: 8576900523871437323
type: {class: ActionNodeModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
Position: {x: 358.14252, y: 143.69176}
ID:
m_Value0: 2543146926494331752
m_Value1: 16203842873353913833
Parents:
- rid: 8576900523871437332
PortModels:
- rid: 8576900523871437324
- rid: 8576900523871437325
NodeType:
m_SerializableType: Unity.Behavior.LogVariableToConsoleAction, Unity.Behavior,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
NodeTypeID:
m_Value0: 14362779694071371193
m_Value1: 7707181868946836709
m_FieldValues:
- rid: 8576900523871437326
- rid: 8576900523871437324
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: InputPort
m_PortDataFlowType: 0
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437323
m_Connections: []
- rid: 8576900523871437325
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: OutputPort
m_PortDataFlowType: 1
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437323
m_Connections: []
- rid: 8576900523871437326
type: {class: BehaviorGraphNodeModel/FieldModel, ns: Unity.Behavior, asm: Unity.Behavior.Authoring}
data:
FieldName: Variable
Type:
m_SerializableType: System.Object, mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
LocalValue:
rid: 8576900523871437327
LinkedVariable:
rid: 8576900523871437314
- rid: 8576900523871437327
type: {class: 'BlackboardVariable`1[[System.Object, mscorlib]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
- rid: 8576900523871437332
type: {class: SequenceNodeModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
Position: {x: 452.34186, y: 123.805275}
ID:
m_Value0: 10214520319780007408
m_Value1: 5191478572695873751
Parents: []
PortModels:
- rid: 8576900523871437333
- rid: 8576900523871437334
Nodes:
- rid: 8576900523871437307
- rid: 8576900523871437323
- rid: 8576900523871437333
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: InputPort
m_PortDataFlowType: 0
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437332
m_Connections:
- rid: 8576900523871437190
- rid: 8576900523871437334
type: {class: PortModel, ns: Unity.Behavior.GraphFramework, asm: Unity.Behavior.GraphFramework}
data:
m_Name: OutputPort
m_PortDataFlowType: 1
m_IsFloating: 0
m_NodeModel:
rid: 8576900523871437332
m_Connections: []
--- !u!114 &8526535084835872973
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: 11500000, guid: db920e62f70f420bb33c771449926fa4, type: 3}
m_Name: FindPlayerByTagGraph
m_EditorClassIdentifier: Unity.Behavior::Unity.Behavior.BehaviorGraph
Graphs:
- rid: 8576900523871437191
m_DebugInfo: {fileID: -7526900791162218060}
m_WasCompileWithPlaceholderNode: 0
references:
version: 2
RefIds:
- rid: -2
type: {class: , ns: , asm: }
- rid: 8576900523871437191
type: {class: BehaviorGraphModule, ns: Unity.Behavior, asm: Unity.Behavior}
data:
AuthoringAssetID:
m_Value0: 7459104701325772789
m_Value1: 7787421155746665098
m_DebugInfo: {fileID: -7526900791162218060}
BlackboardReference:
rid: 8576900523871437192
BlackboardGroupReferences: []
Root:
rid: 8576900523871437348
m_VersionTimestamp: 639129709346051840
- rid: 8576900523871437192
type: {class: BlackboardReference, ns: Unity.Behavior, asm: Unity.Behavior}
data:
m_Blackboard:
rid: 8576900523871437194
m_Source: {fileID: 9145486027612759989}
- rid: 8576900523871437194
type: {class: Blackboard, ns: Unity.Behavior, asm: Unity.Behavior}
data:
m_Variables:
- rid: 8576900523871437257
- rid: 8576900523871437258
- rid: 8576900523871437257
type: {class: 'BlackboardVariable`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 1
m_Value1: 0
Name: Self
m_Value: {fileID: 0}
- rid: 8576900523871437258
type: {class: 'BlackboardVariable`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 9546023108006724255
m_Value1: 13139882300079034470
Name: Target
m_Value: {fileID: 0}
- rid: 8576900523871437348
type: {class: Start, ns: Unity.Behavior, asm: Unity.Behavior}
data:
ID:
m_Value0: 17422087895670303000
m_Value1: 13687843103871736289
Graph:
rid: 8576900523871437191
m_Parent:
rid: -2
m_Child:
rid: 8576900523871437349
Repeat: 1
AllowMultipleRepeatsPerTick: 0
- rid: 8576900523871437349
type: {class: SequenceComposite, ns: Unity.Behavior, asm: Unity.Behavior}
data:
ID:
m_Value0: 10214520319780007408
m_Value1: 5191478572695873751
Graph:
rid: 8576900523871437191
m_Parent:
rid: 8576900523871437348
m_Children:
- rid: 8576900523871437350
- rid: 8576900523871437351
m_RegisteredObservers: []
- rid: 8576900523871437350
type: {class: FindClosestWithTagAction, ns: Unity.Behavior, asm: Unity.Behavior}
data:
ID:
m_Value0: 5909309792806027897
m_Value1: 2497907566840704140
Graph:
rid: 8576900523871437191
m_Parent:
rid: 8576900523871437349
Target:
rid: 8576900523871437258
Agent:
rid: 8576900523871437257
Tag:
rid: 8576900523871437352
- rid: 8576900523871437351
type: {class: LogVariableToConsoleAction, ns: Unity.Behavior, asm: Unity.Behavior}
data:
ID:
m_Value0: 2543146926494331752
m_Value1: 16203842873353913833
Graph:
rid: 8576900523871437191
m_Parent:
rid: 8576900523871437349
Variable:
rid: 8576900523871437258
- rid: 8576900523871437352
type: {class: 'BlackboardVariable`1[[System.String, mscorlib]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 0
m_Value1: 0
Name:
m_Value: Player
--- !u!114 &9145486027612759989
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: 11500000, guid: 5c02bb70996b49eba31d0c206e28da24, type: 3}
m_Name: FindPlayerByTagGraph Blackboard
m_EditorClassIdentifier: Unity.Behavior::Unity.Behavior.RuntimeBlackboardAsset
VersionTimestamp: 639129706401206080
AssetID:
m_Value0: 0
m_Value1: 0
m_Blackboard:
m_Variables:
- rid: 8576900523871437196
- rid: 8576900523871437248
m_SharedBlackboardVariableGuids: []
references:
version: 2
RefIds:
- rid: 8576900523871437196
type: {class: 'BlackboardVariable`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 1
m_Value1: 0
Name: Self
m_Value: {fileID: 0}
- rid: 8576900523871437248
type: {class: 'BlackboardVariable`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 9546023108006724255
m_Value1: 13139882300079034470
Name: Target
m_Value: {fileID: 0}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f507f8b0341084678a52a418487a126c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
+35 -5
View File
@@ -558,6 +558,7 @@ GameObject:
- component: {fileID: 834270197}
- component: {fileID: 834270196}
- component: {fileID: 834270200}
- component: {fileID: 834270201}
m_Layer: 0
m_Name: Enemy
m_TagString: Untagged
@@ -654,7 +655,7 @@ Transform:
m_GameObject: {fileID: 834270195}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 15.94923, y: 1, z: -11.8}
m_LocalPosition: {x: 0, y: 1, z: -11.8}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
@@ -667,12 +668,41 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 834270195}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9454dea900ac47458b0b0a41b50f7351, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::AI.FSM.ChaseStateMachine
playerController: {fileID: 1220817645}
--- !u!114 &834270201
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 834270195}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f0038c16c34866b4f9e25c9c0dc0f7e6, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Behavior::Unity.Behavior.BehaviorGraphAgent
m_Graph: {fileID: -1493939157129430043, guid: f994c7ce892f3403b928211eb15aec30, type: 2}
m_BlackboardVariableOverridesList:
- rid: 8576900521602318569
m_OriginalGraph: {fileID: 8526535084835872973, guid: f507f8b0341084678a52a418487a126c, type: 2}
m_IsInitialised: 0
m_IsStarted: 0
references:
version: 2
RefIds:
- rid: 8576900521602318569
type: {class: 'BlackboardVariable`1[[UnityEngine.GameObject, UnityEngine.CoreModule]]', ns: Unity.Behavior, asm: Unity.Behavior}
data:
GUID:
m_Value0: 1
m_Value1: 0
Name: Self
m_Value: {fileID: 834270195}
--- !u!1 &839778696
GameObject:
m_ObjectHideFlags: 0
@@ -691,7 +721,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!65 &839778697
BoxCollider:
m_ObjectHideFlags: 0
@@ -800,7 +830,7 @@ GameObject:
- component: {fileID: 1220817646}
m_Layer: 0
m_Name: Player
m_TagString: Untagged
m_TagString: Player
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -894,7 +924,7 @@ Transform:
m_GameObject: {fileID: 1220817641}
serializedVersion: 2
m_LocalRotation: {x: -0, y: 1, z: -0, w: -0.0000004768371}
m_LocalPosition: {x: 16.13, y: 1, z: 4.2}
m_LocalPosition: {x: 0, y: 1, z: 4.2}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
+3
View File
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 64c4e3fb204f4969917cc3c9292203d8
timeCreated: 1777370342
+7
View File
@@ -0,0 +1,7 @@
namespace BehaviorTree
{
public abstract class Action : Node
{
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f3ab3ddc36e243b2be90aa9b5509e227
timeCreated: 1777370370
@@ -0,0 +1,9 @@
using System.Collections.Generic;
namespace BehaviorTree
{
public abstract class Composite : Node
{
protected List<Node> nodes = new List<Node>();
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 14d4eb6b8f8d457a8337c28efd869803
timeCreated: 1777370399
@@ -0,0 +1,7 @@
namespace BehaviorTree
{
public abstract class Condition : Node
{
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 802a61204be646c99182eba809e9aaf6
timeCreated: 1777370380
@@ -0,0 +1,8 @@
namespace BehaviorTree
{
public abstract class Decorator : Node
{
protected Node node = null;
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 14a7012970af4403878ef7499c89a656
timeCreated: 1777370408
+29
View File
@@ -0,0 +1,29 @@
using System.Collections.Generic;
namespace BehaviorTree
{
public abstract class Node
{
public virtual Status Start()
{
return Status.Running;
}
public virtual Status End()
{
return Status.Success;
}
public virtual Status Update()
{
return Status.Running;
}
}
public enum Status
{
Success,
Failure,
Running
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d82e920d170a41e7b3c88051227b2b87
timeCreated: 1777370362
@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
namespace BehaviorTree
{
public class Selector : Composite
{
private int _currentIndex;
private Node _currentNode;
public Selector(List<Node> _nodes)
{
nodes = _nodes;
}
public override Status Start()
{
if (nodes == null || nodes.Count == 0)
{
return Status.Failure;
}
_currentIndex = 0;
_currentNode = nodes[_currentIndex];
_currentNode.Start();
return Status.Running;
}
public override Status Update()
{
Status status = _currentNode?.Update() ?? Status.Failure;
switch (status)
{
case Status.Failure:
if (_currentNode?.End() == Status.Failure) return Status.Failure;
_currentIndex++;
if (_currentIndex >= nodes.Count) return Status.Failure;
_currentNode = nodes[_currentIndex];
if (_currentNode?.Start() == Status.Failure) return Status.Failure;
return Status.Running;
case Status.Success:
_currentNode?.End();
return Status.Success;
case Status.Running:
return Status.Running;
default:
throw new ArgumentOutOfRangeException();
}
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 6cdc8db4acb84507990e59ccd03bf1a3
timeCreated: 1777370428
@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
namespace BehaviorTree
{
public class Sequence : Composite
{
private int _currentIndex;
private Node _currentNode;
public Sequence(List<Node> _nodes)
{
nodes = _nodes;
}
public override Status Start()
{
if (nodes == null || nodes.Count == 0)
{
return Status.Failure;
}
_currentIndex = 0;
_currentNode = nodes[_currentIndex];
_currentNode.Start();
return Status.Running;
}
public override Status Update()
{
Status status = _currentNode?.Update() ?? Status.Failure;
switch (status)
{
case Status.Success:
if (_currentNode?.End() == Status.Failure) return Status.Failure;
_currentIndex++;
if (_currentIndex >= nodes.Count) return Status.Success;
_currentNode = nodes[_currentIndex];
if (_currentNode?.Start() == Status.Failure) return Status.Failure;
return Status.Running;
case Status.Failure:
_currentNode?.End();
return Status.Failure;
case Status.Running:
return Status.Running;
default:
throw new ArgumentOutOfRangeException();
}
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a7965f6ffc804719afe03c1ea8ed1f1d
timeCreated: 1777370418
+66
View File
@@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace BehaviorTree
{
public class Tree : MonoBehaviour
{
private Node _rootNode;
private void OnEnable()
{
_rootNode = new Selector(new List<Node>{});
Status status = _rootNode.Start();
Debug.Log(status);
switch (status)
{
case Status.Success:
break;
case Status.Failure:
break;
case Status.Running:
break;
default:
throw new ArgumentOutOfRangeException();
}
}
private void OnDisable()
{
Status status = _rootNode?.End() ?? Status.Failure;
switch (status)
{
case Status.Success:
break;
case Status.Failure:
break;
case Status.Running:
break;
default:
throw new ArgumentOutOfRangeException();
}
_rootNode = null;
}
private void Update()
{
Status status = _rootNode?.Update() ?? Status.Failure;
switch (status)
{
case Status.Success:
break;
case Status.Failure:
break;
case Status.Running:
break;
default:
throw new ArgumentOutOfRangeException();
}
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 48d4d2eb93f743c0821902732350a1e5
timeCreated: 1777370351
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9fdd1a937331f41f6bfe17cf230bbd57
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,49 @@
using System;
using AI.FSM;
using Unity.Behavior;
using UnityEngine;
using Action = Unity.Behavior.Action;
using Unity.Properties;
[Serializable, GeneratePropertyBag]
[NodeDescription(name: "Find By Raycast", story: "Find [Target] by Raycast from [Agent]", category: "Action/Find", id: "4485803bf98219ce319c3000d6f8e6bf")]
public partial class FindByRaycastAction : Action
{
[SerializeReference] public BlackboardVariable<GameObject> Target;
[SerializeReference] public BlackboardVariable<GameObject> Agent;
[SerializeReference] public BlackboardVariable<float> MaxDistance = new(10.0f);
protected override Status OnStart()
{
// initialize action here
// test for valid variables
if (Agent.Value == null) return Status.Failure;
return Status.Running;
}
protected override Status OnUpdate()
{
Target.Value = null;
RaycastHit hit;
if (!Physics.Raycast(Agent.Value.transform.position, Agent.Value.transform.forward, out hit,
MaxDistance))
{
return Status.Failure;
}
PlayerController playerController = hit.collider.GetComponent<PlayerController>();
if (!playerController) return Status.Failure;
Target.Value = playerController.gameObject;
return Status.Success;
}
protected override void OnEnd()
{
// deinitialize action here
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 91157a6cd972849c58afadf2f49c5d04
@@ -0,0 +1,35 @@
using System;
using Unity.Behavior;
using UnityEngine;
[Serializable, Unity.Properties.GeneratePropertyBag]
[Condition(name: "Target Null", story: "[Target] [is] null", category: "Conditions", id: "83ee136bdfeb6568a8a2fb0a340e6e69")]
public partial class GameObjectNullCondition : Condition
{
[SerializeReference] public BlackboardVariable<GameObject> Target;
[Comparison(comparisonType: ComparisonType.Boolean)]
[SerializeReference] public BlackboardVariable<ConditionOperator> Is;
public override bool IsTrue()
{
if (Is.Value == ConditionOperator.Equal)
{
return Target.Value == null;
}
else
{
return Target.Value != null;
}
return (Target.Value == null && Is.Value == ConditionOperator.Equal) ||
(Target.Value != null && Is.Value == ConditionOperator.NotEqual);
}
public override void OnStart()
{
}
public override void OnEnd()
{
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 0c4c02578331346c792b21cbd5e227a4
+1
View File
@@ -1,6 +1,7 @@
{
"dependencies": {
"com.unity.ai.navigation": "2.0.11",
"com.unity.behavior": "1.0.15",
"com.unity.collab-proxy": "2.11.4",
"com.unity.ide.rider": "3.0.39",
"com.unity.ide.visualstudio": "2.0.26",
+40 -4
View File
@@ -9,9 +9,26 @@
},
"url": "https://packages.unity.com"
},
"com.unity.behavior": {
"version": "1.0.15",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.burst": "1.7.2",
"com.unity.dt.app-ui": "2.0.0",
"com.unity.modules.ai": "1.0.0",
"com.unity.collections": "2.1.4",
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.nuget.newtonsoft-json": "3.2.1",
"com.unity.modules.particlesystem": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.burst": {
"version": "1.8.28",
"depth": 2,
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.mathematics": "1.2.1",
@@ -28,7 +45,7 @@
},
"com.unity.collections": {
"version": "2.6.2",
"depth": 2,
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.burst": "1.8.23",
@@ -39,6 +56,18 @@
},
"url": "https://packages.unity.com"
},
"com.unity.dt.app-ui": {
"version": "2.1.1",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.modules.physics": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.uielements": "1.0.0",
"com.unity.modules.screencapture": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.ext.nunit": {
"version": "2.0.5",
"depth": 1,
@@ -89,7 +118,14 @@
},
"com.unity.nuget.mono-cecil": {
"version": "1.11.6",
"depth": 3,
"depth": 2,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.nuget.newtonsoft-json": {
"version": "3.2.2",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
@@ -154,7 +190,7 @@
},
"com.unity.test-framework.performance": {
"version": "3.2.0",
"depth": 3,
"depth": 2,
"source": "registry",
"dependencies": {
"com.unity.test-framework": "1.1.33",
+28
View File
@@ -0,0 +1,28 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &1
MonoBehaviour:
m_ObjectHideFlags: 53
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: 11500000, guid: 6118340bc55d5fc4b88ef6970b16d122, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.Behavior.Authoring::Unity.Behavior.BehaviorProjectSettings
m_GraphOwnerName: Self
m_AutoSaveLastSaveLocation: 1
m_SaveFolder: Scripts/UnityBehaviors
m_UseSeparateSaveFolders: 0
m_SaveFolderAction:
m_SaveFolderModifier:
m_SaveFolderFlow:
m_SaveFolderCondition:
m_SaveFolderEventChannels:
m_SaveFolderEnum:
m_AutoOpenNodeScriptsInExternalEditor: 1
m_Namespace:
m_AllowDisabledAgentDebugging: 0
m_IgnoreMissingManagedReferencesInBuild: 0
@@ -9,5 +9,6 @@ EditorBuildSettings:
path: Assets/Scenes/SampleScene.unity
guid: 99c9720ab356a0642a771bea13969a05
m_configObjects:
com.unity.dt.app-ui: {fileID: 11400000, guid: 99f9c9493070a9d4c979a8fec7c5a8d3, type: 2}
com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
m_UseUCBPForAssetBundles: 0