Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

only detect numerical keyboard input

$
0
0
hello i would like to only detect key input if it a number is pressed, I am using the following code. Regex rgx = new Regex("[^0-9]"); if (e.isKey) Debug.Log("Detected character: " + e.character); I cannot combine these two bits to get it to only detect the number input from the keyboard. Any help is appreciated p.s. i am using c#

Viewing all articles
Browse latest Browse all 171066

Trending Articles



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