Browse Source

flag added to override current wp

main
cailean 10 months ago
parent
commit
0e7002ab22
  1. 226
      Assets/15_Prefabs/Waypoints.prefab
  2. 264
      Assets/6_Scenes/Beep.unity
  3. 7
      Assets/7_Scripts/Model Swapping/ModelSwap.cs
  4. 14
      Assets/7_Scripts/Waypoint/Waypoint.cs
  5. 17
      Assets/7_Scripts/Waypoint/WaypointManager.cs
  6. 2
      Assets/ML-Agents/Timers/Beep_timers.json
  7. 16
      Assets/Settings/HDRPDefaultResources/DefaultSettingsVolumeProfile.asset

226
Assets/15_Prefabs/Waypoints.prefab

@ -27,7 +27,7 @@ Transform:
m_GameObject: {fileID: 209990532492095435}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -19.49, y: -17.83, z: 122.54}
m_LocalPosition: {x: -2.4, y: -32.8, z: 82.33}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
@ -47,7 +47,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_WaypointPosition: {fileID: 6868380804102066130}
m_WaitTime: 0
m_ModelName: Walker
m_ModelName: Climber
m_Index: 0
m_Touched: 0
--- !u!65 &4335030826809746649
@ -71,6 +71,77 @@ BoxCollider:
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &2362562022282731342
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 322217618113553874}
- component: {fileID: 49413528898332131}
- component: {fileID: 8995364599858444108}
m_Layer: 0
m_Name: Waypoint (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &322217618113553874
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2362562022282731342}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -13.6, y: -32.7, z: 77.1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8202717142006031211}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &49413528898332131
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2362562022282731342}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a5c81c2052c91a74a8d9fae388fca038, type: 3}
m_Name:
m_EditorClassIdentifier:
m_WaypointPosition: {fileID: 322217618113553874}
m_WaitTime: 0
m_ModelName: Walker
m_Index: 2
m_Touched: 0
--- !u!65 &8995364599858444108
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2362562022282731342}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 1
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &4823915812732403376
GameObject:
m_ObjectHideFlags: 0
@ -102,6 +173,9 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6868380804102066130}
- {fileID: 3984493130856861062}
- {fileID: 322217618113553874}
- {fileID: 1594025285695098325}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3428618077651019461
@ -116,6 +190,152 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1f83b258daac8e846bed96ffebb253e3, type: 3}
m_Name:
m_EditorClassIdentifier:
m_WaypointList: []
m_WaypointList:
- {fileID: 2913576066548479887}
- {fileID: 2663865915400535980}
- {fileID: 49413528898332131}
- {fileID: 2682402785939406760}
m_Target: {fileID: 0}
m_CurrentWaypoint: {fileID: 2913576066548479887}
--- !u!1 &5987063858495885095
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1594025285695098325}
- component: {fileID: 2682402785939406760}
- component: {fileID: 6841600456297735987}
m_Layer: 0
m_Name: Waypoint (3)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1594025285695098325
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5987063858495885095}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -13.6, y: -32.7, z: 94.3}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8202717142006031211}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2682402785939406760
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5987063858495885095}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a5c81c2052c91a74a8d9fae388fca038, type: 3}
m_Name:
m_EditorClassIdentifier:
m_WaypointPosition: {fileID: 1594025285695098325}
m_WaitTime: 0
m_ModelName: Walker
m_Index: 3
m_Touched: 0
--- !u!65 &6841600456297735987
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5987063858495885095}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 1
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &6158526685412160350
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3984493130856861062}
- component: {fileID: 2663865915400535980}
- component: {fileID: 6449605724862047671}
m_Layer: 0
m_Name: Waypoint (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3984493130856861062
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6158526685412160350}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 9.9, y: -29.94, z: 82.33}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8202717142006031211}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2663865915400535980
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6158526685412160350}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a5c81c2052c91a74a8d9fae388fca038, type: 3}
m_Name:
m_EditorClassIdentifier:
m_WaypointPosition: {fileID: 3984493130856861062}
m_WaitTime: 2
m_ModelName: Walker
m_Index: 1
m_Touched: 0
--- !u!65 &6449605724862047671
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6158526685412160350}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 1
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}

264
Assets/6_Scenes/Beep.unity

@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 21459.441, g: 21663.611, b: 21415.3, a: 1}
m_IndirectSpecularColor: {r: 21461.502, g: 21664.814, b: 21416.361, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
@ -593,12 +593,6 @@ MonoBehaviour:
m_Timer: 5
m_TimerTray: 10
m_HasChanged: 0
--- !u!4 &248988184 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 8202717142006031211, guid: 796c0c7bfd2e89547bd866eedcc6d386,
type: 3}
m_PrefabInstance: {fileID: 2794896440572570268}
m_PrefabAsset: {fileID: 0}
--- !u!1 &264146865
GameObject:
m_ObjectHideFlags: 0
@ -1112,7 +1106,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 470663197}
serializedVersion: 2
m_LocalRotation: {x: -0.15766335, y: 0.6501475, z: 0.14043982, w: 0.7298816}
m_LocalRotation: {x: -0.15766333, y: 0.6501475, z: 0.14043981, w: 0.7298816}
m_LocalPosition: {x: -5.4363403, y: -6.517355, z: -11.485382}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
@ -1180,7 +1174,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 513050371}
serializedVersion: 2
m_LocalRotation: {x: -0.15766335, y: 0.6501475, z: 0.14043982, w: 0.7298816}
m_LocalRotation: {x: -0.15766333, y: 0.6501475, z: 0.14043981, w: 0.7298816}
m_LocalPosition: {x: -5.4363403, y: -6.517355, z: -11.485382}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
@ -1287,77 +1281,6 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 1412792145}
m_PrefabAsset: {fileID: 0}
--- !u!1 &672085695
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 672085696}
- component: {fileID: 672085698}
- component: {fileID: 672085697}
m_Layer: 0
m_Name: Waypoint (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &672085696
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 672085695}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 9.9, y: -29.94, z: 82.33}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 248988184}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &672085697
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 672085695}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 1
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &672085698
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 672085695}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a5c81c2052c91a74a8d9fae388fca038, type: 3}
m_Name:
m_EditorClassIdentifier:
m_WaypointPosition: {fileID: 672085696}
m_WaitTime: 2
m_ModelName: Climber
m_Index: 1
m_Touched: 0
--- !u!1 &707081198
GameObject:
m_ObjectHideFlags: 0
@ -1871,77 +1794,6 @@ MonoBehaviour:
m_Damping: 0
m_DampingWhenOccluded: 0
m_OptimalTargetDistance: 0
--- !u!1 &1166521134
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1166521135}
- component: {fileID: 1166521137}
- component: {fileID: 1166521136}
m_Layer: 0
m_Name: Waypoint (3)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1166521135
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1166521134}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -13.6, y: -32.7, z: 94.3}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 248988184}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &1166521136
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1166521134}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 1
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &1166521137
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1166521134}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a5c81c2052c91a74a8d9fae388fca038, type: 3}
m_Name:
m_EditorClassIdentifier:
m_WaypointPosition: {fileID: 1166521135}
m_WaitTime: 0
m_ModelName: Walker
m_Index: 3
m_Touched: 0
--- !u!1 &1178814724
GameObject:
m_ObjectHideFlags: 3
@ -2663,77 +2515,6 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 1503240170}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1539175864
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1539175865}
- component: {fileID: 1539175867}
- component: {fileID: 1539175866}
m_Layer: 0
m_Name: Waypoint (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1539175865
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1539175864}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -13.6, y: -32.7, z: 77.1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 248988184}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &1539175866
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1539175864}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 1
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &1539175867
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1539175864}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a5c81c2052c91a74a8d9fae388fca038, type: 3}
m_Name:
m_EditorClassIdentifier:
m_WaypointPosition: {fileID: 1539175865}
m_WaitTime: 0
m_ModelName: Walker
m_Index: 2
m_Touched: 0
--- !u!4 &1574719136 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1744424756382034348, guid: 14d8283abcefffd4a916b8611ccd49fa,
@ -3257,36 +3038,21 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2913576066548479887, guid: 796c0c7bfd2e89547bd866eedcc6d386,
type: 3}
propertyPath: m_ModelName
value: Climber
objectReference: {fileID: 0}
- target: {fileID: 3428618077651019461, guid: 796c0c7bfd2e89547bd866eedcc6d386,
type: 3}
propertyPath: m_Target
value:
objectReference: {fileID: 387060610}
- target: {fileID: 3428618077651019461, guid: 796c0c7bfd2e89547bd866eedcc6d386,
type: 3}
propertyPath: m_WaypointList.Array.size
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4823915812732403376, guid: 796c0c7bfd2e89547bd866eedcc6d386,
type: 3}
propertyPath: m_Name
value: Waypoints
objectReference: {fileID: 0}
- target: {fileID: 6868380804102066130, guid: 796c0c7bfd2e89547bd866eedcc6d386,
type: 3}
propertyPath: m_LocalPosition.x
value: -2.4
objectReference: {fileID: 0}
- target: {fileID: 6868380804102066130, guid: 796c0c7bfd2e89547bd866eedcc6d386,
type: 3}
propertyPath: m_LocalPosition.y
value: -32.8
objectReference: {fileID: 0}
- target: {fileID: 6868380804102066130, guid: 796c0c7bfd2e89547bd866eedcc6d386,
type: 3}
propertyPath: m_LocalPosition.z
value: 82.33
objectReference: {fileID: 0}
- target: {fileID: 8202717142006031211, guid: 796c0c7bfd2e89547bd866eedcc6d386,
type: 3}
propertyPath: m_LocalPosition.x
@ -3339,19 +3105,7 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects:
- targetCorrespondingSourceObject: {fileID: 8202717142006031211, guid: 796c0c7bfd2e89547bd866eedcc6d386,
type: 3}
insertIndex: -1
addedObject: {fileID: 672085696}
- targetCorrespondingSourceObject: {fileID: 8202717142006031211, guid: 796c0c7bfd2e89547bd866eedcc6d386,
type: 3}
insertIndex: -1
addedObject: {fileID: 1539175865}
- targetCorrespondingSourceObject: {fileID: 8202717142006031211, guid: 796c0c7bfd2e89547bd866eedcc6d386,
type: 3}
insertIndex: -1
addedObject: {fileID: 1166521135}
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 796c0c7bfd2e89547bd866eedcc6d386, type: 3}
--- !u!1001 &8839643052404795280

7
Assets/7_Scripts/Model Swapping/ModelSwap.cs

@ -29,11 +29,13 @@ public class ModelSwap : MonoBehaviour
private void OnEnable()
{
Waypoint.SwapModelOnWaypointReached += SwapModelOnReachingWaypoint;
WaypointManager.OnOverrideWaypoint += SwitchModelOverride;
}
private void OnDisable()
{
Waypoint.SwapModelOnWaypointReached -= SwapModelOnReachingWaypoint;
WaypointManager.OnOverrideWaypoint += SwitchModelOverride;
}
private void Start()
@ -94,4 +96,9 @@ public class ModelSwap : MonoBehaviour
{
SwitchModel(m_InitialModel.name, agent);
}
private void SwitchModelOverride(string modelName)
{
SwapModelOnReachingWaypoint(modelName);
}
};

14
Assets/7_Scripts/Waypoint/Waypoint.cs

@ -1,5 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.Events;
@ -34,9 +36,15 @@ public class Waypoint : MonoBehaviour
void OnTriggerEnter(Collider other)
{
if (other.transform.CompareTag("agent") && !m_Touched)
if (other.transform.CompareTag("agent"))
{
if (OnWaypointReached != null)
CheckWaypoint();
}
}
private void CheckWaypoint()
{
if (OnWaypointReached != null && !m_Touched)
{
m_Touched = true;
OnWaypointReached(m_Index);
@ -47,7 +55,5 @@ public class Waypoint : MonoBehaviour
}
}
}
}
}

17
Assets/7_Scripts/Waypoint/WaypointManager.cs

