- 博客(17)
- 收藏
- 关注
原创 UnityEvent 中Invoke()方法
只有类型为void的无参函数,才可以被Invoke方法调用。void Start(){Invoke("call_ok",2);//goodInvoke("call_bad1",2);//bad, call_bad1() is not voidInvoke("call_bad2",2);//bad, call_bad1() has parameters}void call_ok(){//s
2017-09-21 10:22:41
6165
原创 visual studio code and unity||mac 下使用visual studio 调试unity代码
官方说明 点选右下角open,即可VS code已经更新~比之前的好用很多啦~ 比如”查找”功能:在任一个你想查找的字段上command+F,则可以看到所有符合的字段均被高亮。窗口右上角可以选择:“区分大小写”,“不区分大小写”,“模糊匹配”。 窗口右侧有整份代码文件的预览,预览右侧的红色竖条,告诉你你想查找的这些字段坐落的位置,有横杠的红色竖条是你开始查找时该字段的位置。非常方便,赶快试试吧
2017-09-15 16:34:29
340
原创 神奇的C# delegate 委托
C# 中的委托(Delegate)类似于 C 或 C++ 中函数的指针。委托(Delegate) 是存有对某个方法的引用的一种引用类型变量。引用可在运行时被改变。 委托(Delegate)特别用于实现事件和回调方法。所有的委托(Delegate)都派生自 System.Delegate 类。一旦声明了委托类型,委托对象必须使用 new 关键字来创建,且与一个特定的方法有关。当创建委托时,传递到 n
2017-09-15 14:45:11
341
原创 C# Queue模板类
用法用于展现一个先入先出的对象队列Namespace: System.Collections.GenericAssembly: System (in System.dll)可序列化[SerializableAttribute][ComVisibleAttribute(false)]public class Queue<T> : IEnumerable<T>, IEnumerable, IC
2017-09-15 13:49:43
297
原创 ROSBridgeWebSocketConnection使用札记
ROSBridgeWebSocketConnection.cs这个文件整个是一个namespace命名空间:ROSBridgeLib 只有一个类:ROSBridgeWebSocketConnection。其中内嵌了私有类RenderTask,这个私有类有3个私有变量和对应的3个公有方法,加一个构造函数。
2017-09-15 13:43:16
2765
翻译 ThreadStart()笔记
语法C#[ComVisibleAttribute(true)]public delegate void ThreadStart()用法说明当创建托管线程时,在线程上执行的方法由传递给Thread构造函数的ThreadStart委托或ParameterizedThreadStart委托表示。线程调用Thread.Start()方法后,线程才会正式开始执行。执行从由ThreadStart或Param
2017-09-15 10:22:29
1699
翻译 SerializeField
描述强制统一序列化一个私有字段。你几乎永远都不需要这个。当Unity序列化您的脚本时,它将只会序列化公有字段。如果除此之外,你还希望Unity序列化一个你的私有字段,你可以将SerializeField属性添加到该字段。Unity将序列化所有脚本组件,重新加载新程序集,并从序列化的版本中重新创建脚本组件。这个序列化不会在.NET的序列化功能中完成,而是内置在Unity。所使用的序列化系统可以执行以下
2017-09-14 17:43:48
1465
翻译 Input.GetAxis()
语法public static float GetAxis(string axisName);用法描述Returns the value of the virtual axis identified by axisName.The value will be in the range -1…1 for keyboard and joystick input.键盘输入&joystick输入If
2017-09-14 15:28:33
806
翻译 transform初接触
用法描述Position, rotation and scale of an object.Every object in a scene has a Transform. It’s used to store and manipulate the position, rotation and scale of the object. Every Transform can have a par
2017-09-14 15:10:22
195
翻译 Input.GetMouseButtonDown()方法 &Input.GetMouseButton()方法
语法public static bool GetMouseButtonDown(int button);用法描述Returns true during the frame the user pressed the given mouse button.You need to call this function from the Update function, since the state ge
2017-09-14 15:00:55
5927
翻译 touch结构
用法描述Structure describing the status of a finger touching the screen.Devices can track跟踪 a number of different pieces of data about a touch on a touchscreen, including its phase状态 (ie, whether it has ju
2017-09-14 14:43:40
448
翻译 Input.GetTouch()方法
官方链接(英文)所属APImonoBehavior || input代码块语法public static Touch GetTouch(int index);作用Returns object representing status of a specific touch. (Does not allocate temporary variables).GetTouch returns
2017-09-14 14:30:04
4924
原创 yield return用法
疑问using UnityEngine;using System.Collections;public class ExampleClass : MonoBehaviour { IEnumerator Start() { print("Starting " + Time.time); yield return StartCoroutine(WaitAndPr
2017-09-14 11:50:48
256
原创 startCoroutine()用法总结
官方链接(英文)所属APImonoBehavior代码块语法public Coroutine StartCoroutine(IEnumerator routine);作用开始一个coroutine。The execution of a coroutine can be paused at any point using the yield statement. The yield return va
2017-09-14 11:46:31
6777
原创 mac上安装.Net core SDK,并开始第一个C#程序
https://www.microsoft.com/net/core#macos.Net 官方下载地址 https://www.microsoft.com/net/core#macos如何配置mac环境变量,请参考http://www.flakor.cn/2014-09-14-714.html
2017-09-14 10:53:51
6258
原创 visual studio code and unity||mac 下使用visual studio 调试unity代码
https://code.visualstudio.com/docs/other/unity
2017-09-14 10:23:13
396
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人