TexturePacker

作者:追风剑情 发布于:2018-11-19 15:08 分类:NGUI

官网: http://www.codeandweb.com/texturepacker 一、安装TexturePacker并设置环境变量 二、通过命令行为Unity生成图集 TexturePacker pics --sheet out.png --data out.txt - -texture-format png --trim-sprite-names --siz...

阅读全文>>

标签: NGUI

评论(0) 浏览(3293)

UILabel支持的BBCode

作者:追风剑情 发布于:2018-7-3 14:47 分类:NGUI

NGUI支持的BBCode [b]加粗[/b]、[i]倾斜[/i]、[u]下划线[/u]、[s]删除线[/s]、 [c]忽略颜色设置[/c]、[url=xxx]URL[/url]、[link=xxx]link[/link] 示例 Color Tint Red [c]ignore color[/c] [66]change alphal[ff]  [u...

阅读全文>>

标签: NGUI

评论(0) 浏览(11371)

NGUI——让UILabel可以显示彩色文字

作者:追风剑情 发布于:2018-6-22 17:31 分类:NGUI

一、修改UILabel.cs 1、增加个变量 public List<Color> vertexColors = null; 2、修改OnFill()方法 二、修改NGUIText.cs 1、增加一个变量 static public List<Color> vertexColors = null; 2、修改Print...

阅读全文>>

标签: NGUI

评论(0) 浏览(7960)

NGUI渲染顺序规则

作者:追风剑情 发布于:2017-10-7 15:47 分类:NGUI

渲染优先级 Camera > UIPanel > Widget Camera的Depth小的先渲染 UIPanel渲染排序优先级 Sort Layer > Sort Order > Render Q > Depth 同一个UIPanel下的Widget根据Depth排序 附上设置选项截图

阅读全文>>

标签: NGUI

评论(0) 浏览(3867)

UILable添加预定义字体样式选项

作者:追风剑情 发布于:2017-8-22 14:34 分类:NGUI

NGUI-3.8 一、修改UILabel.cs //------------------------------------------------- // NGUI: Next-Gen UI kit // Copyright © 2011-2017 Tasharen Entertainment Inc //---------------...

阅读全文>>

标签: NGUI

评论(0) 浏览(6071)

监听屏幕大小改变

作者:追风剑情 发布于:2016-11-10 21:02 分类:NGUI

以下为NGUI源码 UICamera.cs void LateUpdate () { #if UNITY_EDITOR if (!Application.isPlaying || !handlesEvents) return; #else if (!handlesEvents) return; #endif int w = Screen.width; int...

阅读全文>>

标签: NGUI

评论(0) 浏览(4014)

计算UIWidget的Bounds

作者:追风剑情 发布于:2016-11-10 20:07 分类:NGUI

public static Bounds GetBounds(UIWidget w) { //4个角坐标 Vector3[] corners = w.localCorners; Bounds b = new Bounds(); b.center = Vector3.Lerp(corners[0], corners[2], 0...

阅读全文>>

标签: NGUI

评论(0) 浏览(4346)

NGUI绘制饼状图

作者:追风剑情 发布于:2016-1-18 19:22 分类:NGUI

using UnityEngine; using System.Collections; /// <summary> /// 饼状图 /// </summary> public class PieChart : MonoBehaviour { public UITexture texture; public int radius = 10;...

阅读全文>>

标签: NGUI

评论(0) 浏览(4415)

NGUI的UISprite增加灰度处理

作者:追风剑情 发布于:2015-12-3 14:23 分类:NGUI

一、修改Unlit - Transparent Colored.shader Shader "Unlit/Transparent Colored" { Properties { _MainTex ("Base (RGB), Alpha (A)", 2D) = "white" {} } SubShader { LOD 100 Tags ...

阅读全文>>

标签: NGUI

评论(0) 浏览(6155)

UILabel设置行间距

作者:追风剑情 发布于:2014-8-22 17:44 分类:NGUI

using UnityEngine; using System.Collections; public class TestUILabel : MonoBehaviour { public UILabel label; public int hspacing = 2; public int vspacing = 2; // Use this for...

阅读全文>>

标签: NGUI

评论(0) 浏览(6674)

Powered by emlog  蜀ICP备18021003号-1   sitemap

川公网安备 51019002001593号