/// <summary> /// Starts the low memory poll for Android. /// </summary> /// <param name="settings">Settings.</param> public void StartLowMemoryPoll(INativeSettings settings) { #if UNITY_ANDROID && !UNITY_EDITOR this.settings = settings; #endif InvokeRepeating("AndroidLowMemoryPoll", 1.0f, 10.0f); }
/// <summary> /// Initializes a new instance of the <see cref="NativeSettings"/> class. /// </summary> public NativeSettings() { #if UNITY_EDITOR settings = new NativeSettingsEditor(); #elif UNITY_IPHONE settings = new NativeSettingsIos(); #elif UNITY_ANDROID settings = new NativeSettingsAndroid(); #endif }
/// <summary> /// Initializes a new instance of the <see cref="Disney.ForceVision.ContainerAPI"/> class. /// </summary> /// <param name="game">Game.</param> public ContainerAPI(Game game) { // We need a MonoBehaviour for Native to call into as well for Streaming Asset loading. GameObject bridge = GameObject.Find("ForceVisionNativeBridge") ?? new GameObject("ForceVisionNativeBridge", typeof(NativeBridge)); NativeBridge = bridge.GetComponent <NativeBridge>(); // Data Storage / Loading StreamingAssets = new StreamingAssetsStorage(game, NativeBridge); PersistentData = new PersistentDataStorage(game); PlayerPrefs = new PlayerPrefsStorage(game); cdnAssetLoaderApi = new Disney.ForceVision.Internal.CdnAssetLoaderApi(NativeBridge); // Native Settings NativeSettings = new NativeSettings(); #if UNITY_ANDROID && !UNITY_EDITOR NativeBridge.StartLowMemoryPoll(NativeSettings); #endif }