Search Issue Tracker
Texture2D.alphaIsTransparency API is editor-only but lives in UnityEngine.dll
-e: Using Texture2D.alphaIsTransparency in a script causes the build to fail with 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?)
* Open attached example project.
* Go to File > Build Settings
* Select PC, Mac & Linux Standalone
* Select Target Platform "Windows x86"
* Press Build
* NOTICE the build fails.
Using Texture2D.alphaIsTransparency should not break a build.
If this is intended to be an editor-only method, consider moving it in to UnityEditor.dll.
Update: This setting is available only in the Editor scripts. Note that changing this setting will have no effect; it must be enabled in TextureImporter instead.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Slow editor shutdown when baking with progressive lightmapper
- Clicking on cloud icon in "In the Cloud" section, instead of opening Unity Version selector it opens save project location Popup
- [MacOS] Windows that are unattached are hidden behind Editor when the Editor Window is focused
- Some ParticleSystems use the wrong texture when several of them are being rendered with different Textures
- Tilemap's collider is offset on the X-axis when using Isometric Tilemap