CsCore/CsCoreUnity/Plugins/CsCoreUnity/com/csutil/io/ImageLoaderUnity.cs
Method LoadAndPersistTo
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static async Task<Texture2D> LoadAndPersistTo(IFileRef imgRef, DirectoryEntry targetDir, int thumbnailPixelWidth, Action<Texture2D> showTexture) {
Texture2D tempThumbTexture = null;
var hasAlpha = imgRef.mimeType == "image/png";
if (imgRef.fileName != null) { // Try load local thumbnail as quick as possible:
var i = targetDir.GetChild(imgRef.fileName);