Created
June 21, 2013 07:38
-
-
Save aras-p/5829553 to your computer and use it in GitHub Desktop.
C# vs US enum to float cast
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // works in C# | |
| Shader.SetGlobalFloat("_SrcBlendGlobal", (float)UnityEngine.Rendering.BlendMode.SrcAlpha); | |
| // no worky in US | |
| Shader.SetGlobalFloat("_SrcBlendGlobal", UnityEngine.Rendering.BlendMode.One cast float); | |
| // BCE0022: Cannot convert 'UnityEngine.Rendering.BlendMode' to 'float'. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment