Skip to content

Commit

Permalink
Fixed MusicPlayer potentially throwing an error in OnDestroy, fixed J…
Browse files Browse the repository at this point in the history
…SAMSettings interrupting the asset import process
  • Loading branch information
jackyyang09 committed May 6, 2023
1 parent 6f4caa1 commit 29b2ce4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 128 deletions.
128 changes: 0 additions & 128 deletions JSAM/Examples/Shmup 2D/Example2D.unity
Original file line number Diff line number Diff line change
Expand Up @@ -3227,23 +3227,6 @@ MonoBehaviour:
m_EditorClassIdentifier:
prefab: {fileID: 6789875963486134159, guid: e8785c53dae4f7a418f967cbb80baab9, type: 3}
objectsToSpawn: 200
--- !u!1 &2427964397332691147
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5054036817685303738}
- component: {fileID: 5024159101188339072}
m_Layer: 0
m_Name: GameObject
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4502563657082201730
Transform:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -3290,114 +3273,3 @@ MonoBehaviour:
m_EditorClassIdentifier:
library: {fileID: 11400000, guid: a994b5d4d0565104ab406807efdb466d, type: 2}
listener: {fileID: 519420029}
--- !u!82 &5024159101188339072
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2427964397332691147}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!4 &5054036817685303738
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2427964397332691147}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
2 changes: 2 additions & 0 deletions JSAM/Scripts/JSAMSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ public static JSAMSettings Settings

public static void TryCreateNewSettingsAsset()
{
if (EditorApplication.isCompiling) return;

if (!EditorUtility.DisplayDialog(
"JSAM First Time Setup",
"In order to function, JSAM needs a place to store settings. By default, a " +
Expand Down
1 change: 1 addition & 0 deletions JSAM/Scripts/MusicPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ private void OnDisable()

private void OnDestroy()
{
if (!AudioManager.Instance) return;
switch (onDestroy)
{
case AudioPlaybackBehaviour.Play:
Expand Down

0 comments on commit 29b2ce4

Please sign in to comment.