Unity_Code
小可爱别跑
这个作者很懒,什么都没留下…
展开
-
【Unity】Image 设置渐变色
using UnityEngine;using System.Collections;using System.Collections.Generic;using UnityEngine.UI;[AddComponentMenu("UI/Effects/Gradient")]public class Gradient : BaseMeshEffect{ public Color32 topColor = Color.white; public Color32 bottomCo.原创 2022-01-05 14:57:32 · 1381 阅读 · 0 评论 -
Unity-Transform.eulerAngles
DescriptionThe rotation as Euler angles in degrees.The x, y, and z angles represent a rotation z degrees around the z axis, x degrees around the x axis, and y degrees around the y axis.Only use t...原创 2018-11-26 09:02:23 · 3954 阅读 · 0 评论 -
Unity3D 调用系统窗口选择文件 读存
1.新建脚本OpenFileName2.新建脚本FileManagerusing System;using System.Runtime.InteropServices;//脚本OpenFileName[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]public class OpenFileName{...转载 2018-10-12 15:25:38 · 1769 阅读 · 0 评论 -
继承MonoBehaviour的单例类
1、MonoSingleton using UnityEngine;public abstract class MonoSingleton<T> : MonoBehaviour where T : MonoBehaviour{ public bool global = true; static T instance; public static T ...原创 2018-11-28 11:20:31 · 1040 阅读 · 2 评论 -
C#-同时继承多个类
面试题:using UnityEngine;public class Test : MonoBehaviour{ // Use this for initialization void Start() { IMyInterface my1 = new MyClass1(); IMyInterface my2 = new MyCl...原创 2018-12-07 16:14:50 · 15493 阅读 · 0 评论