private void Awake() ///////// SET INSTANCE AND SINGELTON ///////// { if (instance == null) { instance = this; } else { Destroy(gameObject); } DontDestroyOnLoad(gameObject); if (initializeAdsOnLoad) { Initialize(); } if (!debugMode) { GetComponent <DebugScript>().enabled = false; } else { GetComponent <DebugScript>().enabled = true; } }
private void OnEnable() { SetGuistyles(); targetScript = (QuickAds)target; targetSer = new SerializedObject(target); rewardedVideoIsShownEvent_Prop = serializedObject.FindProperty("rewardedVideoIsShown"); CreateReorderableLists(); bannerReorderableList.onCanAddCallback = (ReorderableList l) => { return(l.count < System.Enum.GetValues(typeof(ActiveBannerServicesEnum)).Length); }; interstitialReorderableList.onCanAddCallback = (ReorderableList l) => { return(l.count < System.Enum.GetValues(typeof(ActiveInterstitialServicesEnum)).Length); }; rewardedReorderableList.onCanAddCallback = (ReorderableList l) => { return(l.count < System.Enum.GetValues(typeof(ActiveRewardedServicesEnum)).Length); }; }