Pages

Monday, January 14, 2013

Unity3D + C#: Acquiring the length of an Enum


Acquiring the length of an Enum:

int enumLength = System.Enum.GetValues(typeof(nameSpace.type)).Length;

Replace the "nameSpace" to the source (script name) of the Enum type, and "type" to the Enum type.

Source:

1 comment:

baileahobi said...

Raging Bull Casino - Drmcd
Play with friends, online or mobile at Casino with Drmcd and 문경 출장샵 earn rewards 출장마사지 points 전라남도 출장안마 for new players at 광주광역 출장샵 Raging Bull Casino. The Raging 논산 출장안마 Bull Casino is a popular