(0);
33 | }
34 |
35 | public override string ToUguiRichText ()
36 | {
37 | return text;
38 | }
39 |
40 | public override string ToTextProRichText ()
41 | {
42 | return text;
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Html2UnityRich/Node/HtmlTextNode.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 10c57f3243981dc419813a16a01df9cf
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Plugins.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 288397113f4c7344fbb661d0ce5c2f9d
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Plugins/LitJson.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ae867ea64d58e9a449cc04a4f82c2e14
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Plugins/LitJson/IJsonWrapper.cs:
--------------------------------------------------------------------------------
1 | #region Header
2 | /**
3 | * IJsonWrapper.cs
4 | * Interface that represents a type capable of handling all kinds of JSON
5 | * data. This is mainly used when mapping objects through JsonMapper, and
6 | * it's implemented by JsonData.
7 | *
8 | * The authors disclaim copyright to this source code. For more details, see
9 | * the COPYING file included with this distribution.
10 | **/
11 | #endregion
12 |
13 |
14 | using System.Collections;
15 | using System.Collections.Specialized;
16 |
17 |
18 | namespace LitJson
19 | {
20 | public enum JsonType
21 | {
22 | None,
23 |
24 | Object,
25 | Array,
26 | String,
27 | Int,
28 | Long,
29 | Double,
30 | Boolean
31 | }
32 |
33 | public interface IJsonWrapper : IList, IOrderedDictionary
34 | {
35 | bool IsArray { get; }
36 | bool IsBoolean { get; }
37 | bool IsDouble { get; }
38 | bool IsInt { get; }
39 | bool IsLong { get; }
40 | bool IsObject { get; }
41 | bool IsString { get; }
42 |
43 | bool GetBoolean ();
44 | double GetDouble ();
45 | int GetInt ();
46 | JsonType GetJsonType ();
47 | long GetLong ();
48 | string GetString ();
49 |
50 | void SetBoolean (bool val);
51 | void SetDouble (double val);
52 | void SetInt (int val);
53 | void SetJsonType (JsonType type);
54 | void SetLong (long val);
55 | void SetString (string val);
56 |
57 | string ToJson ();
58 | void ToJson (JsonWriter writer);
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Plugins/LitJson/IJsonWrapper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: eb89843880649894da9d8f86cc501853
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Plugins/LitJson/JsonData.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 10151a7c62ace1e45add8bcba37197d3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Plugins/LitJson/JsonException.cs:
--------------------------------------------------------------------------------
1 | #region Header
2 | /**
3 | * JsonException.cs
4 | * Base class throwed by LitJSON when a parsing error occurs.
5 | *
6 | * The authors disclaim copyright to this source code. For more details, see
7 | * the COPYING file included with this distribution.
8 | **/
9 | #endregion
10 |
11 |
12 | using System;
13 |
14 |
15 | namespace LitJson
16 | {
17 | public class JsonException :
18 | #if NETSTANDARD1_5
19 | Exception
20 | #else
21 | ApplicationException
22 | #endif
23 | {
24 | public JsonException () : base ()
25 | {
26 | }
27 |
28 | internal JsonException (ParserToken token) :
29 | base (String.Format (
30 | "Invalid token '{0}' in input string", token))
31 | {
32 | }
33 |
34 | internal JsonException (ParserToken token,
35 | Exception inner_exception) :
36 | base (String.Format (
37 | "Invalid token '{0}' in input string", token),
38 | inner_exception)
39 | {
40 | }
41 |
42 | internal JsonException (int c) :
43 | base (String.Format (
44 | "Invalid character '{0}' in input string", (char) c))
45 | {
46 | }
47 |
48 | internal JsonException (int c, Exception inner_exception) :
49 | base (String.Format (
50 | "Invalid character '{0}' in input string", (char) c),
51 | inner_exception)
52 | {
53 | }
54 |
55 |
56 | public JsonException (string message) : base (message)
57 | {
58 | }
59 |
60 | public JsonException (string message, Exception inner_exception) :
61 | base (message, inner_exception)
62 | {
63 | }
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Plugins/LitJson/JsonException.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 472ef29ce02cc2248ba13b4a6ed60f9b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Plugins/LitJson/JsonMapper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f924b228cbb019e46b74afd3654baad2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Plugins/LitJson/JsonMockWrapper.cs:
--------------------------------------------------------------------------------
1 | #region Header
2 | /**
3 | * JsonMockWrapper.cs
4 | * Mock object implementing IJsonWrapper, to facilitate actions like
5 | * skipping data more efficiently.
6 | *
7 | * The authors disclaim copyright to this source code. For more details, see
8 | * the COPYING file included with this distribution.
9 | **/
10 | #endregion
11 |
12 |
13 | using System;
14 | using System.Collections;
15 | using System.Collections.Specialized;
16 |
17 |
18 | namespace LitJson
19 | {
20 | public class JsonMockWrapper : IJsonWrapper
21 | {
22 | public bool IsArray { get { return false; } }
23 | public bool IsBoolean { get { return false; } }
24 | public bool IsDouble { get { return false; } }
25 | public bool IsInt { get { return false; } }
26 | public bool IsLong { get { return false; } }
27 | public bool IsObject { get { return false; } }
28 | public bool IsString { get { return false; } }
29 |
30 | public bool GetBoolean () { return false; }
31 | public double GetDouble () { return 0.0; }
32 | public int GetInt () { return 0; }
33 | public JsonType GetJsonType () { return JsonType.None; }
34 | public long GetLong () { return 0L; }
35 | public string GetString () { return ""; }
36 |
37 | public void SetBoolean (bool val) {}
38 | public void SetDouble (double val) {}
39 | public void SetInt (int val) {}
40 | public void SetJsonType (JsonType type) {}
41 | public void SetLong (long val) {}
42 | public void SetString (string val) {}
43 |
44 | public string ToJson () { return ""; }
45 | public void ToJson (JsonWriter writer) {}
46 |
47 |
48 | bool IList.IsFixedSize { get { return true; } }
49 | bool IList.IsReadOnly { get { return true; } }
50 |
51 | object IList.this[int index] {
52 | get { return null; }
53 | set {}
54 | }
55 |
56 | int IList.Add (object value) { return 0; }
57 | void IList.Clear () {}
58 | bool IList.Contains (object value) { return false; }
59 | int IList.IndexOf (object value) { return -1; }
60 | void IList.Insert (int i, object v) {}
61 | void IList.Remove (object value) {}
62 | void IList.RemoveAt (int index) {}
63 |
64 |
65 | int ICollection.Count { get { return 0; } }
66 | bool ICollection.IsSynchronized { get { return false; } }
67 | object ICollection.SyncRoot { get { return null; } }
68 |
69 | void ICollection.CopyTo (Array array, int index) {}
70 |
71 |
72 | IEnumerator IEnumerable.GetEnumerator () { return null; }
73 |
74 |
75 | bool IDictionary.IsFixedSize { get { return true; } }
76 | bool IDictionary.IsReadOnly { get { return true; } }
77 |
78 | ICollection IDictionary.Keys { get { return null; } }
79 | ICollection IDictionary.Values { get { return null; } }
80 |
81 | object IDictionary.this[object key] {
82 | get { return null; }
83 | set {}
84 | }
85 |
86 | void IDictionary.Add (object k, object v) {}
87 | void IDictionary.Clear () {}
88 | bool IDictionary.Contains (object key) { return false; }
89 | void IDictionary.Remove (object key) {}
90 |
91 | IDictionaryEnumerator IDictionary.GetEnumerator () { return null; }
92 |
93 |
94 | object IOrderedDictionary.this[int idx] {
95 | get { return null; }
96 | set {}
97 | }
98 |
99 | IDictionaryEnumerator IOrderedDictionary.GetEnumerator () {
100 | return null;
101 | }
102 | void IOrderedDictionary.Insert (int i, object k, object v) {}
103 | void IOrderedDictionary.RemoveAt (int i) {}
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Plugins/LitJson/JsonMockWrapper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0c65c6e2912f3a346acdf24b9b065269
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Plugins/LitJson/JsonReader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 32cea9187f629054f83d9bf8d43944f4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Plugins/LitJson/JsonWriter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d07b1d2d7b867e64298d9f06ac193dd3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Plugins/LitJson/Lexer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9d320f7b7c94d97478cfd0f1a9d4c54c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Plugins/LitJson/Netstandard15Polyfill.cs:
--------------------------------------------------------------------------------
1 | #if NETSTANDARD1_5
2 | using System;
3 | using System.Reflection;
4 | namespace LitJson
5 | {
6 | internal static class Netstandard15Polyfill
7 | {
8 | internal static Type GetInterface(this Type type, string name)
9 | {
10 | return type.GetTypeInfo().GetInterface(name);
11 | }
12 |
13 | internal static bool IsClass(this Type type)
14 | {
15 | return type.GetTypeInfo().IsClass;
16 | }
17 |
18 | internal static bool IsEnum(this Type type)
19 | {
20 | return type.GetTypeInfo().IsEnum;
21 | }
22 | }
23 | }
24 | #endif
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Plugins/LitJson/Netstandard15Polyfill.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6e3aff4b9ec90c94f902186eac612297
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Plugins/LitJson/ParserToken.cs:
--------------------------------------------------------------------------------
1 | #region Header
2 | /**
3 | * ParserToken.cs
4 | * Internal representation of the tokens used by the lexer and the parser.
5 | *
6 | * The authors disclaim copyright to this source code. For more details, see
7 | * the COPYING file included with this distribution.
8 | **/
9 | #endregion
10 |
11 |
12 | namespace LitJson
13 | {
14 | internal enum ParserToken
15 | {
16 | // Lexer tokens (see section A.1.1. of the manual)
17 | None = System.Char.MaxValue + 1,
18 | Number,
19 | True,
20 | False,
21 | Null,
22 | CharSeq,
23 | // Single char
24 | Char,
25 |
26 | // Parser Rules (see section A.2.1 of the manual)
27 | Text,
28 | Object,
29 | ObjectPrime,
30 | Pair,
31 | PairRest,
32 | Array,
33 | ArrayPrime,
34 | Value,
35 | ValueRest,
36 | String,
37 |
38 | // End of input
39 | End,
40 |
41 | // The empty rule
42 | Epsilon
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Plugins/LitJson/ParserToken.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 289625690f7ae164eba87727cb05b886
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Sample.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4d87571e6aa67414e9bc44c64c335f92
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Sample/Resources.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e94fbc17fd73d724e911fff00df95485
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Sample/Resources/Text.txt:
--------------------------------------------------------------------------------
1 | 露娜物语新服:奈拉城镇开启啦!
亲爱的冒险者们:
3D冒险卡牌手游《露娜物语》将于11月10日10:00开启新服:奈拉城镇!更多详情活动可以进入官方FB查看详情:https://www.baidu.com/
为感谢各位冒险者的陪伴与支持,新服:奈拉城镇为大家准备了丰富的福利活动,以下为部分福利活动:
【每日登入领福利】
次日登入即可领取强力英雄四选一: 巫毒术士·杰森、邪能法师·丽贝卡、重砲手·妮可、大酋长·查理斯。
第七天登入领取超稀有圣界英雄 — 风暴法师·妮娜,她兼具输出聚怪伤害分摊的全面能力,给你带来超体验的战斗快感。
【开服庆典,超多福利等你来拿】
限时超值礼包7天持续免费送!
连续完成7天限时任务更有机会随机强力五星英雄!
活动期间累积消耗鑽石有机会获得五星英雄 — 战地医生·奥菲利亚&倩影女侠·琳
【命运酒馆限时开启】
活动期间,在命运酒馆内召唤超高机率五星英雄“倩影女侠·琳”,或是连续7天登录更可免费获得“倩影女侠·琳”,全力培养快速提升英雄战力,更有超划算的限时礼包等著你哦!
Tips:如果您有任何疑问,请与我们联繫:点击游戏内主页 - 左上角头像 - 设置 - 客服中心
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Sample/Resources/Text.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2bbc432e1375fbe4aae9b8f5cac7177f
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Sample/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 534b9a9cc0aae714090eb2ac47b02043
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Sample/Scenes/SampleScene.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9fc0d4010bbf28b4594072e72b8655ab
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Sample/Scripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e24c6673e6d69d24e921101c2f90dde9
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Sample/Scripts/Start.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Html2UnityRich;
3 | using TMPro;
4 | using UnityEngine;
5 | using UnityEngine.UI;
6 |
7 | public class Start : MonoBehaviour
8 | {
9 | public LinkText4UGUI preTextUGUI;
10 | public TextMeshProUGUI textMeshPro;
11 | public Button btnShowUGUIText;
12 | public Button btnShowTextMeshPro;
13 |
14 | private void Awake ()
15 | {
16 | string content = Resources.Load ("Text").text;
17 | var rootNode = Html2UnityRichMgr.CreateHtmlRootNode (content).ToPropNode ().ToUnityRichNode ();
18 |
19 | #region 由于TextPro组件支持对齐标签,ToTextProRichText直接赋值即可
20 | textMeshPro.alignment = TextAlignmentOptions.MidlineLeft;
21 | textMeshPro.text = rootNode.ToTextProRichText ();
22 | #endregion
23 |
24 | #region 由于UGUI不支持对齐标签,拆分为多个Text显示,每个Text单独设置对齐
25 | List htmlTagNodes = rootNode.GetChilds ();
26 | for ( int i = 0 ; i < htmlTagNodes.Count ; i++ )
27 | {
28 | LinkText4UGUI textItem = GameObject.Instantiate (preTextUGUI , preTextUGUI.transform.parent);
29 | textItem.text = htmlTagNodes [i].ToUguiRichText ();
30 | textItem.gameObject.SetActive (true);
31 |
32 | if ( htmlTagNodes [i].GetProp ().ContainsKey (HtmlTagName.HTML_CLASS_ALIGN_LEFT) )
33 | {
34 | textItem.alignment = TextAnchor.MiddleLeft;
35 | }
36 | else if ( htmlTagNodes [i].GetProp ().ContainsKey (HtmlTagName.HTML_CLASS_ALIGN_RIGHT) )
37 | {
38 | textItem.alignment = TextAnchor.MiddleRight;
39 | }
40 | else if ( htmlTagNodes [i].GetProp ().ContainsKey (HtmlTagName.HTML_CLASS_ALIGN_CENTER) )
41 | {
42 | textItem.alignment = TextAnchor.MiddleCenter;
43 | }
44 | }
45 | #endregion
46 |
47 | preTextUGUI.transform.parent.gameObject.SetActive (false);
48 | textMeshPro.gameObject.SetActive (true);
49 |
50 | btnShowUGUIText.onClick.AddListener (() =>
51 | {
52 | preTextUGUI.transform.parent.gameObject.SetActive (true);
53 | textMeshPro.gameObject.SetActive (false);
54 | });
55 |
56 | btnShowTextMeshPro.onClick.AddListener (() =>
57 | {
58 | preTextUGUI.transform.parent.gameObject.SetActive (false);
59 | textMeshPro.gameObject.SetActive (true);
60 | });
61 |
62 | Debug.Log ($"根节点:{rootNode}");
63 | }
64 | }
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/Sample/Scripts/Start.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7ab0db6ebceebac46bb41bc797cc8a7e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f54d1bd14bd3ca042bd867b519fee8cc
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Documentation.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8e7e8f5a82a3a134e91c54efd2274ea9
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wilson403/Html2UnityRich/081b177f02aa86cbe9b0fde108a9650d945049d0/Html2UnityRich/Assets/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1b8d251f9af63b746bf2f7ffe00ebb9b
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Resources.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 243e06394e614e5d99fab26083b707fa
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Resources/Fonts & Materials.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 731f1baa9d144a9897cb1d341c2092b8
3 | folderAsset: yes
4 | timeCreated: 1442040525
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Resources/Fonts & Materials/fz SDF.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 65327739de6c4b74ab051e74fe0d130d
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Resources/LineBreaking Following Characters.txt:
--------------------------------------------------------------------------------
1 | )]}〕〉》」』】〙〗〟’”⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、%,.:;。!?]):;=}¢°"†‡℃〆%,.
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Resources/LineBreaking Following Characters.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fade42e8bc714b018fac513c043d323b
3 | timeCreated: 1425440388
4 | licenseType: Store
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Resources/LineBreaking Leading Characters.txt:
--------------------------------------------------------------------------------
1 | ([{〔〈《「『【〘〖〝‘“⦅«$—…‥〳〴〵\[({£¥"々〇$¥₩ #
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Resources/LineBreaking Leading Characters.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d82c1b31c7e74239bff1220585707d2b
3 | timeCreated: 1425440388
4 | licenseType: Store
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Resources/Sprite Assets.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 512a49d95c0c4332bdd98131869c23c9
3 | folderAsset: yes
4 | timeCreated: 1441876896
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c41005c129ba4d66911b75229fd70b45
3 | timeCreated: 1480316912
4 | licenseType: Pro
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Resources/Style Sheets.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4aecb92fff08436c8303b10eab8da368
3 | folderAsset: yes
4 | timeCreated: 1441876950
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_PrefabParentObject: {fileID: 0}
7 | m_PrefabInternal: {fileID: 0}
8 | m_GameObject: {fileID: 0}
9 | m_Enabled: 1
10 | m_EditorHideFlags: 0
11 | m_Script: {fileID: 11500000, guid: ab2114bdc8544297b417dfefe9f1e410, type: 3}
12 | m_Name: Default Style Sheet
13 | m_EditorClassIdentifier:
14 | m_StyleList:
15 | - m_Name: H1
16 | m_HashCode: 2425
17 | m_OpeningDefinition: <#40ff80>*
18 | m_ClosingDefinition: '*'
19 | m_OpeningTagArray: 3c00000073000000690000007a000000650000003d00000032000000650000006d0000003e0000003c000000620000003e0000003c000000230000003400000030000000660000006600000038000000300000003e0000002a000000
20 | m_ClosingTagArray: 2a0000003c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000
21 | - m_Name: Quote
22 | m_HashCode: 92254330
23 | m_OpeningDefinition:
24 | m_ClosingDefinition:
25 | m_OpeningTagArray: 3c000000690000003e0000003c00000073000000690000007a000000650000003d0000003700000035000000250000003e0000003c0000006d000000610000007200000067000000690000006e0000003d0000003100000030000000250000003e000000
26 | m_ClosingTagArray: 3c0000002f000000690000003e0000003c0000002f00000073000000690000007a000000650000003e0000003c0000002f00000077000000690000006400000074000000680000003e0000003c0000002f0000006d000000610000007200000067000000690000006e0000003e000000
27 | - m_Name: Link
28 | m_HashCode: 2687968
29 | m_OpeningDefinition: <#40a0ff>
30 | m_ClosingDefinition:
31 | m_OpeningTagArray: 3c000000750000003e0000003c000000230000003400000030000000610000003000000066000000660000003e0000003c0000006c000000690000006e0000006b0000003d0000002200000049000000440000005f0000003000000031000000220000003e000000
32 | m_ClosingTagArray: 3c0000002f000000750000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f0000006c000000690000006e0000006b0000003e000000
33 | - m_Name: Title
34 | m_HashCode: 98732960
35 | m_OpeningDefinition:
36 | m_ClosingDefinition:
37 | m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000003200000035000000250000003e0000003c000000620000003e0000003c000000610000006c00000069000000670000006e0000003d00000063000000650000006e0000007400000065000000720000003e000000
38 | m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000610000006c00000069000000670000006e0000003e000000
39 | - m_Name: H2
40 | m_HashCode: 2426
41 | m_OpeningDefinition: <#4080FF>
42 | m_ClosingDefinition:
43 | m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000002e00000035000000650000006d0000003e0000003c000000620000003e0000003c000000230000003400000030000000380000003000000046000000460000003e000000
44 | m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000
45 | - m_Name: H3
46 | m_HashCode: 2427
47 | m_OpeningDefinition: <#FF8040>
48 | m_ClosingDefinition:
49 | m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000002e0000003100000037000000650000006d0000003e0000003c000000620000003e0000003c000000230000004600000046000000380000003000000034000000300000003e000000
50 | m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000
51 | - m_Name: C1
52 | m_HashCode: 2194
53 | m_OpeningDefinition:
54 | m_ClosingDefinition:
55 | m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000006600000066000000660000006600000034000000300000003e000000
56 | m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e000000
57 | - m_Name: C2
58 | m_HashCode: 2193
59 | m_OpeningDefinition:
60 | m_ClosingDefinition:
61 | m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000006600000066000000340000003000000046000000460000003e0000003c00000073000000690000007a000000650000003d000000310000003200000035000000250000003e000000
62 | m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f00000073000000690000007a000000650000003e000000
63 | - m_Name: C3
64 | m_HashCode: 2192
65 | m_OpeningDefinition:
66 | m_ClosingDefinition:
67 | m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000003800000030000000410000003000000046000000460000003e0000003c000000620000003e000000
68 | m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f000000620000003e000000
69 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f952c082cb03451daed3ee968ac6c63e
3 | timeCreated: 1432805430
4 | licenseType: Store
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Resources/TMP Settings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: 2705215ac5b84b70bacc50632be6e391, type: 3}
13 | m_Name: TMP Settings
14 | m_EditorClassIdentifier:
15 | m_enableWordWrapping: 1
16 | m_enableKerning: 1
17 | m_enableExtraPadding: 0
18 | m_enableTintAllSprites: 0
19 | m_enableParseEscapeCharacters: 1
20 | m_EnableRaycastTarget: 1
21 | m_GetFontFeaturesAtRuntime: 1
22 | m_missingGlyphCharacter: 0
23 | m_warningsDisabled: 0
24 | m_defaultFontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
25 | m_defaultFontAssetPath: Fonts & Materials/
26 | m_defaultFontSize: 36
27 | m_defaultAutoSizeMinRatio: 0.5
28 | m_defaultAutoSizeMaxRatio: 2
29 | m_defaultTextMeshProTextContainerSize: {x: 20, y: 5}
30 | m_defaultTextMeshProUITextContainerSize: {x: 200, y: 50}
31 | m_autoSizeTextContainer: 0
32 | m_fallbackFontAssets: []
33 | m_matchMaterialPreset: 1
34 | m_defaultSpriteAsset: {fileID: 11400000, guid: c41005c129ba4d66911b75229fd70b45,
35 | type: 2}
36 | m_defaultSpriteAssetPath: Sprite Assets/
37 | m_enableEmojiSupport: 1
38 | m_MissingCharacterSpriteUnicode: 0
39 | m_defaultColorGradientPresetsPath: Color Gradient Presets/
40 | m_defaultStyleSheet: {fileID: 11400000, guid: f952c082cb03451daed3ee968ac6c63e,
41 | type: 2}
42 | m_StyleSheetsResourcePath:
43 | m_leadingCharacters: {fileID: 4900000, guid: d82c1b31c7e74239bff1220585707d2b, type: 3}
44 | m_followingCharacters: {fileID: 4900000, guid: fade42e8bc714b018fac513c043d323b,
45 | type: 3}
46 | m_UseModernHangulLineBreakingRules: 0
47 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Resources/TMP Settings.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3f5b5dff67a942289a9defa416b206f3
3 | timeCreated: 1436653997
4 | licenseType: Pro
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e9f693669af91aa45ad615fc681ed29f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader:
--------------------------------------------------------------------------------
1 | Shader "TextMeshPro/Bitmap Custom Atlas" {
2 |
3 | Properties {
4 | _MainTex ("Font Atlas", 2D) = "white" {}
5 | _FaceTex ("Font Texture", 2D) = "white" {}
6 | [HDR]_FaceColor ("Text Color", Color) = (1,1,1,1)
7 |
8 | _VertexOffsetX ("Vertex OffsetX", float) = 0
9 | _VertexOffsetY ("Vertex OffsetY", float) = 0
10 | _MaskSoftnessX ("Mask SoftnessX", float) = 0
11 | _MaskSoftnessY ("Mask SoftnessY", float) = 0
12 |
13 | _ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
14 | _Padding ("Padding", float) = 0
15 |
16 | _StencilComp("Stencil Comparison", Float) = 8
17 | _Stencil("Stencil ID", Float) = 0
18 | _StencilOp("Stencil Operation", Float) = 0
19 | _StencilWriteMask("Stencil Write Mask", Float) = 255
20 | _StencilReadMask("Stencil Read Mask", Float) = 255
21 |
22 | _CullMode("Cull Mode", Float) = 0
23 | _ColorMask("Color Mask", Float) = 15
24 | }
25 |
26 | SubShader{
27 |
28 | Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
29 |
30 | Stencil
31 | {
32 | Ref[_Stencil]
33 | Comp[_StencilComp]
34 | Pass[_StencilOp]
35 | ReadMask[_StencilReadMask]
36 | WriteMask[_StencilWriteMask]
37 | }
38 |
39 |
40 | Lighting Off
41 | Cull [_CullMode]
42 | ZTest [unity_GUIZTestMode]
43 | ZWrite Off
44 | Fog { Mode Off }
45 | Blend SrcAlpha OneMinusSrcAlpha
46 | ColorMask[_ColorMask]
47 |
48 | Pass {
49 | CGPROGRAM
50 | #pragma vertex vert
51 | #pragma fragment frag
52 |
53 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
54 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
55 |
56 |
57 | #include "UnityCG.cginc"
58 |
59 | struct appdata_t {
60 | float4 vertex : POSITION;
61 | fixed4 color : COLOR;
62 | float2 texcoord0 : TEXCOORD0;
63 | float2 texcoord1 : TEXCOORD1;
64 | };
65 |
66 | struct v2f {
67 | float4 vertex : SV_POSITION;
68 | fixed4 color : COLOR;
69 | float2 texcoord0 : TEXCOORD0;
70 | float2 texcoord1 : TEXCOORD1;
71 | float4 mask : TEXCOORD2;
72 | };
73 |
74 | uniform sampler2D _MainTex;
75 | uniform sampler2D _FaceTex;
76 | uniform float4 _FaceTex_ST;
77 | uniform fixed4 _FaceColor;
78 |
79 | uniform float _VertexOffsetX;
80 | uniform float _VertexOffsetY;
81 | uniform float4 _ClipRect;
82 | uniform float _MaskSoftnessX;
83 | uniform float _MaskSoftnessY;
84 |
85 | float2 UnpackUV(float uv)
86 | {
87 | float2 output;
88 | output.x = floor(uv / 4096);
89 | output.y = uv - 4096 * output.x;
90 |
91 | return output * 0.001953125;
92 | }
93 |
94 | v2f vert (appdata_t v)
95 | {
96 | float4 vert = v.vertex;
97 | vert.x += _VertexOffsetX;
98 | vert.y += _VertexOffsetY;
99 |
100 | vert.xy += (vert.w * 0.5) / _ScreenParams.xy;
101 |
102 | float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert));
103 |
104 | fixed4 faceColor = v.color;
105 | faceColor *= _FaceColor;
106 |
107 | v2f OUT;
108 | OUT.vertex = vPosition;
109 | OUT.color = faceColor;
110 | OUT.texcoord0 = v.texcoord0;
111 | OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex);
112 | float2 pixelSize = vPosition.w;
113 | pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
114 |
115 | // Clamp _ClipRect to 16bit.
116 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
117 | OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
118 |
119 | return OUT;
120 | }
121 |
122 | fixed4 frag (v2f IN) : SV_Target
123 | {
124 | fixed4 color = tex2D(_MainTex, IN.texcoord0) * tex2D(_FaceTex, IN.texcoord1) * IN.color;
125 |
126 | // Alternative implementation to UnityGet2DClipping with support for softness.
127 | #if UNITY_UI_CLIP_RECT
128 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
129 | color *= m.x * m.y;
130 | #endif
131 |
132 | #if UNITY_UI_ALPHACLIP
133 | clip(color.a - 0.001);
134 | #endif
135 |
136 | return color;
137 | }
138 | ENDCG
139 | }
140 | }
141 |
142 | CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI"
143 | }
144 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 48bb5f55d8670e349b6e614913f9d910
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader:
--------------------------------------------------------------------------------
1 | Shader "TextMeshPro/Mobile/Bitmap" {
2 |
3 | Properties {
4 | _MainTex ("Font Atlas", 2D) = "white" {}
5 | [HDR]_Color ("Text Color", Color) = (1,1,1,1)
6 | _DiffusePower ("Diffuse Power", Range(1.0,4.0)) = 1.0
7 |
8 | _VertexOffsetX("Vertex OffsetX", float) = 0
9 | _VertexOffsetY("Vertex OffsetY", float) = 0
10 | _MaskSoftnessX("Mask SoftnessX", float) = 0
11 | _MaskSoftnessY("Mask SoftnessY", float) = 0
12 |
13 | _ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
14 |
15 | _StencilComp("Stencil Comparison", Float) = 8
16 | _Stencil("Stencil ID", Float) = 0
17 | _StencilOp("Stencil Operation", Float) = 0
18 | _StencilWriteMask("Stencil Write Mask", Float) = 255
19 | _StencilReadMask("Stencil Read Mask", Float) = 255
20 |
21 | _CullMode("Cull Mode", Float) = 0
22 | _ColorMask("Color Mask", Float) = 15
23 | }
24 |
25 | SubShader {
26 |
27 | Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
28 |
29 | Stencil
30 | {
31 | Ref[_Stencil]
32 | Comp[_StencilComp]
33 | Pass[_StencilOp]
34 | ReadMask[_StencilReadMask]
35 | WriteMask[_StencilWriteMask]
36 | }
37 |
38 |
39 | Lighting Off
40 | Cull [_CullMode]
41 | ZTest [unity_GUIZTestMode]
42 | ZWrite Off
43 | Fog { Mode Off }
44 | Blend SrcAlpha OneMinusSrcAlpha
45 | ColorMask[_ColorMask]
46 |
47 | Pass {
48 | CGPROGRAM
49 | #pragma vertex vert
50 | #pragma fragment frag
51 | #pragma fragmentoption ARB_precision_hint_fastest
52 |
53 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
54 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
55 |
56 |
57 | #include "UnityCG.cginc"
58 |
59 | struct appdata_t {
60 | float4 vertex : POSITION;
61 | fixed4 color : COLOR;
62 | float2 texcoord0 : TEXCOORD0;
63 | float2 texcoord1 : TEXCOORD1;
64 | };
65 |
66 | struct v2f {
67 | float4 vertex : POSITION;
68 | fixed4 color : COLOR;
69 | float2 texcoord0 : TEXCOORD0;
70 | float4 mask : TEXCOORD2;
71 | };
72 |
73 | sampler2D _MainTex;
74 | fixed4 _Color;
75 | float _DiffusePower;
76 |
77 | uniform float _VertexOffsetX;
78 | uniform float _VertexOffsetY;
79 | uniform float4 _ClipRect;
80 | uniform float _MaskSoftnessX;
81 | uniform float _MaskSoftnessY;
82 |
83 | v2f vert (appdata_t v)
84 | {
85 | v2f OUT;
86 | float4 vert = v.vertex;
87 | vert.x += _VertexOffsetX;
88 | vert.y += _VertexOffsetY;
89 |
90 | vert.xy += (vert.w * 0.5) / _ScreenParams.xy;
91 |
92 | OUT.vertex = UnityPixelSnap(UnityObjectToClipPos(vert));
93 | OUT.color = v.color;
94 | OUT.color *= _Color;
95 | OUT.color.rgb *= _DiffusePower;
96 | OUT.texcoord0 = v.texcoord0;
97 |
98 | float2 pixelSize = OUT.vertex.w;
99 | //pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
100 |
101 | // Clamp _ClipRect to 16bit.
102 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
103 | OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
104 |
105 | return OUT;
106 | }
107 |
108 | fixed4 frag (v2f IN) : COLOR
109 | {
110 | fixed4 color = fixed4(IN.color.rgb, IN.color.a * tex2D(_MainTex, IN.texcoord0).a);
111 |
112 | // Alternative implementation to UnityGet2DClipping with support for softness.
113 | #if UNITY_UI_CLIP_RECT
114 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
115 | color *= m.x * m.y;
116 | #endif
117 |
118 | #if UNITY_UI_ALPHACLIP
119 | clip(color.a - 0.001);
120 | #endif
121 |
122 | return color;
123 | }
124 | ENDCG
125 | }
126 | }
127 |
128 | SubShader {
129 | Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
130 | Lighting Off Cull Off ZTest Always ZWrite Off Fog { Mode Off }
131 | Blend SrcAlpha OneMinusSrcAlpha
132 | BindChannels {
133 | Bind "Color", color
134 | Bind "Vertex", vertex
135 | Bind "TexCoord", texcoord0
136 | }
137 | Pass {
138 | SetTexture [_MainTex] {
139 | constantColor [_Color] combine constant * primary, constant * texture
140 | }
141 | }
142 | }
143 |
144 | CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI"
145 | }
146 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1e3b057af24249748ff873be7fafee47
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_Bitmap.shader:
--------------------------------------------------------------------------------
1 | Shader "TextMeshPro/Bitmap" {
2 |
3 | Properties {
4 | _MainTex ("Font Atlas", 2D) = "white" {}
5 | _FaceTex ("Font Texture", 2D) = "white" {}
6 | [HDR]_FaceColor ("Text Color", Color) = (1,1,1,1)
7 |
8 | _VertexOffsetX ("Vertex OffsetX", float) = 0
9 | _VertexOffsetY ("Vertex OffsetY", float) = 0
10 | _MaskSoftnessX ("Mask SoftnessX", float) = 0
11 | _MaskSoftnessY ("Mask SoftnessY", float) = 0
12 |
13 | _ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
14 |
15 | _StencilComp("Stencil Comparison", Float) = 8
16 | _Stencil("Stencil ID", Float) = 0
17 | _StencilOp("Stencil Operation", Float) = 0
18 | _StencilWriteMask("Stencil Write Mask", Float) = 255
19 | _StencilReadMask("Stencil Read Mask", Float) = 255
20 |
21 | _CullMode("Cull Mode", Float) = 0
22 | _ColorMask("Color Mask", Float) = 15
23 | }
24 |
25 | SubShader{
26 |
27 | Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
28 |
29 | Stencil
30 | {
31 | Ref[_Stencil]
32 | Comp[_StencilComp]
33 | Pass[_StencilOp]
34 | ReadMask[_StencilReadMask]
35 | WriteMask[_StencilWriteMask]
36 | }
37 |
38 |
39 | Lighting Off
40 | Cull [_CullMode]
41 | ZTest [unity_GUIZTestMode]
42 | ZWrite Off
43 | Fog { Mode Off }
44 | Blend SrcAlpha OneMinusSrcAlpha
45 | ColorMask[_ColorMask]
46 |
47 | Pass {
48 | CGPROGRAM
49 | #pragma vertex vert
50 | #pragma fragment frag
51 |
52 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
53 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
54 |
55 |
56 | #include "UnityCG.cginc"
57 |
58 | struct appdata_t {
59 | float4 vertex : POSITION;
60 | fixed4 color : COLOR;
61 | float2 texcoord0 : TEXCOORD0;
62 | float2 texcoord1 : TEXCOORD1;
63 | };
64 |
65 | struct v2f {
66 | float4 vertex : SV_POSITION;
67 | fixed4 color : COLOR;
68 | float2 texcoord0 : TEXCOORD0;
69 | float2 texcoord1 : TEXCOORD1;
70 | float4 mask : TEXCOORD2;
71 | };
72 |
73 | uniform sampler2D _MainTex;
74 | uniform sampler2D _FaceTex;
75 | uniform float4 _FaceTex_ST;
76 | uniform fixed4 _FaceColor;
77 |
78 | uniform float _VertexOffsetX;
79 | uniform float _VertexOffsetY;
80 | uniform float4 _ClipRect;
81 | uniform float _MaskSoftnessX;
82 | uniform float _MaskSoftnessY;
83 |
84 | float2 UnpackUV(float uv)
85 | {
86 | float2 output;
87 | output.x = floor(uv / 4096);
88 | output.y = uv - 4096 * output.x;
89 |
90 | return output * 0.001953125;
91 | }
92 |
93 | v2f vert (appdata_t v)
94 | {
95 | float4 vert = v.vertex;
96 | vert.x += _VertexOffsetX;
97 | vert.y += _VertexOffsetY;
98 |
99 | vert.xy += (vert.w * 0.5) / _ScreenParams.xy;
100 |
101 | float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert));
102 |
103 | fixed4 faceColor = v.color;
104 | faceColor *= _FaceColor;
105 |
106 | v2f OUT;
107 | OUT.vertex = vPosition;
108 | OUT.color = faceColor;
109 | OUT.texcoord0 = v.texcoord0;
110 | OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex);
111 | float2 pixelSize = vPosition.w;
112 | pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
113 |
114 | // Clamp _ClipRect to 16bit.
115 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
116 | OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
117 |
118 | return OUT;
119 | }
120 |
121 | fixed4 frag (v2f IN) : SV_Target
122 | {
123 | fixed4 color = tex2D(_MainTex, IN.texcoord0);
124 | color = fixed4 (tex2D(_FaceTex, IN.texcoord1).rgb * IN.color.rgb, IN.color.a * color.a);
125 |
126 | // Alternative implementation to UnityGet2DClipping with support for softness.
127 | #if UNITY_UI_CLIP_RECT
128 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
129 | color *= m.x * m.y;
130 | #endif
131 |
132 | #if UNITY_UI_ALPHACLIP
133 | clip(color.a - 0.001);
134 | #endif
135 |
136 | return color;
137 | }
138 | ENDCG
139 | }
140 | }
141 |
142 | CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI"
143 | }
144 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_Bitmap.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 128e987d567d4e2c824d754223b3f3b0
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_SDF Overlay.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dd89cf5b9246416f84610a006f916af7
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_SDF SSD.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 14eb328de4b8eb245bb7cea29e4ac00b
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader:
--------------------------------------------------------------------------------
1 | // Simplified SDF shader:
2 | // - No Shading Option (bevel / bump / env map)
3 | // - No Glow Option
4 | // - Softness is applied on both side of the outline
5 |
6 | Shader "TextMeshPro/Mobile/Distance Field - Masking" {
7 |
8 | Properties {
9 | [HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
10 | _FaceDilate ("Face Dilate", Range(-1,1)) = 0
11 |
12 | [HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
13 | _OutlineWidth ("Outline Thickness", Range(0,1)) = 0
14 | _OutlineSoftness ("Outline Softness", Range(0,1)) = 0
15 |
16 | [HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
17 | _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
18 | _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
19 | _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
20 | _UnderlaySoftness ("Border Softness", Range(0,1)) = 0
21 |
22 | _WeightNormal ("Weight Normal", float) = 0
23 | _WeightBold ("Weight Bold", float) = .5
24 |
25 | _ShaderFlags ("Flags", float) = 0
26 | _ScaleRatioA ("Scale RatioA", float) = 1
27 | _ScaleRatioB ("Scale RatioB", float) = 1
28 | _ScaleRatioC ("Scale RatioC", float) = 1
29 |
30 | _MainTex ("Font Atlas", 2D) = "white" {}
31 | _TextureWidth ("Texture Width", float) = 512
32 | _TextureHeight ("Texture Height", float) = 512
33 | _GradientScale ("Gradient Scale", float) = 5
34 | _ScaleX ("Scale X", float) = 1
35 | _ScaleY ("Scale Y", float) = 1
36 | _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
37 | _Sharpness ("Sharpness", Range(-1,1)) = 0
38 |
39 | _VertexOffsetX ("Vertex OffsetX", float) = 0
40 | _VertexOffsetY ("Vertex OffsetY", float) = 0
41 |
42 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
43 | _MaskSoftnessX ("Mask SoftnessX", float) = 0
44 | _MaskSoftnessY ("Mask SoftnessY", float) = 0
45 | _MaskTex ("Mask Texture", 2D) = "white" {}
46 | _MaskInverse ("Inverse", float) = 0
47 | _MaskEdgeColor ("Edge Color", Color) = (1,1,1,1)
48 | _MaskEdgeSoftness ("Edge Softness", Range(0, 1)) = 0.01
49 | _MaskWipeControl ("Wipe Position", Range(0, 1)) = 0.5
50 |
51 | _StencilComp ("Stencil Comparison", Float) = 8
52 | _Stencil ("Stencil ID", Float) = 0
53 | _StencilOp ("Stencil Operation", Float) = 0
54 | _StencilWriteMask ("Stencil Write Mask", Float) = 255
55 | _StencilReadMask ("Stencil Read Mask", Float) = 255
56 |
57 | _CullMode ("Cull Mode", Float) = 0
58 | _ColorMask ("Color Mask", Float) = 15
59 | }
60 |
61 | SubShader {
62 | Tags
63 | {
64 | "Queue"="Transparent"
65 | "IgnoreProjector"="True"
66 | "RenderType"="Transparent"
67 | }
68 |
69 |
70 | Stencil
71 | {
72 | Ref [_Stencil]
73 | Comp [_StencilComp]
74 | Pass [_StencilOp]
75 | ReadMask [_StencilReadMask]
76 | WriteMask [_StencilWriteMask]
77 | }
78 |
79 | Cull [_CullMode]
80 | ZWrite Off
81 | Lighting Off
82 | Fog { Mode Off }
83 | ZTest [unity_GUIZTestMode]
84 | Blend One OneMinusSrcAlpha
85 | ColorMask [_ColorMask]
86 |
87 | Pass {
88 | CGPROGRAM
89 | #pragma vertex VertShader
90 | #pragma fragment PixShader
91 | #pragma shader_feature __ OUTLINE_ON
92 | #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
93 |
94 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
95 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
96 |
97 |
98 | #include "UnityCG.cginc"
99 | #include "UnityUI.cginc"
100 | #include "TMPro_Properties.cginc"
101 |
102 | struct vertex_t {
103 | float4 vertex : POSITION;
104 | float3 normal : NORMAL;
105 | fixed4 color : COLOR;
106 | float2 texcoord0 : TEXCOORD0;
107 | float2 texcoord1 : TEXCOORD1;
108 | };
109 |
110 | struct pixel_t {
111 | float4 vertex : SV_POSITION;
112 | fixed4 faceColor : COLOR;
113 | fixed4 outlineColor : COLOR1;
114 | float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
115 | half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
116 | half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
117 | #if (UNDERLAY_ON | UNDERLAY_INNER)
118 | float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved
119 | half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y)
120 | #endif
121 | };
122 |
123 | float _MaskWipeControl;
124 | float _MaskEdgeSoftness;
125 | fixed4 _MaskEdgeColor;
126 | bool _MaskInverse;
127 |
128 | pixel_t VertShader(vertex_t input)
129 | {
130 | float bold = step(input.texcoord1.y, 0);
131 |
132 | float4 vert = input.vertex;
133 | vert.x += _VertexOffsetX;
134 | vert.y += _VertexOffsetY;
135 | float4 vPosition = UnityObjectToClipPos(vert);
136 |
137 | float2 pixelSize = vPosition.w;
138 | pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
139 |
140 | float scale = rsqrt(dot(pixelSize, pixelSize));
141 | scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
142 | if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
143 |
144 | float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
145 | weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
146 |
147 | float layerScale = scale;
148 |
149 | scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
150 | float bias = (0.5 - weight) * scale - 0.5;
151 | float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
152 |
153 | float opacity = input.color.a;
154 | #if (UNDERLAY_ON | UNDERLAY_INNER)
155 | opacity = 1.0;
156 | #endif
157 |
158 | fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
159 | faceColor.rgb *= faceColor.a;
160 |
161 | fixed4 outlineColor = _OutlineColor;
162 | outlineColor.a *= opacity;
163 | outlineColor.rgb *= outlineColor.a;
164 | outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
165 |
166 | #if (UNDERLAY_ON | UNDERLAY_INNER)
167 |
168 | layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
169 | float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
170 |
171 | float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
172 | float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
173 | float2 layerOffset = float2(x, y);
174 | #endif
175 |
176 | // Generate UV for the Masking Texture
177 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
178 | float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
179 |
180 | // Structure for pixel shader
181 | pixel_t output = {
182 | vPosition,
183 | faceColor,
184 | outlineColor,
185 | float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y),
186 | half4(scale, bias - outline, bias + outline, bias),
187 | half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)),
188 | #if (UNDERLAY_ON | UNDERLAY_INNER)
189 | float4(input.texcoord0 + layerOffset, input.color.a, 0),
190 | half2(layerScale, layerBias),
191 | #endif
192 | };
193 |
194 | return output;
195 | }
196 |
197 |
198 | // PIXEL SHADER
199 | fixed4 PixShader(pixel_t input) : SV_Target
200 | {
201 | half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
202 | half4 c = input.faceColor * saturate(d - input.param.w);
203 |
204 | #ifdef OUTLINE_ON
205 | c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z));
206 | c *= saturate(d - input.param.y);
207 | #endif
208 |
209 | #if UNDERLAY_ON
210 | d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
211 | c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
212 | #endif
213 |
214 | #if UNDERLAY_INNER
215 | half sd = saturate(d - input.param.z);
216 | d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
217 | c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
218 | #endif
219 |
220 | // Alternative implementation to UnityGet2DClipping with support for softness.
221 | //#if UNITY_UI_CLIP_RECT
222 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
223 | c *= m.x * m.y;
224 | //#endif
225 |
226 | float a = abs(_MaskInverse - tex2D(_MaskTex, input.texcoord0.zw).a);
227 | float t = a + (1 - _MaskWipeControl) * _MaskEdgeSoftness - _MaskWipeControl;
228 | a = saturate(t / _MaskEdgeSoftness);
229 | c.rgb = lerp(_MaskEdgeColor.rgb*c.a, c.rgb, a);
230 | c *= a;
231 |
232 | #if (UNDERLAY_ON | UNDERLAY_INNER)
233 | c *= input.texcoord1.z;
234 | #endif
235 |
236 | #if UNITY_UI_ALPHACLIP
237 | clip(c.a - 0.001);
238 | #endif
239 |
240 | return c;
241 | }
242 | ENDCG
243 | }
244 | }
245 |
246 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
247 | }
248 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bc1ede39bf3643ee8e493720e4259791
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader:
--------------------------------------------------------------------------------
1 | // Simplified SDF shader:
2 | // - No Shading Option (bevel / bump / env map)
3 | // - No Glow Option
4 | // - Softness is applied on both side of the outline
5 |
6 | Shader "TextMeshPro/Mobile/Distance Field Overlay" {
7 |
8 | Properties {
9 | [HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
10 | _FaceDilate ("Face Dilate", Range(-1,1)) = 0
11 |
12 | [HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
13 | _OutlineWidth ("Outline Thickness", Range(0,1)) = 0
14 | _OutlineSoftness ("Outline Softness", Range(0,1)) = 0
15 |
16 | [HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
17 | _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
18 | _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
19 | _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
20 | _UnderlaySoftness ("Border Softness", Range(0,1)) = 0
21 |
22 | _WeightNormal ("Weight Normal", float) = 0
23 | _WeightBold ("Weight Bold", float) = .5
24 |
25 | _ShaderFlags ("Flags", float) = 0
26 | _ScaleRatioA ("Scale RatioA", float) = 1
27 | _ScaleRatioB ("Scale RatioB", float) = 1
28 | _ScaleRatioC ("Scale RatioC", float) = 1
29 |
30 | _MainTex ("Font Atlas", 2D) = "white" {}
31 | _TextureWidth ("Texture Width", float) = 512
32 | _TextureHeight ("Texture Height", float) = 512
33 | _GradientScale ("Gradient Scale", float) = 5
34 | _ScaleX ("Scale X", float) = 1
35 | _ScaleY ("Scale Y", float) = 1
36 | _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
37 | _Sharpness ("Sharpness", Range(-1,1)) = 0
38 |
39 | _VertexOffsetX ("Vertex OffsetX", float) = 0
40 | _VertexOffsetY ("Vertex OffsetY", float) = 0
41 |
42 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
43 | _MaskSoftnessX ("Mask SoftnessX", float) = 0
44 | _MaskSoftnessY ("Mask SoftnessY", float) = 0
45 |
46 | _StencilComp ("Stencil Comparison", Float) = 8
47 | _Stencil ("Stencil ID", Float) = 0
48 | _StencilOp ("Stencil Operation", Float) = 0
49 | _StencilWriteMask ("Stencil Write Mask", Float) = 255
50 | _StencilReadMask ("Stencil Read Mask", Float) = 255
51 |
52 | _CullMode ("Cull Mode", Float) = 0
53 | _ColorMask ("Color Mask", Float) = 15
54 | }
55 |
56 | SubShader {
57 | Tags
58 | {
59 | "Queue"="Overlay"
60 | "IgnoreProjector"="True"
61 | "RenderType"="Transparent"
62 | }
63 |
64 |
65 | Stencil
66 | {
67 | Ref [_Stencil]
68 | Comp [_StencilComp]
69 | Pass [_StencilOp]
70 | ReadMask [_StencilReadMask]
71 | WriteMask [_StencilWriteMask]
72 | }
73 |
74 | Cull [_CullMode]
75 | ZWrite Off
76 | Lighting Off
77 | Fog { Mode Off }
78 | ZTest Always
79 | Blend One OneMinusSrcAlpha
80 | ColorMask [_ColorMask]
81 |
82 | Pass {
83 | CGPROGRAM
84 | #pragma vertex VertShader
85 | #pragma fragment PixShader
86 | #pragma shader_feature __ OUTLINE_ON
87 | #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
88 |
89 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
90 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
91 |
92 | #include "UnityCG.cginc"
93 | #include "UnityUI.cginc"
94 | #include "TMPro_Properties.cginc"
95 |
96 | struct vertex_t {
97 | UNITY_VERTEX_INPUT_INSTANCE_ID
98 | float4 vertex : POSITION;
99 | float3 normal : NORMAL;
100 | fixed4 color : COLOR;
101 | float2 texcoord0 : TEXCOORD0;
102 | float2 texcoord1 : TEXCOORD1;
103 | };
104 |
105 | struct pixel_t {
106 | UNITY_VERTEX_INPUT_INSTANCE_ID
107 | UNITY_VERTEX_OUTPUT_STEREO
108 | float4 vertex : SV_POSITION;
109 | fixed4 faceColor : COLOR;
110 | fixed4 outlineColor : COLOR1;
111 | float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
112 | half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
113 | half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
114 | #if (UNDERLAY_ON | UNDERLAY_INNER)
115 | float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved
116 | half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y)
117 | #endif
118 | };
119 |
120 |
121 | pixel_t VertShader(vertex_t input)
122 | {
123 | pixel_t output;
124 |
125 | UNITY_INITIALIZE_OUTPUT(pixel_t, output);
126 | UNITY_SETUP_INSTANCE_ID(input);
127 | UNITY_TRANSFER_INSTANCE_ID(input, output);
128 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
129 |
130 | float bold = step(input.texcoord1.y, 0);
131 |
132 | float4 vert = input.vertex;
133 | vert.x += _VertexOffsetX;
134 | vert.y += _VertexOffsetY;
135 | float4 vPosition = UnityObjectToClipPos(vert);
136 |
137 | float2 pixelSize = vPosition.w;
138 | pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
139 |
140 | float scale = rsqrt(dot(pixelSize, pixelSize));
141 | scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
142 | if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
143 |
144 | float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
145 | weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
146 |
147 | float layerScale = scale;
148 |
149 | scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
150 | float bias = (0.5 - weight) * scale - 0.5;
151 | float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
152 |
153 | float opacity = input.color.a;
154 | #if (UNDERLAY_ON | UNDERLAY_INNER)
155 | opacity = 1.0;
156 | #endif
157 |
158 | fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
159 | faceColor.rgb *= faceColor.a;
160 |
161 | fixed4 outlineColor = _OutlineColor;
162 | outlineColor.a *= opacity;
163 | outlineColor.rgb *= outlineColor.a;
164 | outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
165 |
166 | #if (UNDERLAY_ON | UNDERLAY_INNER)
167 | layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
168 | float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
169 |
170 | float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
171 | float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
172 | float2 layerOffset = float2(x, y);
173 | #endif
174 |
175 | // Generate UV for the Masking Texture
176 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
177 | float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
178 |
179 | // Populate structure for pixel shader
180 | output.vertex = vPosition;
181 | output.faceColor = faceColor;
182 | output.outlineColor = outlineColor;
183 | output.texcoord0 = float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y);
184 | output.param = half4(scale, bias - outline, bias + outline, bias);
185 | output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
186 | #if (UNDERLAY_ON || UNDERLAY_INNER)
187 | output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0);
188 | output.underlayParam = half2(layerScale, layerBias);
189 | #endif
190 |
191 | return output;
192 | }
193 |
194 |
195 | // PIXEL SHADER
196 | fixed4 PixShader(pixel_t input) : SV_Target
197 | {
198 | UNITY_SETUP_INSTANCE_ID(input);
199 |
200 | half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
201 | half4 c = input.faceColor * saturate(d - input.param.w);
202 |
203 | #ifdef OUTLINE_ON
204 | c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z));
205 | c *= saturate(d - input.param.y);
206 | #endif
207 |
208 | #if UNDERLAY_ON
209 | d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
210 | c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
211 | #endif
212 |
213 | #if UNDERLAY_INNER
214 | half sd = saturate(d - input.param.z);
215 | d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
216 | c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
217 | #endif
218 |
219 | // Alternative implementation to UnityGet2DClipping with support for softness.
220 | #if UNITY_UI_CLIP_RECT
221 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
222 | c *= m.x * m.y;
223 | #endif
224 |
225 | #if (UNDERLAY_ON | UNDERLAY_INNER)
226 | c *= input.texcoord1.z;
227 | #endif
228 |
229 | #if UNITY_UI_ALPHACLIP
230 | clip(c.a - 0.001);
231 | #endif
232 |
233 | return c;
234 | }
235 | ENDCG
236 | }
237 | }
238 |
239 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
240 | }
241 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a02a7d8c237544f1962732b55a9aebf1
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader:
--------------------------------------------------------------------------------
1 | // Simplified SDF shader:
2 | // - No Shading Option (bevel / bump / env map)
3 | // - No Glow Option
4 | // - Softness is applied on both side of the outline
5 |
6 | Shader "TextMeshPro/Mobile/Distance Field SSD" {
7 |
8 | Properties {
9 | [HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
10 | _FaceDilate ("Face Dilate", Range(-1,1)) = 0
11 |
12 | [HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
13 | _OutlineWidth ("Outline Thickness", Range(0,1)) = 0
14 | _OutlineSoftness ("Outline Softness", Range(0,1)) = 0
15 |
16 | [HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
17 | _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
18 | _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
19 | _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
20 | _UnderlaySoftness ("Border Softness", Range(0,1)) = 0
21 |
22 | _WeightNormal ("Weight Normal", float) = 0
23 | _WeightBold ("Weight Bold", float) = .5
24 |
25 | _ShaderFlags ("Flags", float) = 0
26 | _ScaleRatioA ("Scale RatioA", float) = 1
27 | _ScaleRatioB ("Scale RatioB", float) = 1
28 | _ScaleRatioC ("Scale RatioC", float) = 1
29 |
30 | _MainTex ("Font Atlas", 2D) = "white" {}
31 | _TextureWidth ("Texture Width", float) = 512
32 | _TextureHeight ("Texture Height", float) = 512
33 | _GradientScale ("Gradient Scale", float) = 5
34 | _ScaleX ("Scale X", float) = 1
35 | _ScaleY ("Scale Y", float) = 1
36 | _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
37 | _Sharpness ("Sharpness", Range(-1,1)) = 0
38 |
39 | _VertexOffsetX ("Vertex OffsetX", float) = 0
40 | _VertexOffsetY ("Vertex OffsetY", float) = 0
41 |
42 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
43 | _MaskSoftnessX ("Mask SoftnessX", float) = 0
44 | _MaskSoftnessY ("Mask SoftnessY", float) = 0
45 | _MaskTex ("Mask Texture", 2D) = "white" {}
46 | _MaskInverse ("Inverse", float) = 0
47 | _MaskEdgeColor ("Edge Color", Color) = (1,1,1,1)
48 | _MaskEdgeSoftness ("Edge Softness", Range(0, 1)) = 0.01
49 | _MaskWipeControl ("Wipe Position", Range(0, 1)) = 0.5
50 |
51 | _StencilComp ("Stencil Comparison", Float) = 8
52 | _Stencil ("Stencil ID", Float) = 0
53 | _StencilOp ("Stencil Operation", Float) = 0
54 | _StencilWriteMask ("Stencil Write Mask", Float) = 255
55 | _StencilReadMask ("Stencil Read Mask", Float) = 255
56 |
57 | _CullMode ("Cull Mode", Float) = 0
58 | _ColorMask ("Color Mask", Float) = 15
59 | }
60 |
61 | SubShader {
62 | Tags {
63 | "Queue"="Transparent"
64 | "IgnoreProjector"="True"
65 | "RenderType"="Transparent"
66 | }
67 |
68 | Stencil
69 | {
70 | Ref [_Stencil]
71 | Comp [_StencilComp]
72 | Pass [_StencilOp]
73 | ReadMask [_StencilReadMask]
74 | WriteMask [_StencilWriteMask]
75 | }
76 |
77 | Cull [_CullMode]
78 | ZWrite Off
79 | Lighting Off
80 | Fog { Mode Off }
81 | ZTest [unity_GUIZTestMode]
82 | Blend One OneMinusSrcAlpha
83 | ColorMask [_ColorMask]
84 |
85 | Pass {
86 | CGPROGRAM
87 | #pragma vertex VertShader
88 | #pragma fragment PixShader
89 | #pragma shader_feature __ OUTLINE_ON
90 | #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
91 |
92 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
93 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
94 |
95 | #include "UnityCG.cginc"
96 | #include "UnityUI.cginc"
97 | #include "TMPro_Properties.cginc"
98 |
99 | #include "TMPro_Mobile.cginc"
100 |
101 | ENDCG
102 | }
103 | }
104 |
105 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
106 | }
107 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c8d12adcee749c344b8117cf7c7eb912
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader:
--------------------------------------------------------------------------------
1 | // Simplified SDF shader:
2 | // - No Shading Option (bevel / bump / env map)
3 | // - No Glow Option
4 | // - Softness is applied on both side of the outline
5 |
6 | Shader "TextMeshPro/Mobile/Distance Field" {
7 |
8 | Properties {
9 | [HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
10 | _FaceDilate ("Face Dilate", Range(-1,1)) = 0
11 |
12 | [HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
13 | _OutlineWidth ("Outline Thickness", Range(0,1)) = 0
14 | _OutlineSoftness ("Outline Softness", Range(0,1)) = 0
15 |
16 | [HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
17 | _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
18 | _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
19 | _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
20 | _UnderlaySoftness ("Border Softness", Range(0,1)) = 0
21 |
22 | _WeightNormal ("Weight Normal", float) = 0
23 | _WeightBold ("Weight Bold", float) = .5
24 |
25 | _ShaderFlags ("Flags", float) = 0
26 | _ScaleRatioA ("Scale RatioA", float) = 1
27 | _ScaleRatioB ("Scale RatioB", float) = 1
28 | _ScaleRatioC ("Scale RatioC", float) = 1
29 |
30 | _MainTex ("Font Atlas", 2D) = "white" {}
31 | _TextureWidth ("Texture Width", float) = 512
32 | _TextureHeight ("Texture Height", float) = 512
33 | _GradientScale ("Gradient Scale", float) = 5
34 | _ScaleX ("Scale X", float) = 1
35 | _ScaleY ("Scale Y", float) = 1
36 | _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
37 | _Sharpness ("Sharpness", Range(-1,1)) = 0
38 |
39 | _VertexOffsetX ("Vertex OffsetX", float) = 0
40 | _VertexOffsetY ("Vertex OffsetY", float) = 0
41 |
42 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
43 | _MaskSoftnessX ("Mask SoftnessX", float) = 0
44 | _MaskSoftnessY ("Mask SoftnessY", float) = 0
45 |
46 | _StencilComp ("Stencil Comparison", Float) = 8
47 | _Stencil ("Stencil ID", Float) = 0
48 | _StencilOp ("Stencil Operation", Float) = 0
49 | _StencilWriteMask ("Stencil Write Mask", Float) = 255
50 | _StencilReadMask ("Stencil Read Mask", Float) = 255
51 |
52 | _CullMode ("Cull Mode", Float) = 0
53 | _ColorMask ("Color Mask", Float) = 15
54 | }
55 |
56 | SubShader {
57 | Tags
58 | {
59 | "Queue"="Transparent"
60 | "IgnoreProjector"="True"
61 | "RenderType"="Transparent"
62 | }
63 |
64 |
65 | Stencil
66 | {
67 | Ref [_Stencil]
68 | Comp [_StencilComp]
69 | Pass [_StencilOp]
70 | ReadMask [_StencilReadMask]
71 | WriteMask [_StencilWriteMask]
72 | }
73 |
74 | Cull [_CullMode]
75 | ZWrite Off
76 | Lighting Off
77 | Fog { Mode Off }
78 | ZTest [unity_GUIZTestMode]
79 | Blend One OneMinusSrcAlpha
80 | ColorMask [_ColorMask]
81 |
82 | Pass {
83 | CGPROGRAM
84 | #pragma vertex VertShader
85 | #pragma fragment PixShader
86 | #pragma shader_feature __ OUTLINE_ON
87 | #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
88 |
89 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
90 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
91 |
92 | #include "UnityCG.cginc"
93 | #include "UnityUI.cginc"
94 | #include "TMPro_Properties.cginc"
95 |
96 | struct vertex_t {
97 | UNITY_VERTEX_INPUT_INSTANCE_ID
98 | float4 vertex : POSITION;
99 | float3 normal : NORMAL;
100 | fixed4 color : COLOR;
101 | float2 texcoord0 : TEXCOORD0;
102 | float2 texcoord1 : TEXCOORD1;
103 | };
104 |
105 | struct pixel_t {
106 | UNITY_VERTEX_INPUT_INSTANCE_ID
107 | UNITY_VERTEX_OUTPUT_STEREO
108 | float4 vertex : SV_POSITION;
109 | fixed4 faceColor : COLOR;
110 | fixed4 outlineColor : COLOR1;
111 | float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
112 | half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
113 | half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
114 | #if (UNDERLAY_ON | UNDERLAY_INNER)
115 | float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved
116 | half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y)
117 | #endif
118 | };
119 |
120 |
121 | pixel_t VertShader(vertex_t input)
122 | {
123 | pixel_t output;
124 |
125 | UNITY_INITIALIZE_OUTPUT(pixel_t, output);
126 | UNITY_SETUP_INSTANCE_ID(input);
127 | UNITY_TRANSFER_INSTANCE_ID(input, output);
128 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
129 |
130 | float bold = step(input.texcoord1.y, 0);
131 |
132 | float4 vert = input.vertex;
133 | vert.x += _VertexOffsetX;
134 | vert.y += _VertexOffsetY;
135 | float4 vPosition = UnityObjectToClipPos(vert);
136 |
137 | float2 pixelSize = vPosition.w;
138 | pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
139 |
140 | float scale = rsqrt(dot(pixelSize, pixelSize));
141 | scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
142 | if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
143 |
144 | float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
145 | weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
146 |
147 | float layerScale = scale;
148 |
149 | scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
150 | float bias = (0.5 - weight) * scale - 0.5;
151 | float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
152 |
153 | float opacity = input.color.a;
154 | #if (UNDERLAY_ON | UNDERLAY_INNER)
155 | opacity = 1.0;
156 | #endif
157 |
158 | fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
159 | faceColor.rgb *= faceColor.a;
160 |
161 | fixed4 outlineColor = _OutlineColor;
162 | outlineColor.a *= opacity;
163 | outlineColor.rgb *= outlineColor.a;
164 | outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
165 |
166 | #if (UNDERLAY_ON | UNDERLAY_INNER)
167 | layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
168 | float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
169 |
170 | float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
171 | float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
172 | float2 layerOffset = float2(x, y);
173 | #endif
174 |
175 | // Generate UV for the Masking Texture
176 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
177 | float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
178 |
179 | // Populate structure for pixel shader
180 | output.vertex = vPosition;
181 | output.faceColor = faceColor;
182 | output.outlineColor = outlineColor;
183 | output.texcoord0 = float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y);
184 | output.param = half4(scale, bias - outline, bias + outline, bias);
185 | output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
186 | #if (UNDERLAY_ON || UNDERLAY_INNER)
187 | output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0);
188 | output.underlayParam = half2(layerScale, layerBias);
189 | #endif
190 |
191 | return output;
192 | }
193 |
194 |
195 | // PIXEL SHADER
196 | fixed4 PixShader(pixel_t input) : SV_Target
197 | {
198 | UNITY_SETUP_INSTANCE_ID(input);
199 |
200 | half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
201 | half4 c = input.faceColor * saturate(d - input.param.w);
202 |
203 | #ifdef OUTLINE_ON
204 | c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z));
205 | c *= saturate(d - input.param.y);
206 | #endif
207 |
208 | #if UNDERLAY_ON
209 | d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
210 | c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
211 | #endif
212 |
213 | #if UNDERLAY_INNER
214 | half sd = saturate(d - input.param.z);
215 | d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
216 | c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
217 | #endif
218 |
219 | // Alternative implementation to UnityGet2DClipping with support for softness.
220 | #if UNITY_UI_CLIP_RECT
221 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
222 | c *= m.x * m.y;
223 | #endif
224 |
225 | #if (UNDERLAY_ON | UNDERLAY_INNER)
226 | c *= input.texcoord1.z;
227 | #endif
228 |
229 | #if UNITY_UI_ALPHACLIP
230 | clip(c.a - 0.001);
231 | #endif
232 |
233 | return c;
234 | }
235 | ENDCG
236 | }
237 | }
238 |
239 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
240 | }
241 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fe393ace9b354375a9cb14cdbbc28be4
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader:
--------------------------------------------------------------------------------
1 | // Simplified version of the SDF Surface shader :
2 | // - No support for Bevel, Bump or envmap
3 | // - Diffuse only lighting
4 | // - Fully supports only 1 directional light. Other lights can affect it, but it will be per-vertex/SH.
5 |
6 | Shader "TextMeshPro/Mobile/Distance Field (Surface)" {
7 |
8 | Properties {
9 | _FaceTex ("Fill Texture", 2D) = "white" {}
10 | [HDR]_FaceColor ("Fill Color", Color) = (1,1,1,1)
11 | _FaceDilate ("Face Dilate", Range(-1,1)) = 0
12 |
13 | [HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
14 | _OutlineTex ("Outline Texture", 2D) = "white" {}
15 | _OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
16 | _OutlineSoftness ("Outline Softness", Range(0,1)) = 0
17 |
18 | [HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
19 | _GlowOffset ("Offset", Range(-1,1)) = 0
20 | _GlowInner ("Inner", Range(0,1)) = 0.05
21 | _GlowOuter ("Outer", Range(0,1)) = 0.05
22 | _GlowPower ("Falloff", Range(1, 0)) = 0.75
23 |
24 | _WeightNormal ("Weight Normal", float) = 0
25 | _WeightBold ("Weight Bold", float) = 0.5
26 |
27 | // Should not be directly exposed to the user
28 | _ShaderFlags ("Flags", float) = 0
29 | _ScaleRatioA ("Scale RatioA", float) = 1
30 | _ScaleRatioB ("Scale RatioB", float) = 1
31 | _ScaleRatioC ("Scale RatioC", float) = 1
32 |
33 | _MainTex ("Font Atlas", 2D) = "white" {}
34 | _TextureWidth ("Texture Width", float) = 512
35 | _TextureHeight ("Texture Height", float) = 512
36 | _GradientScale ("Gradient Scale", float) = 5.0
37 | _ScaleX ("Scale X", float) = 1.0
38 | _ScaleY ("Scale Y", float) = 1.0
39 | _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
40 | _Sharpness ("Sharpness", Range(-1,1)) = 0
41 |
42 | _VertexOffsetX ("Vertex OffsetX", float) = 0
43 | _VertexOffsetY ("Vertex OffsetY", float) = 0
44 |
45 | _CullMode ("Cull Mode", Float) = 0
46 | //_MaskCoord ("Mask Coords", vector) = (0,0,0,0)
47 | //_MaskSoftness ("Mask Softness", float) = 0
48 | }
49 |
50 | SubShader {
51 |
52 | Tags {
53 | "Queue"="Transparent"
54 | "IgnoreProjector"="True"
55 | "RenderType"="Transparent"
56 | }
57 |
58 | LOD 300
59 | Cull [_CullMode]
60 |
61 | CGPROGRAM
62 | #pragma surface PixShader Lambert alpha:blend vertex:VertShader noforwardadd nolightmap nodirlightmap
63 | #pragma target 3.0
64 | #pragma shader_feature __ GLOW_ON
65 |
66 | #include "TMPro_Properties.cginc"
67 | #include "TMPro.cginc"
68 |
69 | half _FaceShininess;
70 | half _OutlineShininess;
71 |
72 | struct Input
73 | {
74 | fixed4 color : COLOR;
75 | float2 uv_MainTex;
76 | float2 uv2_FaceTex;
77 | float2 uv2_OutlineTex;
78 | float2 param; // Weight, Scale
79 | float3 viewDirEnv;
80 | };
81 |
82 | #include "TMPro_Surface.cginc"
83 |
84 | ENDCG
85 |
86 | // Pass to render object as a shadow caster
87 | Pass
88 | {
89 | Name "Caster"
90 | Tags { "LightMode" = "ShadowCaster" }
91 | Offset 1, 1
92 |
93 | Fog {Mode Off}
94 | ZWrite On ZTest LEqual Cull Off
95 |
96 | CGPROGRAM
97 | #pragma vertex vert
98 | #pragma fragment frag
99 | #pragma multi_compile_shadowcaster
100 | #include "UnityCG.cginc"
101 |
102 | struct v2f {
103 | V2F_SHADOW_CASTER;
104 | float2 uv : TEXCOORD1;
105 | float2 uv2 : TEXCOORD3;
106 | float alphaClip : TEXCOORD2;
107 | };
108 |
109 | uniform float4 _MainTex_ST;
110 | uniform float4 _OutlineTex_ST;
111 | float _OutlineWidth;
112 | float _FaceDilate;
113 | float _ScaleRatioA;
114 |
115 | v2f vert( appdata_base v )
116 | {
117 | v2f o;
118 | TRANSFER_SHADOW_CASTER(o)
119 | o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
120 | o.uv2 = TRANSFORM_TEX(v.texcoord, _OutlineTex);
121 | o.alphaClip = o.alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _FaceDilate * _ScaleRatioA) / 2;
122 | return o;
123 | }
124 |
125 | uniform sampler2D _MainTex;
126 |
127 | float4 frag(v2f i) : COLOR
128 | {
129 | fixed4 texcol = tex2D(_MainTex, i.uv).a;
130 | clip(texcol.a - i.alphaClip);
131 | SHADOW_CASTER_FRAGMENT(i)
132 | }
133 | ENDCG
134 | }
135 | }
136 |
137 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
138 | }
139 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 85187c2149c549c5b33f0cdb02836b17
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface.shader:
--------------------------------------------------------------------------------
1 | Shader "TextMeshPro/Distance Field (Surface)" {
2 |
3 | Properties {
4 | _FaceTex ("Fill Texture", 2D) = "white" {}
5 | _FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
6 | _FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
7 | [HDR]_FaceColor ("Fill Color", Color) = (1,1,1,1)
8 | _FaceDilate ("Face Dilate", Range(-1,1)) = 0
9 |
10 | [HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
11 | _OutlineTex ("Outline Texture", 2D) = "white" {}
12 | _OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
13 | _OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
14 | _OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
15 | _OutlineSoftness ("Outline Softness", Range(0,1)) = 0
16 |
17 | _Bevel ("Bevel", Range(0,1)) = 0.5
18 | _BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0
19 | _BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0
20 | _BevelClamp ("Bevel Clamp", Range(0,1)) = 0
21 | _BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
22 |
23 | _BumpMap ("Normalmap", 2D) = "bump" {}
24 | _BumpOutline ("Bump Outline", Range(0,1)) = 0.5
25 | _BumpFace ("Bump Face", Range(0,1)) = 0.5
26 |
27 | _ReflectFaceColor ("Face Color", Color) = (0,0,0,1)
28 | _ReflectOutlineColor ("Outline Color", Color) = (0,0,0,1)
29 | _Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
30 | _EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
31 | [HDR]_SpecColor ("Specular Color", Color) = (0,0,0,1)
32 |
33 | _FaceShininess ("Face Shininess", Range(0,1)) = 0
34 | _OutlineShininess ("Outline Shininess", Range(0,1)) = 0
35 |
36 | [HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
37 | _GlowOffset ("Offset", Range(-1,1)) = 0
38 | _GlowInner ("Inner", Range(0,1)) = 0.05
39 | _GlowOuter ("Outer", Range(0,1)) = 0.05
40 | _GlowPower ("Falloff", Range(1, 0)) = 0.75
41 |
42 | _WeightNormal ("Weight Normal", float) = 0
43 | _WeightBold ("Weight Bold", float) = 0.5
44 |
45 | // Should not be directly exposed to the user
46 | _ShaderFlags ("Flags", float) = 0
47 | _ScaleRatioA ("Scale RatioA", float) = 1
48 | _ScaleRatioB ("Scale RatioB", float) = 1
49 | _ScaleRatioC ("Scale RatioC", float) = 1
50 |
51 | _MainTex ("Font Atlas", 2D) = "white" {}
52 | _TextureWidth ("Texture Width", float) = 512
53 | _TextureHeight ("Texture Height", float) = 512
54 | _GradientScale ("Gradient Scale", float) = 5.0
55 | _ScaleX ("Scale X", float) = 1.0
56 | _ScaleY ("Scale Y", float) = 1.0
57 | _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
58 | _Sharpness ("Sharpness", Range(-1,1)) = 0
59 |
60 | _VertexOffsetX ("Vertex OffsetX", float) = 0
61 | _VertexOffsetY ("Vertex OffsetY", float) = 0
62 |
63 | _CullMode ("Cull Mode", Float) = 0
64 | //_MaskCoord ("Mask Coords", vector) = (0,0,0,0)
65 | //_MaskSoftness ("Mask Softness", float) = 0
66 | }
67 |
68 | SubShader {
69 |
70 | Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
71 |
72 | LOD 300
73 | Cull [_CullMode]
74 |
75 | CGPROGRAM
76 | #pragma surface PixShader BlinnPhong alpha:blend vertex:VertShader nolightmap nodirlightmap
77 | #pragma target 3.0
78 | #pragma shader_feature __ GLOW_ON
79 | #pragma glsl
80 |
81 | #include "TMPro_Properties.cginc"
82 | #include "TMPro.cginc"
83 |
84 | half _FaceShininess;
85 | half _OutlineShininess;
86 |
87 | struct Input
88 | {
89 | fixed4 color : COLOR;
90 | float2 uv_MainTex;
91 | float2 uv2_FaceTex;
92 | float2 uv2_OutlineTex;
93 | float2 param; // Weight, Scale
94 | float3 viewDirEnv;
95 | };
96 |
97 |
98 | #define BEVEL_ON 1
99 | #include "TMPro_Surface.cginc"
100 |
101 | ENDCG
102 |
103 | // Pass to render object as a shadow caster
104 | Pass
105 | {
106 | Name "Caster"
107 | Tags { "LightMode" = "ShadowCaster" }
108 | Offset 1, 1
109 |
110 | Fog {Mode Off}
111 | ZWrite On
112 | ZTest LEqual
113 | Cull Off
114 |
115 | CGPROGRAM
116 | #pragma vertex vert
117 | #pragma fragment frag
118 | #pragma multi_compile_shadowcaster
119 | #include "UnityCG.cginc"
120 |
121 | struct v2f {
122 | V2F_SHADOW_CASTER;
123 | float2 uv : TEXCOORD1;
124 | float2 uv2 : TEXCOORD3;
125 | float alphaClip : TEXCOORD2;
126 | };
127 |
128 | uniform float4 _MainTex_ST;
129 | uniform float4 _OutlineTex_ST;
130 | float _OutlineWidth;
131 | float _FaceDilate;
132 | float _ScaleRatioA;
133 |
134 | v2f vert( appdata_base v )
135 | {
136 | v2f o;
137 | TRANSFER_SHADOW_CASTER(o)
138 | o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
139 | o.uv2 = TRANSFORM_TEX(v.texcoord, _OutlineTex);
140 | o.alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _FaceDilate * _ScaleRatioA) / 2;
141 | return o;
142 | }
143 |
144 | uniform sampler2D _MainTex;
145 |
146 | float4 frag(v2f i) : COLOR
147 | {
148 | fixed4 texcol = tex2D(_MainTex, i.uv).a;
149 | clip(texcol.a - i.alphaClip);
150 | SHADOW_CASTER_FRAGMENT(i)
151 | }
152 | ENDCG
153 | }
154 | }
155 |
156 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
157 | }
158 |
159 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f7ada0af4f174f0694ca6a487b8f543d
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_SDF.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 68e6db2ebdc24f95958faec2be5558d6
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_Sprite.shader:
--------------------------------------------------------------------------------
1 | Shader "TextMeshPro/Sprite"
2 | {
3 | Properties
4 | {
5 | [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
6 | _Color ("Tint", Color) = (1,1,1,1)
7 |
8 | _StencilComp ("Stencil Comparison", Float) = 8
9 | _Stencil ("Stencil ID", Float) = 0
10 | _StencilOp ("Stencil Operation", Float) = 0
11 | _StencilWriteMask ("Stencil Write Mask", Float) = 255
12 | _StencilReadMask ("Stencil Read Mask", Float) = 255
13 |
14 | _CullMode ("Cull Mode", Float) = 0
15 | _ColorMask ("Color Mask", Float) = 15
16 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
17 |
18 | [Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
19 | }
20 |
21 | SubShader
22 | {
23 | Tags
24 | {
25 | "Queue"="Transparent"
26 | "IgnoreProjector"="True"
27 | "RenderType"="Transparent"
28 | "PreviewType"="Plane"
29 | "CanUseSpriteAtlas"="True"
30 | }
31 |
32 | Stencil
33 | {
34 | Ref [_Stencil]
35 | Comp [_StencilComp]
36 | Pass [_StencilOp]
37 | ReadMask [_StencilReadMask]
38 | WriteMask [_StencilWriteMask]
39 | }
40 |
41 | Cull [_CullMode]
42 | Lighting Off
43 | ZWrite Off
44 | ZTest [unity_GUIZTestMode]
45 | Blend SrcAlpha OneMinusSrcAlpha
46 | ColorMask [_ColorMask]
47 |
48 | Pass
49 | {
50 | Name "Default"
51 | CGPROGRAM
52 | #pragma vertex vert
53 | #pragma fragment frag
54 | #pragma target 2.0
55 |
56 | #include "UnityCG.cginc"
57 | #include "UnityUI.cginc"
58 |
59 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
60 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
61 |
62 | struct appdata_t
63 | {
64 | float4 vertex : POSITION;
65 | float4 color : COLOR;
66 | float2 texcoord : TEXCOORD0;
67 | UNITY_VERTEX_INPUT_INSTANCE_ID
68 | };
69 |
70 | struct v2f
71 | {
72 | float4 vertex : SV_POSITION;
73 | fixed4 color : COLOR;
74 | float2 texcoord : TEXCOORD0;
75 | float4 worldPosition : TEXCOORD1;
76 | UNITY_VERTEX_OUTPUT_STEREO
77 | };
78 |
79 | sampler2D _MainTex;
80 | fixed4 _Color;
81 | fixed4 _TextureSampleAdd;
82 | float4 _ClipRect;
83 | float4 _MainTex_ST;
84 |
85 | v2f vert(appdata_t v)
86 | {
87 | v2f OUT;
88 | UNITY_SETUP_INSTANCE_ID(v);
89 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
90 | OUT.worldPosition = v.vertex;
91 | OUT.vertex = UnityObjectToClipPos(OUT.worldPosition);
92 |
93 | OUT.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
94 |
95 | OUT.color = v.color * _Color;
96 | return OUT;
97 | }
98 |
99 | fixed4 frag(v2f IN) : SV_Target
100 | {
101 | half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
102 |
103 | #ifdef UNITY_UI_CLIP_RECT
104 | color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
105 | #endif
106 |
107 | #ifdef UNITY_UI_ALPHACLIP
108 | clip (color.a - 0.001);
109 | #endif
110 |
111 | return color;
112 | }
113 | ENDCG
114 | }
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMP_Sprite.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cf81c85f95fe47e1a27f6ae460cf182c
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMPro.cginc:
--------------------------------------------------------------------------------
1 | float2 UnpackUV(float uv)
2 | {
3 | float2 output;
4 | output.x = floor(uv / 4096);
5 | output.y = uv - 4096 * output.x;
6 |
7 | return output * 0.001953125;
8 | }
9 |
10 | fixed4 GetColor(half d, fixed4 faceColor, fixed4 outlineColor, half outline, half softness)
11 | {
12 | half faceAlpha = 1-saturate((d - outline * 0.5 + softness * 0.5) / (1.0 + softness));
13 | half outlineAlpha = saturate((d + outline * 0.5)) * sqrt(min(1.0, outline));
14 |
15 | faceColor.rgb *= faceColor.a;
16 | outlineColor.rgb *= outlineColor.a;
17 |
18 | faceColor = lerp(faceColor, outlineColor, outlineAlpha);
19 |
20 | faceColor *= faceAlpha;
21 |
22 | return faceColor;
23 | }
24 |
25 | float3 GetSurfaceNormal(float4 h, float bias)
26 | {
27 | bool raisedBevel = step(1, fmod(_ShaderFlags, 2));
28 |
29 | h += bias+_BevelOffset;
30 |
31 | float bevelWidth = max(.01, _OutlineWidth+_BevelWidth);
32 |
33 | // Track outline
34 | h -= .5;
35 | h /= bevelWidth;
36 | h = saturate(h+.5);
37 |
38 | if(raisedBevel) h = 1 - abs(h*2.0 - 1.0);
39 | h = lerp(h, sin(h*3.141592/2.0), _BevelRoundness);
40 | h = min(h, 1.0-_BevelClamp);
41 | h *= _Bevel * bevelWidth * _GradientScale * -2.0;
42 |
43 | float3 va = normalize(float3(1.0, 0.0, h.y - h.x));
44 | float3 vb = normalize(float3(0.0, -1.0, h.w - h.z));
45 |
46 | return cross(va, vb);
47 | }
48 |
49 | float3 GetSurfaceNormal(float2 uv, float bias, float3 delta)
50 | {
51 | // Read "height field"
52 | float4 h = {tex2D(_MainTex, uv - delta.xz).a,
53 | tex2D(_MainTex, uv + delta.xz).a,
54 | tex2D(_MainTex, uv - delta.zy).a,
55 | tex2D(_MainTex, uv + delta.zy).a};
56 |
57 | return GetSurfaceNormal(h, bias);
58 | }
59 |
60 | float3 GetSpecular(float3 n, float3 l)
61 | {
62 | float spec = pow(max(0.0, dot(n, l)), _Reflectivity);
63 | return _SpecularColor.rgb * spec * _SpecularPower;
64 | }
65 |
66 | float4 GetGlowColor(float d, float scale)
67 | {
68 | float glow = d - (_GlowOffset*_ScaleRatioB) * 0.5 * scale;
69 | float t = lerp(_GlowInner, (_GlowOuter * _ScaleRatioB), step(0.0, glow)) * 0.5 * scale;
70 | glow = saturate(abs(glow/(1.0 + t)));
71 | glow = 1.0-pow(glow, _GlowPower);
72 | glow *= sqrt(min(1.0, t)); // Fade off glow thinner than 1 screen pixel
73 | return float4(_GlowColor.rgb, saturate(_GlowColor.a * glow * 2));
74 | }
75 |
76 | float4 BlendARGB(float4 overlying, float4 underlying)
77 | {
78 | overlying.rgb *= overlying.a;
79 | underlying.rgb *= underlying.a;
80 | float3 blended = overlying.rgb + ((1-overlying.a)*underlying.rgb);
81 | float alpha = underlying.a + (1-underlying.a)*overlying.a;
82 | return float4(blended, alpha);
83 | }
84 |
85 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMPro.cginc.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 407bc68d299748449bbf7f48ee690f8d
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMPro_Mobile.cginc:
--------------------------------------------------------------------------------
1 | struct vertex_t {
2 | UNITY_VERTEX_INPUT_INSTANCE_ID
3 | float4 position : POSITION;
4 | float3 normal : NORMAL;
5 | float4 color : COLOR;
6 | float2 texcoord0 : TEXCOORD0;
7 | float2 texcoord1 : TEXCOORD1;
8 | };
9 |
10 | struct pixel_t {
11 | UNITY_VERTEX_INPUT_INSTANCE_ID
12 | UNITY_VERTEX_OUTPUT_STEREO
13 | float4 position : SV_POSITION;
14 | float4 faceColor : COLOR;
15 | float4 outlineColor : COLOR1;
16 | float4 texcoord0 : TEXCOORD0;
17 | float4 param : TEXCOORD1; // weight, scaleRatio
18 | float2 mask : TEXCOORD2;
19 | #if (UNDERLAY_ON || UNDERLAY_INNER)
20 | float4 texcoord2 : TEXCOORD3;
21 | float4 underlayColor : COLOR2;
22 | #endif
23 | };
24 |
25 | float4 SRGBToLinear(float4 rgba) {
26 | return float4(lerp(rgba.rgb / 12.92f, pow((rgba.rgb + 0.055f) / 1.055f, 2.4f), step(0.04045f, rgba.rgb)), rgba.a);
27 | }
28 |
29 | pixel_t VertShader(vertex_t input)
30 | {
31 | pixel_t output;
32 |
33 | UNITY_INITIALIZE_OUTPUT(pixel_t, output);
34 | UNITY_SETUP_INSTANCE_ID(input);
35 | UNITY_TRANSFER_INSTANCE_ID(input, output);
36 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
37 |
38 | float bold = step(input.texcoord1.y, 0);
39 |
40 | float4 vert = input.position;
41 | vert.x += _VertexOffsetX;
42 | vert.y += _VertexOffsetY;
43 |
44 | float4 vPosition = UnityObjectToClipPos(vert);
45 |
46 | float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
47 | weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
48 |
49 | // Generate UV for the Masking Texture
50 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
51 | float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
52 |
53 | float4 color = input.color;
54 | #if (FORCE_LINEAR && !UNITY_COLORSPACE_GAMMA)
55 | color = SRGBToLinear(input.color);
56 | #endif
57 |
58 | float opacity = color.a;
59 | #if (UNDERLAY_ON | UNDERLAY_INNER)
60 | opacity = 1.0;
61 | #endif
62 |
63 | float4 faceColor = float4(color.rgb, opacity) * _FaceColor;
64 | faceColor.rgb *= faceColor.a;
65 |
66 | float4 outlineColor = _OutlineColor;
67 | outlineColor.a *= opacity;
68 | outlineColor.rgb *= outlineColor.a;
69 |
70 | output.position = vPosition;
71 | output.faceColor = faceColor;
72 | output.outlineColor = outlineColor;
73 | output.texcoord0 = float4(input.texcoord0.xy, maskUV.xy);
74 | output.param = float4(0.5 - weight, 1.3333 * _GradientScale * (_Sharpness + 1) / _TextureWidth, _OutlineWidth * _ScaleRatioA * 0.5, 0);
75 |
76 | float2 mask = float2(0, 0);
77 | #if UNITY_UI_CLIP_RECT
78 | mask = vert.xy * 2 - clampedRect.xy - clampedRect.zw;
79 | #endif
80 | output.mask = mask;
81 |
82 | #if (UNDERLAY_ON || UNDERLAY_INNER)
83 | float4 underlayColor = _UnderlayColor;
84 | underlayColor.rgb *= underlayColor.a;
85 |
86 | float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
87 | float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
88 |
89 | output.texcoord2 = float4(input.texcoord0 + float2(x, y), input.color.a, 0);
90 | output.underlayColor = underlayColor;
91 | #endif
92 |
93 | return output;
94 | }
95 |
96 | float4 PixShader(pixel_t input) : SV_Target
97 | {
98 | UNITY_SETUP_INSTANCE_ID(input);
99 |
100 | float d = tex2D(_MainTex, input.texcoord0.xy).a;
101 |
102 | float2 UV = input.texcoord0.xy;
103 | float scale = rsqrt(abs(ddx(UV.x) * ddy(UV.y) - ddy(UV.x) * ddx(UV.y))) * input.param.y;
104 |
105 | #if (UNDERLAY_ON | UNDERLAY_INNER)
106 | float layerScale = scale;
107 | layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
108 | float layerBias = input.param.x * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
109 | #endif
110 |
111 | scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
112 |
113 | float4 faceColor = input.faceColor * saturate((d - input.param.x) * scale + 0.5);
114 |
115 | #ifdef OUTLINE_ON
116 | float4 outlineColor = lerp(input.faceColor, input.outlineColor, sqrt(min(1.0, input.param.z * scale * 2)));
117 | faceColor = lerp(outlineColor, input.faceColor, saturate((d - input.param.x - input.param.z) * scale + 0.5));
118 | faceColor *= saturate((d - input.param.x + input.param.z) * scale + 0.5);
119 | #endif
120 |
121 | #if UNDERLAY_ON
122 | d = tex2D(_MainTex, input.texcoord2.xy).a * layerScale;
123 | faceColor += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - layerBias) * (1 - faceColor.a);
124 | #endif
125 |
126 | #if UNDERLAY_INNER
127 | float bias = input.param.x * scale - 0.5;
128 | float sd = saturate(d * scale - bias - input.param.z);
129 | d = tex2D(_MainTex, input.texcoord2.xy).a * layerScale;
130 | faceColor += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - layerBias)) * sd * (1 - faceColor.a);
131 | #endif
132 |
133 | #ifdef MASKING
134 | float a = abs(_MaskInverse - tex2D(_MaskTex, input.texcoord0.zw).a);
135 | float t = a + (1 - _MaskWipeControl) * _MaskEdgeSoftness - _MaskWipeControl;
136 | a = saturate(t / _MaskEdgeSoftness);
137 | faceColor.rgb = lerp(_MaskEdgeColor.rgb * faceColor.a, faceColor.rgb, a);
138 | faceColor *= a;
139 | #endif
140 |
141 | // Alternative implementation to UnityGet2DClipping with support for softness
142 | #if UNITY_UI_CLIP_RECT
143 | float2 maskZW = 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + (1 / scale));
144 | float2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * maskZW);
145 | faceColor *= m.x * m.y;
146 | #endif
147 |
148 | #if (UNDERLAY_ON | UNDERLAY_INNER)
149 | faceColor *= input.texcoord2.z;
150 | #endif
151 |
152 | #if UNITY_UI_ALPHACLIP
153 | clip(faceColor.a - 0.001);
154 | #endif
155 |
156 | return faceColor;
157 | }
158 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMPro_Mobile.cginc.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c334973cef89a9840b0b0c507e0377ab
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc:
--------------------------------------------------------------------------------
1 | // UI Editable properties
2 | uniform sampler2D _FaceTex; // Alpha : Signed Distance
3 | uniform float _FaceUVSpeedX;
4 | uniform float _FaceUVSpeedY;
5 | uniform fixed4 _FaceColor; // RGBA : Color + Opacity
6 | uniform float _FaceDilate; // v[ 0, 1]
7 | uniform float _OutlineSoftness; // v[ 0, 1]
8 |
9 | uniform sampler2D _OutlineTex; // RGBA : Color + Opacity
10 | uniform float _OutlineUVSpeedX;
11 | uniform float _OutlineUVSpeedY;
12 | uniform fixed4 _OutlineColor; // RGBA : Color + Opacity
13 | uniform float _OutlineWidth; // v[ 0, 1]
14 |
15 | uniform float _Bevel; // v[ 0, 1]
16 | uniform float _BevelOffset; // v[-1, 1]
17 | uniform float _BevelWidth; // v[-1, 1]
18 | uniform float _BevelClamp; // v[ 0, 1]
19 | uniform float _BevelRoundness; // v[ 0, 1]
20 |
21 | uniform sampler2D _BumpMap; // Normal map
22 | uniform float _BumpOutline; // v[ 0, 1]
23 | uniform float _BumpFace; // v[ 0, 1]
24 |
25 | uniform samplerCUBE _Cube; // Cube / sphere map
26 | uniform fixed4 _ReflectFaceColor; // RGB intensity
27 | uniform fixed4 _ReflectOutlineColor;
28 | //uniform float _EnvTiltX; // v[-1, 1]
29 | //uniform float _EnvTiltY; // v[-1, 1]
30 | uniform float3 _EnvMatrixRotation;
31 | uniform float4x4 _EnvMatrix;
32 |
33 | uniform fixed4 _SpecularColor; // RGB intensity
34 | uniform float _LightAngle; // v[ 0,Tau]
35 | uniform float _SpecularPower; // v[ 0, 1]
36 | uniform float _Reflectivity; // v[ 5, 15]
37 | uniform float _Diffuse; // v[ 0, 1]
38 | uniform float _Ambient; // v[ 0, 1]
39 |
40 | uniform fixed4 _UnderlayColor; // RGBA : Color + Opacity
41 | uniform float _UnderlayOffsetX; // v[-1, 1]
42 | uniform float _UnderlayOffsetY; // v[-1, 1]
43 | uniform float _UnderlayDilate; // v[-1, 1]
44 | uniform float _UnderlaySoftness; // v[ 0, 1]
45 |
46 | uniform fixed4 _GlowColor; // RGBA : Color + Intesity
47 | uniform float _GlowOffset; // v[-1, 1]
48 | uniform float _GlowOuter; // v[ 0, 1]
49 | uniform float _GlowInner; // v[ 0, 1]
50 | uniform float _GlowPower; // v[ 1, 1/(1+4*4)]
51 |
52 | // API Editable properties
53 | uniform float _ShaderFlags;
54 | uniform float _WeightNormal;
55 | uniform float _WeightBold;
56 |
57 | uniform float _ScaleRatioA;
58 | uniform float _ScaleRatioB;
59 | uniform float _ScaleRatioC;
60 |
61 | uniform float _VertexOffsetX;
62 | uniform float _VertexOffsetY;
63 |
64 | //uniform float _UseClipRect;
65 | uniform float _MaskID;
66 | uniform sampler2D _MaskTex;
67 | uniform float4 _MaskCoord;
68 | uniform float4 _ClipRect; // bottom left(x,y) : top right(z,w)
69 | //uniform float _MaskWipeControl;
70 | //uniform float _MaskEdgeSoftness;
71 | //uniform fixed4 _MaskEdgeColor;
72 | //uniform bool _MaskInverse;
73 |
74 | uniform float _MaskSoftnessX;
75 | uniform float _MaskSoftnessY;
76 |
77 | // Font Atlas properties
78 | uniform sampler2D _MainTex;
79 | uniform float _TextureWidth;
80 | uniform float _TextureHeight;
81 | uniform float _GradientScale;
82 | uniform float _ScaleX;
83 | uniform float _ScaleY;
84 | uniform float _PerspectiveFilter;
85 | uniform float _Sharpness;
86 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3997e2241185407d80309a82f9148466
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMPro_Surface.cginc:
--------------------------------------------------------------------------------
1 | void VertShader(inout appdata_full v, out Input data)
2 | {
3 | v.vertex.x += _VertexOffsetX;
4 | v.vertex.y += _VertexOffsetY;
5 |
6 | UNITY_INITIALIZE_OUTPUT(Input, data);
7 |
8 | float bold = step(v.texcoord1.y, 0);
9 |
10 | // Generate normal for backface
11 | float3 view = ObjSpaceViewDir(v.vertex);
12 | v.normal *= sign(dot(v.normal, view));
13 |
14 | #if USE_DERIVATIVE
15 | data.param.y = 1;
16 | #else
17 | float4 vert = v.vertex;
18 | float4 vPosition = UnityObjectToClipPos(vert);
19 | float2 pixelSize = vPosition.w;
20 |
21 | pixelSize /= float2(_ScaleX, _ScaleY) * mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy);
22 | float scale = rsqrt(dot(pixelSize, pixelSize));
23 | scale *= abs(v.texcoord1.y) * _GradientScale * (_Sharpness + 1);
24 | scale = lerp(scale * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(v.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
25 | data.param.y = scale;
26 | #endif
27 |
28 | data.param.x = (lerp(_WeightNormal, _WeightBold, bold) / 4.0 + _FaceDilate) * _ScaleRatioA * 0.5; //
29 |
30 | v.texcoord1.xy = UnpackUV(v.texcoord1.x);
31 | data.viewDirEnv = mul((float3x3)_EnvMatrix, WorldSpaceViewDir(v.vertex));
32 | }
33 |
34 | void PixShader(Input input, inout SurfaceOutput o)
35 | {
36 |
37 | #if USE_DERIVATIVE
38 | float2 pixelSize = float2(ddx(input.uv_MainTex.y), ddy(input.uv_MainTex.y));
39 | pixelSize *= _TextureWidth * .75;
40 | float scale = rsqrt(dot(pixelSize, pixelSize)) * _GradientScale * (_Sharpness + 1);
41 | #else
42 | float scale = input.param.y;
43 | #endif
44 |
45 | // Signed distance
46 | float c = tex2D(_MainTex, input.uv_MainTex).a;
47 | float sd = (.5 - c - input.param.x) * scale + .5;
48 | float outline = _OutlineWidth*_ScaleRatioA * scale;
49 | float softness = _OutlineSoftness*_ScaleRatioA * scale;
50 |
51 | // Color & Alpha
52 | float4 faceColor = _FaceColor;
53 | float4 outlineColor = _OutlineColor;
54 | faceColor *= input.color;
55 | outlineColor.a *= input.color.a;
56 | faceColor *= tex2D(_FaceTex, float2(input.uv2_FaceTex.x + _FaceUVSpeedX * _Time.y, input.uv2_FaceTex.y + _FaceUVSpeedY * _Time.y));
57 | outlineColor *= tex2D(_OutlineTex, float2(input.uv2_OutlineTex.x + _OutlineUVSpeedX * _Time.y, input.uv2_OutlineTex.y + _OutlineUVSpeedY * _Time.y));
58 | faceColor = GetColor(sd, faceColor, outlineColor, outline, softness);
59 | faceColor.rgb /= max(faceColor.a, 0.0001);
60 |
61 | #if BEVEL_ON
62 | float3 delta = float3(1.0 / _TextureWidth, 1.0 / _TextureHeight, 0.0);
63 |
64 | float4 smp4x = {tex2D(_MainTex, input.uv_MainTex - delta.xz).a,
65 | tex2D(_MainTex, input.uv_MainTex + delta.xz).a,
66 | tex2D(_MainTex, input.uv_MainTex - delta.zy).a,
67 | tex2D(_MainTex, input.uv_MainTex + delta.zy).a };
68 |
69 | // Face Normal
70 | float3 n = GetSurfaceNormal(smp4x, input.param.x);
71 |
72 | // Bumpmap
73 | float3 bump = UnpackNormal(tex2D(_BumpMap, input.uv2_FaceTex.xy)).xyz;
74 | bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5));
75 | bump = lerp(float3(0, 0, 1), bump, faceColor.a);
76 | n = normalize(n - bump);
77 |
78 | // Cubemap reflection
79 | fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDirEnv, mul((float3x3)unity_ObjectToWorld, n)));
80 | float3 emission = reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a;
81 | #else
82 | float3 n = float3(0, 0, -1);
83 | float3 emission = float3(0, 0, 0);
84 | #endif
85 |
86 | #if GLOW_ON
87 | float4 glowColor = GetGlowColor(sd, scale);
88 | glowColor.a *= input.color.a;
89 | emission += glowColor.rgb*glowColor.a;
90 | faceColor = BlendARGB(glowColor, faceColor);
91 | faceColor.rgb /= max(faceColor.a, 0.0001);
92 | #endif
93 |
94 | // Set Standard output structure
95 | o.Albedo = faceColor.rgb;
96 | o.Normal = -n;
97 | o.Emission = emission;
98 | o.Specular = lerp(_FaceShininess, _OutlineShininess, saturate(sd + outline * 0.5));
99 | o.Gloss = 1;
100 | o.Alpha = faceColor.a;
101 | }
102 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Shaders/TMPro_Surface.cginc.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d930090c0cd643c7b55f19a38538c162
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Sprites.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d0603b6d5186471b96c778c3949c7ce2
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt:
--------------------------------------------------------------------------------
1 | This sample of beautiful emojis are provided by EmojiOne https://www.emojione.com/
2 |
3 | Please visit their website to view the complete set of their emojis and review their licensing terms.
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 381dcb09d5029d14897e55f98031fca5
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Sprites/EmojiOne.json:
--------------------------------------------------------------------------------
1 | {"frames": [
2 |
3 | {
4 | "filename": "1f60a.png",
5 | "frame": {"x":0,"y":0,"w":128,"h":128},
6 | "rotated": false,
7 | "trimmed": false,
8 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
9 | "sourceSize": {"w":128,"h":128},
10 | "pivot": {"x":0.5,"y":0.5}
11 | },
12 | {
13 | "filename": "1f60b.png",
14 | "frame": {"x":128,"y":0,"w":128,"h":128},
15 | "rotated": false,
16 | "trimmed": false,
17 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
18 | "sourceSize": {"w":128,"h":128},
19 | "pivot": {"x":0.5,"y":0.5}
20 | },
21 | {
22 | "filename": "1f60d.png",
23 | "frame": {"x":256,"y":0,"w":128,"h":128},
24 | "rotated": false,
25 | "trimmed": false,
26 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
27 | "sourceSize": {"w":128,"h":128},
28 | "pivot": {"x":0.5,"y":0.5}
29 | },
30 | {
31 | "filename": "1f60e.png",
32 | "frame": {"x":384,"y":0,"w":128,"h":128},
33 | "rotated": false,
34 | "trimmed": false,
35 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
36 | "sourceSize": {"w":128,"h":128},
37 | "pivot": {"x":0.5,"y":0.5}
38 | },
39 | {
40 | "filename": "1f600.png",
41 | "frame": {"x":0,"y":128,"w":128,"h":128},
42 | "rotated": false,
43 | "trimmed": false,
44 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
45 | "sourceSize": {"w":128,"h":128},
46 | "pivot": {"x":0.5,"y":0.5}
47 | },
48 | {
49 | "filename": "1f601.png",
50 | "frame": {"x":128,"y":128,"w":128,"h":128},
51 | "rotated": false,
52 | "trimmed": false,
53 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
54 | "sourceSize": {"w":128,"h":128},
55 | "pivot": {"x":0.5,"y":0.5}
56 | },
57 | {
58 | "filename": "1f602.png",
59 | "frame": {"x":256,"y":128,"w":128,"h":128},
60 | "rotated": false,
61 | "trimmed": false,
62 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
63 | "sourceSize": {"w":128,"h":128},
64 | "pivot": {"x":0.5,"y":0.5}
65 | },
66 | {
67 | "filename": "1f603.png",
68 | "frame": {"x":384,"y":128,"w":128,"h":128},
69 | "rotated": false,
70 | "trimmed": false,
71 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
72 | "sourceSize": {"w":128,"h":128},
73 | "pivot": {"x":0.5,"y":0.5}
74 | },
75 | {
76 | "filename": "1f604.png",
77 | "frame": {"x":0,"y":256,"w":128,"h":128},
78 | "rotated": false,
79 | "trimmed": false,
80 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
81 | "sourceSize": {"w":128,"h":128},
82 | "pivot": {"x":0.5,"y":0.5}
83 | },
84 | {
85 | "filename": "1f605.png",
86 | "frame": {"x":128,"y":256,"w":128,"h":128},
87 | "rotated": false,
88 | "trimmed": false,
89 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
90 | "sourceSize": {"w":128,"h":128},
91 | "pivot": {"x":0.5,"y":0.5}
92 | },
93 | {
94 | "filename": "1f606.png",
95 | "frame": {"x":256,"y":256,"w":128,"h":128},
96 | "rotated": false,
97 | "trimmed": false,
98 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
99 | "sourceSize": {"w":128,"h":128},
100 | "pivot": {"x":0.5,"y":0.5}
101 | },
102 | {
103 | "filename": "1f609.png",
104 | "frame": {"x":384,"y":256,"w":128,"h":128},
105 | "rotated": false,
106 | "trimmed": false,
107 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
108 | "sourceSize": {"w":128,"h":128},
109 | "pivot": {"x":0.5,"y":0.5}
110 | },
111 | {
112 | "filename": "1f618.png",
113 | "frame": {"x":0,"y":384,"w":128,"h":128},
114 | "rotated": false,
115 | "trimmed": false,
116 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
117 | "sourceSize": {"w":128,"h":128},
118 | "pivot": {"x":0.5,"y":0.5}
119 | },
120 | {
121 | "filename": "1f923.png",
122 | "frame": {"x":128,"y":384,"w":128,"h":128},
123 | "rotated": false,
124 | "trimmed": false,
125 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
126 | "sourceSize": {"w":128,"h":128},
127 | "pivot": {"x":0.5,"y":0.5}
128 | },
129 | {
130 | "filename": "263a.png",
131 | "frame": {"x":256,"y":384,"w":128,"h":128},
132 | "rotated": false,
133 | "trimmed": false,
134 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
135 | "sourceSize": {"w":128,"h":128},
136 | "pivot": {"x":0.5,"y":0.5}
137 | },
138 | {
139 | "filename": "2639.png",
140 | "frame": {"x":384,"y":384,"w":128,"h":128},
141 | "rotated": false,
142 | "trimmed": false,
143 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
144 | "sourceSize": {"w":128,"h":128},
145 | "pivot": {"x":0.5,"y":0.5}
146 | }],
147 | "meta": {
148 | "app": "http://www.codeandweb.com/texturepacker",
149 | "version": "1.0",
150 | "image": "EmojiOne.png",
151 | "format": "RGBA8888",
152 | "size": {"w":512,"h":512},
153 | "scale": "1",
154 | "smartupdate": "$TexturePacker:SmartUpdate:196a26a2e149d875b91ffc8fa3581e76:fc928c7e275404b7e0649307410475cb:424723c3774975ddb2053fd5c4b85f6e$"
155 | }
156 | }
157 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Sprites/EmojiOne.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8f05276190cf498a8153f6cbe761d4e6
3 | timeCreated: 1480316860
4 | licenseType: Pro
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Html2UnityRich/Assets/TextMesh Pro/Sprites/EmojiOne.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Wilson403/Html2UnityRich/081b177f02aa86cbe9b0fde108a9650d945049d0/Html2UnityRich/Assets/TextMesh Pro/Sprites/EmojiOne.png
--------------------------------------------------------------------------------
/Html2UnityRich/Packages/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.unity.collab-proxy": "1.14.16",
4 | "com.unity.ide.rider": "1.2.1",
5 | "com.unity.ide.visualstudio": "2.0.15",
6 | "com.unity.ide.vscode": "1.2.5",
7 | "com.unity.test-framework": "1.1.31",
8 | "com.unity.textmeshpro": "2.1.6",
9 | "com.unity.timeline": "1.2.18",
10 | "com.unity.ugui": "1.0.0",
11 | "com.unity.modules.ai": "1.0.0",
12 | "com.unity.modules.androidjni": "1.0.0",
13 | "com.unity.modules.animation": "1.0.0",
14 | "com.unity.modules.assetbundle": "1.0.0",
15 | "com.unity.modules.audio": "1.0.0",
16 | "com.unity.modules.autostreaming": "1.0.0",
17 | "com.unity.modules.cloth": "1.0.0",
18 | "com.unity.modules.director": "1.0.0",
19 | "com.unity.modules.imageconversion": "1.0.0",
20 | "com.unity.modules.imgui": "1.0.0",
21 | "com.unity.modules.jsonserialize": "1.0.0",
22 | "com.unity.modules.particlesystem": "1.0.0",
23 | "com.unity.modules.physics": "1.0.0",
24 | "com.unity.modules.physics2d": "1.0.0",
25 | "com.unity.modules.screencapture": "1.0.0",
26 | "com.unity.modules.terrain": "1.0.0",
27 | "com.unity.modules.terrainphysics": "1.0.0",
28 | "com.unity.modules.tilemap": "1.0.0",
29 | "com.unity.modules.ui": "1.0.0",
30 | "com.unity.modules.uielements": "1.0.0",
31 | "com.unity.modules.umbra": "1.0.0",
32 | "com.unity.modules.unityanalytics": "1.0.0",
33 | "com.unity.modules.unitywebrequest": "1.0.0",
34 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
35 | "com.unity.modules.unitywebrequestaudio": "1.0.0",
36 | "com.unity.modules.unitywebrequesttexture": "1.0.0",
37 | "com.unity.modules.unitywebrequestwww": "1.0.0",
38 | "com.unity.modules.vehicles": "1.0.0",
39 | "com.unity.modules.video": "1.0.0",
40 | "com.unity.modules.vr": "1.0.0",
41 | "com.unity.modules.wind": "1.0.0",
42 | "com.unity.modules.xr": "1.0.0"
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/Html2UnityRich/Packages/packages-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.unity.collab-proxy": {
4 | "version": "1.14.16",
5 | "depth": 0,
6 | "source": "registry",
7 | "dependencies": {},
8 | "url": "https://packages.unity.cn"
9 | },
10 | "com.unity.ext.nunit": {
11 | "version": "1.0.6",
12 | "depth": 1,
13 | "source": "registry",
14 | "dependencies": {},
15 | "url": "https://packages.unity.cn"
16 | },
17 | "com.unity.ide.rider": {
18 | "version": "1.2.1",
19 | "depth": 0,
20 | "source": "registry",
21 | "dependencies": {
22 | "com.unity.test-framework": "1.1.1"
23 | },
24 | "url": "https://packages.unity.cn"
25 | },
26 | "com.unity.ide.visualstudio": {
27 | "version": "2.0.15",
28 | "depth": 0,
29 | "source": "registry",
30 | "dependencies": {
31 | "com.unity.test-framework": "1.1.9"
32 | },
33 | "url": "https://packages.unity.cn"
34 | },
35 | "com.unity.ide.vscode": {
36 | "version": "1.2.5",
37 | "depth": 0,
38 | "source": "registry",
39 | "dependencies": {},
40 | "url": "https://packages.unity.cn"
41 | },
42 | "com.unity.test-framework": {
43 | "version": "1.1.31",
44 | "depth": 0,
45 | "source": "registry",
46 | "dependencies": {
47 | "com.unity.ext.nunit": "1.0.6",
48 | "com.unity.modules.imgui": "1.0.0",
49 | "com.unity.modules.jsonserialize": "1.0.0"
50 | },
51 | "url": "https://packages.unity.cn"
52 | },
53 | "com.unity.textmeshpro": {
54 | "version": "2.1.6",
55 | "depth": 0,
56 | "source": "registry",
57 | "dependencies": {
58 | "com.unity.ugui": "1.0.0"
59 | },
60 | "url": "https://packages.unity.cn"
61 | },
62 | "com.unity.timeline": {
63 | "version": "1.2.18",
64 | "depth": 0,
65 | "source": "registry",
66 | "dependencies": {
67 | "com.unity.modules.director": "1.0.0",
68 | "com.unity.modules.animation": "1.0.0",
69 | "com.unity.modules.audio": "1.0.0",
70 | "com.unity.modules.particlesystem": "1.0.0"
71 | },
72 | "url": "https://packages.unity.cn"
73 | },
74 | "com.unity.ugui": {
75 | "version": "1.0.0",
76 | "depth": 0,
77 | "source": "builtin",
78 | "dependencies": {
79 | "com.unity.modules.ui": "1.0.0",
80 | "com.unity.modules.imgui": "1.0.0"
81 | }
82 | },
83 | "com.unity.modules.ai": {
84 | "version": "1.0.0",
85 | "depth": 0,
86 | "source": "builtin",
87 | "dependencies": {}
88 | },
89 | "com.unity.modules.androidjni": {
90 | "version": "1.0.0",
91 | "depth": 0,
92 | "source": "builtin",
93 | "dependencies": {}
94 | },
95 | "com.unity.modules.animation": {
96 | "version": "1.0.0",
97 | "depth": 0,
98 | "source": "builtin",
99 | "dependencies": {}
100 | },
101 | "com.unity.modules.assetbundle": {
102 | "version": "1.0.0",
103 | "depth": 0,
104 | "source": "builtin",
105 | "dependencies": {}
106 | },
107 | "com.unity.modules.audio": {
108 | "version": "1.0.0",
109 | "depth": 0,
110 | "source": "builtin",
111 | "dependencies": {}
112 | },
113 | "com.unity.modules.autostreaming": {
114 | "version": "1.0.0",
115 | "depth": 0,
116 | "source": "builtin",
117 | "dependencies": {
118 | "com.unity.modules.animation": "1.0.0",
119 | "com.unity.modules.assetbundle": "1.0.0",
120 | "com.unity.modules.audio": "1.0.0",
121 | "com.unity.modules.jsonserialize": "1.0.0",
122 | "com.unity.modules.unitywebrequest": "1.0.0",
123 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0"
124 | }
125 | },
126 | "com.unity.modules.cloth": {
127 | "version": "1.0.0",
128 | "depth": 0,
129 | "source": "builtin",
130 | "dependencies": {
131 | "com.unity.modules.physics": "1.0.0"
132 | }
133 | },
134 | "com.unity.modules.director": {
135 | "version": "1.0.0",
136 | "depth": 0,
137 | "source": "builtin",
138 | "dependencies": {
139 | "com.unity.modules.audio": "1.0.0",
140 | "com.unity.modules.animation": "1.0.0"
141 | }
142 | },
143 | "com.unity.modules.imageconversion": {
144 | "version": "1.0.0",
145 | "depth": 0,
146 | "source": "builtin",
147 | "dependencies": {}
148 | },
149 | "com.unity.modules.imgui": {
150 | "version": "1.0.0",
151 | "depth": 0,
152 | "source": "builtin",
153 | "dependencies": {}
154 | },
155 | "com.unity.modules.jsonserialize": {
156 | "version": "1.0.0",
157 | "depth": 0,
158 | "source": "builtin",
159 | "dependencies": {}
160 | },
161 | "com.unity.modules.particlesystem": {
162 | "version": "1.0.0",
163 | "depth": 0,
164 | "source": "builtin",
165 | "dependencies": {}
166 | },
167 | "com.unity.modules.physics": {
168 | "version": "1.0.0",
169 | "depth": 0,
170 | "source": "builtin",
171 | "dependencies": {}
172 | },
173 | "com.unity.modules.physics2d": {
174 | "version": "1.0.0",
175 | "depth": 0,
176 | "source": "builtin",
177 | "dependencies": {}
178 | },
179 | "com.unity.modules.screencapture": {
180 | "version": "1.0.0",
181 | "depth": 0,
182 | "source": "builtin",
183 | "dependencies": {
184 | "com.unity.modules.imageconversion": "1.0.0"
185 | }
186 | },
187 | "com.unity.modules.subsystems": {
188 | "version": "1.0.0",
189 | "depth": 1,
190 | "source": "builtin",
191 | "dependencies": {
192 | "com.unity.modules.jsonserialize": "1.0.0"
193 | }
194 | },
195 | "com.unity.modules.terrain": {
196 | "version": "1.0.0",
197 | "depth": 0,
198 | "source": "builtin",
199 | "dependencies": {}
200 | },
201 | "com.unity.modules.terrainphysics": {
202 | "version": "1.0.0",
203 | "depth": 0,
204 | "source": "builtin",
205 | "dependencies": {
206 | "com.unity.modules.physics": "1.0.0",
207 | "com.unity.modules.terrain": "1.0.0"
208 | }
209 | },
210 | "com.unity.modules.tilemap": {
211 | "version": "1.0.0",
212 | "depth": 0,
213 | "source": "builtin",
214 | "dependencies": {
215 | "com.unity.modules.physics2d": "1.0.0"
216 | }
217 | },
218 | "com.unity.modules.ui": {
219 | "version": "1.0.0",
220 | "depth": 0,
221 | "source": "builtin",
222 | "dependencies": {}
223 | },
224 | "com.unity.modules.uielements": {
225 | "version": "1.0.0",
226 | "depth": 0,
227 | "source": "builtin",
228 | "dependencies": {
229 | "com.unity.modules.imgui": "1.0.0",
230 | "com.unity.modules.jsonserialize": "1.0.0"
231 | }
232 | },
233 | "com.unity.modules.umbra": {
234 | "version": "1.0.0",
235 | "depth": 0,
236 | "source": "builtin",
237 | "dependencies": {}
238 | },
239 | "com.unity.modules.unityanalytics": {
240 | "version": "1.0.0",
241 | "depth": 0,
242 | "source": "builtin",
243 | "dependencies": {
244 | "com.unity.modules.unitywebrequest": "1.0.0",
245 | "com.unity.modules.jsonserialize": "1.0.0"
246 | }
247 | },
248 | "com.unity.modules.unitywebrequest": {
249 | "version": "1.0.0",
250 | "depth": 0,
251 | "source": "builtin",
252 | "dependencies": {}
253 | },
254 | "com.unity.modules.unitywebrequestassetbundle": {
255 | "version": "1.0.0",
256 | "depth": 0,
257 | "source": "builtin",
258 | "dependencies": {
259 | "com.unity.modules.assetbundle": "1.0.0",
260 | "com.unity.modules.unitywebrequest": "1.0.0"
261 | }
262 | },
263 | "com.unity.modules.unitywebrequestaudio": {
264 | "version": "1.0.0",
265 | "depth": 0,
266 | "source": "builtin",
267 | "dependencies": {
268 | "com.unity.modules.unitywebrequest": "1.0.0",
269 | "com.unity.modules.audio": "1.0.0"
270 | }
271 | },
272 | "com.unity.modules.unitywebrequesttexture": {
273 | "version": "1.0.0",
274 | "depth": 0,
275 | "source": "builtin",
276 | "dependencies": {
277 | "com.unity.modules.unitywebrequest": "1.0.0",
278 | "com.unity.modules.imageconversion": "1.0.0"
279 | }
280 | },
281 | "com.unity.modules.unitywebrequestwww": {
282 | "version": "1.0.0",
283 | "depth": 0,
284 | "source": "builtin",
285 | "dependencies": {
286 | "com.unity.modules.unitywebrequest": "1.0.0",
287 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
288 | "com.unity.modules.unitywebrequestaudio": "1.0.0",
289 | "com.unity.modules.audio": "1.0.0",
290 | "com.unity.modules.assetbundle": "1.0.0",
291 | "com.unity.modules.imageconversion": "1.0.0"
292 | }
293 | },
294 | "com.unity.modules.vehicles": {
295 | "version": "1.0.0",
296 | "depth": 0,
297 | "source": "builtin",
298 | "dependencies": {
299 | "com.unity.modules.physics": "1.0.0"
300 | }
301 | },
302 | "com.unity.modules.video": {
303 | "version": "1.0.0",
304 | "depth": 0,
305 | "source": "builtin",
306 | "dependencies": {
307 | "com.unity.modules.audio": "1.0.0",
308 | "com.unity.modules.ui": "1.0.0",
309 | "com.unity.modules.unitywebrequest": "1.0.0"
310 | }
311 | },
312 | "com.unity.modules.vr": {
313 | "version": "1.0.0",
314 | "depth": 0,
315 | "source": "builtin",
316 | "dependencies": {
317 | "com.unity.modules.jsonserialize": "1.0.0",
318 | "com.unity.modules.physics": "1.0.0",
319 | "com.unity.modules.xr": "1.0.0"
320 | }
321 | },
322 | "com.unity.modules.wind": {
323 | "version": "1.0.0",
324 | "depth": 0,
325 | "source": "builtin",
326 | "dependencies": {}
327 | },
328 | "com.unity.modules.xr": {
329 | "version": "1.0.0",
330 | "depth": 0,
331 | "source": "builtin",
332 | "dependencies": {
333 | "com.unity.modules.physics": "1.0.0",
334 | "com.unity.modules.jsonserialize": "1.0.0",
335 | "com.unity.modules.subsystems": "1.0.0"
336 | }
337 | }
338 | }
339 | }
340 |
--------------------------------------------------------------------------------
/Html2UnityRich/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!11 &1
4 | AudioManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Volume: 1
8 | Rolloff Scale: 1
9 | Doppler Factor: 1
10 | Default Speaker Mode: 2
11 | m_SampleRate: 0
12 | m_DSPBufferSize: 1024
13 | m_VirtualVoiceCount: 512
14 | m_RealVoiceCount: 32
15 | m_SpatializerPlugin:
16 | m_AmbisonicDecoderPlugin:
17 | m_DisableAudio: 0
18 | m_VirtualizeEffects: 1
19 | m_RequestedDSPBufferSize: 1024
20 |
--------------------------------------------------------------------------------
/Html2UnityRich/ProjectSettings/AutoStreamingSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1200 &1
4 | AutoStreamingSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | mSearchMode: 15
8 | mCustomSearchFile:
9 | mTextureSearchString:
10 | mMeshSearchString:
11 | mTextures: []
12 | mAudios: []
13 | mMeshes: []
14 | mScenes: []
15 | mConfigCCD:
16 | useCCD: 0
17 | cosKey:
18 | projectGuid:
19 | bucketUuid:
20 | bucketName:
21 | badgeName:
22 |
--------------------------------------------------------------------------------
/Html2UnityRich/ProjectSettings/ClusterInputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!236 &1
4 | ClusterInputManager:
5 | m_ObjectHideFlags: 0
6 | m_Inputs: []
7 |
--------------------------------------------------------------------------------
/Html2UnityRich/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!55 &1
4 | PhysicsManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 11
7 | m_Gravity: {x: 0, y: -9.81, z: 0}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_BounceThreshold: 2
10 | m_SleepThreshold: 0.005
11 | m_DefaultContactOffset: 0.01
12 | m_DefaultSolverIterations: 6
13 | m_DefaultSolverVelocityIterations: 1
14 | m_QueriesHitBackfaces: 0
15 | m_QueriesHitTriggers: 1
16 | m_EnableAdaptiveForce: 0
17 | m_ClothInterCollisionDistance: 0
18 | m_ClothInterCollisionStiffness: 0
19 | m_ContactsGeneration: 1
20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
21 | m_AutoSimulation: 1
22 | m_AutoSyncTransforms: 0
23 | m_ReuseCollisionCallbacks: 1
24 | m_ClothInterCollisionSettingsToggle: 0
25 | m_ContactPairsMode: 0
26 | m_BroadphaseType: 0
27 | m_WorldBounds:
28 | m_Center: {x: 0, y: 0, z: 0}
29 | m_Extent: {x: 250, y: 250, z: 250}
30 | m_WorldSubdivisions: 8
31 | m_FrictionType: 0
32 | m_EnableEnhancedDeterminism: 0
33 | m_EnableUnifiedHeightmaps: 1
34 | m_DefaultMaxAngluarSpeed: 7
35 |
--------------------------------------------------------------------------------
/Html2UnityRich/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes: []
8 | m_configObjects: {}
9 |
--------------------------------------------------------------------------------
/Html2UnityRich/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!159 &1
4 | EditorSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 9
7 | m_ExternalVersionControlSupport: Visible Meta Files
8 | m_SerializationMode: 2
9 | m_LineEndingsForNewScripts: 0
10 | m_DefaultBehaviorMode: 0
11 | m_PrefabRegularEnvironment: {fileID: 0}
12 | m_PrefabUIEnvironment: {fileID: 0}
13 | m_SpritePackerMode: 0
14 | m_SpritePackerPaddingPower: 1
15 | m_EtcTextureCompressorBehavior: 1
16 | m_EtcTextureFastCompressor: 1
17 | m_EtcTextureNormalCompressor: 2
18 | m_EtcTextureBestCompressor: 4
19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref
20 | m_ProjectGenerationRootNamespace:
21 | m_CollabEditorSettings:
22 | inProgressEnabled: 1
23 | m_EnableTextureStreamingInEditMode: 1
24 | m_EnableTextureStreamingInPlayMode: 1
25 | m_AsyncShaderCompilation: 1
26 | m_EnterPlayModeOptionsEnabled: 0
27 | m_EnterPlayModeOptions: 3
28 | m_ShowLightmapResolutionOverlay: 1
29 | m_UseLegacyProbeSampleCount: 0
30 | m_AssetPipelineMode: 1
31 | m_CacheServerMode: 0
32 | m_CacheServerEndpoint:
33 | m_CacheServerNamespacePrefix: default
34 | m_CacheServerEnableDownload: 1
35 | m_CacheServerEnableUpload: 1
36 |
--------------------------------------------------------------------------------
/Html2UnityRich/ProjectSettings/GraphicsSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!30 &1
4 | GraphicsSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 13
7 | m_Deferred:
8 | m_Mode: 1
9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
10 | m_DeferredReflections:
11 | m_Mode: 1
12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
13 | m_ScreenSpaceShadows:
14 | m_Mode: 1
15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
16 | m_LegacyDeferred:
17 | m_Mode: 1
18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
19 | m_DepthNormals:
20 | m_Mode: 1
21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
22 | m_MotionVectors:
23 | m_Mode: 1
24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
25 | m_LightHalo:
26 | m_Mode: 1
27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
28 | m_LensFlare:
29 | m_Mode: 1
30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
31 | m_AlwaysIncludedShaders:
32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
38 | m_PreloadedShaders: []
39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
40 | type: 0}
41 | m_CustomRenderPipeline: {fileID: 0}
42 | m_TransparencySortMode: 0
43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1}
44 | m_DefaultRenderingPath: 1
45 | m_DefaultMobileRenderingPath: 1
46 | m_TierSettings: []
47 | m_LightmapStripping: 0
48 | m_FogStripping: 0
49 | m_InstancingStripping: 0
50 | m_LightmapKeepPlain: 1
51 | m_LightmapKeepDirCombined: 1
52 | m_LightmapKeepDynamicPlain: 1
53 | m_LightmapKeepDynamicDirCombined: 1
54 | m_LightmapKeepShadowMask: 1
55 | m_LightmapKeepSubtractive: 1
56 | m_FogKeepLinear: 1
57 | m_FogKeepExp: 1
58 | m_FogKeepExp2: 1
59 | m_AlbedoSwatchInfos: []
60 | m_LightsUseLinearIntensity: 0
61 | m_LightsUseColorTemperature: 0
62 | m_LogWhenShaderIsCompiled: 0
63 | m_AllowEnlightenSupportForUpgradedProject: 0
64 |
--------------------------------------------------------------------------------
/Html2UnityRich/ProjectSettings/InputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!13 &1
4 | InputManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Axes:
8 | - serializedVersion: 3
9 | m_Name: Horizontal
10 | descriptiveName:
11 | descriptiveNegativeName:
12 | negativeButton: left
13 | positiveButton: right
14 | altNegativeButton: a
15 | altPositiveButton: d
16 | gravity: 3
17 | dead: 0.001
18 | sensitivity: 3
19 | snap: 1
20 | invert: 0
21 | type: 0
22 | axis: 0
23 | joyNum: 0
24 | - serializedVersion: 3
25 | m_Name: Vertical
26 | descriptiveName:
27 | descriptiveNegativeName:
28 | negativeButton: down
29 | positiveButton: up
30 | altNegativeButton: s
31 | altPositiveButton: w
32 | gravity: 3
33 | dead: 0.001
34 | sensitivity: 3
35 | snap: 1
36 | invert: 0
37 | type: 0
38 | axis: 0
39 | joyNum: 0
40 | - serializedVersion: 3
41 | m_Name: Fire1
42 | descriptiveName:
43 | descriptiveNegativeName:
44 | negativeButton:
45 | positiveButton: left ctrl
46 | altNegativeButton:
47 | altPositiveButton: mouse 0
48 | gravity: 1000
49 | dead: 0.001
50 | sensitivity: 1000
51 | snap: 0
52 | invert: 0
53 | type: 0
54 | axis: 0
55 | joyNum: 0
56 | - serializedVersion: 3
57 | m_Name: Fire2
58 | descriptiveName:
59 | descriptiveNegativeName:
60 | negativeButton:
61 | positiveButton: left alt
62 | altNegativeButton:
63 | altPositiveButton: mouse 1
64 | gravity: 1000
65 | dead: 0.001
66 | sensitivity: 1000
67 | snap: 0
68 | invert: 0
69 | type: 0
70 | axis: 0
71 | joyNum: 0
72 | - serializedVersion: 3
73 | m_Name: Fire3
74 | descriptiveName:
75 | descriptiveNegativeName:
76 | negativeButton:
77 | positiveButton: left shift
78 | altNegativeButton:
79 | altPositiveButton: mouse 2
80 | gravity: 1000
81 | dead: 0.001
82 | sensitivity: 1000
83 | snap: 0
84 | invert: 0
85 | type: 0
86 | axis: 0
87 | joyNum: 0
88 | - serializedVersion: 3
89 | m_Name: Jump
90 | descriptiveName:
91 | descriptiveNegativeName:
92 | negativeButton:
93 | positiveButton: space
94 | altNegativeButton:
95 | altPositiveButton:
96 | gravity: 1000
97 | dead: 0.001
98 | sensitivity: 1000
99 | snap: 0
100 | invert: 0
101 | type: 0
102 | axis: 0
103 | joyNum: 0
104 | - serializedVersion: 3
105 | m_Name: Mouse X
106 | descriptiveName:
107 | descriptiveNegativeName:
108 | negativeButton:
109 | positiveButton:
110 | altNegativeButton:
111 | altPositiveButton:
112 | gravity: 0
113 | dead: 0
114 | sensitivity: 0.1
115 | snap: 0
116 | invert: 0
117 | type: 1
118 | axis: 0
119 | joyNum: 0
120 | - serializedVersion: 3
121 | m_Name: Mouse Y
122 | descriptiveName:
123 | descriptiveNegativeName:
124 | negativeButton:
125 | positiveButton:
126 | altNegativeButton:
127 | altPositiveButton:
128 | gravity: 0
129 | dead: 0
130 | sensitivity: 0.1
131 | snap: 0
132 | invert: 0
133 | type: 1
134 | axis: 1
135 | joyNum: 0
136 | - serializedVersion: 3
137 | m_Name: Mouse ScrollWheel
138 | descriptiveName:
139 | descriptiveNegativeName:
140 | negativeButton:
141 | positiveButton:
142 | altNegativeButton:
143 | altPositiveButton:
144 | gravity: 0
145 | dead: 0
146 | sensitivity: 0.1
147 | snap: 0
148 | invert: 0
149 | type: 1
150 | axis: 2
151 | joyNum: 0
152 | - serializedVersion: 3
153 | m_Name: Horizontal
154 | descriptiveName:
155 | descriptiveNegativeName:
156 | negativeButton:
157 | positiveButton:
158 | altNegativeButton:
159 | altPositiveButton:
160 | gravity: 0
161 | dead: 0.19
162 | sensitivity: 1
163 | snap: 0
164 | invert: 0
165 | type: 2
166 | axis: 0
167 | joyNum: 0
168 | - serializedVersion: 3
169 | m_Name: Vertical
170 | descriptiveName:
171 | descriptiveNegativeName:
172 | negativeButton:
173 | positiveButton:
174 | altNegativeButton:
175 | altPositiveButton:
176 | gravity: 0
177 | dead: 0.19
178 | sensitivity: 1
179 | snap: 0
180 | invert: 1
181 | type: 2
182 | axis: 1
183 | joyNum: 0
184 | - serializedVersion: 3
185 | m_Name: Fire1
186 | descriptiveName:
187 | descriptiveNegativeName:
188 | negativeButton:
189 | positiveButton: joystick button 0
190 | altNegativeButton:
191 | altPositiveButton:
192 | gravity: 1000
193 | dead: 0.001
194 | sensitivity: 1000
195 | snap: 0
196 | invert: 0
197 | type: 0
198 | axis: 0
199 | joyNum: 0
200 | - serializedVersion: 3
201 | m_Name: Fire2
202 | descriptiveName:
203 | descriptiveNegativeName:
204 | negativeButton:
205 | positiveButton: joystick button 1
206 | altNegativeButton:
207 | altPositiveButton:
208 | gravity: 1000
209 | dead: 0.001
210 | sensitivity: 1000
211 | snap: 0
212 | invert: 0
213 | type: 0
214 | axis: 0
215 | joyNum: 0
216 | - serializedVersion: 3
217 | m_Name: Fire3
218 | descriptiveName:
219 | descriptiveNegativeName:
220 | negativeButton:
221 | positiveButton: joystick button 2
222 | altNegativeButton:
223 | altPositiveButton:
224 | gravity: 1000
225 | dead: 0.001
226 | sensitivity: 1000
227 | snap: 0
228 | invert: 0
229 | type: 0
230 | axis: 0
231 | joyNum: 0
232 | - serializedVersion: 3
233 | m_Name: Jump
234 | descriptiveName:
235 | descriptiveNegativeName:
236 | negativeButton:
237 | positiveButton: joystick button 3
238 | altNegativeButton:
239 | altPositiveButton:
240 | gravity: 1000
241 | dead: 0.001
242 | sensitivity: 1000
243 | snap: 0
244 | invert: 0
245 | type: 0
246 | axis: 0
247 | joyNum: 0
248 | - serializedVersion: 3
249 | m_Name: Submit
250 | descriptiveName:
251 | descriptiveNegativeName:
252 | negativeButton:
253 | positiveButton: return
254 | altNegativeButton:
255 | altPositiveButton: joystick button 0
256 | gravity: 1000
257 | dead: 0.001
258 | sensitivity: 1000
259 | snap: 0
260 | invert: 0
261 | type: 0
262 | axis: 0
263 | joyNum: 0
264 | - serializedVersion: 3
265 | m_Name: Submit
266 | descriptiveName:
267 | descriptiveNegativeName:
268 | negativeButton:
269 | positiveButton: enter
270 | altNegativeButton:
271 | altPositiveButton: space
272 | gravity: 1000
273 | dead: 0.001
274 | sensitivity: 1000
275 | snap: 0
276 | invert: 0
277 | type: 0
278 | axis: 0
279 | joyNum: 0
280 | - serializedVersion: 3
281 | m_Name: Cancel
282 | descriptiveName:
283 | descriptiveNegativeName:
284 | negativeButton:
285 | positiveButton: escape
286 | altNegativeButton:
287 | altPositiveButton: joystick button 1
288 | gravity: 1000
289 | dead: 0.001
290 | sensitivity: 1000
291 | snap: 0
292 | invert: 0
293 | type: 0
294 | axis: 0
295 | joyNum: 0
296 |
--------------------------------------------------------------------------------
/Html2UnityRich/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!126 &1
4 | NavMeshProjectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | areas:
8 | - name: Walkable
9 | cost: 1
10 | - name: Not Walkable
11 | cost: 1
12 | - name: Jump
13 | cost: 2
14 | - name:
15 | cost: 1
16 | - name:
17 | cost: 1
18 | - name:
19 | cost: 1
20 | - name:
21 | cost: 1
22 | - name:
23 | cost: 1
24 | - name:
25 | cost: 1
26 | - name:
27 | cost: 1
28 | - name:
29 | cost: 1
30 | - name:
31 | cost: 1
32 | - name:
33 | cost: 1
34 | - name:
35 | cost: 1
36 | - name:
37 | cost: 1
38 | - name:
39 | cost: 1
40 | - name:
41 | cost: 1
42 | - name:
43 | cost: 1
44 | - name:
45 | cost: 1
46 | - name:
47 | cost: 1
48 | - name:
49 | cost: 1
50 | - name:
51 | cost: 1
52 | - name:
53 | cost: 1
54 | - name:
55 | cost: 1
56 | - name:
57 | cost: 1
58 | - name:
59 | cost: 1
60 | - name:
61 | cost: 1
62 | - name:
63 | cost: 1
64 | - name:
65 | cost: 1
66 | - name:
67 | cost: 1
68 | - name:
69 | cost: 1
70 | - name:
71 | cost: 1
72 | m_LastAgentTypeID: -887442657
73 | m_Settings:
74 | - serializedVersion: 2
75 | agentTypeID: 0
76 | agentRadius: 0.5
77 | agentHeight: 2
78 | agentSlope: 45
79 | agentClimb: 0.75
80 | ledgeDropHeight: 0
81 | maxJumpAcrossDistance: 0
82 | minRegionArea: 2
83 | manualCellSize: 0
84 | cellSize: 0.16666667
85 | manualTileSize: 0
86 | tileSize: 256
87 | accuratePlacement: 0
88 | debug:
89 | m_Flags: 0
90 | m_SettingNames:
91 | - Humanoid
92 |
--------------------------------------------------------------------------------
/Html2UnityRich/ProjectSettings/PackageManagerSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &1
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 61
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0}
13 | m_Name:
14 | m_EditorClassIdentifier:
15 | m_ScopedRegistriesSettingsExpanded: 1
16 | oneTimeWarningShown: 0
17 | m_Registries:
18 | - m_Id: main
19 | m_Name:
20 | m_Url: https://packages.unity.cn
21 | m_Scopes: []
22 | m_IsDefault: 1
23 | m_UserSelectedRegistryName:
24 | m_UserAddingNewScopedRegistry: 0
25 | m_RegistryInfoDraft:
26 | m_ErrorMessage:
27 | m_Original:
28 | m_Id:
29 | m_Name:
30 | m_Url:
31 | m_Scopes: []
32 | m_IsDefault: 0
33 | m_Modified: 0
34 | m_Name:
35 | m_Url:
36 | m_Scopes:
37 | -
38 | m_SelectedScopeIndex: 0
39 |
--------------------------------------------------------------------------------
/Html2UnityRich/ProjectSettings/Physics2DSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!19 &1
4 | Physics2DSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 4
7 | m_Gravity: {x: 0, y: -9.81}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_VelocityIterations: 8
10 | m_PositionIterations: 3
11 | m_VelocityThreshold: 1
12 | m_MaxLinearCorrection: 0.2
13 | m_MaxAngularCorrection: 8
14 | m_MaxTranslationSpeed: 100
15 | m_MaxRotationSpeed: 360
16 | m_BaumgarteScale: 0.2
17 | m_BaumgarteTimeOfImpactScale: 0.75
18 | m_TimeToSleep: 0.5
19 | m_LinearSleepTolerance: 0.01
20 | m_AngularSleepTolerance: 2
21 | m_DefaultContactOffset: 0.01
22 | m_JobOptions:
23 | serializedVersion: 2
24 | useMultithreading: 0
25 | useConsistencySorting: 0
26 | m_InterpolationPosesPerJob: 100
27 | m_NewContactsPerJob: 30
28 | m_CollideContactsPerJob: 100
29 | m_ClearFlagsPerJob: 200
30 | m_ClearBodyForcesPerJob: 200
31 | m_SyncDiscreteFixturesPerJob: 50
32 | m_SyncContinuousFixturesPerJob: 50
33 | m_FindNearestContactsPerJob: 100
34 | m_UpdateTriggerContactsPerJob: 100
35 | m_IslandSolverCostThreshold: 100
36 | m_IslandSolverBodyCostScale: 1
37 | m_IslandSolverContactCostScale: 10
38 | m_IslandSolverJointCostScale: 10
39 | m_IslandSolverBodiesPerJob: 50
40 | m_IslandSolverContactsPerJob: 50
41 | m_AutoSimulation: 1
42 | m_QueriesHitTriggers: 1
43 | m_QueriesStartInColliders: 1
44 | m_CallbacksOnDisable: 1
45 | m_ReuseCollisionCallbacks: 1
46 | m_AutoSyncTransforms: 0
47 | m_AlwaysShowColliders: 0
48 | m_ShowColliderSleep: 1
49 | m_ShowColliderContacts: 0
50 | m_ShowColliderAABB: 0
51 | m_ContactArrowScale: 0.2
52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
57 |
--------------------------------------------------------------------------------
/Html2UnityRich/ProjectSettings/PresetManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1386491679 &1
4 | PresetManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_DefaultPresets: {}
8 |
--------------------------------------------------------------------------------
/Html2UnityRich/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 2019.4.39f1c1
2 | m_EditorVersionWithRevision: 2019.4.39f1c1 (f17422bde66a)
3 |
--------------------------------------------------------------------------------
/Html2UnityRich/ProjectSettings/QualitySettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!47 &1
4 | QualitySettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 5
7 | m_CurrentQuality: 5
8 | m_QualitySettings:
9 | - serializedVersion: 2
10 | name: Very Low
11 | pixelLightCount: 0
12 | shadows: 0
13 | shadowResolution: 0
14 | shadowProjection: 1
15 | shadowCascades: 1
16 | shadowDistance: 15
17 | shadowNearPlaneOffset: 3
18 | shadowCascade2Split: 0.33333334
19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
20 | shadowmaskMode: 0
21 | blendWeights: 1
22 | textureQuality: 1
23 | anisotropicTextures: 0
24 | antiAliasing: 0
25 | softParticles: 0
26 | softVegetation: 0
27 | realtimeReflectionProbes: 0
28 | billboardsFaceCameraPosition: 0
29 | vSyncCount: 0
30 | lodBias: 0.3
31 | maximumLODLevel: 0
32 | streamingMipmapsActive: 0
33 | streamingMipmapsAddAllCameras: 1
34 | streamingMipmapsMemoryBudget: 512
35 | streamingMipmapsRenderersPerFrame: 512
36 | streamingMipmapsMaxLevelReduction: 2
37 | streamingMipmapsMaxFileIORequests: 1024
38 | particleRaycastBudget: 4
39 | asyncUploadTimeSlice: 2
40 | asyncUploadBufferSize: 16
41 | asyncUploadPersistentBuffer: 1
42 | resolutionScalingFixedDPIFactor: 1
43 | excludedTargetPlatforms: []
44 | - serializedVersion: 2
45 | name: Low
46 | pixelLightCount: 0
47 | shadows: 0
48 | shadowResolution: 0
49 | shadowProjection: 1
50 | shadowCascades: 1
51 | shadowDistance: 20
52 | shadowNearPlaneOffset: 3
53 | shadowCascade2Split: 0.33333334
54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
55 | shadowmaskMode: 0
56 | blendWeights: 2
57 | textureQuality: 0
58 | anisotropicTextures: 0
59 | antiAliasing: 0
60 | softParticles: 0
61 | softVegetation: 0
62 | realtimeReflectionProbes: 0
63 | billboardsFaceCameraPosition: 0
64 | vSyncCount: 0
65 | lodBias: 0.4
66 | maximumLODLevel: 0
67 | streamingMipmapsActive: 0
68 | streamingMipmapsAddAllCameras: 1
69 | streamingMipmapsMemoryBudget: 512
70 | streamingMipmapsRenderersPerFrame: 512
71 | streamingMipmapsMaxLevelReduction: 2
72 | streamingMipmapsMaxFileIORequests: 1024
73 | particleRaycastBudget: 16
74 | asyncUploadTimeSlice: 2
75 | asyncUploadBufferSize: 16
76 | asyncUploadPersistentBuffer: 1
77 | resolutionScalingFixedDPIFactor: 1
78 | excludedTargetPlatforms: []
79 | - serializedVersion: 2
80 | name: Medium
81 | pixelLightCount: 1
82 | shadows: 1
83 | shadowResolution: 0
84 | shadowProjection: 1
85 | shadowCascades: 1
86 | shadowDistance: 20
87 | shadowNearPlaneOffset: 3
88 | shadowCascade2Split: 0.33333334
89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
90 | shadowmaskMode: 0
91 | blendWeights: 2
92 | textureQuality: 0
93 | anisotropicTextures: 1
94 | antiAliasing: 0
95 | softParticles: 0
96 | softVegetation: 0
97 | realtimeReflectionProbes: 0
98 | billboardsFaceCameraPosition: 0
99 | vSyncCount: 1
100 | lodBias: 0.7
101 | maximumLODLevel: 0
102 | streamingMipmapsActive: 0
103 | streamingMipmapsAddAllCameras: 1
104 | streamingMipmapsMemoryBudget: 512
105 | streamingMipmapsRenderersPerFrame: 512
106 | streamingMipmapsMaxLevelReduction: 2
107 | streamingMipmapsMaxFileIORequests: 1024
108 | particleRaycastBudget: 64
109 | asyncUploadTimeSlice: 2
110 | asyncUploadBufferSize: 16
111 | asyncUploadPersistentBuffer: 1
112 | resolutionScalingFixedDPIFactor: 1
113 | excludedTargetPlatforms: []
114 | - serializedVersion: 2
115 | name: High
116 | pixelLightCount: 2
117 | shadows: 2
118 | shadowResolution: 1
119 | shadowProjection: 1
120 | shadowCascades: 2
121 | shadowDistance: 40
122 | shadowNearPlaneOffset: 3
123 | shadowCascade2Split: 0.33333334
124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
125 | shadowmaskMode: 1
126 | blendWeights: 2
127 | textureQuality: 0
128 | anisotropicTextures: 1
129 | antiAliasing: 0
130 | softParticles: 0
131 | softVegetation: 1
132 | realtimeReflectionProbes: 1
133 | billboardsFaceCameraPosition: 1
134 | vSyncCount: 1
135 | lodBias: 1
136 | maximumLODLevel: 0
137 | streamingMipmapsActive: 0
138 | streamingMipmapsAddAllCameras: 1
139 | streamingMipmapsMemoryBudget: 512
140 | streamingMipmapsRenderersPerFrame: 512
141 | streamingMipmapsMaxLevelReduction: 2
142 | streamingMipmapsMaxFileIORequests: 1024
143 | particleRaycastBudget: 256
144 | asyncUploadTimeSlice: 2
145 | asyncUploadBufferSize: 16
146 | asyncUploadPersistentBuffer: 1
147 | resolutionScalingFixedDPIFactor: 1
148 | excludedTargetPlatforms: []
149 | - serializedVersion: 2
150 | name: Very High
151 | pixelLightCount: 3
152 | shadows: 2
153 | shadowResolution: 2
154 | shadowProjection: 1
155 | shadowCascades: 2
156 | shadowDistance: 70
157 | shadowNearPlaneOffset: 3
158 | shadowCascade2Split: 0.33333334
159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
160 | shadowmaskMode: 1
161 | blendWeights: 4
162 | textureQuality: 0
163 | anisotropicTextures: 2
164 | antiAliasing: 2
165 | softParticles: 1
166 | softVegetation: 1
167 | realtimeReflectionProbes: 1
168 | billboardsFaceCameraPosition: 1
169 | vSyncCount: 1
170 | lodBias: 1.5
171 | maximumLODLevel: 0
172 | streamingMipmapsActive: 0
173 | streamingMipmapsAddAllCameras: 1
174 | streamingMipmapsMemoryBudget: 512
175 | streamingMipmapsRenderersPerFrame: 512
176 | streamingMipmapsMaxLevelReduction: 2
177 | streamingMipmapsMaxFileIORequests: 1024
178 | particleRaycastBudget: 1024
179 | asyncUploadTimeSlice: 2
180 | asyncUploadBufferSize: 16
181 | asyncUploadPersistentBuffer: 1
182 | resolutionScalingFixedDPIFactor: 1
183 | excludedTargetPlatforms: []
184 | - serializedVersion: 2
185 | name: Ultra
186 | pixelLightCount: 4
187 | shadows: 2
188 | shadowResolution: 2
189 | shadowProjection: 1
190 | shadowCascades: 4
191 | shadowDistance: 150
192 | shadowNearPlaneOffset: 3
193 | shadowCascade2Split: 0.33333334
194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
195 | shadowmaskMode: 1
196 | blendWeights: 4
197 | textureQuality: 0
198 | anisotropicTextures: 2
199 | antiAliasing: 2
200 | softParticles: 1
201 | softVegetation: 1
202 | realtimeReflectionProbes: 1
203 | billboardsFaceCameraPosition: 1
204 | vSyncCount: 1
205 | lodBias: 2
206 | maximumLODLevel: 0
207 | streamingMipmapsActive: 0
208 | streamingMipmapsAddAllCameras: 1
209 | streamingMipmapsMemoryBudget: 512
210 | streamingMipmapsRenderersPerFrame: 512
211 | streamingMipmapsMaxLevelReduction: 2
212 | streamingMipmapsMaxFileIORequests: 1024
213 | particleRaycastBudget: 4096
214 | asyncUploadTimeSlice: 2
215 | asyncUploadBufferSize: 16
216 | asyncUploadPersistentBuffer: 1
217 | resolutionScalingFixedDPIFactor: 1
218 | excludedTargetPlatforms: []
219 | m_PerPlatformDefaultQuality:
220 | Android: 2
221 | Lumin: 5
222 | Nintendo 3DS: 5
223 | Nintendo Switch: 5
224 | PS4: 5
225 | PSP2: 2
226 | Stadia: 5
227 | Standalone: 5
228 | WebGL: 3
229 | Windows Store Apps: 5
230 | XboxOne: 5
231 | iPhone: 2
232 | tvOS: 2
233 |
--------------------------------------------------------------------------------
/Html2UnityRich/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!78 &1
4 | TagManager:
5 | serializedVersion: 2
6 | tags: []
7 | layers:
8 | - Default
9 | - TransparentFX
10 | - Ignore Raycast
11 | -
12 | - Water
13 | - UI
14 | -
15 | -
16 | -
17 | -
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | m_SortingLayers:
41 | - name: Default
42 | uniqueID: 0
43 | locked: 0
44 |
--------------------------------------------------------------------------------
/Html2UnityRich/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!5 &1
4 | TimeManager:
5 | m_ObjectHideFlags: 0
6 | Fixed Timestep: 0.02
7 | Maximum Allowed Timestep: 0.33333334
8 | m_TimeScale: 1
9 | Maximum Particle Timestep: 0.03
10 |
--------------------------------------------------------------------------------
/Html2UnityRich/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!310 &1
4 | UnityConnectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 1
7 | m_Enabled: 0
8 | m_TestMode: 0
9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com
12 | m_CNEventUrl: https://cdp.cloud.unity.cn/v1/events
13 | m_CNConfigUrl: https://cdp.cloud.unity.cn/config
14 | m_TestInitMode: 0
15 | CrashReportingSettings:
16 | m_EventUrl: https://perf-events.cloud.unity.cn
17 | m_Enabled: 0
18 | m_LogBufferSize: 10
19 | m_CaptureEditorExceptions: 1
20 | UnityPurchasingSettings:
21 | m_Enabled: 0
22 | m_TestMode: 0
23 | UnityAnalyticsSettings:
24 | m_Enabled: 1
25 | m_TestMode: 0
26 | m_InitializeOnStartup: 1
27 | UnityAdsSettings:
28 | m_Enabled: 0
29 | m_InitializeOnStartup: 1
30 | m_TestMode: 0
31 | m_IosGameId:
32 | m_AndroidGameId:
33 | m_GameIds: {}
34 | m_GameId:
35 | PerformanceReportingSettings:
36 | m_Enabled: 0
37 |
--------------------------------------------------------------------------------
/Html2UnityRich/ProjectSettings/VFXManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!937362698 &1
4 | VFXManager:
5 | m_ObjectHideFlags: 0
6 | m_IndirectShader: {fileID: 0}
7 | m_CopyBufferShader: {fileID: 0}
8 | m_SortShader: {fileID: 0}
9 | m_StripUpdateShader: {fileID: 0}
10 | m_RenderPipeSettingsPath:
11 | m_FixedTimeStep: 0.016666668
12 | m_MaxDeltaTime: 0.05
13 |
--------------------------------------------------------------------------------
/Html2UnityRich/ProjectSettings/XRSettings.asset:
--------------------------------------------------------------------------------
1 | {
2 | "m_SettingKeys": [
3 | "VR Device Disabled",
4 | "VR Device User Alert"
5 | ],
6 | "m_SettingValues": [
7 | "False",
8 | "False"
9 | ]
10 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Html2UnityRich
2 | 支持将一段Html富文本转化为Untiy相关文本显示组件所支持的富文本,目前支持的Unity文本显示组件有UGUI(Text),TextMeshPro。主要思路是使用状态机对整段Html文本进行逐字符分析,并生成语法树,在将语法树按照期望的结果解析为Unity支持的富文本格式
3 |
4 |
5 |
6 | ## 目录结构
7 |
8 | - Html4UnityText,核心逻辑
9 | - Sample,配套的演示案例
10 | - Plugins,依赖库
11 |
12 |
13 |
14 | ## 部分代码说明
15 |
16 | - HtmlMachine.cs, 解析Html文本用的状态机,拆分出标签以及纯文本
17 | - TagPropMachine.cs, 解析Html标签用的状态机,获取具体参数
18 | - HtmlNode.cs,构成语法树的节点基础对象
19 | - Html2UnityRichMgr.cs, 接口入口文件
20 | - Start.cs,演示代码文件
21 |
22 |
23 |
24 | ## 如何运行演示案例
25 |
26 | 打开SampleScene.scene场景文件,点击运行
27 |
28 |
29 |
30 | ## 如何使用代码
31 |
32 | start.cs包含了具体2种Text组件(UGUI和TextMeshPro)的使用逻辑
33 |
34 | ```c#
35 | //textMeshPro演示
36 | string content = "这是一段Html文本
"
37 | textMeshPro.text = Html2UnityRichMgr.CreateHtmlRootNode (content).ToPropNode ().ToUnityRichNode ().ToTextProRichText ();
38 | ```
39 |
40 | UGUI(Text)由于不带对齐的富文本的标签,所以实现多了一些步骤,具体实现见Start.cs
41 |
42 | ## 适用的场景
43 | 我自己的需求是用于游戏的公告,游戏公告一般是运营人员编写发出的,他们更多熟悉Html,而不了解Unity的富文本,所以写了这个库来进行转换
44 |
45 | ## 后续更新计划
46 | - 支持图文混排
47 | - 支持Html超链接标签(已实现)
48 |
49 | ## 演示效果
50 | 
51 |
52 | ## 致谢
53 | - [forestluch](https://github.com/forestluch):发现色码转化异常问题,该问题已修复
54 |
55 | ## 友情链接
56 | - [JEngine](https://github.com/JasonXuDeveloper/JEngine) - The solution that allows unity games update in runtime. 使Unity开发的游戏支持热更新的解决方案。
57 | - [BDFramework](https://github.com/yimengfan/BDFramework.Core) - Simple and powerful Unity3d game workflow! 简单、高效、高度工业化的商业级unity3d 工作流。
58 | - [MVI4Unity](https://github.com/Wilson403/MVI4Unity) - 基于MVI架构思想实现的Unity界面框架
59 |
--------------------------------------------------------------------------------