【Unity3D编辑器开发】Unity3D中制作一个可以随时查看键盘对应KeyCode值面板,方便开发

推荐阅读

  • CSDN主页
  • GitHub开源地址
  • Unity3D插件分享
  • 简书地址
  • 我的个人博客

大家好,我是佛系工程师☆恬静的小魔龙☆,不定时更新Unity开发技巧,觉得有用记得一键三连哦。

一、前言

在开发中,会遇到要使用监控键盘输入的KeyCode值来执行代码的情况。

比如说:

using System;
using UnityEditor;
using UnityEngine;public class Test01 : MonoBehaviour
{void Update(){if (Input.GetKeyDown(KeyCode.W)){Debug.Log("点击了键盘W");}}
}

但是,如果是一些不常用的键位,比如说{}[],这些KeyCode值就比较难查看了,因为API是这样的:
在这里插入图片描述
根本不知道这英文还是数字代表了啥,于是就诞生了,在Unity做一个键盘,然后在键盘的键位下标注每个键位的KeyCode值,方便开发。

先看下效果图:
在这里插入图片描述

小明:键位没有对齐,逼死强迫症啊喂!
张三:不重要!不重要!

二、正文

2-1、构建键盘键值表

让我们新建一个脚本,命名为VirtualKeyboardEditor.cs名字无所谓,主要是要继承与EditorWindow类,并且把脚本放到Editor文件夹内。

编辑代码:

using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;public class VirtualKeyboardEditor : EditorWindow
{[MenuItem("工具/键盘映射值")]static void OpenWindow(){GetWindow<VirtualKeyboardEditor>().Show();}//用于绘制窗口内容private void OnGUI(){}
}

然后,我们需要写一个自定义类,用来保存键盘值名和KeyCode值,以及长宽。

// 键盘映射value值
public class VirKeyValue
{public float height;public float width;public string name;public string key;public VirKeyValue(string name, string key, float width, float height){this.name = name;this.width = width;this.height = height;this.key = key;}
}

接着构建键值库:

