You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DOCUMENTATION.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,11 +38,13 @@ Custom commands can be added to the dev console by developers. They can be creat
38
38
- Add the ``[DevConsoleCommand]`` attribute above a static method declaration, using the method body as the callback and arguments as command parameters.
To add a custom type, use ``DevConsole.AddParameterType<T>()`` (see FAQ below).</br>
43
+
- Enums are also supported.</br>
44
+
- Nullable-type parameters accept "null" and "~" (e.g. ``GameObject`` or ``Color?``).
45
+
- Value-type parameters accept "default" and "~" (e.g. ``Int32`` or ``Color``).
46
+
47
+
Commands that use a nullable bool (``Boolean?``) are used primarily as a toggle. For example, executing "<b>showfps ~</b>" will toggle showing the fps on-screen.
46
48
47
49
#### Example using Command.Create
48
50
```cs
@@ -132,4 +134,4 @@ Listed below are all the built-in commands that come with the developer console
132
134
-``time``: Display the current time.
133
135
-``sys_info``: Display system information.
134
136
-``datapath``: Display information about where data is stored by Unity and the developer console.
135
-
-``colour``: Display a colour in the developer console.
137
+
-``colour``: Display a colour in the developer console.
0 commit comments