Fork me on GitHub
上一页 1 ··· 9 10 11 12 13 14 15 下一页
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Net.Sockets;using System.N 阅读全文
posted @ 2017-11-21 17:36 爱上游戏开发 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 代码: using UnityEngine;using UnityEditor;public class MyWidow : EditorWindow{ [MenuItem("Window/Show MyWindow")] static void ShowMyWindow() { MyWidow m 阅读全文
posted @ 2017-11-16 11:22 爱上游戏开发 阅读(940) 评论(0) 推荐(0) 编辑
摘要: 代码: using UnityEditor;using UnityEngine;public class ChangeValue : ScriptableWizard { public int health = 10; public int speed = 23; [MenuItem("Tools/ 阅读全文
posted @ 2017-11-16 11:19 爱上游戏开发 阅读(629) 评论(0) 推荐(0) 编辑
摘要: 代码: [MenuItem("Tools/Delete ", true, 1)] static bool DeleteVadidate() { if (Selection.gameObjects.Length > 0) return true; else return false; } [MenuI 阅读全文
posted @ 2017-11-16 11:03 爱上游戏开发 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 代码: [MenuItem("Tools/Delete",false,1)] static void Delete() { GameObject[] go = Selection.gameObjects; foreach (GameObject g in go) { //GameObject.Des 阅读全文
posted @ 2017-11-16 10:56 爱上游戏开发 阅读(2172) 评论(0) 推荐(0) 编辑
摘要: 代码: [MenuItem("Tools/GetChance", false, 1)] static void GetChance() { if (Selection.gameObjects.Length > 0) { Debug.Log(Selection.activeGameObject.nam 阅读全文
posted @ 2017-11-16 10:53 爱上游戏开发 阅读(1674) 评论(0) 推荐(0) 编辑
摘要: 在组件中右击创建一个选项代码: [MenuItem("CONTEXT/PlayerHealth/InitHealth")] static void Test5() { Debug.Log("init"); } 说明:MenuItem中第二个参数:组件名 MenuItem中第三个参数:选项名 修改该组 阅读全文
posted @ 2017-11-16 10:48 爱上游戏开发 阅读(685) 评论(0) 推荐(0) 编辑
摘要: 在Hierarchy面板创建选项的代码: [MenuItem("GameObject/Test",false,1)] static void Test1() { Debug.Log("test"); } 在Project面板创建选项的代码: [MenuItem("Assets/Test")] sta 阅读全文
posted @ 2017-11-16 10:42 爱上游戏开发 阅读(564) 评论(0) 推荐(0) 编辑
摘要: 代码: [MenuItem("Tools/Test",false,1)] static void Test() { Debug.Log("test"); } 注意:MenuItem中第一个参数:需要创建选项在工具栏中的路径,此路径的父目录可以是Unity中已存在的,也可以自己直接同子目录一起创建,例 阅读全文
posted @ 2017-11-16 10:37 爱上游戏开发 阅读(1962) 评论(0) 推荐(0) 编辑
摘要: 方法一:使用DoString 代码为: Lua lua = new Lua(); lua.DoString("a=13"); lua.DoString("b=14"); object[] value = lua.DoString("return a,b"); foreach (object obj 阅读全文
posted @ 2017-11-06 21:36 爱上游戏开发 阅读(2870) 评论(0) 推荐(1) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 下一页
 >>>转载请注明出处