static Dictionary<int, List<VirKeyValue>> dicVirKeys;const int width1 = 50;const int width2 = 80;const int width100 = 100;const int width120 = 120;const int width140 = 138;const int width3 = 300;const int height1 = 30;private void DataInit(){if (dicVirKeys == null){dicVirKeys = new Dictionary<int, List<VirKeyValue>>();List<VirKeyValue> tempVirKeys = new List<VirKeyValue>{new VirKeyValue("Esc","Esc", width1, height1),new VirKeyValue("F1","F1", width1, height1),new VirKeyValue("F2","F2", width1, height1),new VirKeyValue("F3","F3", width1, height1),new VirKeyValue("F4","F4", width1, height1),new VirKeyValue("F5","F5", width1, height1),new VirKeyValue("F6","F6", width1, height1),new VirKeyValue("F7","F7", width1, height1),new VirKeyValue("F8","F8", width1, height1),new VirKeyValue("F9","F9", width1, height1),new VirKeyValue("F10","F10", width1, height1),new VirKeyValue("F11","F11", width1, height1),new VirKeyValue("F12","F12", width1, height1),new VirKeyValue("Print\nScreen","Print", width1, height1),new VirKeyValue("Scroll\nLock", "ScrollLockScroll",width1, height1),new VirKeyValue("Pause","Pause", width1, height1)};dicVirKeys.Add(0, tempVirKeys);tempVirKeys = new List<VirKeyValue>{new VirKeyValue("~\n`","BackQuote", width1, height1),new VirKeyValue("!\n1","Alpha1", width1, height1),new VirKeyValue("@\n2","Alpha2", width1, height1),new VirKeyValue("#\n3","Alpha3", width1, height1),new VirKeyValue("$\n4","Alpha4", width1, height1),new VirKeyValue("%\n5","Alpha5", width1, height1),new VirKeyValue("^\n6","Alpha6", width1, height1),new VirKeyValue("&\n7","Alpha7", width1, height1),new VirKeyValue("*\n8","Alpha8", width1, height1),new VirKeyValue("(\n9","Alpha9", width1, height1),new VirKeyValue(")\n0","Alpha0", width1, height1),new VirKeyValue("_\n-","Minus", width1, height1),new VirKeyValue("+\n=","Equals", width1, height1),new VirKeyValue("←Backspace","Backspace", width120, height1),new VirKeyValue("Insert","Insert", width1, height1),new VirKeyValue("Home", "Home",width1, height1),new VirKeyValue("Page\nUp", "PageUp",width1, height1),new VirKeyValue("NumLk","Numlock", width1, height1),new VirKeyValue("/","KeypadDivide", width1, height1),new VirKeyValue("*","KeypadMultiply", width1, height1),new VirKeyValue("-","KeypadMinus", width1, height1),};dicVirKeys.Add(1, tempVirKeys);tempVirKeys = new List<VirKeyValue>{new VirKeyValue("Tab","Tab", width100, height1),new VirKeyValue("Q","Q",width1, height1),new VirKeyValue("W","W",width1, height1),new VirKeyValue("E","E",width1, height1),new VirKeyValue("R","R",width1, height1),new VirKeyValue("T","T",width1, height1),new VirKeyValue("Y","Y",width1, height1),new VirKeyValue("U","U",width1, height1),new VirKeyValue("I","I",width1, height1),new VirKeyValue("O","O",width1, height1),new VirKeyValue("P","P",width1, height1),new VirKeyValue("{\n[","LeftBracket", width1, height1),new VirKeyValue("}\n]","RightBracket", width1, height1),new VirKeyValue("|\n\\", "Backslash",70, height1),new VirKeyValue("Delete", "Delete",width1, height1),new VirKeyValue("End", "End",width1, height1),new VirKeyValue("Page\nDown","PageDown", width1, height1),new VirKeyValue("7","Keypad7",width1, height1),new VirKeyValue("8","Keypad8",width1, height1),new VirKeyValue("9","Keypad9",width1, height1),new VirKeyValue("+","KeypadPlus",width1, height1),};dicVirKeys.Add(2, tempVirKeys);tempVirKeys = new List<VirKeyValue>{new VirKeyValue("Caps\nLock","Backspace", width120, height1),new VirKeyValue("A","A", width1, height1),new VirKeyValue("S","S", width1, height1),new VirKeyValue("D","D", width1, height1),new VirKeyValue("F","F", width1, height1),new VirKeyValue("G","G", width1, height1),new VirKeyValue("H","H", width1, height1),new VirKeyValue("J","J", width1, height1),new VirKeyValue("K","K", width1, height1),new VirKeyValue("L","L", width1, height1),new VirKeyValue(":\n;","Semicolon", width1, height1),new VirKeyValue("\"\n'","Quote", width1, height1),new VirKeyValue("Enter","Enter", 104, height1),new VirKeyValue("4","Keypad4",width1, height1),new VirKeyValue("5","Keypad5",width1, height1),new VirKeyValue("6","Keypad6",width1, height1),new VirKeyValue("Enter","KeypadEnter", width1, height1),};dicVirKeys.Add(3, tempVirKeys);tempVirKeys = new List<VirKeyValue>{new VirKeyValue("Shift","LeftShift", width140, height1),new VirKeyValue("Z","Z",width1, height1),new VirKeyValue("X","X",width1, height1),new VirKeyValue("C","C",width1, height1),new VirKeyValue("V","V",width1, height1),new VirKeyValue("B","B",width1, height1),new VirKeyValue("N","N",width1, height1),new VirKeyValue("M","M",width1, height1),new VirKeyValue("<\n,","Comma", width1, height1),new VirKeyValue(">\n.","Period", width1, height1),new VirKeyValue("?\n/","Slash", width1, height1),new VirKeyValue("Shift","RightControl", width140, height1),new VirKeyValue("↑","UpArrow", width1, height1),new VirKeyValue("1","Keypad1", width1, height1),new VirKeyValue("2","Keypad2", width1, height1),new VirKeyValue("3","Keypad3", width1, height1),};dicVirKeys.Add(4, tempVirKeys);tempVirKeys = new List<VirKeyValue>{new VirKeyValue("Ctrl","LeftControl", width2, height1),new VirKeyValue("Win", "LeftWindows",width1, height1),new VirKeyValue("Alt", "LeftAlt",width1, height1),new VirKeyValue("—————Space———","Space", width3, height1),new VirKeyValue("Alt", "RightAlt",width1, height1),new VirKeyValue("Ctrl", "RightControl",width2, height1),new VirKeyValue("←","LeftArrow",width1, height1),new VirKeyValue("↓","DownArrow",width1, height1),new VirKeyValue("→","RightArrow",width1, height1),new VirKeyValue("0","Keypad0",width100, height1),new VirKeyValue(".","KeypadPeriod",width1, height1),};dicVirKeys.Add(5, tempVirKeys);}}

整体代码如下:

using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;// 键盘映射value值
public class VirKeyValue
{public float height;public float width;public string name;public string key;public VirKeyValue(string name, string key, float width, float height){this.name = name;this.width = width;this.height = height;this.key = key;}
}
public class VirtualKeyboardEditor : EditorWindow
{[MenuItem("工具/键盘映射值")]static void OpenWindow(){GetWindow<VirtualKeyboardEditor>().Show();}static Dictionary<int, List<VirKeyValue>> dicVirKeys;const int width1 = 50;const int width2 = 80;const int width100 = 100;const int width120 = 120;const int width140 = 138;const int width3 = 300;const int height1 = 30;private void DataInit(){if (dicVirKeys == null){dicVirKeys = new Dictionary<int, List<VirKeyValue>>();List<VirKeyValue> tempVirKeys = new List<VirKeyValue>{new VirKeyValue("Esc","Esc", width1, height1),new VirKeyValue("F1","F1", width1, height1),new VirKeyValue("F2","F2", width1, height1),new VirKeyValue("F3","F3", width1, height1),new VirKeyValue("F4","F4", width1, height1),new VirKeyValue("F5","F5", width1, height1),new VirKeyValue("F6","F6", width1, height1),new VirKeyValue("F7","F7", width1, height1),new VirKeyValue("F8","F8", width1, height1),new VirKeyValue("F9","F9", width1, height1),new VirKeyValue("F10","F10", width1, height1),new VirKeyValue("F11","F11", width1, height1),new VirKeyValue("F12","F12", width1, height1),new VirKeyValue("Print\nScreen","Print", width1, height1),new VirKeyValue("Scroll\nLock", "ScrollLockScroll",width1, height1),new VirKeyValue("Pause","Pause", width1, height1)};dicVirKeys.Add(0, tempVirKeys);tempVirKeys = new List<VirKeyValue>{new VirKeyValue("~\n`","BackQuote", width1, height1),new VirKeyValue("!\n1","Alpha1", width1, height1),new VirKeyValue("@\n2","Alpha2", width1, height1),new VirKeyValue("#\n3","Alpha3", width1, height1),new VirKeyValue("$\n4","Alpha4", width1, height1),new VirKeyValue("%\n5","Alpha5", width1, height1),new VirKeyValue("^\n6","Alpha6", width1, height1),new VirKeyValue("&\n7","Alpha7", width1, height1),new VirKeyValue("*\n8","Alpha8", width1, height1),new VirKeyValue("(\n9","Alpha9", width1, height1),new VirKeyValue(")\n0","Alpha0", width1, height1),new VirKeyValue("_\n-","Minus", width1, height1),new VirKeyValue("+\n=","Equals", width1, height1),new VirKeyValue("←Backspace","Backspace", width120, height1),new VirKeyValue("Insert","Insert", width1, height1),new VirKeyValue("Home", "Home",width1, height1),new VirKeyValue("Page\nUp", "PageUp",width1, height1),new VirKeyValue("NumLk","Numlock", width1, height1),new VirKeyValue("/","KeypadDivide", width1, height1),new VirKeyValue("*","KeypadMultiply", width1, height1),new VirKeyValue("-","KeypadMinus", width1, height1),};dicVirKeys.Add(1, tempVirKeys);tempVirKeys = new List<VirKeyValue>{new VirKeyValue("Tab","Tab", width100, height1),new VirKeyValue("Q","Q",width1, height1),new VirKeyValue("W","W",width1, height1),new VirKeyValue("E","E",width1, height1),new VirKeyValue("R","R",width1, height1),new VirKeyValue("T","T",width1, height1),new VirKeyValue("Y","Y",width1, height1),new VirKeyValue("U","U",width1, height1),new VirKeyValue("I","I",width1, height1),new VirKeyValue("O","O",width1, height1),new VirKeyValue("P","P",width1, height1),new VirKeyValue("{\n[","LeftBracket", width1, height1),new VirKeyValue("}\n]","RightBracket", width1, height1),new VirKeyValue("|\n\\", "Backslash",70, height1),new VirKeyValue("Delete", "Delete",width1, height1),new VirKeyValue("End", "End",width1, height1),new VirKeyValue("Page\nDown","PageDown", width1, height1),new VirKeyValue("7","Keypad7",width1, height1),new VirKeyValue("8","Keypad8",width1, height1),new VirKeyValue("9","Keypad9",width1, height1),new VirKeyValue("+","KeypadPlus",width1, height1),};dicVirKeys.Add(2, tempVirKeys);tempVirKeys = new List<VirKeyValue>{new VirKeyValue("Caps\nLock","Backspace", width120, height1),new VirKeyValue("A","A", width1, height1),new VirKeyValue("S","S", width1, height1),new VirKeyValue("D","D", width1, height1),new VirKeyValue("F","F", width1, height1),new VirKeyValue("G","G", width1, height1),new VirKeyValue("H","H", width1, height1),new VirKeyValue("J","J", width1, height1),new VirKeyValue("K","K", width1, height1),new VirKeyValue("L","L", width1, height1),new VirKeyValue(":\n;","Semicolon", width1, height1),new VirKeyValue("\"\n'","Quote", width1, height1),new VirKeyValue("Enter","Enter", 104, height1),new VirKeyValue("4","Keypad4",width1, height1),new VirKeyValue("5","Keypad5",width1, height1),new VirKeyValue("6","Keypad6",width1, height1),new VirKeyValue("Enter","KeypadEnter", width1, height1),};dicVirKeys.Add(3, tempVirKeys);tempVirKeys = new List<VirKeyValue>{new VirKeyValue("Shift","LeftShift", width140, height1),new VirKeyValue("Z","Z",width1, height1),new VirKeyValue("X","X",width1, height1),new VirKeyValue("C","C",width1, height1),new VirKeyValue("V","V",width1, height1),new VirKeyValue("B","B",width1, height1),new VirKeyValue("N","N",width1, height1),new VirKeyValue("M","M",width1, height1),new VirKeyValue("<\n,","Comma", width1, height1),new VirKeyValue(">\n.","Period", width1, height1),new VirKeyValue("?\n/","Slash", width1, height1),new VirKeyValue("Shift","RightControl", width140, height1),new VirKeyValue("↑","UpArrow", width1, height1),new VirKeyValue("1","Keypad1", width1, height1),new VirKeyValue("2","Keypad2", width1, height1),new VirKeyValue("3","Keypad3", width1, height1),};dicVirKeys.Add(4, tempVirKeys);tempVirKeys = new List<VirKeyValue>{new VirKeyValue("Ctrl","LeftControl", width2, height1),new VirKeyValue("Win", "LeftWindows",width1, height1),new VirKeyValue("Alt", "LeftAlt",width1, height1),new VirKeyValue("—————Space———","Space", width3, height1),new VirKeyValue("Alt", "RightAlt",width1, height1),new VirKeyValue("Ctrl", "RightControl",width2, height1),new VirKeyValue("←","LeftArrow",width1, height1),new VirKeyValue("↓","DownArrow",width1, height1),new VirKeyValue("→","RightArrow",width1, height1),new VirKeyValue("0","Keypad0",width100, height1),new VirKeyValue(".","KeypadPeriod",width1, height1),};dicVirKeys.Add(5, tempVirKeys);}}//用于绘制窗口内容private void OnGUI(){}
}

2-2、界面绘制

using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;// 键盘映射value值
public class VirKeyValue
{public float height;public float width;public string name;public string key;public VirKeyValue(string name, string key, float width, float height){this.name = name;this.width = width;this.height = height;this.key = key;}
}
public class VirtualKeyboardEditor : EditorWindow
{[MenuItem("工具/键盘映射值")]static void OpenWindow(){GetWindow<VirtualKeyboardEditor>().Show();}static Dictionary<int, List<VirKeyValue>> dicVirKeys;const int width1 = 50;const int width2 = 80;const int width100 = 100;const int width120 = 120;const int width140 = 138;const int width3 = 300;const int height1 = 30;private void DataInit(){if (dicVirKeys == null){dicVirKeys = new Dictionary<int, List<VirKeyValue>>();List<VirKeyValue> tempVirKeys = new List<VirKeyValue>{new VirKeyValue("Esc","Esc", width1, height1),new VirKeyValue("F1","F1", width1, height1),new VirKeyValue("F2","F2", width1, height1),new VirKeyValue("F3","F3", width1, height1),new VirKeyValue("F4","F4", width1, height1),new VirKeyValue("F5","F5", width1, height1),new VirKeyValue("F6","F6", width1, height1),new VirKeyValue("F7","F7", width1, height1),new VirKeyValue("F8","F8", width1, height1),new VirKeyValue("F9","F9", width1, height1),new VirKeyValue("F10","F10", width1, height1),new VirKeyValue("F11","F11", width1, height1),new VirKeyValue("F12","F12", width1, height1),new VirKeyValue("Print\nScreen","Print", width1, height1),new VirKeyValue("Scroll\nLock", "ScrollLockScroll",width1, height1),new VirKeyValue("Pause","Pause", width1, height1)};dicVirKeys.Add(0, tempVirKeys);tempVirKeys = new List<VirKeyValue>{new VirKeyValue("~\n`","BackQuote", width1, height1),new VirKeyValue("!\n1","Alpha1", width1, height1),new VirKeyValue("@\n2","Alpha2", width1, height1),new VirKeyValue("#\n3","Alpha3", width1, height1),new VirKeyValue("$\n4","Alpha4", width1, height1),new VirKeyValue("%\n5","Alpha5", width1, height1),new VirKeyValue("^\n6","Alpha6", width1, height1),new VirKeyValue("&\n7","Alpha7", width1, height1),new VirKeyValue("*\n8","Alpha8", width1, height1),new VirKeyValue("(\n9","Alpha9", width1, height1),new VirKeyValue(")\n0","Alpha0", width1, height1),new VirKeyValue("_\n-","Minus", width1, height1),new VirKeyValue("+\n=","Equals", width1, height1),new VirKeyValue("←Backspace","Backspace", width120, height1),new VirKeyValue("Insert","Insert", width1, height1),new VirKeyValue("Home", "Home",width1, height1),new VirKeyValue("Page\nUp", "PageUp",width1, height1),new VirKeyValue("NumLk","Numlock", width1, height1),new VirKeyValue("/","KeypadDivide", width1, height1),new VirKeyValue("*","KeypadMultiply", width1, height1),new VirKeyValue("-","KeypadMinus", width1, height1),};dicVirKeys.Add(1, tempVirKeys);tempVirKeys = new List<VirKeyValue>{new VirKeyValue("Tab","Tab", width100, height1),new VirKeyValue("Q","Q",width1, height1),new VirKeyValue("W","W",width1, height1),new VirKeyValue("E","E",width1, height1),new VirKeyValue("R","R",width1, height1),new VirKeyValue("T","T",width1, height1),new VirKeyValue("Y","Y",width1, height1),new VirKeyValue("U","U",width1, height1),new VirKeyValue("I","I",width1, height1),new VirKeyValue("O","O",width1, height1),new VirKeyValue("P","P",width1, height1),new VirKeyValue("{\n[","LeftBracket", width1, height1),new VirKeyValue("}\n]","RightBracket", width1, height1),new VirKeyValue("|\n\\", "Backslash",70, height1),new VirKeyValue("Delete", "Delete",width1, height1),new VirKeyValue("End", "End",width1, height1),new VirKeyValue("Page\nDown","PageDown", width1, height1),new VirKeyValue("7","Keypad7",width1, height1),new VirKeyValue("8","Keypad8",width1, height1),new VirKeyValue("9","Keypad9",width1, height1),new VirKeyValue("+","KeypadPlus",width1, height1),};dicVirKeys.Add(2, tempVirKeys);tempVirKeys = new List<VirKeyValue>{new VirKeyValue("Caps\nLock","Backspace", width120, height1),new VirKeyValue("A","A", width1, height1),new VirKeyValue("S","S", width1, height1),new VirKeyValue("D","D", width1, height1),new VirKeyValue("F","F", width1, height1),new VirKeyValue("G","G", width1, height1),new VirKeyValue("H","H", width1, height1),new VirKeyValue("J","J", width1, height1),new VirKeyValue("K","K", width1, height1),new VirKeyValue("L","L", width1, height1),new VirKeyValue(":\n;","Semicolon", width1, height1),new VirKeyValue("\"\n'","Quote", width1, height1),new VirKeyValue("Enter","Enter", 104, height1),new VirKeyValue("4","Keypad4",width1, height1),new VirKeyValue("5","Keypad5",width1, height1),new VirKeyValue("6","Keypad6",width1, height1),new VirKeyValue("Enter","KeypadEnter", width1, height1),};dicVirKeys.Add(3, tempVirKeys);tempVirKeys = new List<VirKeyValue>{new VirKeyValue("Shift","LeftShift", width140, height1),new VirKeyValue("Z","Z",width1, height1),new VirKeyValue("X","X",width1, height1),new VirKeyValue("C","C",width1, height1),new VirKeyValue("V","V",width1, height1),new VirKeyValue("B","B",width1, height1),new VirKeyValue("N","N",width1, height1),new VirKeyValue("M","M",width1, height1),new VirKeyValue("<\n,","Comma", width1, height1),new VirKeyValue(">\n.","Period", width1, height1),new VirKeyValue("?\n/","Slash", width1, height1),new VirKeyValue("Shift","RightControl", width140, height1),new VirKeyValue("↑","UpArrow", width1, height1),new VirKeyValue("1","Keypad1", width1, height1),new VirKeyValue("2","Keypad2", width1, height1),new VirKeyValue("3","Keypad3", width1, height1),};dicVirKeys.Add(4, tempVirKeys);tempVirKeys = new List<VirKeyValue>{new VirKeyValue("Ctrl","LeftControl", width2, height1),new VirKeyValue("Win", "LeftWindows",width1, height1),new VirKeyValue("Alt", "LeftAlt",width1, height1),new VirKeyValue("—————Space———","Space", width3, height1),new VirKeyValue("Alt", "RightAlt",width1, height1),new VirKeyValue("Ctrl", "RightControl",width2, height1),new VirKeyValue("←","LeftArrow",width1, height1),new VirKeyValue("↓","DownArrow",width1, height1),new VirKeyValue("→","RightArrow",width1, height1),new VirKeyValue("0","Keypad0",width100, height1),new VirKeyValue(".","KeypadPeriod",width1, height1),};dicVirKeys.Add(5, tempVirKeys);}}//用于绘制窗口内容private void OnGUI(){DataInit();GUILayout.Label("Note:在开发中会遇到使用监控键盘输入的情况,但是KeyCode的值往往分不清楚,此工具就是跟键盘一一对应的Key值,不清楚的时候" +"看一眼就行了,当然,也可以点击按钮,点击后可以打印当前KeyCode值。");for (int i = 0; i < dicVirKeys.Count; i++){GUILayout.BeginVertical();OnRow(i);GUILayout.EndVertical();}}void OnRow(int index){GUILayout.BeginHorizontal();for (int i = 0; i < dicVirKeys[index].Count; i++){if (dicVirKeys[index][i].name == "↑"){GUILayout.Space(50);}else if (dicVirKeys[index][i].name == "←"){GUILayout.Space(180);}else if (dicVirKeys[index][i].name == "4"){GUILayout.Space(160);}else if (dicVirKeys[index][i].name == "1"){GUILayout.Space(60);}else if (dicVirKeys[index][i].name == "0"){GUILayout.Space(6);}GUILayout.BeginVertical();if (GUILayout.Button(dicVirKeys[index][i].name, GUILayout.Width(dicVirKeys[index][i].width), GUILayout.Height(dicVirKeys[index][i].height))){Debug.Log("当前按下的键位是 : KeyCode." + dicVirKeys[index][i].key);}GUILayout.Label(dicVirKeys[index][i].key);GUILayout.EndVertical();if (dicVirKeys[index][i].name == "Esc"){GUILayout.Space(52);}else if (dicVirKeys[index][i].name == "F4"){GUILayout.Space(36);}else if (dicVirKeys[index][i].name == "F8"){GUILayout.Space(36);}}GUILayout.EndHorizontal();}
}

然后在Untiy编辑器的Edit栏,选择工具→键盘映射值打开面板:
在这里插入图片描述

三、后记

如果觉得本篇文章有用别忘了点个关注,关注不迷路,持续分享更多Unity干货文章。


你的点赞就是对博主的支持,有问题记得留言:

博主主页有联系方式。

博主还有跟多宝藏文章等待你的发掘哦:

专栏方向简介
Unity3D开发小游戏小游戏开发教程分享一些使用Unity3D引擎开发的小游戏,分享一些制作小游戏的教程。
Unity3D从入门到进阶入门从自学Unity中获取灵感,总结从零开始学习Unity的路线,有C#和Unity的知识。
Unity3D之UGUIUGUIUnity的UI系统UGUI全解析,从UGUI的基础控件开始讲起,然后将UGUI的原理,UGUI的使用全面教学。
Unity3D之读取数据文件读取使用Unity3D读取txt文档、json文档、xml文档、csv文档、Excel文档。
Unity3D之数据集合数据集合数组集合:数组、List、字典、堆栈、链表等数据集合知识分享。
Unity3D之VR/AR(虚拟仿真)开发虚拟仿真总结博主工作常见的虚拟仿真需求进行案例讲解。
Unity3D之插件插件主要分享在Unity开发中用到的一些插件使用方法,插件介绍等
Unity3D之日常开发日常记录主要是博主日常开发中用到的,用到的方法技巧,开发思路,代码分享等
Unity3D之日常BUG日常记录记录在使用Unity3D编辑器开发项目过程中,遇到的BUG和坑,让后来人可以有些参考。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/102718.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Python- socket编程

Python中的socket模块为网络通信提供了基础API&#xff0c;使我们能够在应用程序中实现低级的网络交互。使用socket编程&#xff0c;可以创建TCP、UDP和RAW sockets来进行数据通信。 以下是Python socket 编程的简要概述&#xff1a; 1. 核心概念 Socket: 通信的端点&#x…

分布式事务入门

文章目录 分布式事务问题本地事务分布式事务演示分布式事务问题 理论基础CAP定理一致性可用性分区容错矛盾 BASE理论 SeataSeata的架构部署TC服务微服务集成seata 动手实践XA模式两阶段提交Seata的XA模型实现XA模式 AT模式Seata的AT模型流程梳理脏写问题实现AT模式 TCC模式流程…

github小记(一):清除github在add或者commit之后缓存区

github清除在add或者commit之后缓存区 前言1. 第一步之后想要撤销2. 第二步之后想要撤销a. 改变一下rrr.txt的内容b. 想提交本地文件的test文件夹c. 我后悔了突然不想提交了 前言 github自用 一般github上代码提交顺序&#xff1a; 第一步&#xff1a; git add . or git ad…

0基础学习VR全景平台篇 第107篇:全景图调色和细节处理(上,地拍)

上课&#xff01;全体起立~ 大家好&#xff0c;欢迎观看蛙色官方系列全景摄影课程&#xff01; 今天教给大家的课程是地拍全景图调色和细节处理&#xff0c;下面我们就开始吧&#xff01; 1.把照片快速导入LR软件 选择【图库】模块 打开软件后&#xff0c;点击【导入】按…

