Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/jackmawer/JacksWorld. An abandoned mini-project that I created while learning to use Unity with networking.
Something went wrong. Try again.
2.2 kB · 103 lines
C#
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104namespace UnityEngine.Advertisements { using System;
public static class Advertisement {
public enum DebugLevel { NONE = 0, ERROR = 1, WARNING = 2, INFO = 4, DEBUG = 8 } static private DebugLevel _debugLevel = Debug.isDebugBuild ? DebugLevel.ERROR | DebugLevel.WARNING | DebugLevel.INFO | DebugLevel.DEBUG : DebugLevel.ERROR | DebugLevel.WARNING | DebugLevel.INFO; static public DebugLevel debugLevel { get { return _debugLevel; } set { _debugLevel = value;#if UNITY_ANDROID || UNITY_IOS UnityEngine.Advertisements.UnityAds.setLogLevel(_debugLevel);#endif } }
static public bool isSupported { get { return Application.isEditor || Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.Android; } }
static public bool isInitialized { get {#if UNITY_ANDROID || UNITY_IOS return UnityAds.isInitialized;#else return false;#endif } }
static public void Initialize(string appId, bool testMode = false) {#if UNITY_ANDROID || UNITY_IOS UnityAds.SharedInstance.Init(appId, testMode);#endif }
static public void Show(string zoneId = null, ShowOptions options = null) {#if UNITY_ANDROID || UNITY_IOS UnityAds.SharedInstance.Show(zoneId, options);#else if(options.resultCallback != null) { options.resultCallback(ShowResult.Failed); }#endif }
static public bool allowPrecache { get {#if UNITY_ANDROID || UNITY_IOS return UnityAds.allowPrecache;#else return false;#endif } set {#if UNITY_ANDROID || UNITY_IOS UnityAds.allowPrecache = value;#endif } }
static public bool isReady(string zoneId = null) {#if UNITY_ANDROID || UNITY_IOS return UnityAds.canShowZone(zoneId);#else return false;#endif }
static public bool isShowing { get {#if UNITY_ANDROID || UNITY_IOS return UnityAds.isShowing;#else return false;#endif } }
static public bool UnityDeveloperInternalTestMode { get; set; }
}
}