I'm trying to find a list of Unity's primitive data types. As I'm searching I'm running into a conceptual collision between modeling primitives and code primitives, two very different subjects.
Examples would be: int, float, double, boolean, void.
When coding I prefer to statically type numbers as int, float or double opposed to leaving it to a catch all Number class.
asked Sep 29 '10 at 02:05 PM
There is no "catch all" number class in Unity.
Unity uses Mono for its scripting, so it has the same set of integral types as .Net
See these reference pages on MSDN for the full list:
answered Sep 29 '10 at 02:31 PM
You don't exactly specify how primitive you want to get.
It's not really "Unity's" primitive data types exactly. Unity uses a customized subset of mono. Most of the primitive types like int, float, enum, etc. are short names for classes in the System library. Duck's links cover the most primitive of these.There are also the classes that were added by Unity (run-time and editor).
Keep in mind the syntactic differences between Unity js and mono, including different short names like using
answered Sep 29 '10 at 02:40 PM