中级玩家
 
- 贡献度
- 1
- 金元
- 1402
- 积分
- 144
- 精华
- 0
- 注册时间
- 2008-9-22
|
开启命令控制台 应该都是按照 tempa的方法改2个文件。
newman55的mod采用另一个办法,改一个文件也是2处。
Assembly-CSharp-firstpass.dll
UnityConsole.ConsoleController.Update 最后追加面加
// UnityConsole.ConsoleController
// Token: 0x060000DA RID: 218
private void Update()
if (Input.GetKeyDown(KeyCode.BackQuote))
{
this.UI.ToggleConsole();
}
UnityConsole.ConsoleCommandsDatabase.RegisterCommand里面加命令,这个和以前一样
// UnityConsole.ConsoleCommandsDatabase
// Token: 0x060000CA RID: 202
public static void RegisterCommand(string command, string description, string usage, ConsoleCommandCallback callback)
{
ConsoleCommandsDatabase.Database[command] = new ConsoleCommand(command, description, usage, callback);
}
//可选 也许应该加个判断!
// UnityConsole.ConsoleCommandsDatabase
// Token: 0x060000E9 RID: 233 RVA: 0x00006DBA File Offset: 0x00004FBA
public static void RegisterCommand(string command, string description, string usage, ConsoleCommandCallback callback)
{
if (!ConsoleCommandsDatabase.Database.ContainsKey(command))
{
ConsoleCommandsDatabase.Database.Add(command, new ConsoleCommand(command, description, usage, callback));
}
}
出处:https://bbs.3dmgame.com/thread-5988702-1-1.html
1.25.69431测试可用 |
|