1. 继承Editor,重写OnInspectorGUI方法 Editor官方文档 需求 将TestClass中intData属性和stringData按指定格式显示. 实现 定义一个测试类TestClass,一个可序列化类DataClass [CreateAssetMenu] public class TestClass : ScriptableObject { [Range(, )] public int intData; public string stringData; public L
最近比较清闲,就重新看了一遍例子系统,感觉能把效果做的炫酷对于初学者来说并不是一件容易的事,但是回头想想,最重要的原因可能还是没有把Particle Systems组件研究透吧,温故而知新,一起复习一下粒子系统吧. 下面是Unity5.5.0版本的粒子系统官方文档的翻译 Main module//主要模块 Emission//发射 Shape//形状 Velocity Over Lifetime//粒子在生命周期内的速度 Limit Velocity Over Lifetime//粒子在生命周期
通常 在完成 条件之后再增加分数 所以 一开始先增加 public int 得到分数; public Text 分数ui; 在完成条件后增加 得到分数++; 分数ui.text = 得到分数.ToString(); 下面是写贪吃蛇的 using System.Collections; using System.Collections.Generic; using UnityEngine; using System.Collections.Generic; using System.Linq; u
1.首先定义一个需要控制数值的类,类中定义若干个变量 using UnityEngine;using System.Collections; using UnityEngine; using System.Collections; // This is not an editor script. public class MyPlayer : MonoBehaviour { public int Jump; void Update () { // Update logic here... } }