Console |
There is a custom in-game Console integrated into the kit that can be brought up by pressing tilde (~) on PC or flicking down on mobile. The console displays all Log messages and supports scripting in Lua. This should come in handy in situations where you want to debug or tweak the game. There is no need to bind commands to the console — it has full access to your game code. XLua does, however, require classes to be referred to by their fully-qualified name, starting with CS. So GameObject("MyObject") or DataManager.GameData will not work but CS.UnityEngine.GameObject("MyObject") and CS.Game.DataManager.GameData will. To ease the pain of typing CS. over and over again, labels System, UE, Kit and Game have been bound to CS.System, CS.UnityEngine, CS.Kit and CS.Game respectively (see Resources/Lua/General.lua.txt) so UE.GameObject("MyObject") and Game.DataManager.GameData will work just as well.
|
Evaluate and output the value of the expression.
Execute the statement.
Same as typing the expression.
List all public methods, properties, and fields associated with a type.
Use this when you're not sure about the class structure or which member to access. |
Clear the log.
Get the GameObject at the specified scene path. Uses GameObject.Find.
Get the specified component of the GameObject at the given scene path. Uses GameObject.Find.
Get the first component of the given type.
Get the GameObjects with the given tag.
Get the components with the given type.
Create a new GameObject with the given name and list of components.
Create an instance of the prefab at path.
Destroy the given object.
Destroy all the array objects.
Destroy the GameObject at path.
Destroy the given component of the GameObject at path.
Destroy the first component of the given type.
Keys | Action |
|---|---|
Enter | Submit command. |
Shift + Enter | New line. |
Up | Previous command. |
Down | Next command. |
Shift + Up | Move up. |
Shift + Down | Move down. |