Merge branch 'main' of http://1.14.122.170:3000/JinYu/ProtypeProject
# Conflicts: # Assets/BP_Scripts/BT_test.assetmain^2
commit
12eb4e74cf
|
|
@ -9,6 +9,9 @@ MonoBehaviour:
|
|||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c3420f187011c1a43824ca0d4c88d6c6, type: 3}
|
||||
m_Name: PublishCriteria
|
||||
m_Script: {fileID: 11500000, guid: ee4fa5caed5fb2b43b903ef7859c9bf9, type: 3}
|
||||
m_Name: 200030
|
||||
m_EditorClassIdentifier:
|
||||
_serializedBlackboard: '{"_variables":{}}'
|
||||
_objectReferences: []
|
||||
_UID: 6cf47b97-89b5-4e07-968f-13bb25a67a47
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0de0e36ee42ae394a8ac5b18dc6303ed
|
||||
guid: 6b912a448ab5a5741ba1850d8fdcc31c
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
|
|
@ -12,23 +12,20 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: 2d31b62ec9d586a4e94389d9071559ca, type: 3}
|
||||
m_Name: BP_test
|
||||
m_EditorClassIdentifier:
|
||||
_serializedGraph: '{"type":"FlowCanvas.FlowScript","nodes":[{"_position":{"x":740.0,"y":-1520.0},"$type":"FlowCanvas.Nodes.StartEvent","$id":"0"},{"_method":{"_baseInfo":"UnityEngine.Transform|GetPositionAndRotation|System.Void","_paramsInfo":"UnityEngine.Vector3&|UnityEngine.Quaternion&"},"_callable":true,"_position":{"x":920.0,"y":-1520.0},"$type":"FlowCanvas.Nodes.ReflectedMethodNodeWrapper","$id":"1"},{"_simplexNode":{},"_inputPortValues":{"time":{"$content":3.0,"$type":"System.Single"}},"_position":{"x":1220.0,"y":-1520.0},"$type":"FlowCanvas.Nodes.SimplexNodeWrapper`1[[FlowCanvas.Nodes.Wait,
|
||||
FlowCanvas, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]","$id":"2"},{"_simplexNode":{},"_inputPortValues":{"to":{"y":20.0,"$type":"UnityEngine.Vector3"},"duration":{"$content":1.0,"$type":"System.Single"}},"_position":{"x":1440.0,"y":-1520.0},"$type":"FlowCanvas.Nodes.SimplexNodeWrapper`1[[FlowCanvas.Nodes.TweenVector3,
|
||||
FlowCanvas, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]","$id":"3"},{"_simplexNode":{},"_inputPortValues":{"rotation":{"x":410.0,"$type":"UnityEngine.Vector3"},"duration":{"$content":2.0,"$type":"System.Single"}},"_position":{"x":1660.0,"y":-1520.0},"$type":"FlowCanvas.Nodes.SimplexNodeWrapper`1[[FlowCanvas.Nodes.TweenRotation,
|
||||
FlowCanvas, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]","$id":"4"},{"_simplexNode":{},"_inputPortValues":{"duration":{"$content":1.0,"$type":"System.Single"}},"_position":{"x":1880.0,"y":-1520.0},"$type":"FlowCanvas.Nodes.SimplexNodeWrapper`1[[FlowCanvas.Nodes.TweenVector3,
|
||||
FlowCanvas, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]","$id":"5"},{"_field":{"_baseInfo":"CinemachineCameraOffset|m_Offset"},"_position":{"x":1140.0,"y":-1360.0},"$type":"FlowCanvas.Nodes.ReflectedFieldNodeWrapper","$version":1,"$id":"6"}],"connections":[{"_sourcePortName":"Once","_targetPortName":"
|
||||
","_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"1"},"$type":"FlowCanvas.BinderConnection"},{"_sourcePortName":"
|
||||
","_targetPortName":"In","_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"2"},"$type":"FlowCanvas.BinderConnection"},{"_sourcePortName":"Transform","_targetPortName":"from","_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"5"},"$type":"FlowCanvas.BinderConnection`1[[UnityEngine.Vector3,
|
||||
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},{"_sourcePortName":"Done","_targetPortName":"In","_sourceNode":{"$ref":"2"},"_targetNode":{"$ref":"3"},"$type":"FlowCanvas.BinderConnection"},{"_sourcePortName":"Done","_targetPortName":"In","_sourceNode":{"$ref":"3"},"_targetNode":{"$ref":"4"},"$type":"FlowCanvas.BinderConnection"},{"_sourcePortName":"Done","_targetPortName":"In","_sourceNode":{"$ref":"4"},"_targetNode":{"$ref":"5"},"$type":"FlowCanvas.BinderConnection"},{"_sourcePortName":"Value","_targetPortName":"from","_sourceNode":{"$ref":"6","$version":1},"_targetNode":{"$ref":"3"},"$type":"FlowCanvas.BinderConnection`1[[UnityEngine.Vector3,
|
||||
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},{"_sourcePortName":"Value","_targetPortName":"to","_sourceNode":{"$ref":"6","$version":1},"_targetNode":{"$ref":"5"},"$type":"FlowCanvas.BinderConnection`1[[UnityEngine.Vector3,
|
||||
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}],"canvasGroups":[],"localBlackboard":{"_variables":{"myColor":{"_value":{"r":1.0,"b":0.1459293},"_name":"myColor","_id":"6971da02-c1e1-4996-a378-b9dbfe2e5c86","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Color,
|
||||
_serializedGraph: '{"type":"FlowCanvas.FlowScript","nodes":[{"_method":{"_baseInfo":"UnityEngine.Transform|GetPositionAndRotation|System.Void","_paramsInfo":"UnityEngine.Vector3&|UnityEngine.Quaternion&"},"_callable":true,"_position":{"x":920.0,"y":-1520.0},"$type":"FlowCanvas.Nodes.ReflectedMethodNodeWrapper","$id":"0"},{"_simplexNode":{},"_inputPortValues":{"time":{"$content":3.0,"$type":"System.Single"}},"_position":{"x":1220.0,"y":-1520.0},"$type":"FlowCanvas.Nodes.SimplexNodeWrapper`1[[FlowCanvas.Nodes.Wait,
|
||||
FlowCanvas, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]","$id":"1"},{"_simplexNode":{},"_inputPortValues":{"to":{"y":20.0,"$type":"UnityEngine.Vector3"},"duration":{"$content":1.0,"$type":"System.Single"}},"_position":{"x":1440.0,"y":-1520.0},"$type":"FlowCanvas.Nodes.SimplexNodeWrapper`1[[FlowCanvas.Nodes.TweenVector3,
|
||||
FlowCanvas, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]","$id":"2"},{"_simplexNode":{},"_inputPortValues":{"rotation":{"x":410.0,"$type":"UnityEngine.Vector3"},"duration":{"$content":2.0,"$type":"System.Single"}},"_position":{"x":1660.0,"y":-1520.0},"$type":"FlowCanvas.Nodes.SimplexNodeWrapper`1[[FlowCanvas.Nodes.TweenRotation,
|
||||
FlowCanvas, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]","$id":"3"},{"_simplexNode":{},"_inputPortValues":{"duration":{"$content":1.0,"$type":"System.Single"}},"_position":{"x":1880.0,"y":-1520.0},"$type":"FlowCanvas.Nodes.SimplexNodeWrapper`1[[FlowCanvas.Nodes.TweenVector3,
|
||||
FlowCanvas, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]","$id":"4"},{"_position":{"x":1440.0,"y":-1020.0},"$type":"FlowCanvas.Nodes.SwitchBool"}],"connections":[{"_sourcePortName":"
|
||||
","_targetPortName":"In","_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"1"},"$type":"FlowCanvas.BinderConnection"},{"_sourcePortName":"Transform","_targetPortName":"from","_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"4"},"$type":"FlowCanvas.BinderConnection`1[[UnityEngine.Vector3,
|
||||
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},{"_sourcePortName":"Done","_targetPortName":"In","_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"2"},"$type":"FlowCanvas.BinderConnection"},{"_sourcePortName":"Done","_targetPortName":"In","_sourceNode":{"$ref":"2"},"_targetNode":{"$ref":"3"},"$type":"FlowCanvas.BinderConnection"},{"_sourcePortName":"Done","_targetPortName":"In","_sourceNode":{"$ref":"3"},"_targetNode":{"$ref":"4"},"$type":"FlowCanvas.BinderConnection"}],"canvasGroups":[],"localBlackboard":{"_variables":{"myColor":{"_value":{"r":1.0,"b":0.1459293},"_name":"myColor","_id":"6971da02-c1e1-4996-a378-b9dbfe2e5c86","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Color,
|
||||
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}}}}'
|
||||
_objectReferences: []
|
||||
_graphSource:
|
||||
_version: 3.33
|
||||
_category:
|
||||
_comments:
|
||||
_translation: {x: -215.2505, y: 1987.4708}
|
||||
_zoomFactor: 0.75009686
|
||||
_translation: {x: -455, y: 1905}
|
||||
_zoomFactor: 0.92373765
|
||||
_haltSerialization: 0
|
||||
_externalSerializationFile: {fileID: 0}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7a686a47eee2fa44cb0a34b5d86e4d5e, type: 3}
|
||||
m_Name: BT_Sub_JoystickCtronl
|
||||
m_EditorClassIdentifier:
|
||||
_serializedGraph: '{"type":"NodeCanvas.BehaviourTrees.BehaviourTree","nodes":[{"policy":1,"dynamic":true,"_position":{"x":920.0,"y":220.0},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"0"},{"_position":{"x":-580.0,"y":360.0},"$type":"NodeCanvas.BehaviourTrees.Sequencer","$id":"1"},{"_condition":{"conditions":[{"valueA":{"_name":"Output
|
||||
X","_targetVariableID":"0a33c1e5-b9fd-405a-b04e-485f6108bf42"},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckFloat"},{"valueA":{"_name":"Output
|
||||
Y","_targetVariableID":"bb6b42f8-2928-4262-8c1e-715593667064"},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckFloat"}],"$type":"NodeCanvas.Framework.ConditionList"},"_position":{"x":-700.0,"y":480.0},"_comment":"\u5224\u65ad\u6447\u6746\u662f\u5426\u662f\u6b63\u524d","$type":"NodeCanvas.BehaviourTrees.ConditionNode","$id":"2"},{"_action":{"actions":[{"valueA":{"_name":"Accelerate","_targetVariableID":"e5c76720-7c6b-452e-8a27-7d0ef777a12d"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"},{"valueA":{"_name":"Turn","_targetVariableID":"034762dd-f449-4db4-aa54-4a5db57d030a"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}],"$type":"NodeCanvas.Framework.ActionList"},"_position":{"x":-540.0,"y":480.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"3"},{"_position":{"x":-260.0,"y":360.0},"$type":"NodeCanvas.BehaviourTrees.Sequencer","$id":"4"},{"_condition":{"conditions":[{"valueA":{"_name":"Output
|
||||
X","_targetVariableID":"0a33c1e5-b9fd-405a-b04e-485f6108bf42"},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckFloat"},{"valueA":{"_name":"Output
|
||||
Y","_targetVariableID":"bb6b42f8-2928-4262-8c1e-715593667064"},"checkType":3,"valueB":{"_value":0.2},"$type":"NodeCanvas.Tasks.Conditions.CheckFloat"}],"$type":"NodeCanvas.Framework.ConditionList"},"_position":{"x":-380.0,"y":480.0},"_comment":"\u5224\u65ad\u6447\u6746\u662f\u5426\u662f\u6b63\u524d","$type":"NodeCanvas.BehaviourTrees.ConditionNode","$id":"5"},{"_action":{"actions":[{"valueA":{"_name":"Accelerate","_targetVariableID":"e5c76720-7c6b-452e-8a27-7d0ef777a12d"},"valueB":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.SetFloat"},{"valueA":{"_name":"Turn","_targetVariableID":"034762dd-f449-4db4-aa54-4a5db57d030a"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}],"$type":"NodeCanvas.Framework.ActionList"},"_position":{"x":-220.0,"y":480.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"6"},{"_position":{"x":40.0,"y":360.0},"$type":"NodeCanvas.BehaviourTrees.Sequencer","$id":"7"},{"_condition":{"conditions":[{"valueA":{"_name":"Output
|
||||
X","_targetVariableID":"0a33c1e5-b9fd-405a-b04e-485f6108bf42"},"checkType":4,"valueB":{"_value":-0.2},"$type":"NodeCanvas.Tasks.Conditions.CheckFloat"},{"valueA":{"_name":"Output
|
||||
Y","_targetVariableID":"bb6b42f8-2928-4262-8c1e-715593667064"},"checkType":3,"valueB":{"_value":0.2},"$type":"NodeCanvas.Tasks.Conditions.CheckFloat"}],"$type":"NodeCanvas.Framework.ConditionList"},"_position":{"x":-80.0,"y":480.0},"_comment":"\u5224\u65ad\u6447\u6746\u662f\u5426\u662f\ud83d\udcb0\u5de6\u8f6c","$type":"NodeCanvas.BehaviourTrees.ConditionNode","$id":"8"},{"_action":{"actions":[{"valueA":{"_name":"Accelerate","_targetVariableID":"e5c76720-7c6b-452e-8a27-7d0ef777a12d"},"valueB":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.SetFloat"},{"valueA":{"_name":"Turn","_targetVariableID":"034762dd-f449-4db4-aa54-4a5db57d030a"},"valueB":{"_value":-1.0},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}],"$type":"NodeCanvas.Framework.ActionList"},"_position":{"x":80.0,"y":480.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"9"},{"_position":{"x":360.0,"y":360.0},"$type":"NodeCanvas.BehaviourTrees.Sequencer","$id":"10"},{"_condition":{"conditions":[{"valueA":{"_name":"Output
|
||||
X","_targetVariableID":"0a33c1e5-b9fd-405a-b04e-485f6108bf42"},"checkType":3,"valueB":{"_value":0.2},"$type":"NodeCanvas.Tasks.Conditions.CheckFloat"},{"valueA":{"_name":"Output
|
||||
Y","_targetVariableID":"bb6b42f8-2928-4262-8c1e-715593667064"},"checkType":3,"valueB":{"_value":0.2},"$type":"NodeCanvas.Tasks.Conditions.CheckFloat"}],"$type":"NodeCanvas.Framework.ConditionList"},"_position":{"x":240.0,"y":480.0},"_comment":"\u5224\u65ad\u6447\u6746\u662f\u5426\u662f\ud83d\udcb0\u53f3\u8f6c","$type":"NodeCanvas.BehaviourTrees.ConditionNode","$id":"11"},{"_action":{"actions":[{"valueA":{"_name":"Accelerate","_targetVariableID":"e5c76720-7c6b-452e-8a27-7d0ef777a12d"},"valueB":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.SetFloat"},{"valueA":{"_name":"Turn","_targetVariableID":"034762dd-f449-4db4-aa54-4a5db57d030a"},"valueB":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}],"$type":"NodeCanvas.Framework.ActionList"},"_position":{"x":400.0,"y":480.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"12"},{"_position":{"x":680.0,"y":360.0},"$type":"NodeCanvas.BehaviourTrees.Sequencer","$id":"13"},{"_condition":{"valueA":{"_name":"Output
|
||||
X","_targetVariableID":"0a33c1e5-b9fd-405a-b04e-485f6108bf42"},"valueB":{"_value":-1.0},"$type":"NodeCanvas.Tasks.Conditions.CheckFloat"},"_position":{"x":540.0,"y":480.0},"_comment":"\u5224\u65ad\u6447\u6746\u662f\u5426\u662f\u5de6\u8f6c","$type":"NodeCanvas.BehaviourTrees.ConditionNode","$id":"14"},{"_action":{"actions":[{"valueA":{"_name":"Accelerate","_targetVariableID":"e5c76720-7c6b-452e-8a27-7d0ef777a12d"},"valueB":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.SetFloat"},{"valueA":{"_name":"Turn","_targetVariableID":"034762dd-f449-4db4-aa54-4a5db57d030a"},"valueB":{"_value":-1.0},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}],"$type":"NodeCanvas.Framework.ActionList"},"_position":{"x":700.0,"y":480.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"15"},{"_position":{"x":960.0,"y":360.0},"$type":"NodeCanvas.BehaviourTrees.Sequencer","$id":"16"},{"_condition":{"valueA":{"_name":"Output
|
||||
X","_targetVariableID":"0a33c1e5-b9fd-405a-b04e-485f6108bf42"},"valueB":{"_value":1.0},"$type":"NodeCanvas.Tasks.Conditions.CheckFloat"},"_position":{"x":860.0,"y":480.0},"_comment":"\u5224\u65ad\u6447\u6746\u662f\u5426\u662f\u53f3\u8f6c","$type":"NodeCanvas.BehaviourTrees.ConditionNode","$id":"17"},{"_action":{"actions":[{"valueA":{"_name":"Accelerate","_targetVariableID":"e5c76720-7c6b-452e-8a27-7d0ef777a12d"},"valueB":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.SetFloat"},{"valueA":{"_name":"Turn","_targetVariableID":"034762dd-f449-4db4-aa54-4a5db57d030a"},"valueB":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}],"$type":"NodeCanvas.Framework.ActionList"},"_position":{"x":1000.0,"y":480.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"18"},{"_position":{"x":1260.0,"y":360.0},"$type":"NodeCanvas.BehaviourTrees.Sequencer","$id":"19"},{"_condition":{"conditions":[{"valueA":{"_name":"Output
|
||||
X","_targetVariableID":"0a33c1e5-b9fd-405a-b04e-485f6108bf42"},"checkType":4,"valueB":{"_value":-0.2},"$type":"NodeCanvas.Tasks.Conditions.CheckFloat"},{"valueA":{"_name":"Output
|
||||
Y","_targetVariableID":"bb6b42f8-2928-4262-8c1e-715593667064"},"checkType":4,"valueB":{"_value":-0.2},"$type":"NodeCanvas.Tasks.Conditions.CheckFloat"}],"$type":"NodeCanvas.Framework.ConditionList"},"_position":{"x":1140.0,"y":480.0},"_comment":"\u5224\u65ad\u6447\u6746\u662f\u5426\u662f\u540e\u5de6\u8f6c","$type":"NodeCanvas.BehaviourTrees.ConditionNode","$id":"20"},{"_action":{"actions":[{"valueA":{"_name":"Accelerate","_targetVariableID":"e5c76720-7c6b-452e-8a27-7d0ef777a12d"},"valueB":{"_value":-1.0},"$type":"NodeCanvas.Tasks.Actions.SetFloat"},{"valueA":{"_name":"Turn","_targetVariableID":"034762dd-f449-4db4-aa54-4a5db57d030a"},"valueB":{"_value":-1.0},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}],"$type":"NodeCanvas.Framework.ActionList"},"_position":{"x":1300.0,"y":480.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"21"},{"_position":{"x":1580.0,"y":360.0},"$type":"NodeCanvas.BehaviourTrees.Sequencer","$id":"22"},{"_condition":{"conditions":[{"valueA":{"_name":"Output
|
||||
X","_targetVariableID":"0a33c1e5-b9fd-405a-b04e-485f6108bf42"},"checkType":3,"valueB":{"_value":0.2},"$type":"NodeCanvas.Tasks.Conditions.CheckFloat"},{"valueA":{"_name":"Output
|
||||
Y","_targetVariableID":"bb6b42f8-2928-4262-8c1e-715593667064"},"checkType":4,"valueB":{"_value":-0.2},"$type":"NodeCanvas.Tasks.Conditions.CheckFloat"}],"$type":"NodeCanvas.Framework.ConditionList"},"_position":{"x":1440.0,"y":480.0},"_comment":"\u5224\u65ad\u6447\u6746\u662f\u5426\u662f\u540e\u53f3\u8f6c","$type":"NodeCanvas.BehaviourTrees.ConditionNode","$id":"23"},{"_action":{"actions":[{"valueA":{"_name":"Accelerate","_targetVariableID":"e5c76720-7c6b-452e-8a27-7d0ef777a12d"},"valueB":{"_value":-1.0},"$type":"NodeCanvas.Tasks.Actions.SetFloat"},{"valueA":{"_name":"Turn","_targetVariableID":"034762dd-f449-4db4-aa54-4a5db57d030a"},"valueB":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}],"$type":"NodeCanvas.Framework.ActionList"},"_position":{"x":1600.0,"y":480.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"24"},{"_position":{"x":1920.0,"y":360.0},"$type":"NodeCanvas.BehaviourTrees.Sequencer","$id":"25"},{"_condition":{"conditions":[{"valueA":{"_name":"Output
|
||||
X","_targetVariableID":"0a33c1e5-b9fd-405a-b04e-485f6108bf42"},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckFloat"},{"valueA":{"_name":"Output
|
||||
Y","_targetVariableID":"bb6b42f8-2928-4262-8c1e-715593667064"},"checkType":4,"valueB":{"_value":-0.2},"$type":"NodeCanvas.Tasks.Conditions.CheckFloat"}],"$type":"NodeCanvas.Framework.ConditionList"},"_position":{"x":1760.0,"y":480.0},"_comment":"\u5224\u65ad\u6447\u6746\u662f\u5426\u662f\u540e\u53f3\u8f6c","$type":"NodeCanvas.BehaviourTrees.ConditionNode","$id":"26"},{"_action":{"actions":[{"valueA":{"_name":"Accelerate","_targetVariableID":"e5c76720-7c6b-452e-8a27-7d0ef777a12d"},"valueB":{"_value":-1.0},"$type":"NodeCanvas.Tasks.Actions.SetFloat"},{"valueA":{"_name":"Turn","_targetVariableID":"034762dd-f449-4db4-aa54-4a5db57d030a"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}],"$type":"NodeCanvas.Framework.ActionList"},"_position":{"x":1920.0,"y":480.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"27"}],"connections":[{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"4"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"7"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"10"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"13"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"16"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"19"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"22"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"25"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"2"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"3"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"4"},"_targetNode":{"$ref":"5"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"4"},"_targetNode":{"$ref":"6"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"7"},"_targetNode":{"$ref":"8"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"7"},"_targetNode":{"$ref":"9"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"10"},"_targetNode":{"$ref":"11"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"10"},"_targetNode":{"$ref":"12"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"13"},"_targetNode":{"$ref":"14"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"13"},"_targetNode":{"$ref":"15"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"16"},"_targetNode":{"$ref":"17"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"16"},"_targetNode":{"$ref":"18"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"19"},"_targetNode":{"$ref":"20"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"19"},"_targetNode":{"$ref":"21"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"22"},"_targetNode":{"$ref":"23"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"22"},"_targetNode":{"$ref":"24"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"25"},"_targetNode":{"$ref":"26"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"25"},"_targetNode":{"$ref":"27"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"}],"canvasGroups":[],"localBlackboard":{"_variables":{}},"derivedData":{"repeat":true,"$type":"NodeCanvas.BehaviourTrees.BehaviourTree+DerivedSerializationData"}}'
|
||||
_objectReferences: []
|
||||
_graphSource:
|
||||
_version: 3.33
|
||||
_category:
|
||||
_comments:
|
||||
_translation: {x: 404.69495, y: 224.02147}
|
||||
_zoomFactor: 0.42014375
|
||||
_haltSerialization: 0
|
||||
_externalSerializationFile: {fileID: 0}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a0bc0a969202f49498e8d63e4da11d62
|
||||
guid: 38caba86f509bee4381e937d435e072f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7a686a47eee2fa44cb0a34b5d86e4d5e, type: 3}
|
||||
m_Name: BT_VehicleController
|
||||
m_EditorClassIdentifier:
|
||||
_serializedGraph: '{"type":"NodeCanvas.BehaviourTrees.BehaviourTree","nodes":[{"dynamic":true,"_position":{"x":20.0,"y":-60.0},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"0"},{"_action":{"joystickAction":{"_value":1},"outputX":{"_name":"Output
|
||||
X","_targetVariableID":"0a33c1e5-b9fd-405a-b04e-485f6108bf42"},"outputY":{"_name":"Output
|
||||
Y","_targetVariableID":"bb6b42f8-2928-4262-8c1e-715593667064"},"$type":"NLD.Nodes.GetJoystickContext"},"_position":{"x":-160.0,"y":100.0},"_comment":"\u83b7\u53d6\u6447\u6746\u5750\u6807\u4e0a\u4e0b\u6587","$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"1"},{"_subTree":{"_value":2},"_position":{"y":100.0},"_comment":"\u5224\u65ad\u6447\u6746\u8f93\u51fa","$type":"NodeCanvas.BehaviourTrees.SubTree","$id":"2"},{"_action":{"accelerate":{"_name":"Accelerate","_targetVariableID":"e5c76720-7c6b-452e-8a27-7d0ef777a12d"},"turn":{"_name":"Turn","_targetVariableID":"034762dd-f449-4db4-aa54-4a5db57d030a"},"brake":{},"gear":{},"driveMode":{},"headlights":{},"engineOn":{},"$type":"NLD.Nodes.SetVehicleInput"},"_position":{"x":180.0,"y":100.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"3"}],"connections":[{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"2"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"3"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"}],"canvasGroups":[],"localBlackboard":{"_variables":{}},"derivedData":{"repeat":true,"$type":"NodeCanvas.BehaviourTrees.BehaviourTree+DerivedSerializationData"}}'
|
||||
_objectReferences:
|
||||
- {fileID: 0}
|
||||
- {fileID: -8784545083839296357, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
|
||||
- {fileID: 11400000, guid: 38caba86f509bee4381e937d435e072f, type: 2}
|
||||
_graphSource:
|
||||
_version: 3.33
|
||||
_category:
|
||||
_comments:
|
||||
_translation: {x: 418, y: 419}
|
||||
_zoomFactor: 1
|
||||
_haltSerialization: 0
|
||||
_externalSerializationFile: {fileID: 0}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6da43df589d0e9e4486e200a9058c15f
|
||||
guid: 5293d2ca4ceb54046977213c1dffe108
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
|
|
@ -12,23 +12,13 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: 7a686a47eee2fa44cb0a34b5d86e4d5e, type: 3}
|
||||
m_Name: BT_test
|
||||
m_EditorClassIdentifier:
|
||||
_serializedGraph: '{"type":"NodeCanvas.BehaviourTrees.BehaviourTree","nodes":[{"dynamic":true,"_tag":"\u521d\u59cb\u5316","_position":{"x":560.0,"y":280.0},"_comment":"\u8fd9\u662f\u5173\u5361\u521d\u59cb\u5316\uff0c\u5173\u5361\u5f00\u59cb\u5fc5\u6709","$type":"NodeCanvas.BehaviourTrees.Sequencer","$id":"0"},{"dynamic":true,"_position":{"x":420.0,"y":420.0},"$type":"NodeCanvas.BehaviourTrees.Sequencer","$id":"1"},{"_action":{"actions":[{"dictionary":{"_name":"Dictionary","_targetVariableID":"34aa1bb3-2cc8-4d06-9fb0-9d751d56ba17"},"key":{"_value":"1"},"value":{},"$type":"NodeCanvas.Tasks.Actions.AddElementToDictionary`1[[UnityEngine.Camera,
|
||||
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},{"parent":{},"clonePosition":{},"cloneRotation":{},"saveCloneAs":{"_name":""},"$type":"NodeCanvas.Tasks.Actions.InstantiateGameObject"}],"$type":"NodeCanvas.Framework.ActionList"},"_position":{"x":31.53383,"y":683.4225},"_comment":"\u6dfb\u52a0\u76f8\u673a\u5230\u5217\u8868","$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"2"},{"_action":{"dictionary":{"_name":"Dictionary","_targetVariableID":"34aa1bb3-2cc8-4d06-9fb0-9d751d56ba17"},"key":{"_value":"1"},"saveAs":{"_name":"Main","_targetVariableID":"dc6ba0ab-ee9b-4bac-b4a9-8084a2f509b0"},"$type":"NodeCanvas.Tasks.Actions.GetDictionaryElement`1[[UnityEngine.Camera,
|
||||
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"_position":{"x":388.3602,"y":604.3391},"_comment":"\u4ece\u5217\u8868\u62ff\u76f8\u673a","$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"3"},{"dynamic":true,"_position":{"x":560.0,"y":420.0},"$type":"NodeCanvas.BehaviourTrees.Selector","$id":"4"},{"_position":{"x":700.0,"y":420.0},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"5"},{"_position":{"x":700.0,"y":540.0},"$type":"NodeCanvas.BehaviourTrees.ConditionNode"},{"dynamic":true,"desires":[{"considerations":[]},{"considerations":[]},{"considerations":[]}],"_position":{"x":1040.0,"y":280.0},"$type":"NodeCanvas.BehaviourTrees.PrioritySelector","$version":1,"$id":"7"},{"_position":{"x":900.0,"y":420.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"8"},{"_position":{"x":1040.0,"y":420.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"9"},{"_position":{"x":1180.0,"y":420.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"10"},{"_position":{"x":560.0,"y":540.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode"},{"_condition":{"conditions":[{"valueA":{"_name":""},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInt"},{"valueA":{"_name":"Dictionary","_targetVariableID":"34aa1bb3-2cc8-4d06-9fb0-9d751d56ba17"},"valueB":{"_value":{"":null}},"$type":"NodeCanvas.Tasks.Conditions.CheckVariable`1[[System.Collections.Generic.Dictionary`2[[System.String,
|
||||
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[UnityEngine.Camera,
|
||||
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]],
|
||||
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"}],"$type":"NodeCanvas.Framework.ConditionList"},"_position":{"x":480.0,"y":760.0},"$type":"NodeCanvas.BehaviourTrees.ConditionNode"}],"connections":[{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"4"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"5"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"2"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"3"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"7","$version":1},"_targetNode":{"$ref":"8"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"7","$version":1},"_targetNode":{"$ref":"9"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"7","$version":1},"_targetNode":{"$ref":"10"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"}],"canvasGroups":[],"localBlackboard":{"_variables":{"myBoolean":{"_name":"myBoolean","_id":"597a5d7c-3bd9-4688-839b-d14d91ff6172","$type":"NodeCanvas.Framework.Variable`1[[System.Boolean,
|
||||
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"Dictionary":{"_value":{"":null},"_name":"Dictionary","_id":"34aa1bb3-2cc8-4d06-9fb0-9d751d56ba17","$type":"NodeCanvas.Framework.Variable`1[[System.Collections.Generic.Dictionary`2[[System.String,
|
||||
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[UnityEngine.Camera,
|
||||
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]],
|
||||
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"Main":{"_name":"Main","_id":"dc6ba0ab-ee9b-4bac-b4a9-8084a2f509b0","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Camera,
|
||||
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}}},"derivedData":{"repeat":true,"$type":"NodeCanvas.BehaviourTrees.BehaviourTree+DerivedSerializationData"}}'
|
||||
_serializedGraph: '{"type":"NodeCanvas.BehaviourTrees.BehaviourTree","nodes":[{"_position":{"x":500.0,"y":320.0},"$type":"NodeCanvas.BehaviourTrees.Sequencer","$id":"0"},{"_color":{"r":0.7490196,"g":0.4980392,"b":1.0,"a":1.0},"_position":{"x":380.0,"y":420.0},"$type":"NodeCanvas.BehaviourTrees.Sequencer","$id":"1"},{"_condition":{"valueA":{"_name":"40001","_targetVariableID":"c46ad4e2-4d58-4936-a604-0efaada3ac3c"},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInt"},"_position":{"x":120.0,"y":500.0},"$type":"NodeCanvas.BehaviourTrees.ConditionNode","$id":"2"},{"_position":{"x":260.0,"y":500.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"3"},{"_position":{"x":380.0,"y":500.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"4"},{"_color":{"r":0.7490196,"g":0.4980392,"b":1.0,"a":1.0},"_position":{"x":620.0,"y":420.0},"$type":"NodeCanvas.BehaviourTrees.Sequencer","$id":"5"}],"connections":[{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"5"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"2"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"3"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"4"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"}],"canvasGroups":[],"localBlackboard":{"_variables":{}},"derivedData":{"repeat":true,"$type":"NodeCanvas.BehaviourTrees.BehaviourTree+DerivedSerializationData"}}'
|
||||
_objectReferences: []
|
||||
_graphSource:
|
||||
_version: 3.33
|
||||
_category:
|
||||
_comments:
|
||||
_translation: {x: 275, y: -62}
|
||||
_zoomFactor: 0.59610087
|
||||
_translation: {x: 34.72712, y: -139.61983}
|
||||
_zoomFactor: 1
|
||||
_haltSerialization: 0
|
||||
_externalSerializationFile: {fileID: 0}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 17c1d529cbf0f0c4ebfc5c131374c28f
|
||||
guid: f5755d4dc6495f04d93254f1600eae4c
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7a686a47eee2fa44cb0a34b5d86e4d5e, type: 3}
|
||||
m_Name: BT_testA
|
||||
m_EditorClassIdentifier:
|
||||
_serializedGraph: '{"type":"NodeCanvas.BehaviourTrees.BehaviourTree","nodes":[{"dynamic":true,"_tag":"\u521d\u59cb\u5316","_position":{"x":560.0,"y":280.0},"_comment":"\u8fd9\u662f\u5173\u5361\u521d\u59cb\u5316\uff0c\u5173\u5361\u5f00\u59cb\u5fc5\u6709","$type":"NodeCanvas.BehaviourTrees.Sequencer","$id":"0"},{"isDynamic":true,"_condition":{"valueA":{"_name":""},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_position":{"x":260.0,"y":420.0},"$type":"NodeCanvas.BehaviourTrees.ConditionalEvaluator","$id":"1"},{"dynamic":true,"_position":{"x":420.0,"y":420.0},"$type":"NodeCanvas.BehaviourTrees.Sequencer","$id":"2"},{"_condition":{"valueA":{"_name":""},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInt"},"_position":{"x":260.0,"y":540.0},"$type":"NodeCanvas.BehaviourTrees.ConditionNode","$id":"3"},{"dynamic":true,"_position":{"x":560.0,"y":420.0},"$type":"NodeCanvas.BehaviourTrees.Selector","$id":"4"},{"_position":{"x":720.0,"y":420.0},"$type":"NodeCanvas.BehaviourTrees.Parallel","$id":"5"},{"_position":{"x":560.0,"y":540.0},"$type":"NodeCanvas.BehaviourTrees.ConditionNode"},{"dynamic":true,"desires":[{"considerations":[]},{"considerations":[]},{"considerations":[]}],"_position":{"x":1080.0,"y":260.0},"$type":"NodeCanvas.BehaviourTrees.PrioritySelector","$version":1,"$id":"7"},{"_position":{"x":940.0,"y":400.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"8"},{"_position":{"x":1080.0,"y":400.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"9"},{"_position":{"x":1220.0,"y":400.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"10"},{"_position":{"x":420.0,"y":540.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode"},{"_position":{"y":680.0},"$type":"NodeCanvas.BehaviourTrees.Sequencer"},{"_position":{"x":140.0,"y":680.0},"$type":"NodeCanvas.BehaviourTrees.Selector"},{"_position":{"x":280.0,"y":660.0},"$type":"NodeCanvas.BehaviourTrees.Parallel"},{"childWeights":[{"_value":0.3},{"_value":0.7}],"failChance":{},"_position":{"x":420.0,"y":680.0},"$type":"NodeCanvas.BehaviourTrees.ProbabilitySelector","$id":"15"},{"_position":{"x":360.0,"y":780.0},"$type":"NodeCanvas.BehaviourTrees.ActionNode","$id":"16"},{"_position":{"x":500.0,"y":780.0},"$type":"NodeCanvas.BehaviourTrees.ConditionNode","$id":"17"}],"connections":[{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"2"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"4"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"5"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"2"},"_targetNode":{"$ref":"3"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"7","$version":1},"_targetNode":{"$ref":"8"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"7","$version":1},"_targetNode":{"$ref":"9"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"7","$version":1},"_targetNode":{"$ref":"10"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"15"},"_targetNode":{"$ref":"16"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"},{"_sourceNode":{"$ref":"15"},"_targetNode":{"$ref":"17"},"$type":"NodeCanvas.BehaviourTrees.BTConnection"}],"canvasGroups":[],"localBlackboard":{"_variables":{"myBoolean":{"_name":"myBoolean","_id":"597a5d7c-3bd9-4688-839b-d14d91ff6172","$type":"NodeCanvas.Framework.Variable`1[[System.Boolean,
|
||||
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"Dictionary":{"_value":{},"_name":"Dictionary","_id":"34aa1bb3-2cc8-4d06-9fb0-9d751d56ba17","$type":"NodeCanvas.Framework.Variable`1[[System.Collections.Generic.Dictionary`2[[System.String,
|
||||
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[UnityEngine.Camera,
|
||||
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]],
|
||||
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"Main":{"_name":"Main","_id":"dc6ba0ab-ee9b-4bac-b4a9-8084a2f509b0","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Camera,
|
||||
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}}},"derivedData":{"repeat":true,"$type":"NodeCanvas.BehaviourTrees.BehaviourTree+DerivedSerializationData"}}'
|
||||
_objectReferences: []
|
||||
_graphSource:
|
||||
_version: 3.33
|
||||
_category:
|
||||
_comments:
|
||||
_translation: {x: 293, y: 68}
|
||||
_zoomFactor: 0.90335906
|
||||
_haltSerialization: 0
|
||||
_externalSerializationFile: {fileID: 0}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 17c1d529cbf0f0c4ebfc5c131374c28f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -9,16 +9,16 @@ MonoBehaviour:
|
|||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b8409462a7f3e4d46a886d68e7626d94, type: 3}
|
||||
m_Name: ActivityGraph
|
||||
m_Script: {fileID: 11500000, guid: 7a686a47eee2fa44cb0a34b5d86e4d5e, type: 3}
|
||||
m_Name: BT_testB
|
||||
m_EditorClassIdentifier:
|
||||
_serializedGraph: '{"type":"GameplayEditor.Core.GameplayGraph","nodes":[{"levelID":1,"nodeID":1,"nodeLayer":1,"eventTypeGroup":"1","priorityWeight":"1","eventMappingID":1,"_position":{"x":660.0},"$type":"GameplayEditor.Core.GameplayNode"}],"connections":[],"canvasGroups":[],"localBlackboard":{"_variables":{}}}'
|
||||
_serializedGraph: '{"type":"NodeCanvas.BehaviourTrees.BehaviourTree","nodes":[],"connections":[],"canvasGroups":[],"localBlackboard":{"_variables":{}},"derivedData":{"repeat":true,"$type":"NodeCanvas.BehaviourTrees.BehaviourTree+DerivedSerializationData"}}'
|
||||
_objectReferences: []
|
||||
_graphSource:
|
||||
_version: 3.33
|
||||
_category:
|
||||
_comments:
|
||||
_translation: {x: -281, y: 182}
|
||||
_translation: {x: 0, y: 0}
|
||||
_zoomFactor: 1
|
||||
_haltSerialization: 0
|
||||
_externalSerializationFile: {fileID: 0}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 654c38cd0fbd9684f9e28e0a04544681
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameplayEditor.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// 工作表1:玩法关卡配置表(ActivityStage)
|
||||
/// 索引玩法场景的逻辑ID、场景资源、地图坐标打点list、默认主相机
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ActivityStageNode : ActivityNodeBase
|
||||
{
|
||||
public override string TableName => "ActivityStage";
|
||||
|
||||
[SerializeField] private int activityStageID;
|
||||
[SerializeField] private string doc = "";
|
||||
[SerializeField] private string sceneName = "";
|
||||
[SerializeField] private string mapInfo = "";
|
||||
[SerializeField] private float closeLoadingDelay;
|
||||
[SerializeField] private int cameraID;
|
||||
|
||||
public override string[] FieldNames => new[] { "ActivityStageID", "Doc", "SceneName", "MapInfo", "CloseLoadingDelaySeconds", "CameraID" };
|
||||
public override string[] FieldTypes => new[] { "int", "string", "string", "ID", "float", "int" };
|
||||
public override string[] FieldDocs => new[] { "行为树ID", "关卡备注", "场景名称", "地图打点组", "是否关闭加载画面(秒)", "默认相机ID" };
|
||||
|
||||
public override Dictionary<string, string> ToExcelRow() => new Dictionary<string, string>
|
||||
{
|
||||
{ "ActivityStageID", activityStageID.ToString() },
|
||||
{ "Doc", doc },
|
||||
{ "SceneName", sceneName },
|
||||
{ "MapInfo", mapInfo },
|
||||
{ "CloseLoadingDelaySeconds", closeLoadingDelay.ToString("F2") },
|
||||
{ "CameraID", cameraID.ToString() },
|
||||
};
|
||||
|
||||
public override void FromExcelRow(Dictionary<string, string> d)
|
||||
{
|
||||
if (d.TryGetValue("ActivityStageID", out var v)) activityStageID = int.Parse(v);
|
||||
if (d.TryGetValue("Doc", out v)) doc = v;
|
||||
if (d.TryGetValue("SceneName", out v)) sceneName = v;
|
||||
if (d.TryGetValue("MapInfo", out v)) mapInfo = v;
|
||||
if (d.TryGetValue("CloseLoadingDelaySeconds", out v)) float.TryParse(v, out closeLoadingDelay);
|
||||
if (d.TryGetValue("CameraID", out v)) int.TryParse(v, out cameraID);
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void OnNodeInspectorGUI()
|
||||
{
|
||||
activityStageID = UnityEditor.EditorGUILayout.IntField("Activity Stage ID", activityStageID);
|
||||
doc = UnityEditor.EditorGUILayout.TextField("Doc(关卡备注)", doc);
|
||||
sceneName = UnityEditor.EditorGUILayout.TextField("Scene Name", sceneName);
|
||||
mapInfo = UnityEditor.EditorGUILayout.TextField("Map Info(打点组ID)", mapInfo);
|
||||
closeLoadingDelay = UnityEditor.EditorGUILayout.FloatField("Close Loading Delay (s)", closeLoadingDelay);
|
||||
cameraID = UnityEditor.EditorGUILayout.IntField("Camera ID", cameraID);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
@ -1,108 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameplayEditor.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// 工作表3:行为树节点查询与说明
|
||||
/// 用于注释用途,记录节点类型、描述和参数说明
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class BehaviourNodeDocNode : ActivityNodeBase
|
||||
{
|
||||
public override string TableName => "BehaviourNodeDoc";
|
||||
|
||||
[SerializeField] private string nodeType = "";
|
||||
[SerializeField] private string description = "";
|
||||
[SerializeField] private string chineseMapping = "";
|
||||
[SerializeField] private string param1 = "";
|
||||
[SerializeField] private string param2 = "";
|
||||
[SerializeField] private string param3 = "";
|
||||
[SerializeField] private string param4 = "";
|
||||
[SerializeField] private string param5 = "";
|
||||
|
||||
public override string[] FieldNames => new[] { "NodeType", "Description", "ChineseMapping", "Param1", "Param2", "Param3", "Param4", "Param5" };
|
||||
public override string[] FieldTypes => new[] { "string", "string", "string", "string", "string", "string", "string", "string" };
|
||||
public override string[] FieldDocs => new[] { "节点类型", "节点描述", "中文节点映射", "参数1说明", "参数2说明", "参数3说明", "参数4说明", "参数5说明" };
|
||||
|
||||
public override Dictionary<string, string> ToExcelRow() => new Dictionary<string, string>
|
||||
{
|
||||
{ "NodeType", nodeType },
|
||||
{ "Description", description },
|
||||
{ "ChineseMapping", chineseMapping },
|
||||
{ "Param1", param1 },
|
||||
{ "Param2", param2 },
|
||||
{ "Param3", param3 },
|
||||
{ "Param4", param4 },
|
||||
{ "Param5", param5 },
|
||||
};
|
||||
|
||||
public override void FromExcelRow(Dictionary<string, string> d)
|
||||
{
|
||||
if (d.TryGetValue("NodeType", out var v)) nodeType = v;
|
||||
if (d.TryGetValue("Description", out v)) description = v;
|
||||
if (d.TryGetValue("ChineseMapping", out v)) chineseMapping = v;
|
||||
if (d.TryGetValue("Param1", out v)) param1 = v;
|
||||
if (d.TryGetValue("Param2", out v)) param2 = v;
|
||||
if (d.TryGetValue("Param3", out v)) param3 = v;
|
||||
if (d.TryGetValue("Param4", out v)) param4 = v;
|
||||
if (d.TryGetValue("Param5", out v)) param5 = v;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void OnNodeInspectorGUI()
|
||||
{
|
||||
nodeType = UnityEditor.EditorGUILayout.TextField("Node Type(节点类型)", nodeType);
|
||||
description = UnityEditor.EditorGUILayout.TextField("Description(描述)", description);
|
||||
chineseMapping = UnityEditor.EditorGUILayout.TextField("Chinese Mapping(中文映射)", chineseMapping);
|
||||
UnityEditor.EditorGUILayout.LabelField("参数说明", UnityEditor.EditorStyles.boldLabel);
|
||||
param1 = UnityEditor.EditorGUILayout.TextField("Param1", param1);
|
||||
param2 = UnityEditor.EditorGUILayout.TextField("Param2", param2);
|
||||
param3 = UnityEditor.EditorGUILayout.TextField("Param3", param3);
|
||||
param4 = UnityEditor.EditorGUILayout.TextField("Param4", param4);
|
||||
param5 = UnityEditor.EditorGUILayout.TextField("Param5", param5);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 工作表4:组合节点说明
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ActivityGroupNode : ActivityNodeBase
|
||||
{
|
||||
public override string TableName => "ActivityGroup";
|
||||
|
||||
[SerializeField] private string groupTreeID = "";
|
||||
[SerializeField] private string groupTreeType = "";
|
||||
[SerializeField] private string comment = "";
|
||||
|
||||
public override string[] FieldNames => new[] { "GroupTreeID", "GroupTreeType", "Comment" };
|
||||
public override string[] FieldTypes => new[] { "string", "string", "string" };
|
||||
public override string[] FieldDocs => new[] { "组合树ID", "组合树类型/节点名称", "注释" };
|
||||
|
||||
public override Dictionary<string, string> ToExcelRow() => new Dictionary<string, string>
|
||||
{
|
||||
{ "GroupTreeID", groupTreeID },
|
||||
{ "GroupTreeType", groupTreeType },
|
||||
{ "Comment", comment },
|
||||
};
|
||||
|
||||
public override void FromExcelRow(Dictionary<string, string> d)
|
||||
{
|
||||
if (d.TryGetValue("GroupTreeID", out var v)) groupTreeID = v;
|
||||
if (d.TryGetValue("GroupTreeType", out v)) groupTreeType = v;
|
||||
if (d.TryGetValue("Comment", out v)) comment = v;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void OnNodeInspectorGUI()
|
||||
{
|
||||
groupTreeID = UnityEditor.EditorGUILayout.TextField("Group Tree ID(组合树ID)", groupTreeID);
|
||||
groupTreeType = UnityEditor.EditorGUILayout.TextField("Group Tree Type(类型)", groupTreeType);
|
||||
comment = UnityEditor.EditorGUILayout.TextField("Comment(注释)", comment);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
using NodeCanvas.BehaviourTrees;
|
||||
using ParadoxNotion;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameplayEditor.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// 行为树 Graph - 支持可执行的行为逻辑 + 表格编辑
|
||||
/// 继承 BehaviourTree,额外支持 ActivityNodeBase 节点的导出/导入
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
[CreateAssetMenu(menuName = "NodeCanvas/Behaviour Graph")]
|
||||
public class BehaviourGraph : BehaviourTree
|
||||
{
|
||||
public void ExportToExcel(string path)
|
||||
{
|
||||
Export.ExcelExporter.Export(this, path);
|
||||
}
|
||||
|
||||
public void ImportFromExcel(string path)
|
||||
{
|
||||
Export.ExcelImporter.Import(path, this);
|
||||
}
|
||||
|
||||
public List<T> GetNodesByType<T>() where T : Node
|
||||
{
|
||||
return allNodes.OfType<T>().ToList();
|
||||
}
|
||||
|
||||
public List<ActivityNodeBase> GetAllActivityNodes()
|
||||
{
|
||||
return allNodes.OfType<ActivityNodeBase>().ToList();
|
||||
}
|
||||
|
||||
public Dictionary<string, List<ActivityNodeBase>> GetNodesByTableName()
|
||||
{
|
||||
var result = new Dictionary<string, List<ActivityNodeBase>>();
|
||||
foreach (var node in GetAllActivityNodes())
|
||||
{
|
||||
if (!result.ContainsKey(node.TableName))
|
||||
result[node.TableName] = new List<ActivityNodeBase>();
|
||||
result[node.TableName].Add(node);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,246 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameplayEditor.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// 3.5 ActivityMapInfoLut:地图打点存储表
|
||||
/// 支持最多8个打点(点位ID + Vector3坐标),Vector3 存储格式:x|y|z
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class MapInfoNode : ActivityNodeBase
|
||||
{
|
||||
public override string TableName => "ActivityMapInfoLut";
|
||||
|
||||
[Serializable]
|
||||
public struct MapPoint
|
||||
{
|
||||
public string pointID;
|
||||
public Vector3 coord;
|
||||
|
||||
public string CoordToString() => $"{coord.x}|{coord.y}|{coord.z}";
|
||||
|
||||
public static Vector3 ParseCoord(string s)
|
||||
{
|
||||
var parts = s.Split('|');
|
||||
if (parts.Length != 3) return Vector3.zero;
|
||||
return new Vector3(
|
||||
float.TryParse(parts[0], out var x) ? x : 0,
|
||||
float.TryParse(parts[1], out var y) ? y : 0,
|
||||
float.TryParse(parts[2], out var z) ? z : 0);
|
||||
}
|
||||
}
|
||||
|
||||
[SerializeField] private int infoID;
|
||||
[SerializeField] private List<MapPoint> points = new List<MapPoint>();
|
||||
|
||||
private static readonly int MaxPoints = 8;
|
||||
|
||||
public override string[] FieldNames
|
||||
{
|
||||
get
|
||||
{
|
||||
var names = new List<string> { "InfoID" };
|
||||
for (int i = 1; i <= MaxPoints; i++) { names.Add($"PointID_{i}"); names.Add($"Coord_{i}"); }
|
||||
return names.ToArray();
|
||||
}
|
||||
}
|
||||
public override string[] FieldTypes
|
||||
{
|
||||
get
|
||||
{
|
||||
var types = new List<string> { "int" };
|
||||
for (int i = 0; i < MaxPoints; i++) { types.Add("string"); types.Add("Vector3"); }
|
||||
return types.ToArray();
|
||||
}
|
||||
}
|
||||
public override string[] FieldDocs
|
||||
{
|
||||
get
|
||||
{
|
||||
var docs = new List<string> { "地图信息ID" };
|
||||
for (int i = 1; i <= MaxPoints; i++) { docs.Add($"点位ID_{i}"); docs.Add($"坐标_{i}(x|y|z)"); }
|
||||
return docs.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
public override Dictionary<string, string> ToExcelRow()
|
||||
{
|
||||
var row = new Dictionary<string, string> { { "InfoID", infoID.ToString() } };
|
||||
for (int i = 0; i < MaxPoints; i++)
|
||||
{
|
||||
var p = i < points.Count ? points[i] : new MapPoint();
|
||||
row[$"PointID_{i + 1}"] = p.pointID ?? "";
|
||||
row[$"Coord_{i + 1}"] = i < points.Count ? p.CoordToString() : "";
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
public override void FromExcelRow(Dictionary<string, string> d)
|
||||
{
|
||||
if (d.TryGetValue("InfoID", out var v)) int.TryParse(v, out infoID);
|
||||
points.Clear();
|
||||
for (int i = 1; i <= MaxPoints; i++)
|
||||
{
|
||||
d.TryGetValue($"PointID_{i}", out var pid);
|
||||
d.TryGetValue($"Coord_{i}", out var coord);
|
||||
if (string.IsNullOrEmpty(pid) && string.IsNullOrEmpty(coord)) continue;
|
||||
points.Add(new MapPoint { pointID = pid ?? "", coord = MapPoint.ParseCoord(coord ?? "") });
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void OnNodeInspectorGUI()
|
||||
{
|
||||
infoID = UnityEditor.EditorGUILayout.IntField("Info ID", infoID);
|
||||
UnityEditor.EditorGUILayout.LabelField($"打点数量: {points.Count}", UnityEditor.EditorStyles.miniLabel);
|
||||
|
||||
for (int i = 0; i < points.Count; i++)
|
||||
{
|
||||
UnityEditor.EditorGUILayout.BeginVertical(UnityEditor.EditorStyles.helpBox);
|
||||
var p = points[i];
|
||||
p.pointID = UnityEditor.EditorGUILayout.TextField($" Point {i + 1} ID", p.pointID);
|
||||
p.coord = UnityEditor.EditorGUILayout.Vector3Field($" Coord {i + 1}", p.coord);
|
||||
points[i] = p;
|
||||
UnityEditor.EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
UnityEditor.EditorGUILayout.BeginHorizontal();
|
||||
if (GUILayout.Button("+ 添加打点") && points.Count < MaxPoints)
|
||||
points.Add(new MapPoint { pointID = "", coord = Vector3.zero });
|
||||
if (GUILayout.Button("- 删除末尾") && points.Count > 0)
|
||||
points.RemoveAt(points.Count - 1);
|
||||
UnityEditor.EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 3.6 ActivityDialogInfoByStage:活动文本UI配置索引表
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class DialogByStageNode : ActivityNodeBase
|
||||
{
|
||||
public override string TableName => "ActivityDialogInfoByStage";
|
||||
|
||||
[SerializeField] private int stageID;
|
||||
[SerializeField] private string dialogConfigTable = "";
|
||||
|
||||
public override string[] FieldNames => new[] { "StageID", "DialogConfigTable" };
|
||||
public override string[] FieldTypes => new[] { "int", "string" };
|
||||
public override string[] FieldDocs => new[] { "玩法关卡ID", "对应文本配置表名称" };
|
||||
|
||||
public override Dictionary<string, string> ToExcelRow() => new Dictionary<string, string>
|
||||
{
|
||||
{ "StageID", stageID.ToString() },
|
||||
{ "DialogConfigTable", dialogConfigTable },
|
||||
};
|
||||
|
||||
public override void FromExcelRow(Dictionary<string, string> d)
|
||||
{
|
||||
if (d.TryGetValue("StageID", out var v)) int.TryParse(v, out stageID);
|
||||
if (d.TryGetValue("DialogConfigTable", out v)) dialogConfigTable = v;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void OnNodeInspectorGUI()
|
||||
{
|
||||
stageID = UnityEditor.EditorGUILayout.IntField("Stage ID(玩法关卡ID)", stageID);
|
||||
dialogConfigTable = UnityEditor.EditorGUILayout.TextField("Dialog Config Table", dialogConfigTable);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 3.7 DialogInfo:对话详细配置表
|
||||
/// 行为树对应节点:DoShowDialog(DialogInfoID)
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class DialogInfoNode : ActivityNodeBase
|
||||
{
|
||||
public override string TableName => "DialogInfo";
|
||||
|
||||
[SerializeField] private int id;
|
||||
[SerializeField] private bool isMask;
|
||||
[SerializeField] private string maskTarget = ""; // 万分比屏幕坐标 "x,y"
|
||||
[SerializeField] private int clickKey;
|
||||
[SerializeField] private int dialogType;
|
||||
[SerializeField] private int uiType;
|
||||
[SerializeField] private string prefabPath = "";
|
||||
[SerializeField] private string displayName = "";
|
||||
[SerializeField] private string text = "";
|
||||
[SerializeField] private float duration;
|
||||
[SerializeField] private string param1 = "";
|
||||
[SerializeField] private string param2 = "";
|
||||
[SerializeField] private string param3 = "";
|
||||
[SerializeField] private string param4 = "";
|
||||
[SerializeField] private string param5 = "";
|
||||
|
||||
public override string[] FieldNames => new[] { "id", "isMask", "MaskTarget", "ClickKey", "DialogType", "UIType", "PrefabPath", "Name", "Text", "Duration", "Params1", "Params2", "Params3", "Params4", "Params5" };
|
||||
public override string[] FieldTypes => new[] { "int", "bool", "万分比屏幕坐标", "int", "int", "int", "string", "string", "string", "float", "string", "string", "string", "string", "string" };
|
||||
public override string[] FieldDocs => new[] { "配置ID", "是否开启蒙层", "蒙层位置(万分比屏幕坐标)", "关闭蒙层键值", "战中类型", "UI样式", "UI预制体路径(默认不填)", "显示角色名", "正文(支持富文本)", "显示时间", "特殊参数1", "特殊参数2", "特殊参数3", "特殊参数4", "特殊参数5" };
|
||||
|
||||
public override Dictionary<string, string> ToExcelRow() => new Dictionary<string, string>
|
||||
{
|
||||
{ "id", id.ToString() },
|
||||
{ "isMask", isMask.ToString() },
|
||||
{ "MaskTarget", maskTarget },
|
||||
{ "ClickKey", clickKey.ToString() },
|
||||
{ "DialogType", dialogType.ToString() },
|
||||
{ "UIType", uiType.ToString() },
|
||||
{ "PrefabPath", prefabPath },
|
||||
{ "Name", displayName },
|
||||
{ "Text", text },
|
||||
{ "Duration", duration.ToString("F2") },
|
||||
{ "Params1", param1 },
|
||||
{ "Params2", param2 },
|
||||
{ "Params3", param3 },
|
||||
{ "Params4", param4 },
|
||||
{ "Params5", param5 },
|
||||
};
|
||||
|
||||
public override void FromExcelRow(Dictionary<string, string> d)
|
||||
{
|
||||
if (d.TryGetValue("id", out var v)) int.TryParse(v, out id);
|
||||
if (d.TryGetValue("isMask", out v)) bool.TryParse(v, out isMask);
|
||||
if (d.TryGetValue("MaskTarget", out v)) maskTarget = v;
|
||||
if (d.TryGetValue("ClickKey", out v)) int.TryParse(v, out clickKey);
|
||||
if (d.TryGetValue("DialogType", out v)) int.TryParse(v, out dialogType);
|
||||
if (d.TryGetValue("UIType", out v)) int.TryParse(v, out uiType);
|
||||
if (d.TryGetValue("PrefabPath", out v)) prefabPath = v;
|
||||
if (d.TryGetValue("Name", out v)) displayName = v;
|
||||
if (d.TryGetValue("Text", out v)) text = v;
|
||||
if (d.TryGetValue("Duration", out v)) float.TryParse(v, out duration);
|
||||
if (d.TryGetValue("Params1", out v)) param1 = v;
|
||||
if (d.TryGetValue("Params2", out v)) param2 = v;
|
||||
if (d.TryGetValue("Params3", out v)) param3 = v;
|
||||
if (d.TryGetValue("Params4", out v)) param4 = v;
|
||||
if (d.TryGetValue("Params5", out v)) param5 = v;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void OnNodeInspectorGUI()
|
||||
{
|
||||
id = UnityEditor.EditorGUILayout.IntField("ID(配置ID)", id);
|
||||
isMask = UnityEditor.EditorGUILayout.Toggle("isMask(开启蒙层)", isMask);
|
||||
if (isMask)
|
||||
maskTarget = UnityEditor.EditorGUILayout.TextField(" Mask Target(万分比坐标 x,y)", maskTarget);
|
||||
clickKey = UnityEditor.EditorGUILayout.IntField("Click Key(关闭蒙层键值)", clickKey);
|
||||
dialogType = UnityEditor.EditorGUILayout.IntField("Dialog Type(战中类型)", dialogType);
|
||||
uiType = UnityEditor.EditorGUILayout.IntField("UI Type(UI样式)", uiType);
|
||||
prefabPath = UnityEditor.EditorGUILayout.TextField("Prefab Path(默认空)", prefabPath);
|
||||
displayName = UnityEditor.EditorGUILayout.TextField("Name(显示角色名)", displayName);
|
||||
UnityEditor.EditorGUILayout.LabelField("Text(正文,支持富文本)");
|
||||
text = UnityEditor.EditorGUILayout.TextArea(text, GUILayout.MinHeight(48));
|
||||
duration = UnityEditor.EditorGUILayout.FloatField("Duration(显示时间)", duration);
|
||||
UnityEditor.EditorGUILayout.LabelField("特殊参数", UnityEditor.EditorStyles.boldLabel);
|
||||
param1 = UnityEditor.EditorGUILayout.TextField("Params1", param1);
|
||||
param2 = UnityEditor.EditorGUILayout.TextField("Params2", param2);
|
||||
param3 = UnityEditor.EditorGUILayout.TextField("Params3", param3);
|
||||
param4 = UnityEditor.EditorGUILayout.TextField("Params4", param4);
|
||||
param5 = UnityEditor.EditorGUILayout.TextField("Params5", param5);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NodeCanvas.Framework;
|
||||
using ParadoxNotion;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameplayEditor.Core
|
||||
{
|
||||
[System.Serializable]
|
||||
[UnityEngine.CreateAssetMenu(menuName = "NodeCanvas/Gameplay Graph")]
|
||||
public class GameplayGraph : Graph
|
||||
{
|
||||
public override System.Type baseNodeType => typeof(ActivityNodeBase);
|
||||
public override bool requiresAgent => false;
|
||||
public override bool requiresPrimeNode => false;
|
||||
public override bool isTree => false;
|
||||
public override bool allowBlackboardOverrides => false;
|
||||
public override bool canAcceptVariableDrops => false;
|
||||
public override PlanarDirection flowDirection => PlanarDirection.Horizontal;
|
||||
|
||||
public void ExportToExcel(string path)
|
||||
{
|
||||
Export.ExcelExporter.Export(this, path);
|
||||
}
|
||||
|
||||
public void ImportFromExcel(string path)
|
||||
{
|
||||
Export.ExcelImporter.Import(path, this);
|
||||
}
|
||||
|
||||
public List<T> GetNodesByType<T>() where T : ActivityNodeBase
|
||||
{
|
||||
return allNodes.OfType<T>().ToList();
|
||||
}
|
||||
|
||||
public List<ActivityNodeBase> GetAllActivityNodes()
|
||||
{
|
||||
return allNodes.OfType<ActivityNodeBase>().ToList();
|
||||
}
|
||||
|
||||
public Dictionary<string, List<ActivityNodeBase>> GetNodesByTableName()
|
||||
{
|
||||
var result = new Dictionary<string, List<ActivityNodeBase>>();
|
||||
foreach (var node in GetAllActivityNodes())
|
||||
{
|
||||
if (!result.ContainsKey(node.TableName))
|
||||
result[node.TableName] = new List<ActivityNodeBase>();
|
||||
result[node.TableName].Add(node);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ParadoxNotion.Serialization.FullSerializer;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameplayEditor.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// 工作表2:行为树逻辑节点
|
||||
/// 每行对应行为树中一个节点,通过 ParentNodeID 构成树形结构
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[fsSerializeAsReference, fsDeserializeOverwrite]
|
||||
public class GameplayNode : ActivityNodeBase
|
||||
{
|
||||
public override string TableName => "BehaviourTree";
|
||||
|
||||
[SerializeField] private int levelID;
|
||||
[SerializeField] private int nodeID;
|
||||
[SerializeField] private int nodeLayer;
|
||||
[SerializeField] private string eventTypeGroup = "";
|
||||
[SerializeField] private string priorityWeight = "";
|
||||
[SerializeField] private int eventMappingID;
|
||||
[SerializeField] private bool interactVisible = true;
|
||||
[SerializeField] private bool nodeState = true;
|
||||
[SerializeField] private int parentNodeID = -1;
|
||||
|
||||
public int LevelID { get => levelID; set => levelID = value; }
|
||||
public int NodeID { get => nodeID; set => nodeID = value; }
|
||||
public int NodeLayer { get => nodeLayer; set => nodeLayer = value; }
|
||||
public string EventTypeGroup { get => eventTypeGroup; set => eventTypeGroup = value; }
|
||||
public string PriorityWeight { get => priorityWeight; set => priorityWeight = value; }
|
||||
public int EventMappingID { get => eventMappingID; set => eventMappingID = value; }
|
||||
public bool InteractVisible { get => interactVisible; set => interactVisible = value; }
|
||||
public bool NodeState { get => nodeState; set => nodeState = value; }
|
||||
public int ParentNodeID { get => parentNodeID; set => parentNodeID = value; }
|
||||
|
||||
public override string[] FieldNames => new[] { "LevelID", "NodeID", "NodeLayer", "EventTypeGroup", "Priority", "EventMappingID", "InteractVisible", "NodeState", "ParentNodeID" };
|
||||
public override string[] FieldTypes => new[] { "int", "int", "int", "string", "string", "int", "bool", "bool", "int" };
|
||||
public override string[] FieldDocs => new[] { "关卡编号ID", "节点ID(唯一)", "节点层级", "节点事件类型组(|分隔)", "优先级权重(|分隔)", "存储事件ID映射", "交互是否可见", "节点是否可进入", "父节点ID(-1表示根节点)" };
|
||||
|
||||
public override Dictionary<string, string> ToExcelRow() => new Dictionary<string, string>
|
||||
{
|
||||
{ "LevelID", levelID.ToString() },
|
||||
{ "NodeID", nodeID.ToString() },
|
||||
{ "NodeLayer", nodeLayer.ToString() },
|
||||
{ "EventTypeGroup", eventTypeGroup },
|
||||
{ "Priority", priorityWeight },
|
||||
{ "EventMappingID", eventMappingID.ToString() },
|
||||
{ "InteractVisible",interactVisible.ToString() },
|
||||
{ "NodeState", nodeState.ToString() },
|
||||
{ "ParentNodeID", parentNodeID.ToString() },
|
||||
};
|
||||
|
||||
public override void FromExcelRow(Dictionary<string, string> d)
|
||||
{
|
||||
if (d.TryGetValue("LevelID", out var v)) levelID = int.Parse(v);
|
||||
if (d.TryGetValue("NodeID", out v)) nodeID = int.Parse(v);
|
||||
if (d.TryGetValue("NodeLayer", out v)) nodeLayer = int.Parse(v);
|
||||
if (d.TryGetValue("EventTypeGroup", out v)) eventTypeGroup = v;
|
||||
if (d.TryGetValue("Priority", out v)) priorityWeight = v;
|
||||
if (d.TryGetValue("EventMappingID", out v)) eventMappingID = int.Parse(v);
|
||||
if (d.TryGetValue("InteractVisible", out v)) interactVisible = bool.Parse(v);
|
||||
if (d.TryGetValue("NodeState", out v)) nodeState = bool.Parse(v);
|
||||
if (d.TryGetValue("ParentNodeID", out v)) parentNodeID = int.Parse(v);
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void OnNodeInspectorGUI()
|
||||
{
|
||||
levelID = UnityEditor.EditorGUILayout.IntField("Level ID", levelID);
|
||||
nodeID = UnityEditor.EditorGUILayout.IntField("Node ID", nodeID);
|
||||
nodeLayer = UnityEditor.EditorGUILayout.IntField("Node Layer", nodeLayer);
|
||||
eventTypeGroup = UnityEditor.EditorGUILayout.TextField("Event Type Group (|分隔)", eventTypeGroup);
|
||||
priorityWeight = UnityEditor.EditorGUILayout.TextField("Priority (|分隔)", priorityWeight);
|
||||
eventMappingID = UnityEditor.EditorGUILayout.IntField("Event Mapping ID", eventMappingID);
|
||||
interactVisible = UnityEditor.EditorGUILayout.Toggle("Interact Visible", interactVisible);
|
||||
nodeState = UnityEditor.EditorGUILayout.Toggle("Node State", nodeState);
|
||||
parentNodeID = UnityEditor.EditorGUILayout.IntField("Parent Node ID (-1=根节点)", parentNodeID);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 31c9c22045c8107449a43a91ab96f41d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameplayEditor.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// 3.2 ActivityUiLut:UI资源映射表
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class UiLutNode : ActivityNodeBase
|
||||
{
|
||||
public override string TableName => "ActivityUiLut";
|
||||
|
||||
[SerializeField] private int stageID;
|
||||
[SerializeField] private int uiMappingID;
|
||||
[SerializeField] private string prefabPath = "";
|
||||
|
||||
public override string[] FieldNames => new[] { "StageID", "UIMappingID", "PrefabPath" };
|
||||
public override string[] FieldTypes => new[] { "int", "int", "path" };
|
||||
public override string[] FieldDocs => new[] { "关卡ID", "UI映射ID", "Prefab路径" };
|
||||
|
||||
public override Dictionary<string, string> ToExcelRow() => new Dictionary<string, string>
|
||||
{
|
||||
{ "StageID", stageID.ToString() },
|
||||
{ "UIMappingID", uiMappingID.ToString() },
|
||||
{ "PrefabPath", prefabPath },
|
||||
};
|
||||
|
||||
public override void FromExcelRow(Dictionary<string, string> d)
|
||||
{
|
||||
if (d.TryGetValue("StageID", out var v)) int.TryParse(v, out stageID);
|
||||
if (d.TryGetValue("UIMappingID", out v)) int.TryParse(v, out uiMappingID);
|
||||
if (d.TryGetValue("PrefabPath", out v)) prefabPath = v;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void OnNodeInspectorGUI()
|
||||
{
|
||||
stageID = UnityEditor.EditorGUILayout.IntField("Stage ID(关卡ID)", stageID);
|
||||
uiMappingID = UnityEditor.EditorGUILayout.IntField("UI Mapping ID", uiMappingID);
|
||||
prefabPath = UnityEditor.EditorGUILayout.TextField("Prefab Path", prefabPath);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 3.3 ActivityCameraLut:相机资源映射表
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class CameraLutNode : ActivityNodeBase
|
||||
{
|
||||
public override string TableName => "ActivityCameraLut";
|
||||
|
||||
[SerializeField] private int stageID;
|
||||
[SerializeField] private int camMappingID;
|
||||
[SerializeField] private string prefabPath = "";
|
||||
|
||||
public override string[] FieldNames => new[] { "StageID", "CamMappingID", "PrefabPath" };
|
||||
public override string[] FieldTypes => new[] { "int", "int", "path" };
|
||||
public override string[] FieldDocs => new[] { "关卡ID", "Cam映射ID", "Prefab路径" };
|
||||
|
||||
public override Dictionary<string, string> ToExcelRow() => new Dictionary<string, string>
|
||||
{
|
||||
{ "StageID", stageID.ToString() },
|
||||
{ "CamMappingID", camMappingID.ToString() },
|
||||
{ "PrefabPath", prefabPath },
|
||||
};
|
||||
|
||||
public override void FromExcelRow(Dictionary<string, string> d)
|
||||
{
|
||||
if (d.TryGetValue("StageID", out var v)) int.TryParse(v, out stageID);
|
||||
if (d.TryGetValue("CamMappingID", out v)) int.TryParse(v, out camMappingID);
|
||||
if (d.TryGetValue("PrefabPath", out v)) prefabPath = v;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void OnNodeInspectorGUI()
|
||||
{
|
||||
stageID = UnityEditor.EditorGUILayout.IntField("Stage ID(关卡ID)", stageID);
|
||||
camMappingID = UnityEditor.EditorGUILayout.IntField("Cam Mapping ID", camMappingID);
|
||||
prefabPath = UnityEditor.EditorGUILayout.TextField("Prefab Path", prefabPath);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 3.4 ActivityFXLut:特效资源映射表
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class FXLutNode : ActivityNodeBase
|
||||
{
|
||||
public override string TableName => "ActivityFXLut";
|
||||
|
||||
[SerializeField] private int stageID;
|
||||
[SerializeField] private int fxMappingID;
|
||||
[SerializeField] private string prefabPath = "";
|
||||
|
||||
public override string[] FieldNames => new[] { "StageID", "FXMappingID", "PrefabPath" };
|
||||
public override string[] FieldTypes => new[] { "int", "int", "path" };
|
||||
public override string[] FieldDocs => new[] { "关卡ID", "FX映射ID", "Prefab路径" };
|
||||
|
||||
public override Dictionary<string, string> ToExcelRow() => new Dictionary<string, string>
|
||||
{
|
||||
{ "StageID", stageID.ToString() },
|
||||
{ "FXMappingID",fxMappingID.ToString() },
|
||||
{ "PrefabPath", prefabPath },
|
||||
};
|
||||
|
||||
public override void FromExcelRow(Dictionary<string, string> d)
|
||||
{
|
||||
if (d.TryGetValue("StageID", out var v)) int.TryParse(v, out stageID);
|
||||
if (d.TryGetValue("FXMappingID", out v)) int.TryParse(v, out fxMappingID);
|
||||
if (d.TryGetValue("PrefabPath", out v)) prefabPath = v;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void OnNodeInspectorGUI()
|
||||
{
|
||||
stageID = UnityEditor.EditorGUILayout.IntField("Stage ID(关卡ID)", stageID);
|
||||
fxMappingID = UnityEditor.EditorGUILayout.IntField("FX Mapping ID", fxMappingID);
|
||||
prefabPath = UnityEditor.EditorGUILayout.TextField("Prefab Path", prefabPath);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 758081b0b34f2e942b68f9fa35170ba8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameplayEditor
|
||||
{
|
||||
public class ExcelDataProvider
|
||||
{
|
||||
private string filePath;
|
||||
|
||||
public ExcelDataProvider(string path)
|
||||
{
|
||||
filePath = path;
|
||||
}
|
||||
|
||||
public List<Dictionary<string, object>> ReadSheet(string sheetName)
|
||||
{
|
||||
var result = new List<Dictionary<string, object>>();
|
||||
|
||||
if (!File.Exists(filePath)) return result;
|
||||
|
||||
var lines = File.ReadAllLines(filePath);
|
||||
if (lines.Length < 2) return result;
|
||||
|
||||
var headers = ParseCsv(lines[0]).Cast<object>().ToList();
|
||||
|
||||
for (int i = 1; i < lines.Length; i++)
|
||||
{
|
||||
var values = ParseCsv(lines[i]);
|
||||
var rowData = new Dictionary<string, object>();
|
||||
|
||||
for (int j = 0; j < headers.Count && j < values.Count; j++)
|
||||
{
|
||||
rowData[headers[j].ToString()] = values[j];
|
||||
}
|
||||
|
||||
result.Add(rowData);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public void WriteSheet(string sheetName, List<Dictionary<string, object>> data)
|
||||
{
|
||||
var lines = new List<string>();
|
||||
|
||||
if (data.Count == 0) return;
|
||||
|
||||
var headers = data[0].Keys.ToList();
|
||||
lines.Add(string.Join(",", headers.Select(EscapeCsv)));
|
||||
|
||||
foreach (var row in data)
|
||||
{
|
||||
var values = headers.Select(h => row.TryGetValue(h, out var v) ? EscapeCsv(v?.ToString() ?? "") : "").ToList();
|
||||
lines.Add(string.Join(",", values));
|
||||
}
|
||||
|
||||
File.WriteAllLines(filePath, lines);
|
||||
}
|
||||
|
||||
public List<string> GetSheetNames()
|
||||
{
|
||||
return new List<string> { "Sheet1" };
|
||||
}
|
||||
|
||||
private static string EscapeCsv(string value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(value)) return "";
|
||||
if (value.Contains(",") || value.Contains("\"") || value.Contains("\n"))
|
||||
{
|
||||
return "\"" + value.Replace("\"", "\"\"") + "\"";
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
private static List<string> ParseCsv(string line)
|
||||
{
|
||||
var result = new List<string>();
|
||||
var current = "";
|
||||
var inQuotes = false;
|
||||
|
||||
for (int i = 0; i < line.Length; i++)
|
||||
{
|
||||
var c = line[i];
|
||||
|
||||
if (c == '"')
|
||||
{
|
||||
if (inQuotes && i + 1 < line.Length && line[i + 1] == '"')
|
||||
{
|
||||
current += '"';
|
||||
i++;
|
||||
}
|
||||
else
|
||||
{
|
||||
inQuotes = !inQuotes;
|
||||
}
|
||||
}
|
||||
else if (c == ',' && !inQuotes)
|
||||
{
|
||||
result.Add(current);
|
||||
current = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
current += c;
|
||||
}
|
||||
}
|
||||
|
||||
result.Add(current);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 74f1207cb96aeec4bb96fb6c9160ae7a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using GameplayEditor.Core;
|
||||
using NodeCanvas.Framework;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameplayEditor.Export
|
||||
{
|
||||
public static class ExcelExporter
|
||||
{
|
||||
public static void Export(Graph graph, string basePath)
|
||||
{
|
||||
var activityNodes = graph.allNodes.OfType<ActivityNodeBase>().ToList();
|
||||
if (activityNodes.Count == 0)
|
||||
{
|
||||
Debug.LogWarning("No ActivityNodeBase nodes found in graph");
|
||||
return;
|
||||
}
|
||||
|
||||
var nodesByTable = new Dictionary<string, List<ActivityNodeBase>>();
|
||||
foreach (var node in activityNodes)
|
||||
{
|
||||
if (!nodesByTable.ContainsKey(node.TableName))
|
||||
nodesByTable[node.TableName] = new List<ActivityNodeBase>();
|
||||
nodesByTable[node.TableName].Add(node);
|
||||
}
|
||||
|
||||
foreach (var kvp in nodesByTable)
|
||||
{
|
||||
var tableName = kvp.Key;
|
||||
var nodes = kvp.Value;
|
||||
if (nodes.Count == 0) continue;
|
||||
|
||||
var excelPath = Path.Combine(Path.GetDirectoryName(basePath), $"{tableName}.csv");
|
||||
ExportTable(nodes, excelPath);
|
||||
}
|
||||
|
||||
Debug.Log($"Exported {nodesByTable.Count} tables from graph");
|
||||
}
|
||||
|
||||
private static void ExportTable(List<ActivityNodeBase> nodes, string filePath)
|
||||
{
|
||||
if (nodes.Count == 0) return;
|
||||
|
||||
var lines = new List<string>();
|
||||
var firstNode = nodes[0];
|
||||
|
||||
lines.Add(string.Join(",", firstNode.FieldNames.Select(EscapeCsv)));
|
||||
lines.Add(string.Join(",", firstNode.FieldTypes.Select(EscapeCsv)));
|
||||
lines.Add(string.Join(",", firstNode.FieldDocs.Select(EscapeCsv)));
|
||||
|
||||
foreach (var node in nodes)
|
||||
{
|
||||
var rowData = node.ToExcelRow();
|
||||
var values = firstNode.FieldNames.Select(name =>
|
||||
rowData.TryGetValue(name, out var val) ? EscapeCsv(val) : "").ToArray();
|
||||
lines.Add(string.Join(",", values));
|
||||
}
|
||||
|
||||
File.WriteAllLines(filePath, lines);
|
||||
Debug.Log($"Exported {nodes.Count} nodes to {filePath}");
|
||||
}
|
||||
|
||||
private static string EscapeCsv(string value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(value)) return "";
|
||||
if (value.Contains(",") || value.Contains("\"") || value.Contains("\n"))
|
||||
{
|
||||
return "\"" + value.Replace("\"", "\"\"") + "\"";
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: dff3bd8a7b326ac4b9e2f4bd6c311e97
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,115 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using GameplayEditor.Core;
|
||||
using NodeCanvas.Framework;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameplayEditor.Export
|
||||
{
|
||||
public static class ExcelImporter
|
||||
{
|
||||
private static readonly Dictionary<string, Func<ActivityNodeBase>> NodeFactories =
|
||||
new Dictionary<string, Func<ActivityNodeBase>>
|
||||
{
|
||||
{ "BehaviourTree", () => new GameplayNode() },
|
||||
{ "ActivityStage", () => new ActivityStageNode() },
|
||||
{ "BehaviourNodeDoc", () => new BehaviourNodeDocNode() },
|
||||
{ "ActivityGroup", () => new ActivityGroupNode() },
|
||||
{ "ActivityUiLut", () => new UiLutNode() },
|
||||
{ "ActivityCameraLut", () => new CameraLutNode() },
|
||||
{ "ActivityFXLut", () => new FXLutNode() },
|
||||
{ "ActivityMapInfoLut", () => new MapInfoNode() },
|
||||
{ "ActivityDialogInfoByStage", () => new DialogByStageNode() },
|
||||
{ "DialogInfo", () => new DialogInfoNode() },
|
||||
};
|
||||
|
||||
public static void Import(string filePath, Graph graph)
|
||||
{
|
||||
var tableName = Path.GetFileNameWithoutExtension(filePath);
|
||||
ImportTable(filePath, graph, tableName);
|
||||
}
|
||||
|
||||
public static void ImportTable(string filePath, Graph graph, string tableName)
|
||||
{
|
||||
if (!File.Exists(filePath))
|
||||
{
|
||||
Debug.LogError($"CSV not found: {filePath}");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!NodeFactories.TryGetValue(tableName, out var factory))
|
||||
{
|
||||
Debug.LogError($"Unknown table name: {tableName}. Valid tables: {string.Join(", ", NodeFactories.Keys)}");
|
||||
return;
|
||||
}
|
||||
|
||||
var lines = File.ReadAllLines(filePath);
|
||||
if (lines.Length < 4)
|
||||
{
|
||||
Debug.LogError($"CSV format invalid ({filePath}): need at least NAME/TYPE/DOC rows + 1 data row");
|
||||
return;
|
||||
}
|
||||
|
||||
// 删除当前图中同类型节点
|
||||
var toRemove = graph.allNodes.OfType<ActivityNodeBase>()
|
||||
.Where(n => n.TableName == tableName).ToList();
|
||||
foreach (var node in toRemove)
|
||||
graph.RemoveNode(node);
|
||||
|
||||
var fieldNames = ParseCsv(lines[0]);
|
||||
|
||||
// 按节点 ID 建立父子关系(仅 GameplayNode 使用)
|
||||
var nodeDict = new Dictionary<int, GameplayNode>();
|
||||
|
||||
for (int i = 3; i < lines.Length; i++)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(lines[i])) continue;
|
||||
var values = ParseCsv(lines[i]);
|
||||
var rowData = new Dictionary<string, string>();
|
||||
for (int j = 0; j < fieldNames.Count && j < values.Count; j++)
|
||||
rowData[fieldNames[j]] = values[j];
|
||||
|
||||
var node = graph.AddNode(factory().GetType(), Vector2.right * i * 220) as ActivityNodeBase;
|
||||
node?.FromExcelRow(rowData);
|
||||
|
||||
if (node is GameplayNode gn)
|
||||
nodeDict[gn.NodeID] = gn;
|
||||
}
|
||||
|
||||
// 重建 GameplayNode 父子连线
|
||||
foreach (var kvp in nodeDict)
|
||||
{
|
||||
var child = kvp.Value;
|
||||
if (child.ParentNodeID >= 0 && nodeDict.TryGetValue(child.ParentNodeID, out var parent))
|
||||
graph.ConnectNodes(parent, child);
|
||||
}
|
||||
|
||||
graph.Validate();
|
||||
Debug.Log($"Imported {lines.Length - 3} rows from {filePath} as {tableName}");
|
||||
}
|
||||
|
||||
private static List<string> ParseCsv(string line)
|
||||
{
|
||||
var result = new List<string>();
|
||||
var current = "";
|
||||
var inQuotes = false;
|
||||
|
||||
for (int i = 0; i < line.Length; i++)
|
||||
{
|
||||
var c = line[i];
|
||||
if (c == '"')
|
||||
{
|
||||
if (inQuotes && i + 1 < line.Length && line[i + 1] == '"') { current += '"'; i++; }
|
||||
else inQuotes = !inQuotes;
|
||||
}
|
||||
else if (c == ',' && !inQuotes) { result.Add(current); current = ""; }
|
||||
else current += c;
|
||||
}
|
||||
|
||||
result.Add(current);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2bdb5d4a9b1f34d49b3685985cd35f52
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,163 +0,0 @@
|
|||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using NodeCanvas.Framework;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace GameplayEditor
|
||||
{
|
||||
public class GameplayEditorWindow : EditorWindow
|
||||
{
|
||||
private Graph currentGraph;
|
||||
private GraphDataSchema currentSchema;
|
||||
private Vector2 canvasScroll;
|
||||
private int selectedTableIndex;
|
||||
|
||||
private static readonly string[] TableNames = {
|
||||
"BehaviourTree", "ActivityStage", "BehaviourNodeDoc", "ActivityGroup",
|
||||
"ActivityUiLut", "ActivityCameraLut", "ActivityFXLut",
|
||||
"ActivityMapInfoLut", "ActivityDialogInfoByStage", "DialogInfo"
|
||||
};
|
||||
|
||||
[MenuItem("Window/Gameplay Editor")]
|
||||
public static void ShowWindow()
|
||||
{
|
||||
GetWindow<GameplayEditorWindow>("玩法编辑器");
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
DrawToolbar();
|
||||
DrawMainLayout();
|
||||
}
|
||||
|
||||
private void DrawToolbar()
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);
|
||||
|
||||
currentGraph = EditorGUILayout.ObjectField(currentGraph, typeof(Graph), false, GUILayout.Width(200)) as Graph;
|
||||
currentSchema = EditorGUILayout.ObjectField(currentSchema, typeof(GraphDataSchema), false, GUILayout.Width(200)) as GraphDataSchema;
|
||||
|
||||
if (GUILayout.Button("导出所有表 → CSV", EditorStyles.toolbarButton, GUILayout.Width(140)))
|
||||
SyncCanvasToExcel();
|
||||
|
||||
if (GUILayout.Button("导入 CSV → Canvas", EditorStyles.toolbarButton, GUILayout.Width(140)))
|
||||
SyncExcelToCanvas();
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
private void DrawMainLayout()
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
EditorGUILayout.BeginVertical(GUILayout.Width(position.width * 0.5f));
|
||||
DrawCanvasPanel();
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.BeginVertical(GUILayout.Width(position.width * 0.5f));
|
||||
DrawTablePanel();
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
private void DrawCanvasPanel()
|
||||
{
|
||||
EditorGUILayout.LabelField("Canvas 节点列表", EditorStyles.boldLabel);
|
||||
|
||||
if (currentGraph == null)
|
||||
{
|
||||
EditorGUILayout.HelpBox("请选择一个 Graph(GameplayGraph 或 BehaviourGraph)", MessageType.Info);
|
||||
return;
|
||||
}
|
||||
|
||||
canvasScroll = EditorGUILayout.BeginScrollView(canvasScroll);
|
||||
|
||||
var activityNodes = currentGraph.allNodes.OfType<Core.ActivityNodeBase>().ToList();
|
||||
if (activityNodes.Count > 0)
|
||||
{
|
||||
var nodesByTable = new Dictionary<string, List<Core.ActivityNodeBase>>();
|
||||
foreach (var node in activityNodes)
|
||||
{
|
||||
if (!nodesByTable.ContainsKey(node.TableName))
|
||||
nodesByTable[node.TableName] = new List<Core.ActivityNodeBase>();
|
||||
nodesByTable[node.TableName].Add(node);
|
||||
}
|
||||
|
||||
foreach (var kvp in nodesByTable.OrderBy(x => x.Key))
|
||||
{
|
||||
EditorGUILayout.LabelField($"{kvp.Key} ({kvp.Value.Count})", EditorStyles.boldLabel);
|
||||
foreach (var node in kvp.Value)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal(EditorStyles.helpBox);
|
||||
EditorGUILayout.LabelField($" [{node.ID}] {node.name}", GUILayout.Width(200));
|
||||
EditorGUILayout.LabelField(node.GetType().Name, EditorStyles.miniLabel);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.HelpBox("Canvas 中没有 ActivityNodeBase 节点", MessageType.Info);
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
private void DrawTablePanel()
|
||||
{
|
||||
EditorGUILayout.LabelField("表格选择", EditorStyles.boldLabel);
|
||||
|
||||
selectedTableIndex = EditorGUILayout.Popup("选择表格", selectedTableIndex, TableNames);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField($"表格: {TableNames[selectedTableIndex]}", EditorStyles.boldLabel);
|
||||
|
||||
if (currentSchema != null)
|
||||
{
|
||||
EditorGUILayout.LabelField($"字段映射数: {currentSchema.fields.Count}", EditorStyles.miniLabel);
|
||||
foreach (var field in currentSchema.fields)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal(EditorStyles.helpBox);
|
||||
EditorGUILayout.LabelField(field.fieldName, GUILayout.Width(150));
|
||||
EditorGUILayout.LabelField("→", GUILayout.Width(20));
|
||||
EditorGUILayout.LabelField(field.excelColumnName, GUILayout.Width(150));
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SyncCanvasToExcel()
|
||||
{
|
||||
if (currentGraph == null)
|
||||
{
|
||||
EditorUtility.DisplayDialog("错误", "请选择 Graph", "确定");
|
||||
return;
|
||||
}
|
||||
|
||||
var basePath = "Assets/玩法编辑器.csv";
|
||||
Export.ExcelExporter.Export(currentGraph, basePath);
|
||||
EditorUtility.DisplayDialog("成功", $"已导出所有表到 Assets/ 目录", "确定");
|
||||
}
|
||||
|
||||
private void SyncExcelToCanvas()
|
||||
{
|
||||
if (currentGraph == null)
|
||||
{
|
||||
EditorUtility.DisplayDialog("错误", "请选择 Graph", "确定");
|
||||
return;
|
||||
}
|
||||
|
||||
var basePath = "Assets/";
|
||||
foreach (var tableName in TableNames)
|
||||
{
|
||||
var filePath = System.IO.Path.Combine(basePath, $"{tableName}.csv");
|
||||
if (System.IO.File.Exists(filePath))
|
||||
Export.ExcelImporter.ImportTable(filePath, currentGraph, tableName);
|
||||
}
|
||||
|
||||
EditorUtility.DisplayDialog("成功", "已导入所有 CSV 表", "确定");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ac53f5324f6daa54eade0d7ae54420e1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameplayEditor
|
||||
{
|
||||
/// <summary>
|
||||
/// 图数据 Schema 定义
|
||||
/// 定义 Canvas 节点字段 ↔ Excel 列的映射关系
|
||||
/// </summary>
|
||||
[CreateAssetMenu(menuName = "GameplayEditor/GraphDataSchema")]
|
||||
public class GraphDataSchema : ScriptableObject
|
||||
{
|
||||
[System.Serializable]
|
||||
public class FieldMapping
|
||||
{
|
||||
[Tooltip("节点中的字段名(支持嵌套如 'task.duration')")]
|
||||
public string fieldName;
|
||||
|
||||
[Tooltip("Excel 表格中的列名")]
|
||||
public string excelColumnName;
|
||||
|
||||
[Tooltip("数据类型")]
|
||||
public FieldType fieldType = FieldType.String;
|
||||
}
|
||||
|
||||
public enum FieldType
|
||||
{
|
||||
String,
|
||||
Int,
|
||||
Float,
|
||||
Bool,
|
||||
Vector3,
|
||||
Color
|
||||
}
|
||||
|
||||
[Tooltip("对应的 Excel Sheet 名称")]
|
||||
public string sheetName = "技能";
|
||||
|
||||
[Tooltip("字段映射列表")]
|
||||
public List<FieldMapping> fields = new List<FieldMapping>
|
||||
{
|
||||
new FieldMapping { fieldName = "ID", excelColumnName = "NodeID", fieldType = FieldType.Int },
|
||||
new FieldMapping { fieldName = "name", excelColumnName = "NodeName", fieldType = FieldType.String },
|
||||
new FieldMapping { fieldName = "comment", excelColumnName = "描述", fieldType = FieldType.String }
|
||||
};
|
||||
|
||||
[Tooltip("节点类型过滤(为空则包含所有)")]
|
||||
public List<string> nodeTypeFilter = new List<string>();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fd283cf39e183a04d814b09c20b2a810
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,162 +0,0 @@
|
|||
using UnityEngine;
|
||||
using NodeCanvas.Framework;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace GameplayEditor
|
||||
{
|
||||
/// <summary>
|
||||
/// 双向同步管理器:Canvas Graph ↔ Excel 表格
|
||||
/// 核心逻辑:
|
||||
/// 1. 监听 Graph 序列化事件 → 提取节点数据 → 写入 Excel
|
||||
/// 2. 监听 Excel 变化 → 解析表格 → 更新 Graph 节点
|
||||
/// </summary>
|
||||
public class GraphExcelSyncManager : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Graph targetGraph;
|
||||
[SerializeField] private GraphDataSchema schema;
|
||||
|
||||
private ExcelDataProvider excelProvider;
|
||||
private bool isSyncing = false;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
if (targetGraph != null)
|
||||
{
|
||||
Graph.onGraphSerialized += OnGraphChanged;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
Graph.onGraphSerialized -= OnGraphChanged;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 监听 Graph 变化 → 同步到 Excel
|
||||
/// 触发点:Graph.SelfSerialize() 完成后
|
||||
/// </summary>
|
||||
private void OnGraphChanged(Graph graph)
|
||||
{
|
||||
if (isSyncing || graph != targetGraph) return;
|
||||
|
||||
isSyncing = true;
|
||||
SyncGraphToExcel();
|
||||
isSyncing = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Canvas → Excel:提取图数据写入表格
|
||||
/// </summary>
|
||||
public void SyncGraphToExcel()
|
||||
{
|
||||
var nodeDataList = ExtractNodeData();
|
||||
excelProvider.WriteSheet(schema.sheetName, nodeDataList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Excel → Canvas:读取表格数据更新图节点
|
||||
/// </summary>
|
||||
public void SyncExcelToGraph()
|
||||
{
|
||||
var excelData = excelProvider.ReadSheet(schema.sheetName);
|
||||
ApplyDataToGraph(excelData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从 Graph 节点提取数据
|
||||
/// 遍历所有节点,按 schema 映射提取字段
|
||||
/// </summary>
|
||||
private List<Dictionary<string, object>> ExtractNodeData()
|
||||
{
|
||||
var result = new List<Dictionary<string, object>>();
|
||||
|
||||
foreach (var node in targetGraph.allNodes)
|
||||
{
|
||||
var nodeData = new Dictionary<string, object>();
|
||||
nodeData["NodeID"] = node.ID;
|
||||
nodeData["NodeType"] = node.GetType().Name;
|
||||
|
||||
// 按 schema 定义的字段提取
|
||||
foreach (var field in schema.fields)
|
||||
{
|
||||
var value = GetNodeFieldValue(node, field.fieldName);
|
||||
nodeData[field.excelColumnName] = value ?? "";
|
||||
}
|
||||
|
||||
result.Add(nodeData);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从节点获取字段值(支持嵌套属性)
|
||||
/// </summary>
|
||||
private object GetNodeFieldValue(Node node, string fieldPath)
|
||||
{
|
||||
var parts = fieldPath.Split('.');
|
||||
object current = node;
|
||||
|
||||
foreach (var part in parts)
|
||||
{
|
||||
if (current == null) return null;
|
||||
var field = current.GetType().GetField(part,
|
||||
System.Reflection.BindingFlags.Public |
|
||||
System.Reflection.BindingFlags.NonPublic |
|
||||
System.Reflection.BindingFlags.IgnoreCase);
|
||||
current = field?.GetValue(current);
|
||||
}
|
||||
|
||||
return current;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将 Excel 数据应用到 Graph 节点
|
||||
/// </summary>
|
||||
private void ApplyDataToGraph(List<Dictionary<string, object>> excelData)
|
||||
{
|
||||
foreach (var rowData in excelData)
|
||||
{
|
||||
if (!rowData.TryGetValue("NodeID", out var nodeIdObj)) continue;
|
||||
|
||||
var nodeId = (int)nodeIdObj;
|
||||
var node = targetGraph.allNodes.FirstOrDefault(n => n.ID == nodeId);
|
||||
if (node == null) continue;
|
||||
|
||||
foreach (var field in schema.fields)
|
||||
{
|
||||
if (rowData.TryGetValue(field.excelColumnName, out var value))
|
||||
{
|
||||
SetNodeFieldValue(node, field.fieldName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置节点字段值
|
||||
/// </summary>
|
||||
private void SetNodeFieldValue(Node node, string fieldPath, object value)
|
||||
{
|
||||
var parts = fieldPath.Split('.');
|
||||
object current = node;
|
||||
|
||||
for (int i = 0; i < parts.Length - 1; i++)
|
||||
{
|
||||
var field = current.GetType().GetField(parts[i],
|
||||
System.Reflection.BindingFlags.Public |
|
||||
System.Reflection.BindingFlags.NonPublic |
|
||||
System.Reflection.BindingFlags.IgnoreCase);
|
||||
current = field?.GetValue(current);
|
||||
if (current == null) return;
|
||||
}
|
||||
|
||||
var lastField = current.GetType().GetField(parts[parts.Length - 1],
|
||||
System.Reflection.BindingFlags.Public |
|
||||
System.Reflection.BindingFlags.NonPublic |
|
||||
System.Reflection.BindingFlags.IgnoreCase);
|
||||
lastField?.SetValue(current, System.Convert.ChangeType(value, lastField.FieldType));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a01d3b65a99ee6f4fafa43e13719468f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
|
@ -0,0 +1,109 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6db3fd573e4a79c43b1b9d9704bdfc68
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,109 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 90b53901e79c6e4499c2ef4ea9cd5b5e
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,109 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 47f94fc69118c3d4fafdf301d800a7af
|
||||
ModelImporter:
|
||||
serializedVersion: 22200
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 0
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importPhysicalCameras: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
strictVertexDataChecks: 0
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
importBlendShapeDeformPercent: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -7,8 +7,8 @@ PhysicMaterial:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: NoFriction
|
||||
dynamicFriction: 0
|
||||
staticFriction: 0
|
||||
dynamicFriction: 0.6
|
||||
staticFriction: 0.6
|
||||
bounciness: 0
|
||||
frictionCombine: 0
|
||||
bounceCombine: 0
|
||||
bounceCombine: 1
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!134 &13400000
|
||||
PhysicMaterial:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: TestFriction
|
||||
dynamicFriction: 0.4
|
||||
staticFriction: 0.5
|
||||
bounciness: 0.5
|
||||
frictionCombine: 0
|
||||
bounceCombine: 0
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d5a65cf8b74ee8c4eb2d9c79142fef91
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 13400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -131,7 +131,7 @@ GameObject:
|
|||
- component: {fileID: 3083724768804585799}
|
||||
- component: {fileID: 7629886489913545649}
|
||||
- component: {fileID: 386759516297118638}
|
||||
- component: {fileID: 7031162772023813649}
|
||||
- component: {fileID: 7158780953535066107}
|
||||
m_Layer: 0
|
||||
m_Name: cm
|
||||
m_TagString: Untagged
|
||||
|
|
@ -207,10 +207,10 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
m_NoiseProfile: {fileID: 11400000, guid: 46965f9cbaf525742a6da4c2172a99cd, type: 2}
|
||||
m_PivotOffset: {x: 0, y: 1, z: 0}
|
||||
m_AmplitudeGain: 1
|
||||
m_FrequencyGain: 1
|
||||
m_AmplitudeGain: 0.5
|
||||
m_FrequencyGain: 0.5
|
||||
mNoiseOffsets: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &7031162772023813649
|
||||
--- !u!114 &7158780953535066107
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
|
|
@ -219,11 +219,11 @@ MonoBehaviour:
|
|||
m_GameObject: {fileID: 7838931742134070276}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9384ab8608cdc3d479fe89cd51eed48f, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: fa7155796051b734daa718462081dc5f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_BindingMode: 4
|
||||
m_FollowOffset: {x: 0, y: 3, z: -8}
|
||||
m_BindingMode: 1
|
||||
m_FollowOffset: {x: 0, y: 3.5, z: -10}
|
||||
m_XDamping: 0
|
||||
m_YDamping: 0
|
||||
m_ZDamping: 0
|
||||
|
|
@ -232,35 +232,3 @@ MonoBehaviour:
|
|||
m_YawDamping: 0
|
||||
m_RollDamping: 0
|
||||
m_AngularDamping: 0
|
||||
m_Heading:
|
||||
m_Definition: 2
|
||||
m_VelocityFilterStrength: 4
|
||||
m_Bias: 0
|
||||
m_RecenterToTargetHeading:
|
||||
m_enabled: 1
|
||||
m_WaitTime: 1
|
||||
m_RecenteringTime: 2
|
||||
m_LegacyHeadingDefinition: -1
|
||||
m_LegacyVelocityFilterStrength: -1
|
||||
m_XAxis:
|
||||
Value: 0
|
||||
m_SpeedMode: 0
|
||||
m_MaxSpeed: 300
|
||||
m_AccelTime: 0
|
||||
m_DecelTime: 0.3
|
||||
m_InputAxisName: Mouse X
|
||||
m_InputAxisValue: 0
|
||||
m_InvertInput: 1
|
||||
m_MinValue: 0
|
||||
m_MaxValue: 360
|
||||
m_Wrap: 1
|
||||
m_Recentering:
|
||||
m_enabled: 0
|
||||
m_WaitTime: 1
|
||||
m_RecenteringTime: 2
|
||||
m_LegacyHeadingDefinition: -1
|
||||
m_LegacyVelocityFilterStrength: -1
|
||||
m_LegacyRadius: 3.4028235e+38
|
||||
m_LegacyHeightOffset: 3.4028235e+38
|
||||
m_LegacyHeadingBias: 3.4028235e+38
|
||||
m_HeadingIsSlave: 0
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ PrefabInstance:
|
|||
- target: {fileID: 4895846115232909977, guid: cba6236a3ca88a54081cc989c4f0c08a,
|
||||
type: 3}
|
||||
propertyPath: SuspensionDamp
|
||||
value: 4000
|
||||
value: 5000
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4895846115232909977, guid: cba6236a3ca88a54081cc989c4f0c08a,
|
||||
type: 3}
|
||||
|
|
@ -202,7 +202,7 @@ PrefabInstance:
|
|||
- target: {fileID: 4895846115232909977, guid: cba6236a3ca88a54081cc989c4f0c08a,
|
||||
type: 3}
|
||||
propertyPath: baseStats.TopSpeed
|
||||
value: 25
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4895846115232909977, guid: cba6236a3ca88a54081cc989c4f0c08a,
|
||||
type: 3}
|
||||
|
|
@ -297,7 +297,7 @@ PrefabInstance:
|
|||
- target: {fileID: 4895846115232909978, guid: cba6236a3ca88a54081cc989c4f0c08a,
|
||||
type: 3}
|
||||
propertyPath: m_Mass
|
||||
value: 2500
|
||||
value: 4000
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4895846115232909979, guid: cba6236a3ca88a54081cc989c4f0c08a,
|
||||
type: 3}
|
||||
|
|
@ -384,6 +384,32 @@ PrefabInstance:
|
|||
propertyPath: frontRightWheel.wheelTransform
|
||||
value:
|
||||
objectReference: {fileID: 5914210770811335419}
|
||||
- target: {fileID: 4895846115356922126, guid: cba6236a3ca88a54081cc989c4f0c08a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 1.082
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4895846115356922126, guid: cba6236a3ca88a54081cc989c4f0c08a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0.4006195
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4895846115356922127, guid: cba6236a3ca88a54081cc989c4f0c08a,
|
||||
type: 3}
|
||||
propertyPath: m_Height
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4895846115356922127, guid: cba6236a3ca88a54081cc989c4f0c08a,
|
||||
type: 3}
|
||||
propertyPath: m_Radius
|
||||
value: 0.45
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4895846115356922127, guid: cba6236a3ca88a54081cc989c4f0c08a,
|
||||
type: 3}
|
||||
propertyPath: m_Material
|
||||
value:
|
||||
objectReference: {fileID: 13400000, guid: a46ba4e273ba0684f90f4acc0fdf44d5,
|
||||
type: 2}
|
||||
- target: {fileID: 4895846115625279569, guid: cba6236a3ca88a54081cc989c4f0c08a,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
|
|
@ -454,7 +480,8 @@ PrefabInstance:
|
|||
propertyPath: m_ConstrainProportionsScale
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedComponents:
|
||||
- {fileID: 4895846115232909976, guid: cba6236a3ca88a54081cc989c4f0c08a, type: 3}
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects:
|
||||
- targetCorrespondingSourceObject: {fileID: 4895846115232909979, guid: cba6236a3ca88a54081cc989c4f0c08a,
|
||||
|
|
@ -465,8 +492,90 @@ PrefabInstance:
|
|||
type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 9104701626997265028}
|
||||
m_AddedComponents: []
|
||||
m_AddedComponents:
|
||||
- targetCorrespondingSourceObject: {fileID: 4895846115232909980, guid: cba6236a3ca88a54081cc989c4f0c08a,
|
||||
type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 8495751883451832900}
|
||||
- targetCorrespondingSourceObject: {fileID: 4895846115232909980, guid: cba6236a3ca88a54081cc989c4f0c08a,
|
||||
type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 2904771108623864349}
|
||||
- targetCorrespondingSourceObject: {fileID: 4895846115232909980, guid: cba6236a3ca88a54081cc989c4f0c08a,
|
||||
type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 5978989029864510845}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: cba6236a3ca88a54081cc989c4f0c08a, type: 3}
|
||||
--- !u!1 &4810912518991602691 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 4895846115232909980, guid: cba6236a3ca88a54081cc989c4f0c08a,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 86203259526999711}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &8495751883451832900
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4810912518991602691}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: df73947ef73728b4ebb6a0a5c0ef6e7f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Accelerate: 0
|
||||
Turn: 0
|
||||
Brake: 0
|
||||
Gear: 0
|
||||
DriveTrain: 2
|
||||
Lights: 0
|
||||
EngineActive: 1
|
||||
--- !u!114 &2904771108623864349
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4810912518991602691}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: aad115aca74ce3c4891b3f6de0b4aae8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_serializedExposedParameters: []
|
||||
_boundGraphSerialization:
|
||||
_boundGraphObjectReferences: []
|
||||
_boundGraphSource:
|
||||
_version: 0
|
||||
_category:
|
||||
_comments:
|
||||
_translation: {x: 0, y: 0}
|
||||
_zoomFactor: 1
|
||||
_firstActivation: 0
|
||||
_enableAction: 0
|
||||
_disableAction: 0
|
||||
_lockBoundGraphPrefabOverrides: 1
|
||||
_preInitializeSubGraphs: 0
|
||||
_updateMode: 0
|
||||
_graph: {fileID: 11400000, guid: 5293d2ca4ceb54046977213c1dffe108, type: 2}
|
||||
_blackboard: {fileID: 5978989029864510845}
|
||||
--- !u!114 &5978989029864510845
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4810912518991602691}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b98a6db0b653f764eac834f85857a9dd, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_parentBlackboard: {fileID: 0}
|
||||
_serializedBlackboard: '{"_variables":{}}'
|
||||
_objectReferences: []
|
||||
_serializedVariables: []
|
||||
--- !u!4 &4810912518991602692 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4895846115232909979, guid: cba6236a3ca88a54081cc989c4f0c08a,
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,298 +1,298 @@
|
|||
using KartGame.KartSystems;
|
||||
using Unity.MLAgents;
|
||||
using Unity.MLAgents.Sensors;
|
||||
using Unity.MLAgents.Actuators;
|
||||
using UnityEngine;
|
||||
using Random = UnityEngine.Random;
|
||||
// using KartGame.KartSystems;
|
||||
// using Unity.MLAgents;
|
||||
// using Unity.MLAgents.Sensors;
|
||||
// using Unity.MLAgents.Actuators;
|
||||
// using UnityEngine;
|
||||
// using Random = UnityEngine.Random;
|
||||
|
||||
namespace KartGame.AI
|
||||
{
|
||||
/// <summary>
|
||||
/// Sensors hold information such as the position of rotation of the origin of the raycast and its hit threshold
|
||||
/// to consider a "crash".
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public struct Sensor
|
||||
{
|
||||
public Transform Transform;
|
||||
public float RayDistance;
|
||||
public float HitValidationDistance;
|
||||
}
|
||||
// namespace KartGame.AI
|
||||
// {
|
||||
// /// <summary>
|
||||
// /// Sensors hold information such as the position of rotation of the origin of the raycast and its hit threshold
|
||||
// /// to consider a "crash".
|
||||
// /// </summary>
|
||||
// [System.Serializable]
|
||||
// public struct Sensor
|
||||
// {
|
||||
// public Transform Transform;
|
||||
// public float RayDistance;
|
||||
// public float HitValidationDistance;
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// We only want certain behaviours when the agent runs.
|
||||
/// Training would allow certain functions such as OnAgentReset() be called and execute, while Inferencing will
|
||||
/// assume that the agent will continuously run and not reset.
|
||||
/// </summary>
|
||||
public enum AgentMode
|
||||
{
|
||||
Training,
|
||||
Inferencing
|
||||
}
|
||||
// /// <summary>
|
||||
// /// We only want certain behaviours when the agent runs.
|
||||
// /// Training would allow certain functions such as OnAgentReset() be called and execute, while Inferencing will
|
||||
// /// assume that the agent will continuously run and not reset.
|
||||
// /// </summary>
|
||||
// public enum AgentMode
|
||||
// {
|
||||
// Training,
|
||||
// Inferencing
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// The KartAgent will drive the inputs for the KartController.
|
||||
/// </summary>
|
||||
public class KartAgent : Agent, IInput
|
||||
{
|
||||
#region Training Modes
|
||||
[Tooltip("Are we training the agent or is the agent production ready?")]
|
||||
public AgentMode Mode = AgentMode.Training;
|
||||
[Tooltip("What is the initial checkpoint the agent will go to? This value is only for inferencing.")]
|
||||
public ushort InitCheckpointIndex;
|
||||
// /// <summary>
|
||||
// /// The KartAgent will drive the inputs for the KartController.
|
||||
// /// </summary>
|
||||
// public class KartAgent : Agent, IInput
|
||||
// {
|
||||
// #region Training Modes
|
||||
// [Tooltip("Are we training the agent or is the agent production ready?")]
|
||||
// public AgentMode Mode = AgentMode.Training;
|
||||
// [Tooltip("What is the initial checkpoint the agent will go to? This value is only for inferencing.")]
|
||||
// public ushort InitCheckpointIndex;
|
||||
|
||||
#endregion
|
||||
// #endregion
|
||||
|
||||
#region Senses
|
||||
[Header("Observation Params")]
|
||||
[Tooltip("What objects should the raycasts hit and detect?")]
|
||||
public LayerMask Mask;
|
||||
[Tooltip("Sensors contain ray information to sense out the world, you can have as many sensors as you need.")]
|
||||
public Sensor[] Sensors;
|
||||
[Header("Checkpoints"), Tooltip("What are the series of checkpoints for the agent to seek and pass through?")]
|
||||
public Collider[] Colliders;
|
||||
[Tooltip("What layer are the checkpoints on? This should be an exclusive layer for the agent to use.")]
|
||||
public LayerMask CheckpointMask;
|
||||
// #region Senses
|
||||
// [Header("Observation Params")]
|
||||
// [Tooltip("What objects should the raycasts hit and detect?")]
|
||||
// public LayerMask Mask;
|
||||
// [Tooltip("Sensors contain ray information to sense out the world, you can have as many sensors as you need.")]
|
||||
// public Sensor[] Sensors;
|
||||
// [Header("Checkpoints"), Tooltip("What are the series of checkpoints for the agent to seek and pass through?")]
|
||||
// public Collider[] Colliders;
|
||||
// [Tooltip("What layer are the checkpoints on? This should be an exclusive layer for the agent to use.")]
|
||||
// public LayerMask CheckpointMask;
|
||||
|
||||
[Space]
|
||||
[Tooltip("Would the agent need a custom transform to be able to raycast and hit the track? " +
|
||||
"If not assigned, then the root transform will be used.")]
|
||||
public Transform AgentSensorTransform;
|
||||
#endregion
|
||||
// [Space]
|
||||
// [Tooltip("Would the agent need a custom transform to be able to raycast and hit the track? " +
|
||||
// "If not assigned, then the root transform will be used.")]
|
||||
// public Transform AgentSensorTransform;
|
||||
// #endregion
|
||||
|
||||
#region Rewards
|
||||
[Header("Rewards"), Tooltip("What penatly is given when the agent crashes?")]
|
||||
public float HitPenalty = -1f;
|
||||
[Tooltip("How much reward is given when the agent successfully passes the checkpoints?")]
|
||||
public float PassCheckpointReward;
|
||||
[Tooltip("Should typically be a small value, but we reward the agent for moving in the right direction.")]
|
||||
public float TowardsCheckpointReward;
|
||||
[Tooltip("Typically if the agent moves faster, we want to reward it for finishing the track quickly.")]
|
||||
public float SpeedReward;
|
||||
[Tooltip("Reward the agent when it keeps accelerating")]
|
||||
public float AccelerationReward;
|
||||
#endregion
|
||||
// #region Rewards
|
||||
// [Header("Rewards"), Tooltip("What penatly is given when the agent crashes?")]
|
||||
// public float HitPenalty = -1f;
|
||||
// [Tooltip("How much reward is given when the agent successfully passes the checkpoints?")]
|
||||
// public float PassCheckpointReward;
|
||||
// [Tooltip("Should typically be a small value, but we reward the agent for moving in the right direction.")]
|
||||
// public float TowardsCheckpointReward;
|
||||
// [Tooltip("Typically if the agent moves faster, we want to reward it for finishing the track quickly.")]
|
||||
// public float SpeedReward;
|
||||
// [Tooltip("Reward the agent when it keeps accelerating")]
|
||||
// public float AccelerationReward;
|
||||
// #endregion
|
||||
|
||||
#region ResetParams
|
||||
[Header("Inference Reset Params")]
|
||||
[Tooltip("What is the unique mask that the agent should detect when it falls out of the track?")]
|
||||
public LayerMask OutOfBoundsMask;
|
||||
[Tooltip("What are the layers we want to detect for the track and the ground?")]
|
||||
public LayerMask TrackMask;
|
||||
[Tooltip("How far should the ray be when casted? For larger karts - this value should be larger too.")]
|
||||
public float GroundCastDistance;
|
||||
#endregion
|
||||
// #region ResetParams
|
||||
// [Header("Inference Reset Params")]
|
||||
// [Tooltip("What is the unique mask that the agent should detect when it falls out of the track?")]
|
||||
// public LayerMask OutOfBoundsMask;
|
||||
// [Tooltip("What are the layers we want to detect for the track and the ground?")]
|
||||
// public LayerMask TrackMask;
|
||||
// [Tooltip("How far should the ray be when casted? For larger karts - this value should be larger too.")]
|
||||
// public float GroundCastDistance;
|
||||
// #endregion
|
||||
|
||||
#region Debugging
|
||||
[Header("Debug Option")] [Tooltip("Should we visualize the rays that the agent draws?")]
|
||||
public bool ShowRaycasts;
|
||||
#endregion
|
||||
// #region Debugging
|
||||
// [Header("Debug Option")] [Tooltip("Should we visualize the rays that the agent draws?")]
|
||||
// public bool ShowRaycasts;
|
||||
// #endregion
|
||||
|
||||
ArcadeKart m_Kart;
|
||||
bool m_Acceleration;
|
||||
bool m_Brake;
|
||||
float m_Steering;
|
||||
int m_CheckpointIndex;
|
||||
// ArcadeKart m_Kart;
|
||||
// bool m_Acceleration;
|
||||
// bool m_Brake;
|
||||
// float m_Steering;
|
||||
// int m_CheckpointIndex;
|
||||
|
||||
bool m_EndEpisode;
|
||||
float m_LastAccumulatedReward;
|
||||
// bool m_EndEpisode;
|
||||
// float m_LastAccumulatedReward;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
m_Kart = GetComponent<ArcadeKart>();
|
||||
if (AgentSensorTransform == null) AgentSensorTransform = transform;
|
||||
}
|
||||
// void Awake()
|
||||
// {
|
||||
// m_Kart = GetComponent<ArcadeKart>();
|
||||
// if (AgentSensorTransform == null) AgentSensorTransform = transform;
|
||||
// }
|
||||
|
||||
void Start()
|
||||
{
|
||||
// If the agent is training, then at the start of the simulation, pick a random checkpoint to train the agent.
|
||||
OnEpisodeBegin();
|
||||
// void Start()
|
||||
// {
|
||||
// // If the agent is training, then at the start of the simulation, pick a random checkpoint to train the agent.
|
||||
// OnEpisodeBegin();
|
||||
|
||||
if (Mode == AgentMode.Inferencing) m_CheckpointIndex = InitCheckpointIndex;
|
||||
}
|
||||
// if (Mode == AgentMode.Inferencing) m_CheckpointIndex = InitCheckpointIndex;
|
||||
// }
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (m_EndEpisode)
|
||||
{
|
||||
m_EndEpisode = false;
|
||||
AddReward(m_LastAccumulatedReward);
|
||||
EndEpisode();
|
||||
OnEpisodeBegin();
|
||||
}
|
||||
}
|
||||
// void Update()
|
||||
// {
|
||||
// if (m_EndEpisode)
|
||||
// {
|
||||
// m_EndEpisode = false;
|
||||
// AddReward(m_LastAccumulatedReward);
|
||||
// EndEpisode();
|
||||
// OnEpisodeBegin();
|
||||
// }
|
||||
// }
|
||||
|
||||
void LateUpdate()
|
||||
{
|
||||
switch (Mode)
|
||||
{
|
||||
case AgentMode.Inferencing:
|
||||
if (ShowRaycasts)
|
||||
Debug.DrawRay(transform.position, Vector3.down * GroundCastDistance, Color.cyan);
|
||||
// void LateUpdate()
|
||||
// {
|
||||
// switch (Mode)
|
||||
// {
|
||||
// case AgentMode.Inferencing:
|
||||
// if (ShowRaycasts)
|
||||
// Debug.DrawRay(transform.position, Vector3.down * GroundCastDistance, Color.cyan);
|
||||
|
||||
// We want to place the agent back on the track if the agent happens to launch itself outside of the track.
|
||||
if (Physics.Raycast(transform.position + Vector3.up, Vector3.down, out var hit, GroundCastDistance, TrackMask)
|
||||
&& ((1 << hit.collider.gameObject.layer) & OutOfBoundsMask) > 0)
|
||||
{
|
||||
// Reset the agent back to its last known agent checkpoint
|
||||
var checkpoint = Colliders[m_CheckpointIndex].transform;
|
||||
transform.localRotation = checkpoint.rotation;
|
||||
transform.position = checkpoint.position;
|
||||
m_Kart.Rigidbody.velocity = default;
|
||||
m_Steering = 0f;
|
||||
m_Acceleration = m_Brake = false;
|
||||
}
|
||||
// // We want to place the agent back on the track if the agent happens to launch itself outside of the track.
|
||||
// if (Physics.Raycast(transform.position + Vector3.up, Vector3.down, out var hit, GroundCastDistance, TrackMask)
|
||||
// && ((1 << hit.collider.gameObject.layer) & OutOfBoundsMask) > 0)
|
||||
// {
|
||||
// // Reset the agent back to its last known agent checkpoint
|
||||
// var checkpoint = Colliders[m_CheckpointIndex].transform;
|
||||
// transform.localRotation = checkpoint.rotation;
|
||||
// transform.position = checkpoint.position;
|
||||
// m_Kart.Rigidbody.velocity = default;
|
||||
// m_Steering = 0f;
|
||||
// m_Acceleration = m_Brake = false;
|
||||
// }
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
void OnTriggerEnter(Collider other)
|
||||
{
|
||||
var maskedValue = 1 << other.gameObject.layer;
|
||||
var triggered = maskedValue & CheckpointMask;
|
||||
// void OnTriggerEnter(Collider other)
|
||||
// {
|
||||
// var maskedValue = 1 << other.gameObject.layer;
|
||||
// var triggered = maskedValue & CheckpointMask;
|
||||
|
||||
FindCheckpointIndex(other, out var index);
|
||||
// FindCheckpointIndex(other, out var index);
|
||||
|
||||
// Ensure that the agent touched the checkpoint and the new index is greater than the m_CheckpointIndex.
|
||||
if (triggered > 0 && index > m_CheckpointIndex || index == 0 && m_CheckpointIndex == Colliders.Length - 1)
|
||||
{
|
||||
AddReward(PassCheckpointReward);
|
||||
m_CheckpointIndex = index;
|
||||
}
|
||||
}
|
||||
// // Ensure that the agent touched the checkpoint and the new index is greater than the m_CheckpointIndex.
|
||||
// if (triggered > 0 && index > m_CheckpointIndex || index == 0 && m_CheckpointIndex == Colliders.Length - 1)
|
||||
// {
|
||||
// AddReward(PassCheckpointReward);
|
||||
// m_CheckpointIndex = index;
|
||||
// }
|
||||
// }
|
||||
|
||||
void FindCheckpointIndex(Collider checkPoint, out int index)
|
||||
{
|
||||
for (int i = 0; i < Colliders.Length; i++)
|
||||
{
|
||||
if (Colliders[i].GetInstanceID() == checkPoint.GetInstanceID())
|
||||
{
|
||||
index = i;
|
||||
return;
|
||||
}
|
||||
}
|
||||
index = -1;
|
||||
}
|
||||
// void FindCheckpointIndex(Collider checkPoint, out int index)
|
||||
// {
|
||||
// for (int i = 0; i < Colliders.Length; i++)
|
||||
// {
|
||||
// if (Colliders[i].GetInstanceID() == checkPoint.GetInstanceID())
|
||||
// {
|
||||
// index = i;
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// index = -1;
|
||||
// }
|
||||
|
||||
float Sign(float value)
|
||||
{
|
||||
if (value > 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (value < 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
// float Sign(float value)
|
||||
// {
|
||||
// if (value > 0)
|
||||
// {
|
||||
// return 1;
|
||||
// }
|
||||
// if (value < 0)
|
||||
// {
|
||||
// return -1;
|
||||
// }
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
public override void CollectObservations(VectorSensor sensor)
|
||||
{
|
||||
sensor.AddObservation(m_Kart.LocalSpeed());
|
||||
// public override void CollectObservations(VectorSensor sensor)
|
||||
// {
|
||||
// sensor.AddObservation(m_Kart.LocalSpeed());
|
||||
|
||||
// Add an observation for direction of the agent to the next checkpoint.
|
||||
var next = (m_CheckpointIndex + 1) % Colliders.Length;
|
||||
var nextCollider = Colliders[next];
|
||||
if (nextCollider == null)
|
||||
return;
|
||||
// // Add an observation for direction of the agent to the next checkpoint.
|
||||
// var next = (m_CheckpointIndex + 1) % Colliders.Length;
|
||||
// var nextCollider = Colliders[next];
|
||||
// if (nextCollider == null)
|
||||
// return;
|
||||
|
||||
var direction = (nextCollider.transform.position - m_Kart.transform.position).normalized;
|
||||
sensor.AddObservation(Vector3.Dot(m_Kart.Rigidbody.velocity.normalized, direction));
|
||||
// var direction = (nextCollider.transform.position - m_Kart.transform.position).normalized;
|
||||
// sensor.AddObservation(Vector3.Dot(m_Kart.Rigidbody.velocity.normalized, direction));
|
||||
|
||||
if (ShowRaycasts)
|
||||
Debug.DrawLine(AgentSensorTransform.position, nextCollider.transform.position, Color.magenta);
|
||||
// if (ShowRaycasts)
|
||||
// Debug.DrawLine(AgentSensorTransform.position, nextCollider.transform.position, Color.magenta);
|
||||
|
||||
m_LastAccumulatedReward = 0.0f;
|
||||
m_EndEpisode = false;
|
||||
for (var i = 0; i < Sensors.Length; i++)
|
||||
{
|
||||
var current = Sensors[i];
|
||||
var xform = current.Transform;
|
||||
var hit = Physics.Raycast(AgentSensorTransform.position, xform.forward, out var hitInfo,
|
||||
current.RayDistance, Mask, QueryTriggerInteraction.Ignore);
|
||||
// m_LastAccumulatedReward = 0.0f;
|
||||
// m_EndEpisode = false;
|
||||
// for (var i = 0; i < Sensors.Length; i++)
|
||||
// {
|
||||
// var current = Sensors[i];
|
||||
// var xform = current.Transform;
|
||||
// var hit = Physics.Raycast(AgentSensorTransform.position, xform.forward, out var hitInfo,
|
||||
// current.RayDistance, Mask, QueryTriggerInteraction.Ignore);
|
||||
|
||||
if (ShowRaycasts)
|
||||
{
|
||||
Debug.DrawRay(AgentSensorTransform.position, xform.forward * current.RayDistance, Color.green);
|
||||
Debug.DrawRay(AgentSensorTransform.position, xform.forward * current.HitValidationDistance,
|
||||
Color.red);
|
||||
// if (ShowRaycasts)
|
||||
// {
|
||||
// Debug.DrawRay(AgentSensorTransform.position, xform.forward * current.RayDistance, Color.green);
|
||||
// Debug.DrawRay(AgentSensorTransform.position, xform.forward * current.HitValidationDistance,
|
||||
// Color.red);
|
||||
|
||||
if (hit && hitInfo.distance < current.HitValidationDistance)
|
||||
{
|
||||
Debug.DrawRay(hitInfo.point, Vector3.up * 3.0f, Color.blue);
|
||||
}
|
||||
}
|
||||
// if (hit && hitInfo.distance < current.HitValidationDistance)
|
||||
// {
|
||||
// Debug.DrawRay(hitInfo.point, Vector3.up * 3.0f, Color.blue);
|
||||
// }
|
||||
// }
|
||||
|
||||
if (hit)
|
||||
{
|
||||
if (hitInfo.distance < current.HitValidationDistance)
|
||||
{
|
||||
m_LastAccumulatedReward += HitPenalty;
|
||||
m_EndEpisode = true;
|
||||
}
|
||||
}
|
||||
// if (hit)
|
||||
// {
|
||||
// if (hitInfo.distance < current.HitValidationDistance)
|
||||
// {
|
||||
// m_LastAccumulatedReward += HitPenalty;
|
||||
// m_EndEpisode = true;
|
||||
// }
|
||||
// }
|
||||
|
||||
sensor.AddObservation(hit ? hitInfo.distance : current.RayDistance);
|
||||
}
|
||||
// sensor.AddObservation(hit ? hitInfo.distance : current.RayDistance);
|
||||
// }
|
||||
|
||||
sensor.AddObservation(m_Acceleration);
|
||||
}
|
||||
// sensor.AddObservation(m_Acceleration);
|
||||
// }
|
||||
|
||||
public override void OnActionReceived(ActionBuffers actions)
|
||||
{
|
||||
base.OnActionReceived(actions);
|
||||
InterpretDiscreteActions(actions);
|
||||
// public override void OnActionReceived(ActionBuffers actions)
|
||||
// {
|
||||
// base.OnActionReceived(actions);
|
||||
// InterpretDiscreteActions(actions);
|
||||
|
||||
// Find the next checkpoint when registering the current checkpoint that the agent has passed.
|
||||
var next = (m_CheckpointIndex + 1) % Colliders.Length;
|
||||
var nextCollider = Colliders[next];
|
||||
var direction = (nextCollider.transform.position - m_Kart.transform.position).normalized;
|
||||
var reward = Vector3.Dot(m_Kart.Rigidbody.velocity.normalized, direction);
|
||||
// // Find the next checkpoint when registering the current checkpoint that the agent has passed.
|
||||
// var next = (m_CheckpointIndex + 1) % Colliders.Length;
|
||||
// var nextCollider = Colliders[next];
|
||||
// var direction = (nextCollider.transform.position - m_Kart.transform.position).normalized;
|
||||
// var reward = Vector3.Dot(m_Kart.Rigidbody.velocity.normalized, direction);
|
||||
|
||||
if (ShowRaycasts) Debug.DrawRay(AgentSensorTransform.position, m_Kart.Rigidbody.velocity, Color.blue);
|
||||
// if (ShowRaycasts) Debug.DrawRay(AgentSensorTransform.position, m_Kart.Rigidbody.velocity, Color.blue);
|
||||
|
||||
// Add rewards if the agent is heading in the right direction
|
||||
AddReward(reward * TowardsCheckpointReward);
|
||||
AddReward((m_Acceleration && !m_Brake ? 1.0f : 0.0f) * AccelerationReward);
|
||||
AddReward(m_Kart.LocalSpeed() * SpeedReward);
|
||||
}
|
||||
// // Add rewards if the agent is heading in the right direction
|
||||
// AddReward(reward * TowardsCheckpointReward);
|
||||
// AddReward((m_Acceleration && !m_Brake ? 1.0f : 0.0f) * AccelerationReward);
|
||||
// AddReward(m_Kart.LocalSpeed() * SpeedReward);
|
||||
// }
|
||||
|
||||
public override void OnEpisodeBegin()
|
||||
{
|
||||
switch (Mode)
|
||||
{
|
||||
case AgentMode.Training:
|
||||
m_CheckpointIndex = Random.Range(0, Colliders.Length - 1);
|
||||
var collider = Colliders[m_CheckpointIndex];
|
||||
transform.localRotation = collider.transform.rotation;
|
||||
transform.position = collider.transform.position;
|
||||
m_Kart.Rigidbody.velocity = default;
|
||||
m_Acceleration = false;
|
||||
m_Brake = false;
|
||||
m_Steering = 0f;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
// public override void OnEpisodeBegin()
|
||||
// {
|
||||
// switch (Mode)
|
||||
// {
|
||||
// case AgentMode.Training:
|
||||
// m_CheckpointIndex = Random.Range(0, Colliders.Length - 1);
|
||||
// var collider = Colliders[m_CheckpointIndex];
|
||||
// transform.localRotation = collider.transform.rotation;
|
||||
// transform.position = collider.transform.position;
|
||||
// m_Kart.Rigidbody.velocity = default;
|
||||
// m_Acceleration = false;
|
||||
// m_Brake = false;
|
||||
// m_Steering = 0f;
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
void InterpretDiscreteActions(ActionBuffers actions)
|
||||
{
|
||||
m_Steering = actions.DiscreteActions[0] - 1f;
|
||||
m_Acceleration = actions.DiscreteActions[1] >= 1.0f;
|
||||
m_Brake = actions.DiscreteActions[1] < 1.0f;
|
||||
}
|
||||
// void InterpretDiscreteActions(ActionBuffers actions)
|
||||
// {
|
||||
// m_Steering = actions.DiscreteActions[0] - 1f;
|
||||
// m_Acceleration = actions.DiscreteActions[1] >= 1.0f;
|
||||
// m_Brake = actions.DiscreteActions[1] < 1.0f;
|
||||
// }
|
||||
|
||||
public InputData GenerateInput()
|
||||
{
|
||||
return new InputData
|
||||
{
|
||||
Accelerate = m_Acceleration,
|
||||
Brake = m_Brake,
|
||||
TurnInput = m_Steering
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
// public InputData GenerateInput()
|
||||
// {
|
||||
// return new InputData
|
||||
// {
|
||||
// Accelerate = m_Acceleration,
|
||||
// Brake = m_Brake,
|
||||
// TurnInput = m_Steering
|
||||
// };
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ namespace KartGame.KartSystems
|
|||
}
|
||||
else
|
||||
{
|
||||
return Input.Accelerate ? 1.0f : 0.0f;
|
||||
return Input.Accelerate;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -402,10 +402,10 @@ namespace KartGame.KartSystems
|
|||
}
|
||||
|
||||
// 车辆移动核心逻辑
|
||||
void MoveVehicle(bool accelerate, bool brake, float turnInput)
|
||||
void MoveVehicle(float accelerate, bool brake, float turnInput)
|
||||
{
|
||||
// 合并加速和刹车输入
|
||||
float accelInput = (accelerate ? 1.0f : 0.0f) - (brake ? 1.0f : 0.0f);
|
||||
float accelInput = accelerate - (brake ? 1.0f : 0.0f);
|
||||
|
||||
float accelerationCurveCoeff = 5;
|
||||
Vector3 localVel = transform.InverseTransformVector(Rigidbody.velocity);
|
||||
|
|
@ -424,7 +424,7 @@ namespace KartGame.KartSystems
|
|||
float accelRamp = Mathf.Lerp(multipliedAccelerationCurve, 1, accelRampT * accelRampT);
|
||||
|
||||
// 判定是否正在通过反向输入进行刹车
|
||||
bool isBraking = (localVelDirectionIsFwd && brake) || (!localVelDirectionIsFwd && accelerate);
|
||||
bool isBraking = (localVelDirectionIsFwd && brake) || (!localVelDirectionIsFwd && Mathf.Abs(accelerate) > 0.01f);
|
||||
|
||||
float finalAccelPower = isBraking ? m_FinalStats.Braking : accelPower;
|
||||
float finalAcceleration = finalAccelPower * accelRamp;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace KartGame.KartSystems
|
||||
{
|
||||
public class BTInput : BaseInput
|
||||
{
|
||||
public override InputData GenerateInput()
|
||||
{
|
||||
return new InputData
|
||||
{
|
||||
Accelerate = this.Accelerate,
|
||||
TurnInput = this.Turn,
|
||||
Brake = this.Brake,
|
||||
CurrentGear = this.Gear,
|
||||
CurrentDrive = this.DriveTrain,
|
||||
LightsOn = this.Lights,
|
||||
EngineOn = this.EngineActive
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e498e185f67a544479d637626a1f98a7
|
||||
guid: df73947ef73728b4ebb6a0a5c0ef6e7f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
|
@ -2,11 +2,19 @@
|
|||
|
||||
namespace KartGame.KartSystems
|
||||
{
|
||||
public enum GearMode { Automatic, Manual, Neutral, Reverse }
|
||||
public enum DriveTrainMode { ForwardWheelDrive, RearWheelDrive, AllWheelDrive }
|
||||
|
||||
[System.Serializable]
|
||||
public struct InputData
|
||||
{
|
||||
public bool Accelerate;
|
||||
public bool Brake;
|
||||
public float Accelerate;
|
||||
public float TurnInput;
|
||||
public bool Brake;
|
||||
public GearMode CurrentGear;
|
||||
public DriveTrainMode CurrentDrive;
|
||||
public bool LightsOn; //灯光状态
|
||||
public bool EngineOn; //引擎状态
|
||||
}
|
||||
|
||||
public interface IInput
|
||||
|
|
@ -16,9 +24,49 @@ namespace KartGame.KartSystems
|
|||
|
||||
public abstract class BaseInput : MonoBehaviour, IInput
|
||||
{
|
||||
/// <summary>
|
||||
/// Override this function to generate an XY input that can be used to steer and control the car.
|
||||
/// </summary>
|
||||
[Header("Basic Controls")]
|
||||
public float Accelerate;
|
||||
public float Turn;
|
||||
public bool Brake;
|
||||
|
||||
[Header("Advanced Simulation")]
|
||||
public GearMode Gear = GearMode.Automatic;
|
||||
public DriveTrainMode DriveTrain = DriveTrainMode.AllWheelDrive;
|
||||
public bool Lights;
|
||||
public bool EngineActive = true;
|
||||
|
||||
// --- 基础移动控制 ---
|
||||
public void SetMovement(float accel, float turn, bool brake)
|
||||
{
|
||||
this.Accelerate = accel;
|
||||
this.Turn = turn;
|
||||
this.Brake = brake;
|
||||
}
|
||||
|
||||
// --- 档位控制 ---
|
||||
public void SetGear(GearMode newGear)
|
||||
{
|
||||
this.Gear = newGear;
|
||||
}
|
||||
|
||||
// --- 驱动模式控制 ---
|
||||
public void SetDriveMode(DriveTrainMode newMode)
|
||||
{
|
||||
this.DriveTrain = newMode;
|
||||
}
|
||||
|
||||
// --- 灯光控制 ---
|
||||
public void SetLights(bool state)
|
||||
{
|
||||
this.Lights = state;
|
||||
}
|
||||
|
||||
// --- 引擎状态控制 ---
|
||||
public void SetEngineStatus(bool state)
|
||||
{
|
||||
this.EngineActive = state;
|
||||
}
|
||||
|
||||
public abstract InputData GenerateInput();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +1,20 @@
|
|||
using UnityEngine;
|
||||
// using UnityEngine;
|
||||
|
||||
namespace KartGame.KartSystems {
|
||||
// namespace KartGame.KartSystems {
|
||||
|
||||
public class KeyboardInput : BaseInput
|
||||
{
|
||||
public string TurnInputName = "Horizontal";
|
||||
public string AccelerateButtonName = "Accelerate";
|
||||
public string BrakeButtonName = "Brake";
|
||||
// public class KeyboardInput : BaseInput
|
||||
// {
|
||||
// public string TurnInputName = "Horizontal";
|
||||
// public string AccelerateButtonName = "Accelerate";
|
||||
// public string BrakeButtonName = "Brake";
|
||||
|
||||
public override InputData GenerateInput() {
|
||||
return new InputData
|
||||
{
|
||||
Accelerate = Input.GetButton(AccelerateButtonName),
|
||||
Brake = Input.GetButton(BrakeButtonName),
|
||||
TurnInput = Input.GetAxis("Horizontal")
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
// public override InputData GenerateInput() {
|
||||
// return new InputData
|
||||
// {
|
||||
// Accelerate = Input.GetButton(AccelerateButtonName),
|
||||
// Brake = Input.GetButton(BrakeButtonName),
|
||||
// TurnInput = Input.GetAxis("Horizontal")
|
||||
// };
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -1,69 +0,0 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8f107dc6d4c984c45bdafd3bb15f98f0, type: 3}
|
||||
m_Name: 5 Build and Publish
|
||||
m_EditorClassIdentifier:
|
||||
TutorialTitle:
|
||||
m_Untranslated: Build, publish, & BONUS
|
||||
m_ProgressTrackingEnabled: 1
|
||||
m_LessonId: 47146
|
||||
m_Version: 1
|
||||
m_SceneManagementBehavior: 0
|
||||
m_Scenes:
|
||||
- {fileID: 102900000, guid: 92786e23da2af4a4f8803aaf44c47121, type: 3}
|
||||
m_DefaultSceneCameraSettings:
|
||||
m_CameraMode: 0
|
||||
m_FocusMode: 0
|
||||
m_Orthographic: 0
|
||||
m_Size: 0
|
||||
m_Pivot: {x: 0, y: 0, z: 0}
|
||||
m_Rotation: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_FrameObject:
|
||||
m_SceneGuid:
|
||||
m_GameObjectGuid:
|
||||
m_SerializedComponentType:
|
||||
m_TypeName:
|
||||
m_ComponentIndex: 0
|
||||
m_AssetObject: {fileID: 0}
|
||||
m_Prefab: {fileID: 0}
|
||||
m_Enabled: 0
|
||||
m_WindowLayout: {fileID: 0}
|
||||
m_Pages:
|
||||
m_Items:
|
||||
- {fileID: 11400000, guid: 2e886da6f6aba0f47b6241a2700a78b9, type: 2}
|
||||
- {fileID: 11400000, guid: fcca6e4cbcfd27e49bf16a7c3a6eb019, type: 2}
|
||||
- {fileID: 11400000, guid: 97f3ee3958d87894d8f23cc258f28f0e, type: 2}
|
||||
- {fileID: 11400000, guid: eb4604b43980b3740a07722643b2ecbe, type: 2}
|
||||
- {fileID: 11400000, guid: daafa2d048ca372498d84eb1ff8a9a31, type: 2}
|
||||
- {fileID: 11400000, guid: 6f964d3cc40f45747aebcf0c57f609ba, type: 2}
|
||||
- {fileID: 11400000, guid: 9903de0d10380094eb753dcdac1f5e68, type: 2}
|
||||
- {fileID: 11400000, guid: 5ae42c0e96418ec46b613bb3c92bb7b3, type: 2}
|
||||
Modified:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Initiated:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
PageInitiated:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
GoingBack:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Completed:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Quit:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Scene: {fileID: 0}
|
||||
m_TutorialTitle:
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
using System.Linq;
|
||||
using Unity.Play.Publisher.Editor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.Tutorials
|
||||
{
|
||||
/// <summary>
|
||||
/// Contaisn all the callbacks needed for the Build And Publish tutorial
|
||||
/// </summary>
|
||||
[CreateAssetMenu(fileName = "PublishCriteria", menuName = "Tutorials/Microgame/PublishCriteria")]
|
||||
class PublishCriteria : ScriptableObject
|
||||
{
|
||||
static PublisherWindow publisherWindow;
|
||||
public bool IsNotDisplayingFirstTimeInstructions()
|
||||
{
|
||||
if (!IsWebGLPublisherOpen()) { return false; }
|
||||
return (!string.IsNullOrEmpty(publisherWindow.CurrentTab) && publisherWindow.CurrentTab != PublisherWindow.TabIntroduction);
|
||||
}
|
||||
|
||||
public bool IsUserLoggedIn()
|
||||
{
|
||||
if (!IsWebGLPublisherOpen()) { return false; }
|
||||
return (publisherWindow.CurrentTab != PublisherWindow.TabNotLoggedIn);
|
||||
}
|
||||
|
||||
public bool IsBuildBeingUploaded()
|
||||
{
|
||||
if (!IsWebGLPublisherOpen()) { return false; }
|
||||
switch (PublisherUtils.GetCurrentPublisherState(publisherWindow))
|
||||
{
|
||||
case PublisherState.Upload:
|
||||
case PublisherState.Process:
|
||||
return true;
|
||||
default: break;
|
||||
}
|
||||
return !string.IsNullOrEmpty(PublisherUtils.GetUrlOfLastPublishedBuild(publisherWindow));
|
||||
}
|
||||
|
||||
public bool IsBuildPublished()
|
||||
{
|
||||
if (!IsWebGLPublisherOpen()) { return false; }
|
||||
return !string.IsNullOrEmpty(PublisherUtils.GetUrlOfLastPublishedBuild(publisherWindow));
|
||||
}
|
||||
|
||||
public bool AtLeastOneBuildIsRegistered()
|
||||
{
|
||||
if (!IsWebGLPublisherOpen()) { return false; }
|
||||
switch (PublisherUtils.GetCurrentPublisherState(publisherWindow))
|
||||
{
|
||||
case PublisherState.Zip:
|
||||
case PublisherState.Upload:
|
||||
case PublisherState.Process:
|
||||
return true;
|
||||
default: break;
|
||||
}
|
||||
int availableBuilds = PublisherUtils.GetAllBuildsDirectories()
|
||||
.Where(p => (p != string.Empty)
|
||||
&& PublisherUtils.BuildIsValid(p)).Count();
|
||||
return availableBuilds > 0;
|
||||
}
|
||||
|
||||
bool IsWebGLPublisherOpen()
|
||||
{
|
||||
if (publisherWindow) { return true; }
|
||||
publisherWindow = PublisherWindow.FindInstance();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c3420f187011c1a43824ca0d4c88d6c6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"name": "Unity.Microgame.Tutorials",
|
||||
"references": [
|
||||
"GUID:149cad238efed4f53ac932b1e9555356"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,18 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a231f89d5f90f6b45b04ea196ff35119
|
||||
VideoClipImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
frameRange: 0
|
||||
startFrame: -1
|
||||
endFrame: -1
|
||||
colorSpace: 0
|
||||
deinterlace: 0
|
||||
encodeAlpha: 0
|
||||
flipVertical: 0
|
||||
flipHorizontal: 0
|
||||
importAudio: 1
|
||||
targetSettings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
|
@ -1,18 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4b30147b1a648474289a85d083bfe7d3
|
||||
VideoClipImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
frameRange: 0
|
||||
startFrame: -1
|
||||
endFrame: -1
|
||||
colorSpace: 0
|
||||
deinterlace: 0
|
||||
encodeAlpha: 0
|
||||
flipVertical: 0
|
||||
flipHorizontal: 0
|
||||
importAudio: 1
|
||||
targetSettings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.9 KiB |
|
|
@ -1,92 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 837030d6eaeb92b4aaba503b87f17491
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
applyGammaDecoding: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
|
@ -1,18 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 04d21b8885e76ec4885ffd9fc01efa6d
|
||||
VideoClipImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
frameRange: 0
|
||||
startFrame: -1
|
||||
endFrame: -1
|
||||
colorSpace: 0
|
||||
deinterlace: 0
|
||||
encodeAlpha: 0
|
||||
flipVertical: 0
|
||||
flipHorizontal: 0
|
||||
importAudio: 1
|
||||
targetSettings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.5 KiB |
|
|
@ -1,154 +0,0 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ff771ccdf4150419d9ff4d342b069aae, type: 3}
|
||||
m_Name: Walkthrough7-005
|
||||
m_EditorClassIdentifier:
|
||||
m_Paragraphs:
|
||||
m_Items:
|
||||
- m_Type: 6
|
||||
Title:
|
||||
m_Untranslated:
|
||||
Text:
|
||||
m_Untranslated:
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 2800000, guid: 7047302abcab8496488f93b3f766350d, type: 3}
|
||||
m_Video: {fileID: 0}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items: []
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 1
|
||||
m_UnmaskedViews:
|
||||
- m_SelectorType: 1
|
||||
m_ViewType:
|
||||
m_TypeName:
|
||||
m_EditorWindowType:
|
||||
m_TypeName: Unity.Tutorials.Core.Editor.TutorialWindow, Unity.Tutorials.Core.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_AlternateEditorWindowTypes:
|
||||
m_Items: []
|
||||
m_MaskType: 0
|
||||
m_MaskSizeModifier: 0
|
||||
m_UnmaskedControls: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
- m_Type: 0
|
||||
Title:
|
||||
m_Untranslated: Build, publish, & BONUS
|
||||
Text:
|
||||
m_Untranslated: "Before you publish your game, discover more ways to customize
|
||||
it with the Karting <a href=\"https://learn.unity.com/project/karting-template\">Creative
|
||||
Mods</a>.\n\nWhen you\u2019re ready, this tutorial will guide you through
|
||||
building and publishing your game on a webpage that you can share with
|
||||
friends!\n\n<b>BONUS:</b> by publishing your game, you\u2019ll unlock a
|
||||
self-driving <b>Roadster Kart</b> to use in future builds!\n\n<b>Note:</b>\n\n\u2022
|
||||
The Creative Mods link above will open the Unity Learn website in your
|
||||
default browser.\n\n\u2022 Please keep in mind that building this Unity
|
||||
project can take some time."
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 0}
|
||||
m_Video: {fileID: 0}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items: []
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 0
|
||||
m_UnmaskedViews: []
|
||||
m_Summary: Build and publish
|
||||
m_Description: "Before you publish your game, have you tried adding some of
|
||||
the LEGO\xAE <a href=\"https://learn.unity.com/project/lego-template\">Creative
|
||||
Mods</a> to make it your own? \r\n\r\nWhen you\u2019re ready, this tutorial
|
||||
will guide you through building and publishing your game so your friends
|
||||
and family can play it on a dedicated webpage.\r\n\r\n<b>Notes:</b>\n\n\u2022
|
||||
The Creative Mods link above will open the Unity Learn website in your default
|
||||
browser.\n\n\u2022 Building this Unity project can take some time \u2014
|
||||
please be patient when you complete this tutorial and publish your game.
|
||||
\r"
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
- m_Type: 1
|
||||
Title:
|
||||
m_Untranslated:
|
||||
Text:
|
||||
m_Untranslated: Select <b>Start</b> to begin.
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 0}
|
||||
m_Video: {fileID: 0}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items: []
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 0
|
||||
m_UnmaskedViews: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText: Select <b>Start</b> to begin.
|
||||
m_TutorialButtonText:
|
||||
m_CameraSettings:
|
||||
m_CameraMode: 0
|
||||
m_FocusMode: 0
|
||||
m_Orthographic: 0
|
||||
m_Size: 0
|
||||
m_Pivot: {x: 0, y: 0, z: 0}
|
||||
m_Rotation: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_FrameObject:
|
||||
m_SceneGuid:
|
||||
m_GameObjectGuid:
|
||||
m_SerializedComponentType:
|
||||
m_TypeName:
|
||||
m_ComponentIndex: 0
|
||||
m_AssetObject: {fileID: 0}
|
||||
m_Prefab: {fileID: 0}
|
||||
m_Enabled: 0
|
||||
NextButton:
|
||||
m_Untranslated: Start
|
||||
DoneButton:
|
||||
m_Untranslated: Done
|
||||
m_CompletedSound: {fileID: 8300000, guid: 93fbb109633e844259ea828442bda0cb, type: 3}
|
||||
m_AutoAdvance: 0
|
||||
Showing:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Shown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Staying:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
CriteriaValidated:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
MaskingSettingsChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
NonMaskingSettingsChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnBeforePageShown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnAfterPageShown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnTutorialPageStay:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnBeforeTutorialQuit:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_NextButton: Start
|
||||
m_DoneButton: Done
|
||||
|
|
@ -1,165 +0,0 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-4710486571970311243
|
||||
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: f095ab04ffe3b514c808035bb335fa56, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Completed:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Invalidated:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_EditorWindowType:
|
||||
m_TypeName: Unity.Play.Publisher.Editor.PublisherWindow, Unity.Play.Publisher.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_CloseIfAlreadyOpen: 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: ff771ccdf4150419d9ff4d342b069aae, type: 3}
|
||||
m_Name: Walkthrough7-010
|
||||
m_EditorClassIdentifier:
|
||||
m_Paragraphs:
|
||||
m_Items:
|
||||
- m_Type: 6
|
||||
Title:
|
||||
m_Untranslated:
|
||||
Text:
|
||||
m_Untranslated:
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 2800000, guid: 4ac6c8dffabf68a4893d8a66a9c39792, type: 3}
|
||||
m_Video: {fileID: 32900000, guid: 5b7680371f1b34fe49c339038de4258f, type: 3}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items: []
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 1
|
||||
m_UnmaskedViews:
|
||||
- m_SelectorType: 1
|
||||
m_ViewType:
|
||||
m_TypeName:
|
||||
m_EditorWindowType:
|
||||
m_TypeName: Unity.Tutorials.Core.Editor.TutorialWindow, Unity.Tutorials.Core.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_AlternateEditorWindowTypes:
|
||||
m_Items: []
|
||||
m_MaskType: 0
|
||||
m_MaskSizeModifier: 0
|
||||
m_UnmaskedControls: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
- m_Type: 0
|
||||
Title:
|
||||
m_Untranslated: Open the WebGL Publisher
|
||||
Text:
|
||||
m_Untranslated: "In this tutorial, you\u2019ll export your Microgame project
|
||||
as a WebGL game. Your game will then have its own dedicated webpage. "
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 0}
|
||||
m_Video: {fileID: 0}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items: []
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 0
|
||||
m_UnmaskedViews: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
- m_Type: 1
|
||||
Title:
|
||||
m_Untranslated: Open the WebGL Publisher window
|
||||
Text:
|
||||
m_Untranslated: In the top menu, go to <b>Publish</b> > <b>WebGL project</b>.
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 0}
|
||||
m_Video: {fileID: 0}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items:
|
||||
- Type:
|
||||
m_TypeName: Unity.Tutorials.Core.Editor.EditorWindowCriterion, Unity.Tutorials.Core.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
Criterion: {fileID: -4710486571970311243}
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 0
|
||||
m_UnmaskedViews: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
m_CameraSettings:
|
||||
m_CameraMode: 0
|
||||
m_FocusMode: 0
|
||||
m_Orthographic: 0
|
||||
m_Size: 0
|
||||
m_Pivot: {x: 0, y: 0, z: 0}
|
||||
m_Rotation: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_FrameObject:
|
||||
m_SceneGuid:
|
||||
m_GameObjectGuid:
|
||||
m_SerializedComponentType:
|
||||
m_TypeName:
|
||||
m_ComponentIndex: 0
|
||||
m_AssetObject: {fileID: 0}
|
||||
m_Prefab: {fileID: 0}
|
||||
m_Enabled: 0
|
||||
NextButton:
|
||||
m_Untranslated: Next
|
||||
DoneButton:
|
||||
m_Untranslated: Done
|
||||
m_CompletedSound: {fileID: 8300000, guid: 93fbb109633e844259ea828442bda0cb, type: 3}
|
||||
m_AutoAdvance: 1
|
||||
Showing:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Shown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Staying:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
CriteriaValidated:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
MaskingSettingsChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
NonMaskingSettingsChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnBeforePageShown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnAfterPageShown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnTutorialPageStay:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnBeforeTutorialQuit:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_NextButton:
|
||||
m_DoneButton:
|
||||
|
|
@ -1,177 +0,0 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ff771ccdf4150419d9ff4d342b069aae, type: 3}
|
||||
m_Name: Walkthrough7-013
|
||||
m_EditorClassIdentifier:
|
||||
m_Paragraphs:
|
||||
m_Items:
|
||||
- m_Type: 7
|
||||
Title:
|
||||
m_Untranslated:
|
||||
Text:
|
||||
m_Untranslated:
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 2800000, guid: 8397db88d32d5418e8ebc7e6bb6ccafc, type: 3}
|
||||
m_Video: {fileID: 32900000, guid: 4b30147b1a648474289a85d083bfe7d3, type: 3}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items: []
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 1
|
||||
m_UnmaskedViews:
|
||||
- m_SelectorType: 1
|
||||
m_ViewType:
|
||||
m_TypeName:
|
||||
m_EditorWindowType:
|
||||
m_TypeName: Unity.Play.Publisher.Editor.PublisherWindow, Unity.Play.Publisher.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_AlternateEditorWindowTypes:
|
||||
m_Items: []
|
||||
m_MaskType: 0
|
||||
m_MaskSizeModifier: 0
|
||||
m_UnmaskedControls: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
- m_Type: 0
|
||||
Title:
|
||||
m_Untranslated: Get started
|
||||
Text:
|
||||
m_Untranslated: "Now that you\u2019ve opened the <b>WebGL Publisher</b> window,
|
||||
you can set up the Unity Editor to publish projects on Unity Play."
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 0}
|
||||
m_Video: {fileID: 0}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items: []
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 0
|
||||
m_UnmaskedViews: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
- m_Type: 1
|
||||
Title:
|
||||
m_Untranslated:
|
||||
Text:
|
||||
m_Untranslated: Select <b>Get Started</b> in the <b>WebGL Publisher</b> window.
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 0}
|
||||
m_Video: {fileID: 0}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items:
|
||||
- Type:
|
||||
m_TypeName: Unity.Tutorials.Core.Editor.ArbitraryCriterion, Unity.Tutorials.Core.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
Criterion: {fileID: 1171428662055131150}
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 0
|
||||
m_UnmaskedViews: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
m_CameraSettings:
|
||||
m_CameraMode: 0
|
||||
m_FocusMode: 0
|
||||
m_Orthographic: 0
|
||||
m_Size: 0
|
||||
m_Pivot: {x: 0, y: 0, z: 0}
|
||||
m_Rotation: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_FrameObject:
|
||||
m_SceneGuid:
|
||||
m_GameObjectGuid:
|
||||
m_SerializedComponentType:
|
||||
m_TypeName:
|
||||
m_ComponentIndex: 0
|
||||
m_AssetObject: {fileID: 0}
|
||||
m_Prefab: {fileID: 0}
|
||||
m_Enabled: 0
|
||||
NextButton:
|
||||
m_Untranslated: Next
|
||||
DoneButton:
|
||||
m_Untranslated: Done
|
||||
m_CompletedSound: {fileID: 8300000, guid: 93fbb109633e844259ea828442bda0cb, type: 3}
|
||||
m_AutoAdvance: 1
|
||||
Showing:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Shown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Staying:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
CriteriaValidated:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
MaskingSettingsChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
NonMaskingSettingsChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnBeforePageShown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnAfterPageShown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnTutorialPageStay:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnBeforeTutorialQuit:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_NextButton:
|
||||
m_DoneButton:
|
||||
--- !u!114 &1171428662055131150
|
||||
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: 7231e8df50e16c74c979c4a2affab91b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Completed:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Invalidated:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Callback:
|
||||
_target: {fileID: 11400000, guid: 43f99256ccd065c47b41dc50b89eb706, type: 2}
|
||||
_methodName: IsNotDisplayingFirstTimeInstructions
|
||||
_args: []
|
||||
_dynamic: 0
|
||||
_typeName: Unity.Tutorials.Core.Editor.ArbitraryCriterion+BoolCallback, Unity.Tutorials.Core.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
dirty: 0
|
||||
m_AutoCompleteCallback:
|
||||
_target: {fileID: 0}
|
||||
_methodName:
|
||||
_args: []
|
||||
_dynamic: 0
|
||||
_typeName: Unity.Tutorials.Core.Editor.ArbitraryCriterion+BoolCallback, Unity.Tutorials.Core.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
dirty: 0
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 97f3ee3958d87894d8f23cc258f28f0e
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,177 +0,0 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ff771ccdf4150419d9ff4d342b069aae, type: 3}
|
||||
m_Name: Walkthrough7-014
|
||||
m_EditorClassIdentifier:
|
||||
m_Paragraphs:
|
||||
m_Items:
|
||||
- m_Type: 6
|
||||
Title:
|
||||
m_Untranslated:
|
||||
Text:
|
||||
m_Untranslated:
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 2800000, guid: e430ed4d1b31c0f47952237586390b14, type: 3}
|
||||
m_Video: {fileID: 0}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items: []
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 1
|
||||
m_UnmaskedViews:
|
||||
- m_SelectorType: 1
|
||||
m_ViewType:
|
||||
m_TypeName:
|
||||
m_EditorWindowType:
|
||||
m_TypeName: Unity.Play.Publisher.Editor.PublisherWindow, Unity.Play.Publisher.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_AlternateEditorWindowTypes:
|
||||
m_Items: []
|
||||
m_MaskType: 0
|
||||
m_MaskSizeModifier: 0
|
||||
m_UnmaskedControls: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
- m_Type: 0
|
||||
Title:
|
||||
m_Untranslated: Sign in
|
||||
Text:
|
||||
m_Untranslated: To publish your game on Unity Play, you need to sign in with
|
||||
your Unity ID.
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 0}
|
||||
m_Video: {fileID: 0}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items: []
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 0
|
||||
m_UnmaskedViews: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
- m_Type: 1
|
||||
Title:
|
||||
m_Untranslated:
|
||||
Text:
|
||||
m_Untranslated: Select <b>Sign in</b>, then sign in with your Unity ID.
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 0}
|
||||
m_Video: {fileID: 0}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items:
|
||||
- Type:
|
||||
m_TypeName: Unity.Tutorials.Core.Editor.ArbitraryCriterion, Unity.Tutorials.Core.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
Criterion: {fileID: 1171428662055131150}
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 0
|
||||
m_UnmaskedViews: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
m_CameraSettings:
|
||||
m_CameraMode: 0
|
||||
m_FocusMode: 0
|
||||
m_Orthographic: 0
|
||||
m_Size: 0
|
||||
m_Pivot: {x: 0, y: 0, z: 0}
|
||||
m_Rotation: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_FrameObject:
|
||||
m_SceneGuid:
|
||||
m_GameObjectGuid:
|
||||
m_SerializedComponentType:
|
||||
m_TypeName:
|
||||
m_ComponentIndex: 0
|
||||
m_AssetObject: {fileID: 0}
|
||||
m_Prefab: {fileID: 0}
|
||||
m_Enabled: 0
|
||||
NextButton:
|
||||
m_Untranslated: Next
|
||||
DoneButton:
|
||||
m_Untranslated: Done
|
||||
m_CompletedSound: {fileID: 8300000, guid: 93fbb109633e844259ea828442bda0cb, type: 3}
|
||||
m_AutoAdvance: 1
|
||||
Showing:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Shown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Staying:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
CriteriaValidated:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
MaskingSettingsChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
NonMaskingSettingsChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnBeforePageShown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnAfterPageShown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnTutorialPageStay:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnBeforeTutorialQuit:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_NextButton:
|
||||
m_DoneButton:
|
||||
--- !u!114 &1171428662055131150
|
||||
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: 7231e8df50e16c74c979c4a2affab91b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Completed:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Invalidated:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Callback:
|
||||
_target: {fileID: 11400000, guid: 43f99256ccd065c47b41dc50b89eb706, type: 2}
|
||||
_methodName: IsUserLoggedIn
|
||||
_args: []
|
||||
_dynamic: 0
|
||||
_typeName: Unity.Tutorials.Core.Editor.ArbitraryCriterion+BoolCallback, Unity.Tutorials.Core.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
dirty: 0
|
||||
m_AutoCompleteCallback:
|
||||
_target: {fileID: 0}
|
||||
_methodName:
|
||||
_args: []
|
||||
_dynamic: 0
|
||||
_typeName: Unity.Tutorials.Core.Editor.ArbitraryCriterion+BoolCallback, Unity.Tutorials.Core.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
dirty: 0
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: eb4604b43980b3740a07722643b2ecbe
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,207 +0,0 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-682297016320248225
|
||||
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: 7231e8df50e16c74c979c4a2affab91b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Completed:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Invalidated:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Callback:
|
||||
_target: {fileID: 11400000, guid: 43f99256ccd065c47b41dc50b89eb706, type: 2}
|
||||
_methodName: AtLeastOneBuildIsRegistered
|
||||
_args: []
|
||||
_dynamic: 0
|
||||
_typeName: Unity.Tutorials.Core.Editor.ArbitraryCriterion+BoolCallback, Unity.Tutorials.Core.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
dirty: 0
|
||||
m_AutoCompleteCallback:
|
||||
_target: {fileID: 0}
|
||||
_methodName:
|
||||
_args: []
|
||||
_dynamic: 0
|
||||
_typeName: Unity.Tutorials.Core.Editor.ArbitraryCriterion+BoolCallback, Unity.Tutorials.Core.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
dirty: 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: ff771ccdf4150419d9ff4d342b069aae, type: 3}
|
||||
m_Name: Walkthrough7-015
|
||||
m_EditorClassIdentifier:
|
||||
m_Paragraphs:
|
||||
m_Items:
|
||||
- m_Type: 7
|
||||
Title:
|
||||
m_Untranslated:
|
||||
Text:
|
||||
m_Untranslated:
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 2800000, guid: 8397db88d32d5418e8ebc7e6bb6ccafc, type: 3}
|
||||
m_Video: {fileID: 32900000, guid: a231f89d5f90f6b45b04ea196ff35119, type: 3}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items: []
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 1
|
||||
m_UnmaskedViews:
|
||||
- m_SelectorType: 1
|
||||
m_ViewType:
|
||||
m_TypeName:
|
||||
m_EditorWindowType:
|
||||
m_TypeName: Unity.Play.Publisher.Editor.PublisherWindow, Unity.Play.Publisher.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_AlternateEditorWindowTypes:
|
||||
m_Items: []
|
||||
m_MaskType: 0
|
||||
m_MaskSizeModifier: 0
|
||||
m_UnmaskedControls: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
- m_Type: 0
|
||||
Title:
|
||||
m_Untranslated: Build your game
|
||||
Text:
|
||||
m_Untranslated: "Before you can publish your game, you need to build it.
|
||||
This will create a playable file of your game on your computer.\n\n<b>Notes:</b>\n\n\u2022
|
||||
This step could take up to 30 minutes.\n\n\u2022 If you are prompted to
|
||||
switch to WebGL, click <b>\"Switch to WebGL\"</b> and choose a folder for
|
||||
your build in the window that appears. \n\n\u2022 You can use the default
|
||||
folder, or create a new folder to store your build files."
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 0}
|
||||
m_Video: {fileID: 0}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items: []
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 0
|
||||
m_UnmaskedViews: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
- m_Type: 1
|
||||
Title:
|
||||
m_Untranslated:
|
||||
Text:
|
||||
m_Untranslated: 'Select <b>Build and Publish</b>.
|
||||
|
||||
|
||||
When your build
|
||||
is complete, select <b>Next</b> to continue.'
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 0}
|
||||
m_Video: {fileID: 0}
|
||||
m_CriteriaCompletion: 1
|
||||
m_Criteria:
|
||||
m_Items:
|
||||
- Type:
|
||||
m_TypeName: Unity.Tutorials.Core.Editor.BuildStartedCriterion, Unity.Tutorials.Core.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
Criterion: {fileID: 4935916112382527856}
|
||||
- Type:
|
||||
m_TypeName: Unity.Tutorials.Core.Editor.ArbitraryCriterion, Unity.Tutorials.Core.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
Criterion: {fileID: -682297016320248225}
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 0
|
||||
m_UnmaskedViews: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
m_CameraSettings:
|
||||
m_CameraMode: 0
|
||||
m_FocusMode: 0
|
||||
m_Orthographic: 0
|
||||
m_Size: 0
|
||||
m_Pivot: {x: 0, y: 0, z: 0}
|
||||
m_Rotation: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_FrameObject:
|
||||
m_SceneGuid:
|
||||
m_GameObjectGuid:
|
||||
m_SerializedComponentType:
|
||||
m_TypeName:
|
||||
m_ComponentIndex: 0
|
||||
m_AssetObject: {fileID: 0}
|
||||
m_Prefab: {fileID: 0}
|
||||
m_Enabled: 0
|
||||
NextButton:
|
||||
m_Untranslated: Next
|
||||
DoneButton:
|
||||
m_Untranslated: Done
|
||||
m_CompletedSound: {fileID: 8300000, guid: 93fbb109633e844259ea828442bda0cb, type: 3}
|
||||
m_AutoAdvance: 1
|
||||
Showing:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Shown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Staying:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
CriteriaValidated:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
MaskingSettingsChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
NonMaskingSettingsChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnBeforePageShown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnAfterPageShown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnTutorialPageStay:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnBeforeTutorialQuit:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_NextButton:
|
||||
m_DoneButton:
|
||||
--- !u!114 &4935916112382527856
|
||||
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: 17ecd043c7572b4429873c0f8ef1cae2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Completed:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Invalidated:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: daafa2d048ca372498d84eb1ff8a9a31
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,180 +0,0 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-2340161092345423632
|
||||
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: 7231e8df50e16c74c979c4a2affab91b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Completed:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Invalidated:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Callback:
|
||||
_target: {fileID: 11400000, guid: 43f99256ccd065c47b41dc50b89eb706, type: 2}
|
||||
_methodName: IsBuildBeingUploaded
|
||||
_args: []
|
||||
_dynamic: 0
|
||||
_typeName: Unity.Tutorials.Core.Editor.ArbitraryCriterion+BoolCallback, Unity.Tutorials.Core.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
dirty: 0
|
||||
m_AutoCompleteCallback:
|
||||
_target: {fileID: 0}
|
||||
_methodName:
|
||||
_args: []
|
||||
_dynamic: 0
|
||||
_typeName: Unity.Tutorials.Core.Editor.ArbitraryCriterion+BoolCallback, Unity.Tutorials.Core.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
dirty: 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: ff771ccdf4150419d9ff4d342b069aae, type: 3}
|
||||
m_Name: Walkthrough7-020
|
||||
m_EditorClassIdentifier:
|
||||
m_Paragraphs:
|
||||
m_Items:
|
||||
- m_Type: 7
|
||||
Title:
|
||||
m_Untranslated:
|
||||
Text:
|
||||
m_Untranslated:
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 2800000, guid: 8397db88d32d5418e8ebc7e6bb6ccafc, type: 3}
|
||||
m_Video: {fileID: 32900000, guid: 04d21b8885e76ec4885ffd9fc01efa6d, type: 3}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items: []
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 1
|
||||
m_UnmaskedViews:
|
||||
- m_SelectorType: 1
|
||||
m_ViewType:
|
||||
m_TypeName:
|
||||
m_EditorWindowType:
|
||||
m_TypeName: Unity.Play.Publisher.Editor.PublisherWindow, Unity.Play.Publisher.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_AlternateEditorWindowTypes:
|
||||
m_Items: []
|
||||
m_MaskType: 0
|
||||
m_MaskSizeModifier: 0
|
||||
m_UnmaskedControls: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
- m_Type: 0
|
||||
Title:
|
||||
m_Untranslated: Publish your game
|
||||
Text:
|
||||
m_Untranslated: 'Now that your build is ready, you can publish it on Unity
|
||||
Play!
|
||||
|
||||
|
||||
<b>Note:</b> This step could take up to 30 minutes.'
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 0}
|
||||
m_Video: {fileID: 0}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items: []
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 0
|
||||
m_UnmaskedViews: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
- m_Type: 1
|
||||
Title:
|
||||
m_Untranslated:
|
||||
Text:
|
||||
m_Untranslated: Select <b>Publish</b> to publish your build on Unity Play.
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 0}
|
||||
m_Video: {fileID: 0}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items:
|
||||
- Type:
|
||||
m_TypeName: Unity.Tutorials.Core.Editor.ArbitraryCriterion, Unity.Tutorials.Core.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
Criterion: {fileID: -2340161092345423632}
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 0
|
||||
m_UnmaskedViews: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
m_CameraSettings:
|
||||
m_CameraMode: 0
|
||||
m_FocusMode: 0
|
||||
m_Orthographic: 0
|
||||
m_Size: 0
|
||||
m_Pivot: {x: 0, y: 0, z: 0}
|
||||
m_Rotation: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_FrameObject:
|
||||
m_SceneGuid:
|
||||
m_GameObjectGuid:
|
||||
m_SerializedComponentType:
|
||||
m_TypeName:
|
||||
m_ComponentIndex: 0
|
||||
m_AssetObject: {fileID: 0}
|
||||
m_Prefab: {fileID: 0}
|
||||
m_Enabled: 0
|
||||
NextButton:
|
||||
m_Untranslated: Next
|
||||
DoneButton:
|
||||
m_Untranslated: Done
|
||||
m_CompletedSound: {fileID: 8300000, guid: 93fbb109633e844259ea828442bda0cb, type: 3}
|
||||
m_AutoAdvance: 1
|
||||
Showing:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Shown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Staying:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
CriteriaValidated:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
MaskingSettingsChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
NonMaskingSettingsChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnBeforePageShown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnAfterPageShown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnTutorialPageStay:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnBeforeTutorialQuit:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_NextButton:
|
||||
m_DoneButton:
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6f964d3cc40f45747aebcf0c57f609ba
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,177 +0,0 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-2340161092345423632
|
||||
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: 7231e8df50e16c74c979c4a2affab91b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Completed:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Invalidated:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Callback:
|
||||
_target: {fileID: 11400000, guid: 43f99256ccd065c47b41dc50b89eb706, type: 2}
|
||||
_methodName: IsBuildPublished
|
||||
_args: []
|
||||
_dynamic: 0
|
||||
_typeName: Unity.Tutorials.Core.Editor.ArbitraryCriterion+BoolCallback, Unity.Tutorials.Core.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
dirty: 0
|
||||
m_AutoCompleteCallback:
|
||||
_target: {fileID: 0}
|
||||
_methodName:
|
||||
_args: []
|
||||
_dynamic: 0
|
||||
_typeName: Unity.Tutorials.Core.Editor.ArbitraryCriterion+BoolCallback, Unity.Tutorials.Core.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
dirty: 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: ff771ccdf4150419d9ff4d342b069aae, type: 3}
|
||||
m_Name: Walkthrough7-025
|
||||
m_EditorClassIdentifier:
|
||||
m_Paragraphs:
|
||||
m_Items:
|
||||
- m_Type: 7
|
||||
Title:
|
||||
m_Untranslated:
|
||||
Text:
|
||||
m_Untranslated:
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 0}
|
||||
m_Video: {fileID: 32900000, guid: 04d21b8885e76ec4885ffd9fc01efa6d, type: 3}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items: []
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 1
|
||||
m_UnmaskedViews:
|
||||
- m_SelectorType: 1
|
||||
m_ViewType:
|
||||
m_TypeName:
|
||||
m_EditorWindowType:
|
||||
m_TypeName: Unity.Play.Publisher.Editor.PublisherWindow, Unity.Play.Publisher.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_AlternateEditorWindowTypes:
|
||||
m_Items: []
|
||||
m_MaskType: 0
|
||||
m_MaskSizeModifier: 0
|
||||
m_UnmaskedControls: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
- m_Type: 0
|
||||
Title:
|
||||
m_Untranslated: Your game is being processed
|
||||
Text:
|
||||
m_Untranslated: "Your game is uploading to Unity Play. \n\nIn a few minutes,
|
||||
you'll be able to share your game with your friends!"
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 0}
|
||||
m_Video: {fileID: 0}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items: []
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 0
|
||||
m_UnmaskedViews: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
- m_Type: 1
|
||||
Title:
|
||||
m_Untranslated:
|
||||
Text:
|
||||
m_Untranslated:
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 0}
|
||||
m_Video: {fileID: 0}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items:
|
||||
- Type:
|
||||
m_TypeName: Unity.Tutorials.Core.Editor.ArbitraryCriterion, Unity.Tutorials.Core.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
Criterion: {fileID: -2340161092345423632}
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 0
|
||||
m_UnmaskedViews: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
m_CameraSettings:
|
||||
m_CameraMode: 0
|
||||
m_FocusMode: 0
|
||||
m_Orthographic: 0
|
||||
m_Size: 0
|
||||
m_Pivot: {x: 0, y: 0, z: 0}
|
||||
m_Rotation: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_FrameObject:
|
||||
m_SceneGuid:
|
||||
m_GameObjectGuid:
|
||||
m_SerializedComponentType:
|
||||
m_TypeName:
|
||||
m_ComponentIndex: 0
|
||||
m_AssetObject: {fileID: 0}
|
||||
m_Prefab: {fileID: 0}
|
||||
m_Enabled: 0
|
||||
NextButton:
|
||||
m_Untranslated: Next
|
||||
DoneButton:
|
||||
m_Untranslated: Done
|
||||
m_CompletedSound: {fileID: 8300000, guid: 93fbb109633e844259ea828442bda0cb, type: 3}
|
||||
m_AutoAdvance: 1
|
||||
Showing:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Shown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Staying:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
CriteriaValidated:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
MaskingSettingsChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
NonMaskingSettingsChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnBeforePageShown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnAfterPageShown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnTutorialPageStay:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnBeforeTutorialQuit:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_NextButton:
|
||||
m_DoneButton:
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9903de0d10380094eb753dcdac1f5e68
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,156 +0,0 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ff771ccdf4150419d9ff4d342b069aae, type: 3}
|
||||
m_Name: Walkthrough7-030
|
||||
m_EditorClassIdentifier:
|
||||
m_Paragraphs:
|
||||
m_Items:
|
||||
- m_Type: 6
|
||||
Title:
|
||||
m_Untranslated:
|
||||
Text:
|
||||
m_Untranslated:
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 2800000, guid: 8d0bf2defb8cb734fb0a63a9aa031ee7, type: 3}
|
||||
m_Video: {fileID: 0}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items: []
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 0
|
||||
m_UnmaskedViews:
|
||||
- m_SelectorType: 1
|
||||
m_ViewType:
|
||||
m_TypeName:
|
||||
m_EditorWindowType:
|
||||
m_TypeName: Unity.Connect.Share.Editor.ShareWindow, Unity.Connect.Share.Editor,
|
||||
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_AlternateEditorWindowTypes:
|
||||
m_Items: []
|
||||
m_MaskType: 0
|
||||
m_MaskSizeModifier: 0
|
||||
m_UnmaskedControls: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
- m_Type: 0
|
||||
Title:
|
||||
m_Untranslated: Share your game
|
||||
Text:
|
||||
m_Untranslated: "You\u2019re almost ready to share! Before you do, add some
|
||||
details for your game directly on Unity Play: a title, description, and
|
||||
a thumbnail, if you like.\n\nIt\u2019s also a good idea to test one more
|
||||
time, to make sure that everything works as expected.\n\n<b>Your journey
|
||||
doesn't end here:</b>\n\n\u2022 When you\u2019re ready, share the link
|
||||
so others can play your game!\n\n\u2022 After publishing your game, you\u2019ll
|
||||
find the bonus <b>Roadster Kart</b> added to <b>My Assets</b> in the Unity
|
||||
Asset Store. Go check it out!\n\n\u2022 You can <a href=\"https://learn.unity.com/project/karting-template\">try
|
||||
out the Creative Mods</a> and explore other Microgames on <a href=\"https://learn.unity.com/\">Unity
|
||||
Learn!</a> These links will open in your default browser window.\n\n\u2022
|
||||
Learn more about Unity and continue your creator journey with <a href=\"https://learn.unity.com/pathway/unity-essentials\">Unity
|
||||
Essentials!</a>"
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 0}
|
||||
m_Video: {fileID: 0}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items: []
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 0
|
||||
m_UnmaskedViews: []
|
||||
m_Summary: Share your game
|
||||
m_Description: "You\u2019re almost ready to share! Before you do, add some
|
||||
details for your game directly on Unity Play: a title, description, and a
|
||||
thumbnail if you want.\n\nIt\u2019s also a good idea to test that everything
|
||||
works as expected one more time.\n\n<b>Your journey doesn't end here:</b>\n\n\u2022
|
||||
When you\u2019re ready, share the link so others can play your game!\n\n\u2022
|
||||
You can <a href=\"https://learn.unity.com/project/lego-template\">add more
|
||||
Mods to your game</a> and explore other Microgames on <a href=\"https://learn.unity.com/\">Unity
|
||||
Learn!</a> These links will open in your default browser window."
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText:
|
||||
m_TutorialButtonText:
|
||||
- m_Type: 1
|
||||
Title:
|
||||
m_Untranslated:
|
||||
Text:
|
||||
m_Untranslated: Select <b>Done</b> to return to the tutorial overview.
|
||||
m_Tutorial: {fileID: 0}
|
||||
m_Image: {fileID: 0}
|
||||
m_Video: {fileID: 0}
|
||||
m_CriteriaCompletion: 0
|
||||
m_Criteria:
|
||||
m_Items: []
|
||||
m_MaskingSettings:
|
||||
m_MaskingEnabled: 0
|
||||
m_UnmaskedViews: []
|
||||
m_Summary:
|
||||
m_Description:
|
||||
m_InstructionBoxTitle:
|
||||
m_InstructionText: Select <b>Done</b> to return to the tutorial overview.
|
||||
m_TutorialButtonText:
|
||||
m_CameraSettings:
|
||||
m_CameraMode: 0
|
||||
m_FocusMode: 0
|
||||
m_Orthographic: 0
|
||||
m_Size: 0
|
||||
m_Pivot: {x: 0, y: 0, z: 0}
|
||||
m_Rotation: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_FrameObject:
|
||||
m_SceneGuid:
|
||||
m_GameObjectGuid:
|
||||
m_SerializedComponentType:
|
||||
m_TypeName:
|
||||
m_ComponentIndex: 0
|
||||
m_AssetObject: {fileID: 0}
|
||||
m_Prefab: {fileID: 0}
|
||||
m_Enabled: 0
|
||||
NextButton:
|
||||
m_Untranslated: Next
|
||||
DoneButton:
|
||||
m_Untranslated: Done
|
||||
m_CompletedSound: {fileID: 8300000, guid: 93fbb109633e844259ea828442bda0cb, type: 3}
|
||||
m_AutoAdvance: 0
|
||||
Showing:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Shown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
Staying:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
CriteriaValidated:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
MaskingSettingsChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
NonMaskingSettingsChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnBeforePageShown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnAfterPageShown:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnTutorialPageStay:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_OnBeforeTutorialQuit:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_NextButton: Next
|
||||
m_DoneButton: Done
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5ae42c0e96418ec46b613bb3c92bb7b3
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.0 KiB |
|
|
@ -51,7 +51,7 @@ namespace Unity.Tutorials
|
|||
|
||||
public void StartTutorial(Tutorial tutorial)
|
||||
{
|
||||
TutorialManager.Instance.StartTutorial(tutorial);
|
||||
TutorialWindowUtils.StartTutorial(tutorial);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fd283cf39e183a04d814b09c20b2a810, type: 3}
|
||||
m_Name: New Graph Data Schema
|
||||
m_EditorClassIdentifier:
|
||||
sheetName: "\u6280\u80FD"
|
||||
fields:
|
||||
- fieldName: ID
|
||||
excelColumnName: NodeID
|
||||
fieldType: 1
|
||||
- fieldName: name
|
||||
excelColumnName: NodeName
|
||||
fieldType: 0
|
||||
- fieldName: comment
|
||||
excelColumnName: "\u63CF\u8FF0"
|
||||
fieldType: 0
|
||||
nodeTypeFilter: []
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
{
|
||||
"name": "NodeCanvas",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:66c2eb417c67ad849907d0769db96dbf"
|
||||
"GUID:66c2eb417c67ad849907d0769db96dbf",
|
||||
"GUID:a54b96d5ddd2c488aadb7e2cb0921b9b",
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||
"GUID:09dcc9c0126b6b34ab2a877b8f2277f5"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: dac0a55ce952bd643ab858cfb121d36b
|
||||
guid: 30e0fd23302094445aea750c6b3b486c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
using NodeCanvas.Framework;
|
||||
using ParadoxNotion.Design;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NLD.Nodes
|
||||
{
|
||||
[Category("Math")] // 出现在右键菜单的 Math 分类下
|
||||
[Description("取变量A的绝对值输出变量B")]
|
||||
public class FloatAbs : ActionTask {
|
||||
public BBParameter<float> input;
|
||||
[BlackboardOnly]
|
||||
public BBParameter<float> result;
|
||||
|
||||
protected override void OnExecute() {
|
||||
result.value = Mathf.Abs(input.value);
|
||||
EndAction(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 25cde69a219386b44bccc0c08271bdc2
|
||||
guid: e5b6728fff9754e4bb1b422c09332ac5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
using NodeCanvas.Framework;
|
||||
using ParadoxNotion.Design;
|
||||
|
||||
namespace NLD.Nodes
|
||||
{
|
||||
[Category("Math")] // 出现在右键菜单的 Math 分类下
|
||||
[Description("变量A+变量B输出变量C")]
|
||||
public class FloatAdd : ActionTask {
|
||||
public BBParameter<float> A;
|
||||
public BBParameter<float> B;
|
||||
|
||||
[BlackboardOnly]
|
||||
public BBParameter<float> C;
|
||||
|
||||
protected override void OnExecute() {
|
||||
C.value = A.value + B.value;
|
||||
EndAction(true); // 瞬间执行完
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b8409462a7f3e4d46a886d68e7626d94
|
||||
guid: f448a65cd81636a4b8fb655f0ca97cd0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
using NodeCanvas.Framework;
|
||||
using ParadoxNotion.Design;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using KartGame.KartSystems;
|
||||
|
||||
namespace NLD.Nodes
|
||||
{
|
||||
[Category("VehicleControl")]
|
||||
[Name("Get Joystick Context")]
|
||||
[Description("实时提取摇杆 Vector2 并拆分为 X(转向) 和 Y(油门) 输出")]
|
||||
public class GetJoystickContext : ActionTask
|
||||
{
|
||||
[RequiredField]
|
||||
public BBParameter<InputActionReference> joystickAction;
|
||||
|
||||
[BlackboardOnly]
|
||||
public BBParameter<float> outputX; // 对应转向 (Horizontal)
|
||||
|
||||
[BlackboardOnly]
|
||||
public BBParameter<float> outputY; // 对应油门 (Vertical)
|
||||
|
||||
protected override void OnUpdate() {
|
||||
if (joystickAction.value == null) return;
|
||||
|
||||
// 获取当前上下文的 Vector2 坐标
|
||||
Vector2 pos = joystickAction.value.action.ReadValue<Vector2>();
|
||||
|
||||
// 拆分并存入黑板变量
|
||||
outputX.value = pos.x;
|
||||
outputY.value = pos.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f68ed535e8fe19d43ba9ae227e07c76d
|
||||
guid: 876e073f19999c74595e790ac54463b2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
using NodeCanvas.Framework;
|
||||
using ParadoxNotion.Design;
|
||||
using KartGame.KartSystems; // 确保指向你的载具命名空间
|
||||
|
||||
|
||||
namespace NLD.Nodes
|
||||
{
|
||||
[Category("VehicleControl")]
|
||||
[Description("将 NodeCanvas 黑板中的数据实时同步到 BaseInput 抽象层")]
|
||||
public class SetVehicleInput : ActionTask<BaseInput>
|
||||
{
|
||||
[RequiredField]
|
||||
public BBParameter<float> accelerate;
|
||||
public BBParameter<float> turn;
|
||||
public BBParameter<bool> brake;
|
||||
|
||||
[Header("档位和传动")]
|
||||
public BBParameter<GearMode> gear;
|
||||
public BBParameter<DriveTrainMode> driveMode;
|
||||
|
||||
[Header("电气与启停")]
|
||||
public BBParameter<bool> headlights;
|
||||
public BBParameter<bool> engineOn;
|
||||
|
||||
// OnUpdate 会在行为树运行到该节点时每帧执行
|
||||
protected override void OnUpdate() {
|
||||
if (agent == null) return;
|
||||
|
||||
// 1. 同步基础移动
|
||||
agent.SetMovement(accelerate.value, turn.value, brake.value);
|
||||
|
||||
// 2. 同步档位与驱动
|
||||
agent.SetGear(gear.value);
|
||||
agent.SetDriveMode(driveMode.value);
|
||||
|
||||
// 3. 同步其他系统
|
||||
agent.SetLights(headlights.value);
|
||||
agent.SetEngineStatus(engineOn.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0553e70a8240d014b8956fe6859bb522
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -38,6 +38,14 @@ MonoBehaviour:
|
|||
type: 3}
|
||||
objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486,
|
||||
type: 3}
|
||||
dataDrivenLensFlare: {fileID: 4800000, guid: 6cda457ac28612740adb23da5d39ea92,
|
||||
type: 3}
|
||||
terrainDetailLitPS: {fileID: 4800000, guid: f6783ab646d374f94b199774402a5144,
|
||||
type: 3}
|
||||
terrainDetailGrassPS: {fileID: 4800000, guid: e507fdfead5ca47e8b9a768b51c291a1,
|
||||
type: 3}
|
||||
terrainDetailGrassBillboardPS: {fileID: 4800000, guid: 29868e73b638e48ca99a19ea58c48d90,
|
||||
type: 3}
|
||||
m_AssetVersion: 2
|
||||
m_OpaqueLayerMask:
|
||||
serializedVersion: 2
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: efb2368ee8bed9140a42c2805613ed11
|
||||
guid: bea343b9900271546b0205334acdc3bb
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f96b48dd45cbd804ab3b88d6d060fa33
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,6 +1,6 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 91426e0839faeb34d86ad8835bdfb743
|
||||
AssemblyDefinitionImporter:
|
||||
guid: 1a4b80bda286fc945af99cf36acd6546
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue