From fe3a09bb3c82f5401f91b4ee82ae5aa1a0ac7221 Mon Sep 17 00:00:00 2001 From: cailean Date: Tue, 19 Mar 2024 13:30:21 +0000 Subject: [PATCH] tray adjustment & audio obj null check --- Assets/4_Audio/Audio Script/AudioManager.cs | 4 +- Assets/6_Scenes/Beep.unity | 54 ++++++++++++++------- Assets/ML-Agents/Timers/Beep_timers.json | 2 +- 3 files changed, 40 insertions(+), 20 deletions(-) diff --git a/Assets/4_Audio/Audio Script/AudioManager.cs b/Assets/4_Audio/Audio Script/AudioManager.cs index b89229d..90cbd85 100644 --- a/Assets/4_Audio/Audio Script/AudioManager.cs +++ b/Assets/4_Audio/Audio Script/AudioManager.cs @@ -26,8 +26,8 @@ public class AudioManager : MonoBehaviour public void FootStepAudio( Vector3 bp_Position, float magnitude, PhysicMaterial groundType) { - - FindAudioObjectByType(groundType, magnitude, bp_Position); + if (!groundType.IsUnityNull()) + FindAudioObjectByType(groundType, magnitude, bp_Position); } private AudioObject FindAudioObjectByType(PhysicMaterial groundType, float mag, Vector3 pos) diff --git a/Assets/6_Scenes/Beep.unity b/Assets/6_Scenes/Beep.unity index 144bd62..353db1c 100644 --- a/Assets/6_Scenes/Beep.unity +++ b/Assets/6_Scenes/Beep.unity @@ -392,7 +392,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 155411616} serializedVersion: 2 - m_LocalRotation: {x: 0.032237124, y: 0.96677077, z: -0.15566999, w: 0.200205} + m_LocalRotation: {x: 0.03223712, y: 0.96677077, z: -0.15566999, w: 0.20020498} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -1097,7 +1097,7 @@ MonoBehaviour: LensShift: {x: 0, y: 0} GateFit: 1 FocusDistance: 8.93528 - m_SensorSize: {x: 1, y: 1} + m_SensorSize: {x: 36, y: 24} Iso: 50 ShutterSpeed: 0.0005 Aperture: 2.2 @@ -1212,7 +1212,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 377437129} serializedVersion: 2 - m_LocalRotation: {x: -0.03783877, y: 0.8817097, z: -0.07178479, w: -0.46476156} + m_LocalRotation: {x: -0.037838772, y: 0.8817097, z: -0.071784794, w: -0.46476156} m_LocalPosition: {x: -128.4, y: 13, z: -248.6} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -1250,7 +1250,7 @@ MonoBehaviour: LensShift: {x: 0, y: 0} GateFit: 1 FocusDistance: 0.01 - m_SensorSize: {x: 1, y: 1} + m_SensorSize: {x: 36, y: 24} Iso: 50 ShutterSpeed: 0.0005 Aperture: 1.9 @@ -1329,17 +1329,17 @@ PrefabInstance: - target: {fileID: 3364236482078802793, guid: 263d8cea838224448bdfd0e71bc2dce4, type: 3} propertyPath: m_LocalPosition.x - value: -245.97 + value: -258.72 objectReference: {fileID: 0} - target: {fileID: 3364236482078802793, guid: 263d8cea838224448bdfd0e71bc2dce4, type: 3} propertyPath: m_LocalPosition.y - value: 6.0099983 + value: 8.5 objectReference: {fileID: 0} - target: {fileID: 3364236482078802793, guid: 263d8cea838224448bdfd0e71bc2dce4, type: 3} propertyPath: m_LocalPosition.z - value: 504.51 + value: 517.25 objectReference: {fileID: 0} - target: {fileID: 3364236482078802793, guid: 263d8cea838224448bdfd0e71bc2dce4, type: 3} @@ -1838,7 +1838,7 @@ MonoBehaviour: LensShift: {x: 0, y: 0} GateFit: 1 FocusDistance: 8.93528 - m_SensorSize: {x: 1, y: 1} + m_SensorSize: {x: 36, y: 24} Iso: 50 ShutterSpeed: 0.0005 Aperture: 2.2 @@ -1919,7 +1919,7 @@ MonoBehaviour: LensShift: {x: -0.21, y: 0.15} GateFit: 1 FocusDistance: 10 - m_SensorSize: {x: 1, y: 1} + m_SensorSize: {x: 36, y: 24} Iso: 50 ShutterSpeed: 0.0005 Aperture: 2.2 @@ -2141,7 +2141,7 @@ MonoBehaviour: LensShift: {x: 0, y: 0} GateFit: 1 FocusDistance: 8.93528 - m_SensorSize: {x: 1, y: 1} + m_SensorSize: {x: 36, y: 24} Iso: 50 ShutterSpeed: 0.0005 Aperture: 2.2 @@ -4487,7 +4487,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &2072680723 Transform: m_ObjectHideFlags: 0 @@ -4868,7 +4868,7 @@ PrefabInstance: - target: {fileID: 1082572882027964806, guid: 796c0c7bfd2e89547bd866eedcc6d386, type: 3} propertyPath: m_IsActive - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 2913576066548479887, guid: 796c0c7bfd2e89547bd866eedcc6d386, type: 3} @@ -5015,7 +5015,7 @@ PrefabInstance: - target: {fileID: 976481949853134852, guid: 14d8283abcefffd4a916b8611ccd49fa, type: 3} propertyPath: m_LocalPosition.z - value: 0.022 + value: 0.03489989 objectReference: {fileID: 0} - target: {fileID: 1073758426341463485, guid: 14d8283abcefffd4a916b8611ccd49fa, type: 3} @@ -5026,7 +5026,7 @@ PrefabInstance: - target: {fileID: 1804160633990764388, guid: 14d8283abcefffd4a916b8611ccd49fa, type: 3} propertyPath: m_LocalPosition.z - value: 0.06 + value: 0.072899885 objectReference: {fileID: 0} - target: {fileID: 2222743290187972764, guid: 14d8283abcefffd4a916b8611ccd49fa, type: 3} @@ -5119,7 +5119,7 @@ PrefabInstance: - target: {fileID: 3228041511559138902, guid: 14d8283abcefffd4a916b8611ccd49fa, type: 3} propertyPath: m_LocalPosition.z - value: 0.088 + value: 0.1009 objectReference: {fileID: 0} - target: {fileID: 3910738680306197312, guid: 14d8283abcefffd4a916b8611ccd49fa, type: 3} @@ -5175,20 +5175,40 @@ PrefabInstance: value: objectReference: {fileID: 13400000, guid: 52a249eaa894e35488a1519221a56769, type: 2} + - target: {fileID: 6834825630909992125, guid: 14d8283abcefffd4a916b8611ccd49fa, + type: 3} + propertyPath: m_Size.x + value: 0.6009801 + objectReference: {fileID: 0} + - target: {fileID: 6834825630909992125, guid: 14d8283abcefffd4a916b8611ccd49fa, + type: 3} + propertyPath: m_Size.y + value: 0.45956475 + objectReference: {fileID: 0} - target: {fileID: 6834825630909992125, guid: 14d8283abcefffd4a916b8611ccd49fa, type: 3} propertyPath: m_Size.z - value: 0.02 + value: 0.035835482 objectReference: {fileID: 0} - target: {fileID: 6834825630909992125, guid: 14d8283abcefffd4a916b8611ccd49fa, type: 3} propertyPath: m_Enabled value: 1 objectReference: {fileID: 0} + - target: {fileID: 6834825630909992125, guid: 14d8283abcefffd4a916b8611ccd49fa, + type: 3} + propertyPath: m_Center.x + value: -0.0015681998 + objectReference: {fileID: 0} + - target: {fileID: 6834825630909992125, guid: 14d8283abcefffd4a916b8611ccd49fa, + type: 3} + propertyPath: m_Center.y + value: 0.00053906604 + objectReference: {fileID: 0} - target: {fileID: 6834825630909992125, guid: 14d8283abcefffd4a916b8611ccd49fa, type: 3} propertyPath: m_Center.z - value: -0.001 + value: -0.008917745 objectReference: {fileID: 0} - target: {fileID: 6834825630909992125, guid: 14d8283abcefffd4a916b8611ccd49fa, type: 3} diff --git a/Assets/ML-Agents/Timers/Beep_timers.json b/Assets/ML-Agents/Timers/Beep_timers.json index 8f4487a..c0309d6 100644 --- a/Assets/ML-Agents/Timers/Beep_timers.json +++ b/Assets/ML-Agents/Timers/Beep_timers.json @@ -1 +1 @@ -{"count":1,"self":45.6146336,"total":46.2928968,"children":{"InitializeActuators":{"count":1,"self":0.0010107,"total":0.0010107,"children":null},"InitializeSensors":{"count":1,"self":0.0010039,"total":0.0010039,"children":null},"AgentSendState":{"count":2021,"self":0.0211559,"total":0.3031351,"children":{"CollectObservations":{"count":405,"self":0.0070731,"total":0.0070731,"children":null},"WriteActionMask":{"count":405,"self":0,"total":0,"children":null},"RequestDecision":{"count":405,"self":0.2749061,"total":0.2749061,"children":null}}},"DecideAction":{"count":2021,"self":0.3534794,"total":0.3560065,"children":{"RayPerceptionSensor.Perceive":{"count":405,"self":0.0025271,"total":0.0025271,"children":null}}},"AgentAct":{"count":2021,"self":0.0161058,"total":0.0161058,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1710853612","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":"1710853658"}} \ No newline at end of file +{"count":1,"self":27.952790399999998,"total":28.481453499999997,"children":{"InitializeActuators":{"count":1,"self":0.0005151,"total":0.0005151,"children":null},"InitializeSensors":{"count":1,"self":0.0019986,"total":0.0019986,"children":null},"AgentSendState":{"count":1129,"self":0.019601399999999998,"total":0.30181949999999996,"children":{"CollectObservations":{"count":226,"self":0.0055245,"total":0.0055245,"children":null},"WriteActionMask":{"count":226,"self":0.0005162,"total":0.0005162,"children":null},"RequestDecision":{"count":226,"self":0.27617739999999996,"total":0.27617739999999996,"children":null}}},"DecideAction":{"count":1129,"self":0.2042173,"total":0.2087327,"children":{"RayPerceptionSensor.Perceive":{"count":226,"self":0.0045154,"total":0.0045154,"children":null}}},"AgentAct":{"count":1129,"self":0.014594399999999999,"total":0.014594399999999999,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1710854971","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":"1710855000"}} \ No newline at end of file