![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Unity封装及常用私用代码
LetsonH
菜鸡一个,请大佬们多多指点
展开
-
【封装】UnityWebRequest常用功能封装
using System;using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.Networking;public class MyUnityWebRequest : MonoBehaviour{ static MyUnityWebReque...原创 2019-03-14 10:36:21 · 3301 阅读 · 1 评论 -
【常用】摄像机移动跟随,依据中心点旋转缩放等
/// <summary>/// Mouse orbit./// This script use to control a main camera/// </summary>using UnityEngine;using System.Collections;public class MouseOrbit : MonoBehaviour{ //[...原创 2019-03-14 10:41:25 · 567 阅读 · 0 评论 -
【常用】2DUI跟随3D物体移动(待修复)
using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.UI;public class UImovePlusSample : MonoBehaviour{ /// <summary> /// 3D物体 /// <...原创 2019-03-14 10:52:33 · 458 阅读 · 0 评论 -
【常用】鼠标拖动物体移动
using System.Collections;using System.Collections.Generic;using UnityEngine;public class WTMove : MonoSingleton<WTMove>{ void Start() { StartCoroutine(OnMouseDown()); }...原创 2019-03-14 10:54:49 · 1254 阅读 · 0 评论 -
【常用】截取相机图片截图功能
using System.Collections;using System.Collections.Generic;using UnityEngine;public class ScreenShot : MonoBehaviour{ public Camera mainCamera; public Camera uiCamera; /// <summar...原创 2019-03-14 10:56:32 · 1854 阅读 · 0 评论 -
【常用】单例
using UnityEngine;using System.Collections;/// <summary>/// 脚本的单例类/// </summary>public class MonoSingleton<T> : MonoBehaviour where T:MonoSingleton<T>{ //public sta...原创 2019-03-14 10:59:41 · 190 阅读 · 0 评论 -
【常用】查找子物体
using UnityEngine;using System.Collections;using System.Collections.Generic; /// <summary>/// 变换组件助手类/// </summary>public class TransformHelper{ /// <summary> /// 未...原创 2019-03-14 11:00:40 · 725 阅读 · 0 评论 -
【常用】加载配置文件管理资源路径
using UnityEngine;using System.Collections;using System.Collections.Generic;using System.IO; /// <summary>/// 资源管理器:管理资源路径/// </summary>public static class ResourceManager{ p...原创 2019-03-14 11:02:27 · 309 阅读 · 0 评论 -
【常用】对象池
using UnityEngine;using System.Collections;using System.Collections.Generic;using System;/// <summary>/// 对象池/// </summary>public class GameObjectPool : MonoSingleton<GameObjec...原创 2019-03-14 11:03:27 · 259 阅读 · 0 评论