Hello !
I’ve seen many Unity Answers articles that have info related to this question, but none of them have resolved my problem. I made a texture in paint and exported it as a Jpeg. Then I dragged the texture onto a plane in unity. All of this worked out, but now I want to store the pixel information into an array in MonoDevelop using the Texture2d class method getPixels32(). My problem is that when I try to access the texture using
myTexture = plane.GetComponent ().material.mainTexture;
it won’t work because this returns a texture value, whereas my variable myTexture is in the Texture2D class. I can’t get pixel info if I use the Texture class so it has to be Texture2D. In the Unity Scrip API it says that the Texture2d class can be used to “modify existing texture assets”, but I can’t figure out how to bring my texture information into MonoDevelop as Texture2D objects. I’ve been through the Unity docs and have read many articles, but I haven’t found anything that was able to resolve my issue. Much thanks for any help I can get.
Best
Alex