Quantcast
Browsing all 4 articles
Browse latest View live

Answer by ValooFX

dont use 'as', do it like (YourEnumType)EditorGUILayout.EnumPopup(x,x,x);

View Article


Answer by Bunny83

Like ValooFx said you have to use a "normal" cast. The as cast only works with reference types. An enum is a value type. script.movementSettings.runKey = (KeyCode)EditorGUILayout.EnumPopup("Run Key",...

View Article


Answer by Polymo

dont use 'as', do it like (YourEnumType)EditorGUILayout.EnumPopup(x,x,x);

View Article

Answer by Bunny83

Like ValooFx said you have to use a "normal" cast. The as cast only works with reference types. An enum is a value type. script.movementSettings.runKey = (KeyCode)EditorGUILayout.EnumPopup("Run Key",...

View Article
Browsing all 4 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>