示例#1
0
        public void ReleaseResources(object holder, string movieName)
        {
            if (!videoLoader.IsLoaded(movieName))
            {
                return;
            }
            var resource = videoLoader.GetLoadedOrNull(movieName);

            resource.Release(holder);
        }
示例#2
0
 public void ReleaseResources(object holder, string movieName)
 {
     #if UNITY_WEBGL && !UNITY_EDITOR
     return;
     #else
     if (!videoLoader.IsLoaded(movieName))
     {
         return;
     }
     var resource = videoLoader.GetLoadedOrNull(movieName);
     resource.Release(holder);
     #endif
 }
示例#3
0
        public virtual async UniTask <Texture2D> LoadCGTextureAsync()
        {
            Texture2D cgTexture;

            if (textureLoader.IsLoaded(textureLocalPath))
            {
                cgTexture = textureLoader.GetLoadedOrNull(textureLocalPath);
            }
            else
            {
                thumbnailImage.texture = loadingTexture;
                cgTexture = await textureLoader.LoadAsync(textureLocalPath);
            }

            thumbnailImage.texture = unlockableManager.ItemUnlocked(UnlockableId) ? cgTexture : lockedTexture;

            return(cgTexture);
        }
示例#4
0
        public virtual async UniTask <Texture2D> LoadCGTextureAsync()
        {
            Texture2D cgTexture;

            if (textureLoader.IsLoaded(textureLocalPath))
            {
                cgTexture = textureLoader.GetLoadedOrNull(textureLocalPath);
            }
            else
            {
                thumbnailImage.texture = loadingTexture;
                var resource = await textureLoader.LoadAndHoldAsync(textureLocalPath, this);

                cgTexture = resource;
            }

            return(cgTexture);
        }
示例#5
0
 /// <summary>
 /// Checks whether avatar texture with the provided (local) path exists.
 /// </summary>
 public bool AvatarTextureExists(string avatarTexturePath) => avatarTextureLoader.IsLoaded(avatarTexturePath);