fix : Wwise global guard
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -4292,6 +4292,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 473823046}
|
||||
- component: {fileID: 473823045}
|
||||
- component: {fileID: 473823047}
|
||||
m_Layer: 0
|
||||
m_Name: WwiseGlobal
|
||||
m_TagString: Untagged
|
||||
@@ -4339,6 +4340,18 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &473823047
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 473823044}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a732b4b9bbfc16c4ab4d5c50a810287d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::WwiseGlobalGuard
|
||||
--- !u!1 &478876090
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class WwiseGlobalGuard : MonoBehaviour
|
||||
{
|
||||
void Awake()
|
||||
{
|
||||
if (FindObjectsByType<WwiseGlobalGuard>(FindObjectsSortMode.None).Length > 1)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
DontDestroyOnLoad(gameObject);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a732b4b9bbfc16c4ab4d5c50a810287d
|
||||
Reference in New Issue
Block a user