Quantcast
Channel: Answers for "KeyCode in custom editor"
Browsing latest articles
Browse All 4 View Live

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 latest articles
Browse All 4 View Live


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