游戏蛮牛学习群(纯技术交流,不闲聊):159852603
游戏蛮牛 手机端
开启辅助访问
 找回密码
 注册帐号

扫一扫,访问微社区

首页   >   博客   >  UnityTerminator  >  Unity-开发技巧
UnityTerminator 个人分类:Unity-开发技巧 198 2018-9-11 20:04

1.状态接口 csharpcode: using System.Collections; using System.Collections.Generic; using UnityEngine; /// summary /// 场景状态 /// /summary public class ISceneState { //状态名称 private string m_StateName = "ISceneState"; public string StateName { get ...

UnityTerminator 个人分类:Unity-开发技巧 173 2018-9-6 09:54

csharpcode: using UnityEngine; using UnityEngine.UI; using System.Collections; public class HUDFPS : MonoBehaviour { // Attach this to a Text to make a frames/second indicator. // // It calculates frames/second over each updateInterval, // so the display does not keep changing wi ...

UnityTerminator 个人分类:Unity-开发技巧 200 2018-8-24 16:41

csharpcode: //世界坐标转屏幕坐标 public Vector3 WorldToScreenPoint(Vector3 position) { Vector3 screenPosition = Camera.main.WorldToScreenPoint(position); Vector3 uipoint = WindowManager.instance.uiCamera.ScreenToWorldPoint(screenPosition); uipoint.z = 0; ...

UnityTerminator 个人分类:Unity-开发技巧 333 2018-8-10 13:29

自己写着玩的,感觉挺好用,就是代码比较Low 后续再优化,话不多说,上代码 搜索 复制 csharpcode: using UnityEngine; public static class SaveManager : object { public static int diamondAmmound = 100; //钻石数量 public static int bestDistance; //最远的距离 ...

UnityTerminator 个人分类:Unity-开发技巧 264 2018-8-10 13:13

csharpcode: using UnityEngine; using System.Collections; using System.IO; #if UNITY_EDITOR using UnityEditor; #endif public class GenerateFolders : MonoBehaviour { #if UNITY_EDITOR private static void CreateBasicFolder() { GenerateFolder(); Debug.Log ...

UnityTerminator 个人分类:Unity-开发技巧 39 2018-7-23 14:06

csharpcode: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class MaskSpeakingTool : MonoBehaviour { private static ListInputField lists=new ListInputField(); static string[] maskStrs; private static MaskSpeak ...

UnityTerminator 个人分类:Unity-开发技巧 292 2018-7-23 10:22

相机的Size 设置为分辨率的最大值/100/2; 比如 1280*720,1280/100/2 =6.4;相机的Size设置为6.4即可。 100 指的是 Texture 的 Pixels One Unit 属性设置,也就是说 1 个unity的 Size 单位对应 多少个图片 Pixels 。默认是100。 搜索 复制

UnityTerminator 个人分类:Unity-开发技巧 275 2018-7-18 11:02

csharpcode: using UnityEngine; using System.Collections; public static class FunctionLibrary : object { public delegate void myDelegate(); public delegate void myDelegateInt(int i); //Moves a menu element by the received ammount in time //通过接收到的文件来移动菜单元 ...

UnityTerminator 个人分类:Unity-开发技巧 343 2018-7-18 10:25

csharpcode: using UnityEngine; using System.Collections; public class SetRenderingLayer : MonoBehaviour { public string sortingLayer; //分类层 public int sortingOrder; //排序顺序 void Start() { this.GetComponentRenderer().sortingLayerNa ...

返回顶部