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.
- Search Sync sends wrong initial search query
- Perforce integration - Attempting to add a P4Ignore ignored file does nothing
- URP ScriptableObject SerializeField value set to default during the first Import
- Variables use old overridden values on Prefabs when a variable has FormerlySerializedAs attribute
- [GPU PLM] 100% repro crash when baking EnterTheRoom with 4K maps when using system allocator