Skip to content

Instantly share code, notes, and snippets.

View LoneWindG's full-sized avatar

LoneWindG

  • China
  • 06:22 (UTC +08:00)
View GitHub Profile
@LoneWindG
LoneWindG / ShaderOutline.cs
Last active February 12, 2026 08:58
UnityUGUI描边的Shader实现方案
//————————————————————————————————————————————
// OutlineEx.cs
//
// Created by Chiyu Ren on 2018/9/12 23:03:51
// https://www.cnblogs.com/GuyaWeiren/p/9665106.html
// Modify by zhenmu on 2019/3/26
// https://blog.csdn.net/zhenmu/article/details/88821562
// 额外修改调整:
// 1.改为动态加载材质, 用于配合描边质量在材质上的预先设置
// 2.增加对Mask组件的Stencil参数的兼容, 使得描边组件能与Mask组件配合使用
@LoneWindG
LoneWindG / CJKCharsetExporter.cs
Last active February 12, 2026 09:09
UnityTMP中文字符集简单生成工具
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Windows.Media;
/// <summary>
/// 这是一个字体的字符集读取并导出工具, 依赖于.NET Framework的PresentationCore.dll程序集
/// <para>注: CJK相关字符范围获取自 https://www.unicode.org/roadmaps/</para>
/// </summary>
@LoneWindG
LoneWindG / CJKUnicodeHelper.cs
Created February 10, 2026 09:07
CJKUnicodeHelper
/// <summary>
/// CJK的UTF-16或Unicode字符判定方法
/// </summary>
public static class CJKUnicodeHelper
{
/// <summary>
/// 不换行/间断空格
/// </summary>
public const char NO_BREAKING_SPACE = '\u00A0';
/// <summary>