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.
- When a Rigidbody2D is inactive GetPoint/GetVector/GetRelativePoint/GetRelativeVector fallbacks to returning (0, 0)
- Light brightness gets intense until the 'Lightmap Encoding' quality is changed when baking Lightmap
- Crash on LinearCollectionField::LinearCollectionField after a 'm_ArrayField != SCRIPTING_NULL' assertion when opening a project
- Import Activity Window takes long time to open
- Child Canvas' Sorting Layer is changed to the same value as the parent Canvas after interacting with Dropdown UI object