- 博客(13)
- 资源 (14)
- 收藏
- 关注
原创 鼠标缩放拖动物体
using UnityEngine;/// <summary>/// 脚本挂载新建相机上 —— /// </summary>public class ChinarSmoothUi3DCamera : MonoBehaviour{ public Transform pivot; public Vector3 pivotOffset = ...
2018-12-25 14:13:56 150
原创 Quaternion.LookRotation和lookat
Quaternion.LookRotation(v3 v)的参数是一个向量,是让物体z轴和这个向量重合Quaternion.LookRotation(v3 v1,v3 v2)前一个参数对应物体z轴,后一个对应Y轴lookat的参数是一个点,是让物体Z轴指向这个点利用这一点可以实现一个简单的移动void Move() { float horizontal =...
2018-12-25 14:13:27 2313 1
原创 四元数旋转
using UnityEngine;using System.Collections;public class SetFromToDirection_ts : MonoBehaviour{ public Transform A, B; float angle; Vector3 axis = Vector3.zero; float xSpeed = 0.0...
2018-12-25 13:44:06 246
转载 事件数据 - EventData
BaseEventData:基础事件数据—事件数据的基类,和EventSystem配合使用PointerEventData:指针事件数据 —鼠标与触摸事件的相关数据(点击、抬起、拖动等),UGUI中大部分事件数据类型都是PointerEventData类型button:该属性有3个取值。分别是Left(鼠标左键)、Right(鼠标右键)、Middle(鼠标中键) clickCo...
2018-12-25 10:32:01 9366
原创 一些关于坐标的转换
世界空间中的点坐标转换到屏幕坐标:screenPos = RectTransformUtility.WorldToScreenPoint(cam, worldPos.transform.position);UGUI物体的坐标转换到屏幕坐标:screenPos = RectTransformUtility.WorldToScreenPoint(canvas.worldCamera, u...
2018-12-24 16:32:44 127
转载 pc端模拟鼠标输入
需要再全屏状态下使用转自 https://blog.csdn.net/qq_21397217/article/details/78488072using System;public class MouseSimulater{ #region DLLs [System.Runtime.InteropServices.DllImport("user32.dll")] ...
2018-12-24 14:33:22 826 1
原创 关于子物体在世界坐标中的移动
移动球体到黑色方块位置。球体为白色方块的子物体的子物体public GameObject target; // Use this for initialization void Start () { Vector3 world = target.transform.TransformPoint(this.transform.position); th...
2018-12-19 16:37:27 1264
原创 控制粒子运动
using System.Collections;using System.Collections.Generic;using UnityEngine;public class ParticleGrid : MonoBehaviour { ParticleSystem particleSystem; public Vector3 bounds = new Vector...
2018-12-19 11:01:10 557
原创 关于按钮监听的传参
正常的AddListener是0参数的想要传参可以用private void Start() { btn.onClick.AddListener(() => { click(1, 2); }); } private void click(int i, int j) { }兰姆达表达式 ...
2018-12-18 15:21:35 306
原创 关于EventTrigger的代码添加
封装using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.EventSystems;using UnityEngine.Events;public static class AddTriggersListener { public...
2018-12-18 14:25:23 622
原创 关于OnBecameInvisible
OnBecameInvisible is called when the renderer is no longer visible by any camera.所以 物体必须要有renderer组件,而且在编辑器模式下scene界面能看到物体也不会触发,打包后不会...
2018-12-07 10:24:35 190
Scratch Card 2.1
2023-03-15
Serial Port Utility Pro v2.6
2023-03-15
Thalassophobia-Stylized-Oceans1.0.4
2023-03-15
Azure Kinect Examples for Unity 1.18
2023-03-15
Highlight Plus 9.4
2023-03-15
Yughues Underwater Plants v2.unitypackage
2021-03-22
Volumetric Light Beam v1.7.unitypackage
2021-03-22
HUD Navigation System - 2.1.0.unitypackage
2021-03-22
Mirror-32.1.4.unitypackage
2021-03-22
Paint in 3D v1.9.5.unitypackage
2021-03-22
TopDown Engine1.2
2019-05-07
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人