https://www.cnblogs.com/CodeGize/p/7859656.html Unity生成的VS工程一般是无法打开属性面板的.但是事实上,如果使用VS for unity,通过配置是可以打开这个属性面板的.这里使用Unity版本为2017.2.0f3,使用的是VS for Unity 3.4.0.2版本,IDE为VS2017版本. 打开VS2017,选择菜单“工具->选项”,打开选项面板.在选项面板中选择适用于Unity的工具(如果没有这个,请用VS2017 installe
博客转移到 http://jacean.github.io/ 继续分享编程经验 因为要做流体布局,但两个控件没办法组合,就做自定义控件.这个控件需要一个text设置文本,一个pic设置图片显示,图片通过选择获取,在属性面板里能够修改. 添加用户控件之后就可以自己随意设置控件内容了,这里说下关于属性的一些设置. 自定义控件显示在工具箱的开关:将true改为false就可以不显示了. [ToolboxItem(true)] public partial class UserControl1 : Us
在扩展Unity的时候,往往会用到一些属性,这里将常用的列一下. 1.属性只读: #if UNITY_EDITOR using UnityEditor; #endif using UnityEngine; public class ReadOnlyAttribute : PropertyAttribute { } #if UNITY_EDITOR [CustomPropertyDrawer(typeof(ReadOnlyAttribute))] public class ReadOnlyDraw
using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(MeshFilter),typeof(MeshRenderer))] public class Radar : MonoBehaviour { [Tooltip("属性边长")] ; [Range(, ), Tooltip("当前属性百分比")] public List<float> m_attrib