Closed tbillington closed 9 years ago
Hey there,
I'll make that section platform-dependant so it won't have that issue, when I can. Thanks for bringing it to my attention.
Not 100% sure but I think you can just call AssetDatabase.CreateAsset(destTex, textureFileName); Of course you will lose the byte[] bytes = destTex.EncodeToPNG(); so it will not be encoded to PNG. But it may be enough ;)
It almost seems like a bug in Unity to complain about the platform of the code when it is editor only.
Yes also :)
Fixed in the latest commit :)
When making a web build, this error occurs
Assets/MaterialUI/Scripts/ShadowGen.cs(292,40): error CS0117: 'System.IO.File' does not contain a definition for 'WriteAllBytes'
.From cursory investigation it's because I'm in web build mode and web builds don't have that method defined. I see that file is Unity Editor only, I have just commented that line out as a temporary solution.