201503-28 NGUI之代码添加Button事件 使用NGUI时,对于Button事件,有时我们会需要在代码中删除或添加事件,这时我们就需要了解如何动态添加Butoon事件的方法。 1.首先我们要做的是获取该物体的UIButton组件。 2.调用onClick方法,在调用时我们会看到它是一个EventDelegate集合 .... Read More >
201503-16 Path对应各平台中的路径 转自:http://www.jianshu.com/p/a01a1803cc54 IOS: Application.dataPath : Application/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/xxx.app/Data Application.streamingAssetsPath : Application/xxxxxxxx-xxxx-xxxx-x.... Read More >
201502-26 Layers和LayerMask解析 转自:http://www.jianshu.com/p/89d5252a8b74 Unity中是用int32来表示32个Layer层。int32表示二进制一共有32位(0—31)。 在Unity中可编辑的Layer如下图所示: 在Unity中每个GameObject都有Layer属性,默认的Layer都是Default。在Unity中可编辑的Layer共有24个(8—31层),官方已使用.... Read More >