The following code compiles in Visual Studio, and runs fine in the editor:
Texture2D texture = new Texture2D(1, 1); texture.alphaIsTransparency = true;
but when I attempt to build either the standalone PC or the web version, I get the following error:
error CS1061: Type
UnityEngine.Texture2D' does not contain a definition for alphaIsTransparency’ and no extension method
alphaIsTransparency' of type UnityEngine.Texture2D’ could be found (are you missing a using directive or an assembly reference?)
If I remove the alphaIsTransparency line, I can build those versions just fine.
What would cause this error and how might I correct it?