public void ReleaseResources(object holder, string movieName) { if (!videoLoader.IsLoaded(movieName)) { return; } var resource = videoLoader.GetLoadedOrNull(movieName); resource.Release(holder); }
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 }
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); }
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); }
/// <summary> /// Checks whether avatar texture with the provided (local) path exists. /// </summary> public bool AvatarTextureExists(string avatarTexturePath) => avatarTextureLoader.IsLoaded(avatarTexturePath);