Question by
emrexconi · Oct 14, 2020 at 10:09 PM ·
buildbuild-errornormalmaptextureimportertexture compression
Texture importer API doesn't work on build exe
when i run the game at Runtime, it works. at runtime it download images to Resources Folder and set the resolution to 4096x4096, set the texture type to GUI and apply them to material of 3d model.
if i try to build the game Standalone exe , i get errors. i can't build it.
the picture shows that the error messages while publishing to Standalone exe
and the script that i use for Texture Importer API
string path = "Assets/Resources/Data/Models/" + ModelID + "/Model.jpg";
TextureImporter importer = (TextureImporter)TextureImporter.GetAtPath(path);
importer.textureType = TextureImporterType.GUI;
importer.mipmapEnabled = false;
importer.maxTextureSize = 4096;
importer.SaveAndReimport();
whatsapp-image-2020-10-15-at-100719-am.jpeg
(207.0 kB)
Comment
Your answer
Follow this Question
Related Questions
Windows standalone build error 0 Answers
How do i build my game??? 1 Answer
Unity 5 not responding on texture compression? 0 Answers
I can't catch Unity build errors via script 0 Answers
CommandInvokationFailure: Failed to re-package resources. 0 Answers