【Ceph Block Device】块设备挂载使用

文章目录 前言创建pool创建user创建image列出image检索image信息调整image大小增加image大小减少image大小 删除image从pool中删除image从pool中“延迟删除”image从pool中移除“延迟删除的image” 恢复image恢复指定pool中延迟删除的image恢复并重命名image 映射块设备格式化i…

总结四:数据库(MySQL)面经

文章目录 一、SQL1、介绍一下数据库分页2、介绍一下SQL中的聚合函数3、表跟表是怎么关联的?4、说一说你对外连接的了解&#xff1f;5、说一说数据库的左连接和右连接&#xff1f;6、SQL中怎么将行转成列&#xff1f;7、谈谈你对SQL注入的理解&#xff1f;8、将一张表的部分数据…

苍穹外卖(一)

苍穹外卖项目介绍 项目介绍 本项目&#xff08;苍穹外卖&#xff09;是专门为餐饮企业&#xff08;餐厅、饭店&#xff09;定制的一款软件产品&#xff0c;包括 系统管理后台 和 小程序端应用 两部分。其中系统管理后台主要提供给餐饮企业内部员工使用&#xff0c;可以对餐厅…

提升市场调研和竞品分析效率:利用Appium实现App数据爬取

市场调研和竞品分析通常需要获取大量的数据&#xff0c;而手动收集这些数据往往耗时且容易出错。而利用Appium框架&#xff0c;我们可以轻松地实现自动化的App数据爬取&#xff0c;这种方法不仅可以节省时间和人力成本&#xff0c;还可以提高数据的准确性和一致性。 Appium是一…

springboot单独在指定地方输出sql

一般线上项目都是将日志进行关闭&#xff0c;因为mybatis日志打印&#xff0c;时间长了&#xff0c;会占用大量的内存&#xff0c;如果我想在我指定的地方进行打印sql情况&#xff0c;怎么玩呢&#xff01; 下面这个场景&#xff1a; 某天线上的项目出bug了&#xff0c;日志打印…

网线接法aaa

