摘要: Waiter.transform.DOPath(list.ToArray(), 3f * (index / 2.0f + 1.0f), PathType.CatmullRom).SetLookAt(0.001f); 阅读全文
posted @ 2018-11-05 23:56 福建小屁孩 阅读(4785) 评论(0) 推荐(0) 编辑
摘要: 在做文本框的时候,我们经常碰到需要计算字符输入的长度,然后适当地做处理。这个时候不能直接了当地拿text.Length来用,原因有: 1、字符会因为fontSize的大小不同而有不同的宽度; 2、即使fontSize在你的场景里是同一的,字符也有英文字符和中文字符等的差别,它们的宽度也是相差极大的, 阅读全文
posted @ 2018-06-07 17:01 福建小屁孩 阅读(1986) 评论(0) 推荐(0) 编辑
摘要: https://www.assetstore.unity3d.com/cn/?stay#!/content/21897 阅读全文
posted @ 2018-01-24 10:04 福建小屁孩 阅读(354) 评论(0) 推荐(0) 编辑
摘要: using UnityEngine;using System.Collections;using UnityEditor;/// <summary>/// 脚本位置:Editor文件夹下/// 脚本功能:打包/// </summary>public class CreateAssetBundle : 阅读全文
posted @ 2018-01-24 09:58 福建小屁孩 阅读(229) 评论(0) 推荐(0) 编辑
摘要: using UnityEngine;using System.Collections;using UnityEngine.SceneManagement; /// <summary>/// 脚本位置:需要加载物体的场景中任意物体上/// 脚本功能:加载场景/// </summary>public c 阅读全文
posted @ 2018-01-24 09:56 福建小屁孩 阅读(423) 评论(0) 推荐(0) 编辑
摘要: 加载asset bundle的时候出现Could not produce class with ID XXX的错误 在asset 文件夹下建一个Link的XML,内容如下: <?xml version="1.0" encoding="utf-8"?><linker> <assembly fullna 阅读全文
posted @ 2018-01-16 11:37 福建小屁孩 阅读(341) 评论(0) 推荐(0) 编辑
摘要: using UnityEngine;using System.Collections;using System.Collections.Generic;using UnityEngine.UI;using System; [AddComponentMenu("UI/Effects/Gradient" 阅读全文
posted @ 2017-12-14 10:28 福建小屁孩 阅读(303) 评论(0) 推荐(0) 编辑
摘要: public class CreateAssetBundle : Editor{ // 打包unity场景文件 [MenuItem("Assets/Build AssetBundle Scene")] static void MyBuild() { // 需要打包的场景名字 string[] lev 阅读全文
posted @ 2017-09-27 11:36 福建小屁孩 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 我们都希望能够在场景中投入一百万个物体,不幸的是,渲染和管理大量的游戏对象是以牺牲CPU和GPU性能为代价的,因为有太多Draw Call的问题,最后我们必须找到其他的解决方案。在本文中,我们将讨论两种优化技术,它们可以帮助您减少Unity游戏中的Draw Call数量以提高整体性能:批处理和GPU 阅读全文
posted @ 2017-07-07 14:15 福建小屁孩 阅读(3858) 评论(0) 推荐(0) 编辑
摘要: WaitForTargetFPS 该参数一般出现在 CPU开销过低,且通过设定了目标帧率的情况下(Application.targetFrameRate)。当上一帧低于目标帧率时,将会在本帧产生一个WaitForTargetFPS的空闲等待耗时,以维持目标帧率。 解析:该项在Unity引擎的主循环中 阅读全文
posted @ 2017-07-07 13:52 福建小屁孩 阅读(364) 评论(0) 推荐(0) 编辑