unity
804052545@qq.com
你好
展开
-
unity 自定义shader坐标变换矩阵
Shader "Coustom/XYZShader"{ Properties { _MainTex ("Texture", 2D) = "white" {} _MoveOffset("MoveOffset",vector)=(1,1,1,1) _Scale("Scale",vector)=(1,1,1,1) _Rotate("RotateAngle",vector) = (0,0,0,1) } SubShader { Blend SrcAlpha OneMinusSrcAl.原创 2020-09-16 16:13:46 · 657 阅读 · 0 评论 -
Unity协程异步加载资源
using System.Collections;using System.Collections.Generic;using UnityEngine;public class SyncGetResources : MonoBehaviour{ private GameObject go; ResourceRequest request; // Start is called before the first frame update void Start().原创 2020-07-29 11:21:22 · 1132 阅读 · 0 评论 -
Unity朝向某个物体(星体围绕太阳旋转)
方式一:public Transform target;void Update () { transform.LookAt(target); }方式二: public Transform target; void Update () { Vector3 relativePos = target.position - transform.position; transform.rotation = Quaternion.L...原创 2020-07-27 15:37:47 · 465 阅读 · 0 评论