- Home /
Comparing Textures on 2 Objects
How can I compare 2 gameobjects textures to see if they are the same.
For example:
if(this.texture == other.texture){ print("Equal");}
Thanks
In what way doesn't that work?
Well, technically it should be
if(this.material.mainTexture == other.material.mainTexture)
but that's just details.
Oh, this only checks for reference equality- it doesn't check for if the contents of the texture are the same, only if it's sitting in the same spot in memory.
Answer by McBeezy · Jul 08, 2012 at 05:53 AM
I think this is the answer, but I could be wrong:
http://answers.unity3d.com/questions/15641/compare-if-object-is-assigned-specific-material.html
Your answer
Follow this Question
Related Questions
Chat Client in Unity 1 Answer
Better method for importing images for textures 1 Answer
WebGL + JSLIB Plugin, how to pass images from JQuery to c#? 0 Answers
Non Power of Two Images 1 Answer
8 bpp TIFF images are not supported ? 2 Answers