We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 015ffc0 commit 1a9260aCopy full SHA for 1a9260a
Runtime/General/Advertising.cs
@@ -11,6 +11,7 @@ namespace VirtueSky.Ads
11
{
12
public class Advertising : MonoBehaviour
13
14
+ public bool dontDestroyOnLoad = true;
15
public static Advertising Instance;
16
private IEnumerator autoLoadAdCoroutine;
17
private float _lastTimeLoadInterstitialAdTimestamp = DEFAULT_TIMESTAMP;
@@ -24,7 +25,11 @@ public class Advertising : MonoBehaviour
24
25
26
private void Awake()
27
- DontDestroyOnLoad(this.gameObject);
28
+ if (dontDestroyOnLoad)
29
+ {
30
+ DontDestroyOnLoad(this.gameObject);
31
+ }
32
+
33
if (Instance == null)
34
35
Instance = this;
0 commit comments