![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Unity技术
无畏前行,方得始终
这个作者很懒,什么都没留下…
展开
-
2020-09-26
1.在根目录下创建一个Editor文件夹 之后在Editor文件夹下创建一个脚本 TextureChage2.TextureChange的代码如下using System.Collections;using System.Collections.Generic;using UnityEditor;using UnityEngine;//精灵图片导入器public class TextureChange : AssetPostprocessor{ private void O转载 2020-09-26 10:35:15 · 165 阅读 · 2 评论 -
Unity的九大回调函数
Unity的九大函数注意:回调函数的调用前提是脚本必须以组件的形式挂载到一个游戏对象身上Awake():游戏开始时第一个调用的回调函数,但调用一次 OnEnable():没当脚本组件被设置为可用时,调用一次 Start():在OnEnable之后调用,但在整个游戏中只会调用一次 FixedUpdate():每隔一段时间调用一次,默认调用间隔为0.02s,可通过Edit–Project Settings–Time改变时间间隔 Update():每帧调用一次 LateUpdate():每帧调用原创 2020-06-17 10:26:38 · 2469 阅读 · 0 评论 -
【Unity3D】5.x以上版本Application里面的某些方法过时的解决办法
Application.LoadLevel过时Application.LoadLevel("levelToLoad");//levelToLoad是string类型解决办法:using UnityEngine.SceneManagement;//引入命名空间SceneManager.LoadScene("levelToLoad");原创 2020-07-09 11:25:19 · 1046 阅读 · 1 评论 -
Unity里面的时间戳
获取当前时间转化为时间戳 TimeSpan timeSpan = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0); Debug.Log(Convert.ToInt64(st.TotalSeconds));把时间戳转化为日期时间 DateTime startTime = TimeZone....原创 2019-12-30 19:16:54 · 545 阅读 · 0 评论