![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Unity
程序丑汉
马上填写
展开
-
2DUI随鼠标改变Z轴角度
if (Input.GetMouseButton(0)){ Vector3 pos = transform.rectTransform().anchoredPosition; Vector3 targetPos = Input.mousePosition - new Vector3(Screen.width / 2, Screen.height / 2, 0); Vector3 to = targetPos - pos; float z; if (targ原创 2021-09-15 10:21:21 · 108 阅读 · 0 评论 -
UNITY 模拟手机滑屏功能
挂到ScrollRect组上,模拟手机滑屏功能using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.UI;using UnityEngine.EventSystems;using DG.Tweening;using DG.Tweening.Core;using DG.Tweening.Plugins.Options;/// <summary>原创 2020-10-14 10:05:40 · 949 阅读 · 0 评论 -
Unity的Analytics系统自动发包
今天被人查到unity的Analytics系统会在WEBGL平台包运行的时候往他们自己的服务器上分一串解析数据包。去谷歌查了一下在你们程序入口的awake函数里调用以下函数就可以屏蔽。private void CloseAnalytics() { UnityEngine.Analytics.Analytics.enabled = false; UnityEngine.Analytics.Analytics.deviceStatsEnabled = false;原创 2020-07-20 16:24:01 · 905 阅读 · 0 评论 -
Unity单例模式
using System;using UnityEngine;public class SingletonMonobehaviour<T> : MonoBehaviour where T : MonoBehaviour{ private static T _instance; public SingletonMonobehaviour() { if (SingletonMonobehaviour<T>._instance != nul原创 2020-07-16 14:35:21 · 284 阅读 · 0 评论