luoyikun

导航

统计

09 2018 档案

unity3d:悬停显示
摘要:using Framework.UI; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.U 阅读全文

posted @ 2018-09-29 17:03 luoyikun 阅读(21) 评论(0) 推荐(0) 编辑

unity3d:物体点击与拖动互不影响
摘要:private bool bInTouch = false; private float ClickAfter = 0.0f; GameObject m_curClickBox; private Vector3 mousePosLast = Vector3.zero; private bool Dr 阅读全文

posted @ 2018-09-28 19:18 luoyikun 阅读(11) 评论(0) 推荐(0) 编辑

unity3d:camera拖动与ui拖动互不影响
摘要:if (Input.GetMouseButtonDown(0)) { if (Application.isMobilePlatform && Input.touchCount > 0) { for (int i = 0; i < Input.touchCount; i++) { if (EventS 阅读全文

posted @ 2018-09-28 19:14 luoyikun 阅读(4) 评论(0) 推荐(0) 编辑

unity3d:Types.GetType 升级为System.Reflection.Assembly.Load
摘要:var type = Types.GetType(TypeName, "Assembly-CSharp"); 5.3.8代码在2018中报错 UnityEngine.Types.GetType(string, string)' is obsolete: `This was an internal m 阅读全文

posted @ 2018-09-27 13:34 luoyikun 阅读(6) 评论(0) 推荐(0) 编辑

unity3d:ugui双击按钮
摘要:public class ClickEventListener : MonoBehaviour, IPointerClickHandler, IPointerDownHandler, IPointerUpHandler { public static ClickEventListener Get(G 阅读全文

posted @ 2018-09-27 11:04 luoyikun 阅读(7) 评论(0) 推荐(0) 编辑

unity3d:定时任务封装类TimeManager
摘要:namespace Framework.Tools { /// <summary> /// 定时任务封装类 /// </summary> public class TimeTask { /// <summary> /// 延迟时间 /// </summary> private float _time 阅读全文

posted @ 2018-09-22 15:40 luoyikun 阅读(2) 评论(0) 推荐(0) 编辑

unity3d:ui跟着gameobject移动
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; public class UiFollowObj : MonoBehaviour { Transform m_trans; public Tr 阅读全文

posted @ 2018-09-22 14:50 luoyikun 阅读(8) 评论(0) 推荐(0) 编辑

unity3d:最简单的服务器,把收到消息发回客户端
摘要:using UnityEngine; using System.Collections; using System.Collections.Generic; using System.Net.Sockets; using System.Net; using System.Threading; usi 阅读全文

posted @ 2018-09-21 16:15 luoyikun 阅读(4) 评论(0) 推荐(0) 编辑

c#:两个list不同元素,值类型,对象类型
摘要:基本值类型 public static List<T> GetListDiff<T>(List<T> listA,List<T> listB) { List<T> ret = new List<T>(); if (listA.Count > listB.Count) ret = listA.Exce 阅读全文

posted @ 2018-09-20 16:33 luoyikun 阅读(16) 评论(0) 推荐(0) 编辑

unity3d:protobuf .java转.cs
摘要:服务器端定义好protobuf结构,放unity编辑器中生成.cs的结构 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; using System.IO 阅读全文

posted @ 2018-09-19 10:48 luoyikun 阅读(2) 评论(0) 推荐(0) 编辑

unity3d:背景根据字缩放,往一个方向
摘要:unity3d:背景根据字缩放,往一个方向 阅读全文

posted @ 2018-09-14 14:51 luoyikun 阅读(1) 评论(0) 推荐(0) 编辑

unity3d:显示FPS
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; public class FPSShow : MonoBehaviour { private void OnGUI() { string te 阅读全文

posted @ 2018-09-13 13:53 luoyikun 阅读(2) 评论(0) 推荐(0) 编辑

unity3d:复制选中物体transform信息到剪切板
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; public class SaveTransInfo : EditorWindow { [MenuIte 阅读全文

posted @ 2018-09-12 19:22 luoyikun 阅读(17) 评论(0) 推荐(0) 编辑

Unity中解决JsonUtility转换数组失败的BUG
摘要:由于转对象没问题,转数组才会产生问题。所以解决思路是: 转换时遇到数组,在数组外加壳,作为对象转成JSON,再去壳。 解析时遇到数组,先套壳转成对象,再取对象里的数组。 using System.Collections; using System.Collections.Generic; using 阅读全文

posted @ 2018-09-12 15:53 luoyikun 阅读(31) 评论(0) 推荐(0) 编辑

unity3d:ugui 每个字间隔间距
摘要:using UnityEngine; using System.Collections; using UnityEngine.UI; using System; using System.Collections.Generic; public class Line { private int _st 阅读全文

posted @ 2018-09-07 10:10 luoyikun 阅读(3) 评论(0) 推荐(0) 编辑

Unity3D :Mob SMSSDK 运行崩溃
摘要:报错信息 android.content.ActivityNotFoundException: Unable to find explicit activity class {com.shuiying.smsm09061/com.mob.tools.MobUIShell}; have you dec 阅读全文

posted @ 2018-09-06 13:53 luoyikun 阅读(8) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示