@ -18,6 +18,10 @@ public class WaypointManager : MonoBehaviour
[SerializeField]
public Waypoint m_CurrentWaypoint;
public delegate void OverrideWaypoint(string modelName);
public static event OverrideWaypoint OnOverrideWaypoint;
private void OnEnable()
{
m_WaypointList = new List<Waypoint>();
@ -38,6 +42,7 @@ public class WaypointManager : MonoBehaviour
private void FixedUpdate()
{
CheckOverride();
MoveTargetToWaypoint();
}
@ -56,7 +61,7 @@ public class WaypointManager : MonoBehaviour
}
else
{
Debug.Log($"Wrong Waypoint reached {index}");
Debug.Log($"Wrong Waypoint reached {index} Current {m_CurrentWaypoint.m_Index}");
}
}
@ -72,7 +77,6 @@ public class WaypointManager : MonoBehaviour
{
m_CurrentWaypoint = m_WaypointList[(int)index + 1];
MoveTargetToWaypoint();
//Debug.Log($"Next waypoint {m_CurrentWaypoint.m_Index}");
}
else
{
@ -90,6 +94,15 @@ public class WaypointManager : MonoBehaviour
m_WaypointList = m_WaypointList.OrderBy(waypoint => waypoint.m_Index).ToList();
}
private void CheckOverride()
{
if(Input.GetKeyUp(KeyCode.F))
{
SetNextWaypoint(m_CurrentWaypoint.m_Index);
OnOverrideWaypoint(m_CurrentWaypoint.m_ModelName);
}
}
void OnDrawGizmos()
{
#if UNITY_EDITOR

2
Assets/ML-Agents/Timers/Beep_timers.json

@ -1 +1 @@
{"count":1,"self":77.1750208,"total":78.05201799999999,"children":{"InitializeActuators":{"count":1,"self":0.005626,"total":0.005626,"children":null},"InitializeSensors":{"count":1,"self":0.008298,"total":0.008298,"children":null},"AgentSendState":{"count":2392,"self":0.043495,"total":0.260818,"children":{"CollectObservations":{"count":479,"self":0.015212999999999999,"total":0.015212999999999999,"children":null},"WriteActionMask":{"count":479,"self":0.00172,"total":0.00172,"children":null},"RequestDecision":{"count":479,"self":0.20038999999999998,"total":0.20038999999999998,"children":null}}},"DecideAction":{"count":2392,"self":0.54847499999999993,"total":0.559873,"children":{"RayPerceptionSensor.Perceive":{"count":479,"self":0.011398,"total":0.011398,"children":null}}},"AgentAct":{"count":2392,"self":0.039006,"total":0.039006,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1709904520","unity_version":"2023.2.8f1","command_line_arguments":"\/Applications\/Unity\/Hub\/Editor\/2023.2.8f1\/Unity.app\/Contents\/MacOS\/Unity -projectpath \/Users\/scn\/Documents\/BB_Beauty & The Beep\/12 Unity\/git\/beep-final -useHub -hubIPC -cloudEnvironment production","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.3.0-exp.3","scene_name":"Beep","end_time_seconds":"1709904598"}}
{"count":1,"self":40.7099584,"total":41.3180456,"children":{"InitializeActuators":{"count":1,"self":0.001501,"total":0.001501,"children":null},"InitializeSensors":{"count":1,"self":0.0020122,"total":0.0020122,"children":null},"AgentSendState":{"count":1775,"self":0.0225784,"total":0.3057639,"children":{"CollectObservations":{"count":355,"self":0.0080433,"total":0.0080433,"children":null},"WriteActionMask":{"count":355,"self":0,"total":0,"children":null},"RequestDecision":{"count":355,"self":0.2751422,"total":0.2751422,"children":null}}},"DecideAction":{"count":1775,"self":0.2827425,"total":0.2842454,"children":{"RayPerceptionSensor.Perceive":{"count":355,"self":0.0015029,"total":0.0015029,"children":null}}},"AgentAct":{"count":1775,"self":0.013056199999999999,"total":0.013056199999999999,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1709908418","unity_version":"2023.2.8f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2023.2.8f1\\Editor\\Unity.exe -projectpath C:\\Users\\caile\\Desktop\\Projects\\24_02-Beep\\4_Unity\\Beep Final Git\\beep-final -useHub -hubIPC -cloudEnvironment production","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.3.0-exp.3","scene_name":"Beep","end_time_seconds":"1709908459"}}

16
Assets/Settings/HDRPDefaultResources/DefaultSettingsVolumeProfile.asset

@ -33,6 +33,18 @@ MonoBehaviour:
maximumIntensity:
m_OverrideState: 1
m_Value: 10
denoising:
m_OverrideState: 0
m_Value: 0
useAOVs:
m_OverrideState: 0
m_Value: 1
temporal:
m_OverrideState: 0
m_Value: 0
asyncDenoising:
m_OverrideState: 0
m_Value: 1
skyImportanceSampling:
m_OverrideState: 1
m_Value: 0
@ -775,9 +787,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: e3f28ae5e03094946a7a9c9ddfc1a178, type: 3}
m_Name: Ramp
m_EditorClassIdentifier:
active: 1
active: 0
intensity:
m_OverrideState: 0
m_OverrideState: 1
m_Value: 0.182
--- !u!114 &5036919984216512174
MonoBehaviour:

Loading…
Cancel
Save