当前位置:网站首页>unity3d扩展工具栏
unity3d扩展工具栏
2022-07-01 16:32:00 【技术改造世界】
添加一个便捷工具到unity3d编辑器中,加快使用效率。
public class PathMaker : EditorWindow
{
private static GameObject obj = null;
[MenuItem("GameObject/制作路径(快捷键ALT+A) &a")]
public static void ShowWindow(MenuCommand com)
{
obj = (GameObject)com.context;
SceneView view = SceneView.lastActiveSceneView;
Debug.Log("camera position:"+view.camera.transform.position);
// view.pivot = YOUR_GAME_OBJECT.transform.position;
// 此处省略1000字实现的自己逻辑。
}
}
此代码将场景中的GameObject右键菜单加一个选项“制作路径(快捷键ALT+A)”,其中可以使用快捷键ALT+A代替,里面获取当前场景中的摄像机位置。
边栏推荐
- Report on Market Research and investment prospects of ammonium dihydrogen phosphate industry in China (2022 Edition)
- Is the securities account given by the head teacher of goucai school safe? Can I open an account?
- What are the differences between PHP and DW
- 单例模式的懒汉模式跟恶汉模式的区别
- [kotlin] Introduction to higher-order functions
- P2893 [usaco08feb] making the grade g (DP & priority queue)
- 【直播预约】数据库OBCP认证全面升级公开课
- MySQL learning summary
- Zabbix2.2 monitoring system and application log monitoring alarm
- 求求你们,别再刷 Star 了!这跟“爱国”没关系!
猜你喜欢

Tutorial on principles and applications of database system (006) -- compiling and installing MySQL 5.7 (Linux Environment)

Building blocks for domestic databases, stonedb integrated real-time HTAP database is officially open source!

String类

Principes et applications du système de base de données (006) - - compilation et installation de MySQL 5.7 (environnement Linux)

Kali install Nessus

Défaillance lors du démarrage de la machine virtuelle VMware: le poste de travail VMware n'est pas compatible avec hyper - V...

免费抽奖 | 《阿巴豆》探索未来系列盲盒数字版权作品全网首发!

Basic usage of Frida

Exclusive news: Alibaba cloud quietly launched RPA cloud computer and has opened cooperation with many RPA manufacturers

机器学习11-聚类,孤立点判别
随机推荐
Gaussdb (for MySQL):partial result cache, which accelerates the operator by caching intermediate results
China BMS battery management system Market Research Report (2022 Edition)
Hi Fun Summer, play SQL planner with starrocks!
巴比特 | 元宇宙每日必读:奈雪币、元宇宙乐园、虚拟股票游戏...奈雪的茶这波“操作拉满”的营销活动你看懂了吗?...
数据库系统原理与应用教程(003)—— MySQL 安装与配置:手工配置 MySQL(windows 环境)
Borui data integrated intelligent observable platform was selected into the "Yunyuan production catalogue" of China Academy of communications in 2022
判断一棵二叉树是否为平衡二叉树
毕业季 | 华为专家亲授面试秘诀:如何拿到大厂高薪offer?
Basic usage of Frida
Tutorial on the principle and application of database system (005) -- Yum offline installation of MySQL 5.7 (Linux Environment)
Tutorial on the principle and application of database system (001) -- MySQL installation and configuration: installation of MySQL software (Windows Environment)
What is the effect of choosing game shield safely in the game industry?
Virtual serial port simulator and serial port debugging assistant tutorial "suggestions collection"
Redis6.0 新功能
Detailed explanation of activity life cycle and startup mode
Why is the pkg/errors tripartite library more recommended for go language error handling?
Soft test network engineer full truth simulation question (including answer and analysis)
Kali install Nessus
Flux d'entrées / sorties et opérations de fichiers en langage C
AI高考志愿填报:大厂神仙打架,考生付费围观