摘要:The same field name is serialized multiple times in the class or its parent class. This is not supported: Base(MonoBehaviour) txtTitle UnityEditor.Hos
阅读全文
摘要:不要直接引用dll文件,在项目中添加引用,引用生成dll文件的项目。 右键项目名称–>点击菜单中的“添加”–>点击“引用”–>在弹出窗中点击“解决方案”下的“项目”,勾选要引用的项目,点击“确定”
阅读全文
摘要:什么是局部类型? C# 2.0 引入了局部类型的概念。局部类型允许我们将一个类、结构或接口分成几个部分,分别实现在几个不同的.cs文件中。 局部类型适用于以下情况: (1) 类型特别大,不宜放在一个文件中实现。 (2) 一个类型中的一部分代码为自动化工具生成的代码,不宜与我们自己编写的代码混合在一起
阅读全文
摘要:using UnityEngine; using System.Collections; using UnityEngine.Events; using UnityEngine.EventSystems; public class ClickListener : MonoBehaviour, IPo
阅读全文
摘要:public static IEnumerator YieldAniFinish(Animator ani,string aniName, UnityAction action) { yield return null; AnimatorStateInfo stateinfo = ani.GetCu
阅读全文
摘要:Mono单例 场景里挂载了,先找场景里有的DontDestroyOnLoad using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; namesp
阅读全文