예제 #1
0
 public static void ReleaseAddressable(this UnityEngine.Object toUnload)
 {
     if (toUnload == null)
     {
         return;
     }
     AddressableManager.Get().FreeResource(toUnload);
 }
예제 #2
0
        public static AddressableManager Get()
        {
            if (_instance == null)
            {
                _instance = new AddressableManager();
            }

            return(_instance);
        }
예제 #3
0
 public static void Load(this IAddressableLoader loader)
 {
     if (loader == null)
     {
         UnityEngine.Debug.LogError("<color=red>ERROR:</color> Cannot load null loader without a provided path and group.");
         return;
     }
     AddressableManager.Get().QueueLoader(loader);
 }
예제 #4
0
 public static void Load <T>(this IAddressableLoader loader, string path, string group, System.Action <T> onLoaded) where T : UnityEngine.Object
 {
     loader = new AddressableLoader <T>(path, group, onLoaded);
     AddressableManager.Get().QueueLoader(loader);
 }