- Home /
Question by
DiGiaCom-Tech · Jun 16, 2018 at 03:39 PM ·
savingsettingsimages
Setting Saved Properties of Procedurally Generated Texture2Ds...
I am procedurally generating Texture2Ds and am setting all of the appropriate properties...
// Create a new 2x2 texture ARGB32 (32 bit with alpha) and no mipmaps
Texture2D texture = new Texture2D(Width, Height, TextureFormat.ARGB32, false);
// Set image properties
texture.filterMode = FilterMode.Point;
texture.wrapMode = TextureWrapMode.Clamp;
texture.alphaIsTransparency = false;
texture.anisoLevel = 1;
... however, when I save the generated texture ...
byte[] bytes = texture.EncodeToPNG();
File.WriteAllBytes(MapFile, bytes);
... and then look at the resulting file in the Inspector I DO NOT see that (the properties I have set) have been saved to the file.
The question is ... how do I save generated Texture2Ds to file and maintain all of the property settings?
texture2d.png
(42.5 kB)
Comment
Your answer
Follow this Question
Related Questions
How to make my game settings save? 1 Answer
Storing blob in SQLite 1 Answer
Is there a way to save Editor configuration without closing Unity? 0 Answers
Saving Post Processing as a graphic option 1 Answer
About Multios platform setting of Logos of Unity 2018.3 ProjectSettings-Player-SplashImage 0 Answers