游戏内控制台
官方文档:A uGUI based console to see debug messages and execute commands during gameplay in Unity
插件自带的指令,输入help可以查询
Available commands:
- help: Prints all commands
- help [String commandName]: Prints all matching commands
- logs.save: Saves logs to persistentDataPath
- logs.save [String filePath]: Saves logs to the specified file
- prefs.clear: Deletes all PlayerPrefs fields
- prefs.delete [String key]: Deletes a PlayerPrefs field
- prefs.float [String key]: Returns the value of a Float PlayerPrefs field
- prefs.float [String key] [Float value]: Sets the value of a Float PlayerPrefs field
- prefs.int [String key]: Returns the value of an Integer PlayerPrefs field
- prefs.int [String key] [Integer value]: Sets the value of an Integer PlayerPrefs field
- prefs.string [String key]: Returns the value of a String PlayerPrefs field
- prefs.string [String key] [String value]: Sets the value of a String PlayerPrefs field
- scene.load [String sceneName]: Loads a scene
- scene.load [String sceneName] [LoadSceneMode mode]: Loads a scene
- scene.loadasync [String sceneName]: Loads a scene asynchronously
- scene.loadasync [String sceneName] [LoadSceneMode mode]: Loads a scene asynchronously
- scene.restart: Restarts the active scene
- scene.unload [String sceneName]: Unloads a scene
- sysinfo: Prints system information
- time.scale: Returns the current Time.timeScale value
- time.scale [Float value]: Sets the Time.timeScale value
上述实用的指令有:
- scene.load [String sceneName]: 加载一个场景
- scene.restart: 重启当前的关卡
- time.scale [Float value]:修改时间速率