unity-C#脚本
新一下的兰天
紧要关头不放弃,绝望就会变成希望
展开
-
unity-UGUI隐藏按钮
方法1:Button btn;btn.gameObject.setActive(false);方法2:Button btn;btn.transform.localScale = Vector3.zero;原创 2017-03-21 12:44:13 · 14599 阅读 · 3 评论 -
unity-实现摄像机跟随物体(Vector3.SmoothDamp)
直接贴代码using UnityEngine;using System.Collections;public class FllowTarget : MonoBehaviour { public Transform target; //摄像机要跟随的人物 public float smoothTime = 0.01f; //摄像机平滑移动的时间 private Vector3 came原创 2017-03-16 10:01:02 · 11389 阅读 · 2 评论 -
unity3d鼠标滚轮实现摄像头拉近后退
using UnityEngine;using System.Collections;public class CubeStatic : MonoBehaviour{ public float minFov = 15f; public float maxFov = 90f; public float sensitivity = 10f; void Update(转载 2017-04-21 10:07:30 · 4653 阅读 · 0 评论