![(https://img-blog.csdnimg.cn/d2901403dbd44feaa8f7be669ddcf2fc.png) 加粗样式 在这里插入图片描述

论文阅读笔记(Clover: 计算与存储被动分离的分布式键值存储系统)

关于Disaggregating Persistent Memory and Controlling Them Remotely: An Exploration of Passive Disaggregated Key-Value Stores这篇论文的笔记 原文链接 提出背景 传统的分布式存储系统中&#xff0c;每个节点都会包含计算和存储两个部分&#xff0c;一个节点既可以访…

HDLbits: Lemmings3

Lemmings又多了一种状态&#xff1a;dig&#xff0c;我按照上一篇文章里大神的思路又多加了两种状态&#xff1a;LEFT_DIGGING与RIGHT_DIGGING&#xff0c;写出了如下的代码&#xff1a; module top_module(input clk,input areset, // Freshly brainwashed Lemmings walk …

nginx windows安装部署,代理转发配置

一、安装 1、nginx官网下载 windows版本 nginx官网 下载后解压到本地 2、在nginx的配置文件是conf目录下的nginx.conf&#xff0c;默认配置的nginx监听的端口为80&#xff0c;如果本地电脑的80端口有被占用&#xff0c;如果本地80端口已经被使用则修改成其他端口。如下&…

HDLbits: Lfsr5

我的错误写法&#xff0c;半成品&#xff0c;完全错误&#xff1a; module top_module(input clk,input reset, // Active-high synchronous reset to 5h1output [4:0] q ); dff dff_1(clk, 0 ^ q[0],q[4]);dff dff_2(clk, q[4] ,q[3]);dff dff_3(clk, q[3] ^ q[0] ,q[2]);…

通讯网关软件020——利用CommGate X2Mysql实现Modbus TCP数据转储Mysql

本文介绍利用CommGate X2MYSQL实现从Modbus TCP设备读取数据并转储至MYSQL数据库。CommGate X2MYSQL是宁波科安网信开发的网关软件&#xff0c;软件可以登录到网信智汇(http://wangxinzhihui.com)下载。 【案例】如下图所示&#xff0c;实现从Modbus TCP设备读取数据并转储至M…

2023年电工(初级)证考试题库及电工(初级)试题解析

题库来源&#xff1a;安全生产模拟考试一点通公众号小程序 2023年电工&#xff08;初级&#xff09;证考试题库及电工&#xff08;初级&#xff09;试题解析是安全生产模拟考试一点通结合&#xff08;安监局&#xff09;特种作业人员操作证考试大纲和&#xff08;质检局&#…

【网络安全】「漏洞原理」(二)SQL 注入漏洞之理论讲解

前言 严正声明&#xff1a;本博文所讨论的技术仅用于研究学习&#xff0c;旨在增强读者的信息安全意识&#xff0c;提高信息安全防护技能&#xff0c;严禁用于非法活动。任何个人、团体、组织不得用于非法目的&#xff0c;违法犯罪必将受到法律的严厉制裁。 【点击此处即可获…

软件设计师学习笔记12-数据库的基本概念+数据库的设计过程+概念设计+逻辑设计

1.数据库的基本概念 1.1数据库的体系结构 1.1.1常见数据库 ①集中式数据库 数据是集中的&#xff1b;数据管理是集中的 ②C/S结构 客户端负责数据表服务&#xff1b;服务器负责数据库服务&#xff1b;系统分前后端&#xff1b;ODBC、JDBC ③分布式数据库 物理上分布、逻…

Unity可视化Shader工具ASE介绍——5、ASE快捷键和常用节点介绍

大家好&#xff0c;我是阿赵。   继续介绍Unity可视化Shader插件ASE。这次来说一些常用节点的快捷键&#xff0c;顺便介绍一些常用的节点。   用过UE引擎的朋友可能会发现&#xff0c;ASE的整体用法和UE的材质节点编辑器非常的像&#xff0c;甚至连很多节点的快捷键都和UE的…

【iOS】Fastlane一键打包上传到TestFlight、蒲公英

Fastlane一键打包上传到TestFlight、蒲公英 前言一、准备二、探索一、Fastlane配置1、Fastlane安装2、Fastlane更新3、Fastlane卸载4、查看Fastlane版本5、查看Fastlane位置6、Fastlane初始化 二、Fastlane安装蒲公英插件三、Fastlane文件编辑1、Gemfile文件2、Appfile文件3、F…