akaaafk commited on
Commit
d147573
·
verified ·
1 Parent(s): 77cb12f

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +2 -0
  2. benchmark/IOAI/IOAI-2025/GAITE-Contest/Synthetic_Speech_Detector/training_set/bonafide/LA_E_6693511_bonafide.pt +3 -0
  3. benchmark/IOAI/IOAI-2025/GAITE-Contest/Synthetic_Speech_Detector/training_set/bonafide/LA_E_6699186_bonafide.pt +3 -0
  4. benchmark/IOAI/IOAI-2025/GAITE-Contest/Synthetic_Speech_Detector/training_set/bonafide/LA_E_6813363_bonafide.pt +3 -0
  5. benchmark/IOAI/IOAI-2025/GAITE-Contest/Synthetic_Speech_Detector/training_set/bonafide/LA_E_6813643_bonafide.pt +3 -0
  6. benchmark/IOAI/IOAI-2025/GAITE-Contest/Synthetic_Speech_Detector/training_set/spoof/LA_E_2458742_spoof_A13.pt +3 -0
  7. benchmark/IOAI/IOAI-2025/GAITE-Contest/Synthetic_Speech_Detector/training_set/spoof/LA_E_2501421_spoof_A10.pt +3 -0
  8. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/1d/1d02a6c02ebd3e4110b4a9b47ebb3f92 +0 -0
  9. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/1d/1d04fa9d9e10eefa3404c7cafed71531 +0 -0
  10. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/1d/1dce79f6ff490fccf52630dd9183efdc +0 -0
  11. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/1d/1dd4ff6eca40d99dec6264eb700b5dbf +0 -0
  12. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/21/2100e1eb70b44278a34ef1f689611b05 +0 -0
  13. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/21/212cbbafa87ac153974b59eaa8e0f427 +0 -0
  14. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/28/284deddfb3ed9d6b8b5ea615e6165ab0 +0 -0
  15. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/28/2866bfc0ec2570237df3a0dd2088ffd9 +0 -0
  16. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/28/288afdf0833f5afb83d10940a06cf530 +0 -0
  17. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/28/28a604da2bdae1ab64826e7cda1697da +0 -0
  18. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/2a/2a5498c6e5424e63a88a50d9eaedea1b +0 -0
  19. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/2a/2a569debaadca8350bc9e70822cb14dd +0 -0
  20. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/2a/2a6bac3eb087bf83135060f99c315817 +0 -0
  21. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/2a/2a813ebf35d44571f6cd3cba3bbb34cf +0 -0
  22. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/2a/2a8c14d559cd7d1258780dc89feb213d +0 -0
  23. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/2a/2a8f867e91310834a84bd76ed96994cf +0 -0
  24. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/2a/2ab75d6b3bea4767d6e88aa87763042d +0 -0
  25. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/2b/2b06da4fe5aed98e2aec78fb4a82dff6 +0 -0
  26. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/2b/2b226400e3d00ef6c5e4ba5c026ce34a +0 -0
  27. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/DropdownOptionListDrawer.cs +60 -0
  28. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/DropdownOptionListDrawer.cs.meta +12 -0
  29. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/GlyphInfoDrawer.cs +61 -0
  30. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/GlyphInfoDrawer.cs.meta +10 -0
  31. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/GlyphMetricsPropertyDrawer.cs +53 -0
  32. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/GlyphMetricsPropertyDrawer.cs.meta +11 -0
  33. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/GlyphRectPropertyDrawer.cs +44 -0
  34. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/GlyphRectPropertyDrawer.cs.meta +11 -0
  35. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_BaseEditorPanel.cs +1336 -0
  36. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_BaseEditorPanel.cs.meta +10 -0
  37. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_BaseShaderGUI.cs +551 -0
  38. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_BaseShaderGUI.cs.meta +12 -0
  39. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_BitmapShaderGUI.cs +93 -0
  40. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_BitmapShaderGUI.cs.meta +12 -0
  41. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_CharacterPropertyDrawer.cs +235 -0
  42. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_CharacterPropertyDrawer.cs.meta +11 -0
  43. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_ColorGradientAssetMenu.cs +50 -0
  44. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_ColorGradientAssetMenu.cs.meta +12 -0
  45. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_ColorGradientEditor.cs +146 -0
  46. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_ColorGradientEditor.cs.meta +12 -0
  47. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_DropdownEditor.cs +57 -0
  48. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_DropdownEditor.cs.meta +12 -0
  49. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_EditorCoroutine.cs +96 -0
  50. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_EditorCoroutine.cs.meta +11 -0
.gitattributes CHANGED
@@ -739,3 +739,5 @@ benchmark/IOL/official_pdfs/2008/iol-2008-indiv-prob.bg.pdf filter=lfs diff=lfs
739
  benchmark/IOL/official_pdfs/2008/iol-2008-indiv-prob.pl.pdf filter=lfs diff=lfs merge=lfs -text
740
  benchmark/IOL/official_pdfs/2008/iol-2008-indiv-prob.ru.pdf filter=lfs diff=lfs merge=lfs -text
741
  benchmark/IOL/official_pdfs/2008/iol-2008-indiv-prob.sl.pdf filter=lfs diff=lfs merge=lfs -text
 
 
 
739
  benchmark/IOL/official_pdfs/2008/iol-2008-indiv-prob.pl.pdf filter=lfs diff=lfs merge=lfs -text
740
  benchmark/IOL/official_pdfs/2008/iol-2008-indiv-prob.ru.pdf filter=lfs diff=lfs merge=lfs -text
741
  benchmark/IOL/official_pdfs/2008/iol-2008-indiv-prob.sl.pdf filter=lfs diff=lfs merge=lfs -text
742
+ benchmark/science_bowl/MS-Sample-Questions/Sample-Set-8/Round-6-A.pdf filter=lfs diff=lfs merge=lfs -text
743
+ benchmark/science_bowl/MS-Sample-Questions/Sample-Set-2/sample_questions_r10.pdf filter=lfs diff=lfs merge=lfs -text
benchmark/IOAI/IOAI-2025/GAITE-Contest/Synthetic_Speech_Detector/training_set/bonafide/LA_E_6693511_bonafide.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:92c270a306ad3d1fa4149454df8db7e47053ddc8663d1b4ffe7cbd6d7720b612
3
+ size 49378
benchmark/IOAI/IOAI-2025/GAITE-Contest/Synthetic_Speech_Detector/training_set/bonafide/LA_E_6699186_bonafide.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:71b8353165e956b86d71ae109089e6fdea45c5237aa2a16eb65967cc151c266a
3
+ size 49378
benchmark/IOAI/IOAI-2025/GAITE-Contest/Synthetic_Speech_Detector/training_set/bonafide/LA_E_6813363_bonafide.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c51fde43b5b0851042a8bc85ce8a359eaabbc56c186ba0b87eb6b484e784744
3
+ size 49378
benchmark/IOAI/IOAI-2025/GAITE-Contest/Synthetic_Speech_Detector/training_set/bonafide/LA_E_6813643_bonafide.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:af35c029ba0f4b8ce15b59d282a7929035b016cc5e662d47d0b2da484528dfca
3
+ size 49378
benchmark/IOAI/IOAI-2025/GAITE-Contest/Synthetic_Speech_Detector/training_set/spoof/LA_E_2458742_spoof_A13.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8ad34195d2c8fbe0f81e92f22e6e3953337d4bcd5d71bb26f85568628b99ad6a
3
+ size 49447
benchmark/IOAI/IOAI-2025/GAITE-Contest/Synthetic_Speech_Detector/training_set/spoof/LA_E_2501421_spoof_A10.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b3208cda03d97b910f3c60c2c5881c6394ab24e6119bdaec1bd29add2b4428b
3
+ size 49447
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/1d/1d02a6c02ebd3e4110b4a9b47ebb3f92 ADDED
Binary file (4.98 kB). View file
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/1d/1d04fa9d9e10eefa3404c7cafed71531 ADDED
Binary file (65.4 kB). View file
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/1d/1dce79f6ff490fccf52630dd9183efdc ADDED
Binary file (9.71 kB). View file
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/1d/1dd4ff6eca40d99dec6264eb700b5dbf ADDED
Binary file (4.44 kB). View file
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/21/2100e1eb70b44278a34ef1f689611b05 ADDED
Binary file (4.66 kB). View file
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/21/212cbbafa87ac153974b59eaa8e0f427 ADDED
Binary file (5.18 kB). View file
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/28/284deddfb3ed9d6b8b5ea615e6165ab0 ADDED
Binary file (30.6 kB). View file
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/28/2866bfc0ec2570237df3a0dd2088ffd9 ADDED
Binary file (4.82 kB). View file
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/28/288afdf0833f5afb83d10940a06cf530 ADDED
Binary file (8.17 kB). View file
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/28/28a604da2bdae1ab64826e7cda1697da ADDED
Binary file (7.2 kB). View file
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/2a/2a5498c6e5424e63a88a50d9eaedea1b ADDED
Binary file (21.6 kB). View file
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/2a/2a569debaadca8350bc9e70822cb14dd ADDED
Binary file (4.41 kB). View file
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/2a/2a6bac3eb087bf83135060f99c315817 ADDED
Binary file (21.6 kB). View file
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/2a/2a813ebf35d44571f6cd3cba3bbb34cf ADDED
Binary file (5.02 kB). View file
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/2a/2a8c14d559cd7d1258780dc89feb213d ADDED
Binary file (5.13 kB). View file
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/2a/2a8f867e91310834a84bd76ed96994cf ADDED
Binary file (30.5 kB). View file
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/2a/2ab75d6b3bea4767d6e88aa87763042d ADDED
Binary file (18.5 kB). View file
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/2b/2b06da4fe5aed98e2aec78fb4a82dff6 ADDED
Binary file (5.66 kB). View file
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/Artifacts/2b/2b226400e3d00ef6c5e4ba5c026ce34a ADDED
Binary file (9.7 kB). View file
 
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/DropdownOptionListDrawer.cs ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using UnityEditorInternal;
2
+ using UnityEngine;
3
+ using UnityEngine.UI;
4
+ using UnityEditor;
5
+
6
+ namespace TMPro.EditorUtilities
7
+ {
8
+ [CustomPropertyDrawer(typeof(TMP_Dropdown.OptionDataList), true)]
9
+ class DropdownOptionListDrawer : PropertyDrawer
10
+ {
11
+ private ReorderableList m_ReorderableList;
12
+
13
+ private void Init(SerializedProperty property)
14
+ {
15
+ if (m_ReorderableList != null)
16
+ return;
17
+
18
+ SerializedProperty array = property.FindPropertyRelative("m_Options");
19
+
20
+ m_ReorderableList = new ReorderableList(property.serializedObject, array);
21
+ m_ReorderableList.drawElementCallback = DrawOptionData;
22
+ m_ReorderableList.drawHeaderCallback = DrawHeader;
23
+ m_ReorderableList.elementHeight += 16;
24
+ }
25
+
26
+ public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
27
+ {
28
+ Init(property);
29
+
30
+ m_ReorderableList.DoList(position);
31
+ }
32
+
33
+ private void DrawHeader(Rect rect)
34
+ {
35
+ GUI.Label(rect, "Options");
36
+ }
37
+
38
+ private void DrawOptionData(Rect rect, int index, bool isActive, bool isFocused)
39
+ {
40
+ SerializedProperty itemData = m_ReorderableList.serializedProperty.GetArrayElementAtIndex(index);
41
+ SerializedProperty itemText = itemData.FindPropertyRelative("m_Text");
42
+ SerializedProperty itemImage = itemData.FindPropertyRelative("m_Image");
43
+
44
+ RectOffset offset = new RectOffset(0, 0, -1, -3);
45
+ rect = offset.Add(rect);
46
+ rect.height = EditorGUIUtility.singleLineHeight;
47
+
48
+ EditorGUI.PropertyField(rect, itemText, GUIContent.none);
49
+ rect.y += EditorGUIUtility.singleLineHeight;
50
+ EditorGUI.PropertyField(rect, itemImage, GUIContent.none);
51
+ }
52
+
53
+ public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
54
+ {
55
+ Init(property);
56
+
57
+ return m_ReorderableList.GetHeight();
58
+ }
59
+ }
60
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/DropdownOptionListDrawer.cs.meta ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 9545c9eb3bf94265810463794fec8334
3
+ timeCreated: 1464818008
4
+ licenseType: Pro
5
+ MonoImporter:
6
+ serializedVersion: 2
7
+ defaultReferences: []
8
+ executionOrder: 0
9
+ icon: {instanceID: 0}
10
+ userData:
11
+ assetBundleName:
12
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/GlyphInfoDrawer.cs ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ using UnityEngine;
3
+ using UnityEditor;
4
+ using System.Collections;
5
+
6
+
7
+ namespace TMPro.EditorUtilities
8
+ {
9
+
10
+ [CustomPropertyDrawer(typeof(TMP_Glyph))]
11
+ public class GlyphInfoDrawer : PropertyDrawer
12
+ {
13
+
14
+ public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
15
+ {
16
+ SerializedProperty prop_id = property.FindPropertyRelative("id");
17
+ SerializedProperty prop_x = property.FindPropertyRelative("x");
18
+ SerializedProperty prop_y = property.FindPropertyRelative("y");
19
+ SerializedProperty prop_width = property.FindPropertyRelative("width");
20
+ SerializedProperty prop_height = property.FindPropertyRelative("height");
21
+ SerializedProperty prop_xOffset = property.FindPropertyRelative("xOffset");
22
+ SerializedProperty prop_yOffset = property.FindPropertyRelative("yOffset");
23
+ SerializedProperty prop_xAdvance = property.FindPropertyRelative("xAdvance");
24
+ SerializedProperty prop_scale = property.FindPropertyRelative("scale");
25
+
26
+
27
+ // We get Rect since a valid position may not be provided by the caller.
28
+ Rect rect = GUILayoutUtility.GetRect(position.width, 48);
29
+ rect.y -= 15;
30
+
31
+ //GUI.enabled = false;
32
+ EditorGUIUtility.labelWidth = 40f;
33
+ EditorGUIUtility.fieldWidth = 45f;
34
+
35
+ bool prevGuiState = GUI.enabled;
36
+ GUI.enabled = true;
37
+ EditorGUI.LabelField(new Rect(rect.x + 5f, rect.y, 80f, 18), new GUIContent("Ascii: <color=#FFFF80>" + prop_id.intValue + "</color>"), TMP_UIStyleManager.label);
38
+ EditorGUI.LabelField(new Rect(rect.x + 90f, rect.y, 80f, 18), new GUIContent("Hex: <color=#FFFF80>" + prop_id.intValue.ToString("X") + "</color>"), TMP_UIStyleManager.label);
39
+ EditorGUI.LabelField(new Rect(rect.x + 170f, rect.y, 80, 18), "Char: [ <color=#FFFF80>" + (char)prop_id.intValue + "</color> ]", TMP_UIStyleManager.label);
40
+ GUI.enabled = prevGuiState;
41
+
42
+ EditorGUIUtility.labelWidth = 35f;
43
+ EditorGUIUtility.fieldWidth = 10f;
44
+
45
+ float width = (rect.width - 5f) / 4;
46
+ EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 0, rect.y + 22, width - 5f, 18), prop_x, new GUIContent("X:"));
47
+ EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 1, rect.y + 22, width - 5f, 18), prop_y, new GUIContent("Y:"));
48
+ EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 2, rect.y + 22, width - 5f, 18), prop_width, new GUIContent("W:"));
49
+ EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 3, rect.y + 22, width - 5f, 18), prop_height, new GUIContent("H:"));
50
+
51
+ //GUI.enabled = true;
52
+ EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 0, rect.y + 44, width - 5f, 18), prop_xOffset, new GUIContent("OX:"));
53
+ EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 1, rect.y + 44, width - 5f, 18), prop_yOffset, new GUIContent("OY:"));
54
+ //GUI.enabled = true;
55
+ EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 2, rect.y + 44, width - 5f, 18), prop_xAdvance, new GUIContent("ADV:"));
56
+ EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 3, rect.y + 44, width - 5f, 18), prop_scale, new GUIContent("SF:"));
57
+ }
58
+
59
+ }
60
+ }
61
+ */
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/GlyphInfoDrawer.cs.meta ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 900f1a451c764dc3bdcc0de815a15935
3
+ MonoImporter:
4
+ serializedVersion: 2
5
+ defaultReferences: []
6
+ executionOrder: 0
7
+ icon: {instanceID: 0}
8
+ userData:
9
+ assetBundleName:
10
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/GlyphMetricsPropertyDrawer.cs ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using UnityEngine;
2
+ using UnityEngine.TextCore;
3
+ using UnityEditor;
4
+ using System.Collections;
5
+
6
+
7
+ namespace TMPro.EditorUtilities
8
+ {
9
+
10
+ [CustomPropertyDrawer(typeof(GlyphMetrics))]
11
+ public class GlyphMetricsPropertyDrawer : PropertyDrawer
12
+ {
13
+ public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
14
+ {
15
+ SerializedProperty prop_Width = property.FindPropertyRelative("m_Width");
16
+ SerializedProperty prop_Height = property.FindPropertyRelative("m_Height");
17
+ SerializedProperty prop_HoriBearingX = property.FindPropertyRelative("m_HorizontalBearingX");
18
+ SerializedProperty prop_HoriBearingY = property.FindPropertyRelative("m_HorizontalBearingY");
19
+ SerializedProperty prop_HoriAdvance = property.FindPropertyRelative("m_HorizontalAdvance");
20
+
21
+ // We get Rect since a valid position may not be provided by the caller.
22
+ Rect rect = new Rect(position.x, position.y, position.width, 49);
23
+
24
+ EditorGUI.LabelField(new Rect(rect.x, rect.y - 2.5f, rect.width, 18), new GUIContent("Glyph Metrics"));
25
+
26
+ EditorGUIUtility.labelWidth = 50f;
27
+ EditorGUIUtility.fieldWidth = 15f;
28
+
29
+ //GUI.enabled = false;
30
+ float width = (rect.width - 75f) / 2;
31
+ EditorGUI.PropertyField(new Rect(rect.x + width * 0, rect.y + 20, width - 5f, 18), prop_Width, new GUIContent("W:"));
32
+ EditorGUI.PropertyField(new Rect(rect.x + width * 1, rect.y + 20, width - 5f, 18), prop_Height, new GUIContent("H:"));
33
+
34
+ //GUI.enabled = true;
35
+
36
+ width = (rect.width - 75f) / 3;
37
+ EditorGUI.BeginChangeCheck();
38
+ EditorGUI.PropertyField(new Rect(rect.x + width * 0, rect.y + 40, width - 5f, 18), prop_HoriBearingX, new GUIContent("BX:"));
39
+ EditorGUI.PropertyField(new Rect(rect.x + width * 1, rect.y + 40, width - 5f, 18), prop_HoriBearingY, new GUIContent("BY:"));
40
+ EditorGUI.PropertyField(new Rect(rect.x + width * 2, rect.y + 40, width - 5f, 18), prop_HoriAdvance, new GUIContent("AD:"));
41
+ if (EditorGUI.EndChangeCheck())
42
+ {
43
+
44
+ }
45
+ }
46
+
47
+ public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
48
+ {
49
+ return 65f;
50
+ }
51
+
52
+ }
53
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/GlyphMetricsPropertyDrawer.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: e3882522a08b6f5459b4dea6f8791278
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/GlyphRectPropertyDrawer.cs ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using UnityEngine;
2
+ using UnityEngine.TextCore;
3
+ using UnityEditor;
4
+ using System.Collections;
5
+
6
+
7
+ namespace TMPro.EditorUtilities
8
+ {
9
+
10
+ [CustomPropertyDrawer(typeof(GlyphRect))]
11
+ public class GlyphRectPropertyDrawer : PropertyDrawer
12
+ {
13
+ public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
14
+ {
15
+ //EditorGUI.BeginProperty(position, label, property);
16
+
17
+ SerializedProperty prop_X = property.FindPropertyRelative("m_X");
18
+ SerializedProperty prop_Y = property.FindPropertyRelative("m_Y");
19
+ SerializedProperty prop_Width = property.FindPropertyRelative("m_Width");
20
+ SerializedProperty prop_Height = property.FindPropertyRelative("m_Height");
21
+
22
+ // We get Rect since a valid position may not be provided by the caller.
23
+ Rect rect = new Rect(position.x, position.y, position.width, 49);
24
+ EditorGUI.LabelField(new Rect(rect.x, rect.y - 2.5f, rect.width, 18), new GUIContent("Glyph Rect"));
25
+
26
+ EditorGUIUtility.labelWidth = 50f;
27
+ EditorGUIUtility.fieldWidth = 20f;
28
+
29
+ //GUI.enabled = false;
30
+ float width = (rect.width - 75f) / 4;
31
+ EditorGUI.PropertyField(new Rect(rect.x + width * 0, rect.y + 20, width - 5f, 18), prop_X, new GUIContent("X:"));
32
+ EditorGUI.PropertyField(new Rect(rect.x + width * 1, rect.y + 20, width - 5f, 18), prop_Y, new GUIContent("Y:"));
33
+ EditorGUI.PropertyField(new Rect(rect.x + width * 2, rect.y + 20, width - 5f, 18), prop_Width, new GUIContent("W:"));
34
+ EditorGUI.PropertyField(new Rect(rect.x + width * 3, rect.y + 20, width - 5f, 18), prop_Height, new GUIContent("H:"));
35
+
36
+ //EditorGUI.EndProperty();
37
+ }
38
+
39
+ public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
40
+ {
41
+ return 45f;
42
+ }
43
+ }
44
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/GlyphRectPropertyDrawer.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 8bc2b083b068f3546a9509c805e0541c
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_BaseEditorPanel.cs ADDED
@@ -0,0 +1,1336 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using UnityEngine;
2
+ using UnityEditor;
3
+ using System.Collections.Generic;
4
+ using System.Linq;
5
+
6
+
7
+ namespace TMPro.EditorUtilities
8
+ {
9
+ public abstract class TMP_BaseEditorPanel : Editor
10
+ {
11
+ //Labels and Tooltips
12
+ static readonly GUIContent k_RtlToggleLabel = new GUIContent("Enable RTL Editor", "Reverses text direction and allows right to left editing.");
13
+ //static readonly GUIContent k_MainSettingsLabel = new GUIContent("Main Settings");
14
+ static readonly GUIContent k_FontAssetLabel = new GUIContent("Font Asset", "The Font Asset containing the glyphs that can be rendered for this text.");
15
+ static readonly GUIContent k_MaterialPresetLabel = new GUIContent("Material Preset", "The material used for rendering. Only materials created from the Font Asset can be used.");
16
+ static readonly GUIContent k_StyleLabel = new GUIContent("Text Style", "The style from a style sheet to be applied to the text.");
17
+ static readonly GUIContent k_AutoSizeLabel = new GUIContent("Auto Size", "Auto sizes the text to fit the available space.");
18
+ static readonly GUIContent k_FontSizeLabel = new GUIContent("Font Size", "The size the text will be rendered at in points.");
19
+ static readonly GUIContent k_AutoSizeOptionsLabel = new GUIContent("Auto Size Options");
20
+ static readonly GUIContent k_MinLabel = new GUIContent("Min", "The minimum font size.");
21
+ static readonly GUIContent k_MaxLabel = new GUIContent("Max", "The maximum font size.");
22
+ static readonly GUIContent k_WdLabel = new GUIContent("WD%", "Compresses character width up to this value before reducing font size.");
23
+ static readonly GUIContent k_LineLabel = new GUIContent("Line", "Negative value only. Compresses line height down to this value before reducing font size.");
24
+ static readonly GUIContent k_FontStyleLabel = new GUIContent("Font Style", "Styles to apply to the text such as Bold or Italic.");
25
+
26
+ static readonly GUIContent k_BoldLabel = new GUIContent("B", "Bold");
27
+ static readonly GUIContent k_ItalicLabel = new GUIContent("I", "Italic");
28
+ static readonly GUIContent k_UnderlineLabel = new GUIContent("U", "Underline");
29
+ static readonly GUIContent k_StrikethroughLabel = new GUIContent("S", "Strikethrough");
30
+ static readonly GUIContent k_LowercaseLabel = new GUIContent("ab", "Lowercase");
31
+ static readonly GUIContent k_UppercaseLabel = new GUIContent("AB", "Uppercase");
32
+ static readonly GUIContent k_SmallcapsLabel = new GUIContent("SC", "Smallcaps");
33
+
34
+ static readonly GUIContent k_ColorModeLabel = new GUIContent("Color Mode", "The type of gradient to use.");
35
+ static readonly GUIContent k_BaseColorLabel = new GUIContent("Vertex Color", "The base color of the text vertices.");
36
+ static readonly GUIContent k_ColorPresetLabel = new GUIContent("Color Preset", "A Color Preset which override the local color settings.");
37
+ static readonly GUIContent k_ColorGradientLabel = new GUIContent("Color Gradient", "The gradient color applied over the Vertex Color. Can be locally set or driven by a Gradient Asset.");
38
+ static readonly GUIContent k_CorenerColorsLabel = new GUIContent("Colors", "The color composition of the gradient.");
39
+ static readonly GUIContent k_OverrideTagsLabel = new GUIContent("Override Tags", "Whether the color settings override the <color> tag.");
40
+
41
+ static readonly GUIContent k_SpacingOptionsLabel = new GUIContent("Spacing Options (em)", "Spacing adjustments between different elements of the text. Values are in font units where a value of 1 equals 1/100em.");
42
+ static readonly GUIContent k_CharacterSpacingLabel = new GUIContent("Character");
43
+ static readonly GUIContent k_WordSpacingLabel = new GUIContent("Word");
44
+ static readonly GUIContent k_LineSpacingLabel = new GUIContent("Line");
45
+ static readonly GUIContent k_ParagraphSpacingLabel = new GUIContent("Paragraph");
46
+
47
+ static readonly GUIContent k_AlignmentLabel = new GUIContent("Alignment", "Horizontal and vertical aligment of the text within its container.");
48
+ static readonly GUIContent k_WrapMixLabel = new GUIContent("Wrap Mix (W <-> C)", "How much to favor words versus characters when distributing the text.");
49
+
50
+ static readonly GUIContent k_WrappingLabel = new GUIContent("Wrapping", "Wraps text to the next line when reaching the edge of the container.");
51
+ static readonly GUIContent[] k_WrappingOptions = { new GUIContent("Disabled"), new GUIContent("Enabled") };
52
+ static readonly GUIContent k_OverflowLabel = new GUIContent("Overflow", "How to display text which goes past the edge of the container.");
53
+
54
+ static readonly GUIContent k_MarginsLabel = new GUIContent("Margins", "The space between the text and the edge of its container.");
55
+ static readonly GUIContent k_GeometrySortingLabel = new GUIContent("Geometry Sorting", "The order in which text geometry is sorted. Used to adjust the way overlapping characters are displayed.");
56
+ static readonly GUIContent k_IsTextObjectScaleStatic = new GUIContent("Is Scale Static", "Controls whether a text object will be excluded from the InteralUpdate callback to handle scale changes of the text object or its parent(s).");
57
+ static readonly GUIContent k_RichTextLabel = new GUIContent("Rich Text", "Enables the use of rich text tags such as <color> and <font>.");
58
+ static readonly GUIContent k_EscapeCharactersLabel = new GUIContent("Parse Escape Characters", "Whether to display strings such as \"\\n\" as is or replace them by the character they represent.");
59
+ static readonly GUIContent k_VisibleDescenderLabel = new GUIContent("Visible Descender", "Compute descender values from visible characters only. Used to adjust layout behavior when hiding and revealing characters dynamically.");
60
+ static readonly GUIContent k_SpriteAssetLabel = new GUIContent("Sprite Asset", "The Sprite Asset used when NOT specifically referencing one using <sprite=\"Sprite Asset Name\">.");
61
+ static readonly GUIContent k_StyleSheetAssetLabel = new GUIContent("Style Sheet Asset", "The Style Sheet Asset used by this text object.");
62
+
63
+ static readonly GUIContent k_HorizontalMappingLabel = new GUIContent("Horizontal Mapping", "Horizontal UV mapping when using a shader with a texture face option.");
64
+ static readonly GUIContent k_VerticalMappingLabel = new GUIContent("Vertical Mapping", "Vertical UV mapping when using a shader with a texture face option.");
65
+ static readonly GUIContent k_LineOffsetLabel = new GUIContent("Line Offset", "Adds an horizontal offset to each successive line. Used for slanted texturing.");
66
+
67
+ static readonly GUIContent k_KerningLabel = new GUIContent("Kerning", "Enables character specific spacing between pairs of characters.");
68
+ static readonly GUIContent k_PaddingLabel = new GUIContent("Extra Padding", "Adds some padding between the characters and the edge of the text mesh. Can reduce graphical errors when displaying small text.");
69
+
70
+ static readonly GUIContent k_LeftLabel = new GUIContent("Left");
71
+ static readonly GUIContent k_TopLabel = new GUIContent("Top");
72
+ static readonly GUIContent k_RightLabel = new GUIContent("Right");
73
+ static readonly GUIContent k_BottomLabel = new GUIContent("Bottom");
74
+
75
+ protected static readonly GUIContent k_ExtraSettingsLabel = new GUIContent("Extra Settings");
76
+ protected static string[] k_UiStateLabel = new string[] { "<i>(Click to collapse)</i> ", "<i>(Click to expand)</i> " };
77
+
78
+ static Dictionary<int, TMP_Style> k_AvailableStyles = new Dictionary<int, TMP_Style>();
79
+ protected Dictionary<int, int> m_TextStyleIndexLookup = new Dictionary<int, int>();
80
+
81
+ protected struct Foldout
82
+ {
83
+ // Track Inspector foldout panel states, globally.
84
+ public static bool extraSettings = false;
85
+ public static bool materialInspector = true;
86
+ }
87
+
88
+ protected static int s_EventId;
89
+
90
+ public int selAlignGridA;
91
+ public int selAlignGridB;
92
+
93
+ protected SerializedProperty m_TextProp;
94
+
95
+ protected SerializedProperty m_IsRightToLeftProp;
96
+ protected string m_RtlText;
97
+
98
+ protected SerializedProperty m_FontAssetProp;
99
+
100
+ protected SerializedProperty m_FontSharedMaterialProp;
101
+ protected Material[] m_MaterialPresets;
102
+ protected GUIContent[] m_MaterialPresetNames;
103
+ protected Dictionary<int, int> m_MaterialPresetIndexLookup = new Dictionary<int, int>();
104
+ protected int m_MaterialPresetSelectionIndex;
105
+ protected bool m_IsPresetListDirty;
106
+
107
+ protected List<TMP_Style> m_Styles = new List<TMP_Style>();
108
+ protected GUIContent[] m_StyleNames;
109
+ protected int m_StyleSelectionIndex;
110
+
111
+ protected SerializedProperty m_FontStyleProp;
112
+
113
+ protected SerializedProperty m_FontColorProp;
114
+ protected SerializedProperty m_EnableVertexGradientProp;
115
+ protected SerializedProperty m_FontColorGradientProp;
116
+ protected SerializedProperty m_FontColorGradientPresetProp;
117
+ protected SerializedProperty m_OverrideHtmlColorProp;
118
+
119
+ protected SerializedProperty m_FontSizeProp;
120
+ protected SerializedProperty m_FontSizeBaseProp;
121
+
122
+ protected SerializedProperty m_AutoSizingProp;
123
+ protected SerializedProperty m_FontSizeMinProp;
124
+ protected SerializedProperty m_FontSizeMaxProp;
125
+
126
+ protected SerializedProperty m_LineSpacingMaxProp;
127
+ protected SerializedProperty m_CharWidthMaxAdjProp;
128
+
129
+ protected SerializedProperty m_CharacterSpacingProp;
130
+ protected SerializedProperty m_WordSpacingProp;
131
+ protected SerializedProperty m_LineSpacingProp;
132
+ protected SerializedProperty m_ParagraphSpacingProp;
133
+
134
+ protected SerializedProperty m_TextAlignmentProp;
135
+
136
+ protected SerializedProperty m_HorizontalAlignmentProp;
137
+ protected SerializedProperty m_VerticalAlignmentProp;
138
+
139
+ protected SerializedProperty m_HorizontalMappingProp;
140
+ protected SerializedProperty m_VerticalMappingProp;
141
+ protected SerializedProperty m_UvLineOffsetProp;
142
+
143
+ protected SerializedProperty m_EnableWordWrappingProp;
144
+ protected SerializedProperty m_WordWrappingRatiosProp;
145
+ protected SerializedProperty m_TextOverflowModeProp;
146
+ protected SerializedProperty m_PageToDisplayProp;
147
+ protected SerializedProperty m_LinkedTextComponentProp;
148
+ protected SerializedProperty m_ParentLinkedTextComponentProp;
149
+
150
+ protected SerializedProperty m_EnableKerningProp;
151
+
152
+ protected SerializedProperty m_IsRichTextProp;
153
+
154
+ protected SerializedProperty m_HasFontAssetChangedProp;
155
+
156
+ protected SerializedProperty m_EnableExtraPaddingProp;
157
+ protected SerializedProperty m_CheckPaddingRequiredProp;
158
+ protected SerializedProperty m_EnableEscapeCharacterParsingProp;
159
+ protected SerializedProperty m_UseMaxVisibleDescenderProp;
160
+ protected SerializedProperty m_GeometrySortingOrderProp;
161
+ protected SerializedProperty m_IsTextObjectScaleStaticProp;
162
+
163
+ protected SerializedProperty m_SpriteAssetProp;
164
+
165
+ protected SerializedProperty m_StyleSheetAssetProp;
166
+ protected SerializedProperty m_TextStyleHashCodeProp;
167
+
168
+ protected SerializedProperty m_MarginProp;
169
+
170
+ protected SerializedProperty m_ColorModeProp;
171
+
172
+ protected bool m_HavePropertiesChanged;
173
+
174
+ protected TMP_Text m_TextComponent;
175
+ protected TMP_Text m_PreviousLinkedTextComponent;
176
+ protected RectTransform m_RectTransform;
177
+
178
+ protected Material m_TargetMaterial;
179
+
180
+ protected Vector3[] m_RectCorners = new Vector3[4];
181
+ protected Vector3[] m_HandlePoints = new Vector3[4];
182
+
183
+ protected virtual void OnEnable()
184
+ {
185
+ m_TextProp = serializedObject.FindProperty("m_text");
186
+ m_IsRightToLeftProp = serializedObject.FindProperty("m_isRightToLeft");
187
+ m_FontAssetProp = serializedObject.FindProperty("m_fontAsset");
188
+ m_FontSharedMaterialProp = serializedObject.FindProperty("m_sharedMaterial");
189
+
190
+ m_FontStyleProp = serializedObject.FindProperty("m_fontStyle");
191
+
192
+ m_FontSizeProp = serializedObject.FindProperty("m_fontSize");
193
+ m_FontSizeBaseProp = serializedObject.FindProperty("m_fontSizeBase");
194
+
195
+ m_AutoSizingProp = serializedObject.FindProperty("m_enableAutoSizing");
196
+ m_FontSizeMinProp = serializedObject.FindProperty("m_fontSizeMin");
197
+ m_FontSizeMaxProp = serializedObject.FindProperty("m_fontSizeMax");
198
+
199
+ m_LineSpacingMaxProp = serializedObject.FindProperty("m_lineSpacingMax");
200
+ m_CharWidthMaxAdjProp = serializedObject.FindProperty("m_charWidthMaxAdj");
201
+
202
+ // Colors & Gradient
203
+ m_FontColorProp = serializedObject.FindProperty("m_fontColor");
204
+ m_EnableVertexGradientProp = serializedObject.FindProperty("m_enableVertexGradient");
205
+ m_FontColorGradientProp = serializedObject.FindProperty("m_fontColorGradient");
206
+ m_FontColorGradientPresetProp = serializedObject.FindProperty("m_fontColorGradientPreset");
207
+ m_OverrideHtmlColorProp = serializedObject.FindProperty("m_overrideHtmlColors");
208
+
209
+ m_CharacterSpacingProp = serializedObject.FindProperty("m_characterSpacing");
210
+ m_WordSpacingProp = serializedObject.FindProperty("m_wordSpacing");
211
+ m_LineSpacingProp = serializedObject.FindProperty("m_lineSpacing");
212
+ m_ParagraphSpacingProp = serializedObject.FindProperty("m_paragraphSpacing");
213
+
214
+ m_TextAlignmentProp = serializedObject.FindProperty("m_textAlignment");
215
+ m_HorizontalAlignmentProp = serializedObject.FindProperty("m_HorizontalAlignment");
216
+ m_VerticalAlignmentProp = serializedObject.FindProperty("m_VerticalAlignment");
217
+
218
+ m_HorizontalMappingProp = serializedObject.FindProperty("m_horizontalMapping");
219
+ m_VerticalMappingProp = serializedObject.FindProperty("m_verticalMapping");
220
+ m_UvLineOffsetProp = serializedObject.FindProperty("m_uvLineOffset");
221
+
222
+ m_EnableWordWrappingProp = serializedObject.FindProperty("m_enableWordWrapping");
223
+ m_WordWrappingRatiosProp = serializedObject.FindProperty("m_wordWrappingRatios");
224
+ m_TextOverflowModeProp = serializedObject.FindProperty("m_overflowMode");
225
+ m_PageToDisplayProp = serializedObject.FindProperty("m_pageToDisplay");
226
+ m_LinkedTextComponentProp = serializedObject.FindProperty("m_linkedTextComponent");
227
+ m_ParentLinkedTextComponentProp = serializedObject.FindProperty("parentLinkedComponent");
228
+
229
+ m_EnableKerningProp = serializedObject.FindProperty("m_enableKerning");
230
+
231
+ m_EnableExtraPaddingProp = serializedObject.FindProperty("m_enableExtraPadding");
232
+ m_IsRichTextProp = serializedObject.FindProperty("m_isRichText");
233
+ m_CheckPaddingRequiredProp = serializedObject.FindProperty("checkPaddingRequired");
234
+ m_EnableEscapeCharacterParsingProp = serializedObject.FindProperty("m_parseCtrlCharacters");
235
+ m_UseMaxVisibleDescenderProp = serializedObject.FindProperty("m_useMaxVisibleDescender");
236
+
237
+ m_GeometrySortingOrderProp = serializedObject.FindProperty("m_geometrySortingOrder");
238
+ m_IsTextObjectScaleStaticProp = serializedObject.FindProperty("m_IsTextObjectScaleStatic");
239
+
240
+ m_SpriteAssetProp = serializedObject.FindProperty("m_spriteAsset");
241
+
242
+ m_StyleSheetAssetProp = serializedObject.FindProperty("m_StyleSheet");
243
+ m_TextStyleHashCodeProp = serializedObject.FindProperty("m_TextStyleHashCode");
244
+
245
+ m_MarginProp = serializedObject.FindProperty("m_margin");
246
+
247
+ m_HasFontAssetChangedProp = serializedObject.FindProperty("m_hasFontAssetChanged");
248
+
249
+ m_ColorModeProp = serializedObject.FindProperty("m_colorMode");
250
+
251
+ m_TextComponent = (TMP_Text)target;
252
+ m_RectTransform = m_TextComponent.rectTransform;
253
+
254
+ // Restore Previous Linked Text Component
255
+ m_PreviousLinkedTextComponent = m_TextComponent.linkedTextComponent;
256
+
257
+ // Create new Material Editor if one does not exists
258
+ m_TargetMaterial = m_TextComponent.fontSharedMaterial;
259
+
260
+ // Set material inspector visibility
261
+ if (m_TargetMaterial != null)
262
+ UnityEditorInternal.InternalEditorUtility.SetIsInspectorExpanded(m_TargetMaterial, Foldout.materialInspector);
263
+
264
+ // Find all Material Presets matching the current Font Asset Material
265
+ m_MaterialPresetNames = GetMaterialPresets();
266
+
267
+ // Get Styles from Style Sheet
268
+ if (!m_TextComponent.m_isWaitingOnResourceLoad)
269
+ m_StyleNames = GetStyleNames();
270
+
271
+ // Register to receive events when style sheets are modified.
272
+ TMPro_EventManager.TEXT_STYLE_PROPERTY_EVENT.Add(ON_TEXT_STYLE_CHANGED);
273
+
274
+ // Initialize the Event Listener for Undo Events.
275
+ Undo.undoRedoPerformed += OnUndoRedo;
276
+ }
277
+
278
+ protected virtual void OnDisable()
279
+ {
280
+ // Set material inspector visibility
281
+ if (m_TargetMaterial != null)
282
+ Foldout.materialInspector = UnityEditorInternal.InternalEditorUtility.GetIsInspectorExpanded(m_TargetMaterial);
283
+
284
+ if (Undo.undoRedoPerformed != null)
285
+ Undo.undoRedoPerformed -= OnUndoRedo;
286
+
287
+ // Unregister from style sheet related events.
288
+ TMPro_EventManager.TEXT_STYLE_PROPERTY_EVENT.Remove(ON_TEXT_STYLE_CHANGED);
289
+ }
290
+
291
+ // Event received when Text Styles are changed.
292
+ void ON_TEXT_STYLE_CHANGED(bool isChanged)
293
+ {
294
+ m_StyleNames = GetStyleNames();
295
+ }
296
+
297
+ public override void OnInspectorGUI()
298
+ {
299
+ // Make sure Multi selection only includes TMP Text objects.
300
+ if (IsMixSelectionTypes()) return;
301
+
302
+ serializedObject.Update();
303
+
304
+ DrawTextInput();
305
+
306
+ DrawMainSettings();
307
+
308
+ DrawExtraSettings();
309
+
310
+ EditorGUILayout.Space();
311
+
312
+ if (serializedObject.ApplyModifiedProperties() || m_HavePropertiesChanged)
313
+ {
314
+ m_TextComponent.havePropertiesChanged = true;
315
+ m_HavePropertiesChanged = false;
316
+ EditorUtility.SetDirty(target);
317
+ }
318
+ }
319
+
320
+ public void OnSceneGUI()
321
+ {
322
+ if (IsMixSelectionTypes()) return;
323
+
324
+ // Margin Frame & Handles
325
+ m_RectTransform.GetWorldCorners(m_RectCorners);
326
+ Vector4 marginOffset = m_TextComponent.margin;
327
+ Vector3 lossyScale = m_RectTransform.lossyScale;
328
+
329
+ m_HandlePoints[0] = m_RectCorners[0] + m_RectTransform.TransformDirection(new Vector3(marginOffset.x * lossyScale.x, marginOffset.w * lossyScale.y, 0));
330
+ m_HandlePoints[1] = m_RectCorners[1] + m_RectTransform.TransformDirection(new Vector3(marginOffset.x * lossyScale.x, -marginOffset.y * lossyScale.y, 0));
331
+ m_HandlePoints[2] = m_RectCorners[2] + m_RectTransform.TransformDirection(new Vector3(-marginOffset.z * lossyScale.x, -marginOffset.y * lossyScale.y, 0));
332
+ m_HandlePoints[3] = m_RectCorners[3] + m_RectTransform.TransformDirection(new Vector3(-marginOffset.z * lossyScale.x, marginOffset.w * lossyScale.y, 0));
333
+
334
+ Handles.DrawSolidRectangleWithOutline(m_HandlePoints, new Color32(255, 255, 255, 0), new Color32(255, 255, 0, 255));
335
+
336
+ // Draw & process FreeMoveHandles
337
+
338
+ // LEFT HANDLE
339
+ Vector3 oldLeft = (m_HandlePoints[0] + m_HandlePoints[1]) * 0.5f;
340
+ Vector3 newLeft = Handles.FreeMoveHandle(oldLeft, Quaternion.identity, HandleUtility.GetHandleSize(m_RectTransform.position) * 0.05f, Vector3.zero, Handles.DotHandleCap);
341
+ bool hasChanged = false;
342
+ if (oldLeft != newLeft)
343
+ {
344
+ float delta = oldLeft.x - newLeft.x;
345
+ marginOffset.x += -delta / lossyScale.x;
346
+ //Debug.Log("Left Margin H0:" + handlePoints[0] + " H1:" + handlePoints[1]);
347
+ hasChanged = true;
348
+ }
349
+
350
+ // TOP HANDLE
351
+ Vector3 oldTop = (m_HandlePoints[1] + m_HandlePoints[2]) * 0.5f;
352
+ Vector3 newTop = Handles.FreeMoveHandle(oldTop, Quaternion.identity, HandleUtility.GetHandleSize(m_RectTransform.position) * 0.05f, Vector3.zero, Handles.DotHandleCap);
353
+ if (oldTop != newTop)
354
+ {
355
+ float delta = oldTop.y - newTop.y;
356
+ marginOffset.y += delta / lossyScale.y;
357
+ //Debug.Log("Top Margin H1:" + handlePoints[1] + " H2:" + handlePoints[2]);
358
+ hasChanged = true;
359
+ }
360
+
361
+ // RIGHT HANDLE
362
+ Vector3 oldRight = (m_HandlePoints[2] + m_HandlePoints[3]) * 0.5f;
363
+ Vector3 newRight = Handles.FreeMoveHandle(oldRight, Quaternion.identity, HandleUtility.GetHandleSize(m_RectTransform.position) * 0.05f, Vector3.zero, Handles.DotHandleCap);
364
+ if (oldRight != newRight)
365
+ {
366
+ float delta = oldRight.x - newRight.x;
367
+ marginOffset.z += delta / lossyScale.x;
368
+ hasChanged = true;
369
+ //Debug.Log("Right Margin H2:" + handlePoints[2] + " H3:" + handlePoints[3]);
370
+ }
371
+
372
+ // BOTTOM HANDLE
373
+ Vector3 oldBottom = (m_HandlePoints[3] + m_HandlePoints[0]) * 0.5f;
374
+ Vector3 newBottom = Handles.FreeMoveHandle(oldBottom, Quaternion.identity, HandleUtility.GetHandleSize(m_RectTransform.position) * 0.05f, Vector3.zero, Handles.DotHandleCap);
375
+ if (oldBottom != newBottom)
376
+ {
377
+ float delta = oldBottom.y - newBottom.y;
378
+ marginOffset.w += -delta / lossyScale.y;
379
+ hasChanged = true;
380
+ //Debug.Log("Bottom Margin H0:" + handlePoints[0] + " H3:" + handlePoints[3]);
381
+ }
382
+
383
+ if (hasChanged)
384
+ {
385
+ Undo.RecordObjects(new Object[] {m_RectTransform, m_TextComponent }, "Margin Changes");
386
+ m_TextComponent.margin = marginOffset;
387
+ EditorUtility.SetDirty(target);
388
+ }
389
+ }
390
+
391
+ protected void DrawTextInput()
392
+ {
393
+ EditorGUILayout.Space();
394
+
395
+ Rect rect = EditorGUILayout.GetControlRect(false, 22);
396
+ GUI.Label(rect, new GUIContent("<b>Text Input</b>"), TMP_UIStyleManager.sectionHeader);
397
+
398
+ EditorGUI.indentLevel = 0;
399
+
400
+ // If the text component is linked, disable the text input box.
401
+ if (m_ParentLinkedTextComponentProp.objectReferenceValue != null)
402
+ {
403
+ EditorGUILayout.HelpBox("The Text Input Box is disabled due to this text component being linked to another.", MessageType.Info);
404
+ }
405
+ else
406
+ {
407
+ // Display RTL Toggle
408
+ float labelWidth = EditorGUIUtility.labelWidth;
409
+ EditorGUIUtility.labelWidth = 110f;
410
+
411
+ m_IsRightToLeftProp.boolValue = EditorGUI.Toggle(new Rect(rect.width - 120, rect.y + 3, 130, 20), k_RtlToggleLabel, m_IsRightToLeftProp.boolValue);
412
+
413
+ EditorGUIUtility.labelWidth = labelWidth;
414
+
415
+ EditorGUI.BeginChangeCheck();
416
+ EditorGUILayout.PropertyField(m_TextProp, GUIContent.none);
417
+
418
+ if (EditorGUI.EndChangeCheck())
419
+ {
420
+ m_TextComponent.m_inputSource = TMP_Text.TextInputSources.Text;
421
+ m_TextComponent.m_isInputParsingRequired = true;
422
+ m_HavePropertiesChanged = true;
423
+ }
424
+
425
+ if (m_IsRightToLeftProp.boolValue)
426
+ {
427
+ // Copy source text to RTL string
428
+ m_RtlText = string.Empty;
429
+ string sourceText = m_TextProp.stringValue;
430
+
431
+ // Reverse Text displayed in Text Input Box
432
+ for (int i = 0; i < sourceText.Length; i++)
433
+ m_RtlText += sourceText[sourceText.Length - i - 1];
434
+
435
+ GUILayout.Label("RTL Text Input");
436
+
437
+ EditorGUI.BeginChangeCheck();
438
+ m_RtlText = EditorGUILayout.TextArea(m_RtlText, TMP_UIStyleManager.wrappingTextArea, GUILayout.Height(EditorGUI.GetPropertyHeight(m_TextProp) - EditorGUIUtility.singleLineHeight), GUILayout.ExpandWidth(true));
439
+
440
+ if (EditorGUI.EndChangeCheck())
441
+ {
442
+ // Convert RTL input
443
+ sourceText = string.Empty;
444
+
445
+ // Reverse Text displayed in Text Input Box
446
+ for (int i = 0; i < m_RtlText.Length; i++)
447
+ sourceText += m_RtlText[m_RtlText.Length - i - 1];
448
+
449
+ m_TextProp.stringValue = sourceText;
450
+ }
451
+ }
452
+
453
+ // TEXT STYLE
454
+ if (m_StyleNames != null)
455
+ {
456
+ rect = EditorGUILayout.GetControlRect(false, 17);
457
+
458
+ m_TextStyleIndexLookup.TryGetValue(m_TextStyleHashCodeProp.intValue, out m_StyleSelectionIndex);
459
+
460
+ EditorGUI.BeginChangeCheck();
461
+ m_StyleSelectionIndex = EditorGUI.Popup(rect, k_StyleLabel, m_StyleSelectionIndex, m_StyleNames);
462
+ if (EditorGUI.EndChangeCheck())
463
+ {
464
+ m_TextStyleHashCodeProp.intValue = m_Styles[m_StyleSelectionIndex].hashCode;
465
+ m_TextComponent.m_TextStyle = m_Styles[m_StyleSelectionIndex];
466
+ m_HavePropertiesChanged = true;
467
+ }
468
+ }
469
+ }
470
+ }
471
+
472
+ protected void DrawMainSettings()
473
+ {
474
+ // MAIN SETTINGS SECTION
475
+ GUILayout.Label(new GUIContent("<b>Main Settings</b>"), TMP_UIStyleManager.sectionHeader);
476
+
477
+ //EditorGUI.indentLevel += 1;
478
+
479
+ DrawFont();
480
+
481
+ DrawColor();
482
+
483
+ DrawSpacing();
484
+
485
+ DrawAlignment();
486
+
487
+ DrawWrappingOverflow();
488
+
489
+ DrawTextureMapping();
490
+
491
+ //EditorGUI.indentLevel -= 1;
492
+ }
493
+
494
+ void DrawFont()
495
+ {
496
+ bool isFontAssetDirty = false;
497
+
498
+ // FONT ASSET
499
+ EditorGUI.BeginChangeCheck();
500
+ EditorGUILayout.PropertyField(m_FontAssetProp, k_FontAssetLabel);
501
+ if (EditorGUI.EndChangeCheck())
502
+ {
503
+ m_HavePropertiesChanged = true;
504
+ m_HasFontAssetChangedProp.boolValue = true;
505
+
506
+ // Get new Material Presets for the new font asset
507
+ m_MaterialPresetNames = GetMaterialPresets();
508
+ m_MaterialPresetSelectionIndex = 0;
509
+
510
+ isFontAssetDirty = true;
511
+ }
512
+
513
+ Rect rect;
514
+
515
+ // MATERIAL PRESET
516
+ if (m_MaterialPresetNames != null && !isFontAssetDirty )
517
+ {
518
+ EditorGUI.BeginChangeCheck();
519
+ rect = EditorGUILayout.GetControlRect(false, 17);
520
+
521
+ float oldHeight = EditorStyles.popup.fixedHeight;
522
+ EditorStyles.popup.fixedHeight = rect.height;
523
+
524
+ int oldSize = EditorStyles.popup.fontSize;
525
+ EditorStyles.popup.fontSize = 11;
526
+
527
+ if (m_FontSharedMaterialProp.objectReferenceValue != null)
528
+ m_MaterialPresetIndexLookup.TryGetValue(m_FontSharedMaterialProp.objectReferenceValue.GetInstanceID(), out m_MaterialPresetSelectionIndex);
529
+
530
+ m_MaterialPresetSelectionIndex = EditorGUI.Popup(rect, k_MaterialPresetLabel, m_MaterialPresetSelectionIndex, m_MaterialPresetNames);
531
+ if (EditorGUI.EndChangeCheck())
532
+ {
533
+ m_FontSharedMaterialProp.objectReferenceValue = m_MaterialPresets[m_MaterialPresetSelectionIndex];
534
+ m_HavePropertiesChanged = true;
535
+ }
536
+
537
+ EditorStyles.popup.fixedHeight = oldHeight;
538
+ EditorStyles.popup.fontSize = oldSize;
539
+ }
540
+
541
+ // FONT STYLE
542
+ EditorGUI.BeginChangeCheck();
543
+
544
+ int v1, v2, v3, v4, v5, v6, v7;
545
+
546
+ if (EditorGUIUtility.wideMode)
547
+ {
548
+ rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight + 2f);
549
+
550
+ EditorGUI.PrefixLabel(rect, k_FontStyleLabel);
551
+
552
+ int styleValue = m_FontStyleProp.intValue;
553
+
554
+ rect.x += EditorGUIUtility.labelWidth;
555
+ rect.width -= EditorGUIUtility.labelWidth;
556
+
557
+ rect.width = Mathf.Max(25f, rect.width / 7f);
558
+
559
+ v1 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 1) == 1, k_BoldLabel, TMP_UIStyleManager.alignmentButtonLeft) ? 1 : 0; // Bold
560
+ rect.x += rect.width;
561
+ v2 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 2) == 2, k_ItalicLabel, TMP_UIStyleManager.alignmentButtonMid) ? 2 : 0; // Italics
562
+ rect.x += rect.width;
563
+ v3 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 4) == 4, k_UnderlineLabel, TMP_UIStyleManager.alignmentButtonMid) ? 4 : 0; // Underline
564
+ rect.x += rect.width;
565
+ v7 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 64) == 64, k_StrikethroughLabel, TMP_UIStyleManager.alignmentButtonRight) ? 64 : 0; // Strikethrough
566
+ rect.x += rect.width;
567
+
568
+ int selected = 0;
569
+
570
+ EditorGUI.BeginChangeCheck();
571
+ v4 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 8) == 8, k_LowercaseLabel, TMP_UIStyleManager.alignmentButtonLeft) ? 8 : 0; // Lowercase
572
+ if (EditorGUI.EndChangeCheck() && v4 > 0)
573
+ {
574
+ selected = v4;
575
+ }
576
+ rect.x += rect.width;
577
+ EditorGUI.BeginChangeCheck();
578
+ v5 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 16) == 16, k_UppercaseLabel, TMP_UIStyleManager.alignmentButtonMid) ? 16 : 0; // Uppercase
579
+ if (EditorGUI.EndChangeCheck() && v5 > 0)
580
+ {
581
+ selected = v5;
582
+ }
583
+ rect.x += rect.width;
584
+ EditorGUI.BeginChangeCheck();
585
+ v6 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 32) == 32, k_SmallcapsLabel, TMP_UIStyleManager.alignmentButtonRight) ? 32 : 0; // Smallcaps
586
+ if (EditorGUI.EndChangeCheck() && v6 > 0)
587
+ {
588
+ selected = v6;
589
+ }
590
+
591
+ if (selected > 0)
592
+ {
593
+ v4 = selected == 8 ? 8 : 0;
594
+ v5 = selected == 16 ? 16 : 0;
595
+ v6 = selected == 32 ? 32 : 0;
596
+ }
597
+ }
598
+ else
599
+ {
600
+ rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight + 2f);
601
+
602
+ EditorGUI.PrefixLabel(rect, k_FontStyleLabel);
603
+
604
+ int styleValue = m_FontStyleProp.intValue;
605
+
606
+ rect.x += EditorGUIUtility.labelWidth;
607
+ rect.width -= EditorGUIUtility.labelWidth;
608
+ rect.width = Mathf.Max(25f, rect.width / 4f);
609
+
610
+ v1 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 1) == 1, k_BoldLabel, TMP_UIStyleManager.alignmentButtonLeft) ? 1 : 0; // Bold
611
+ rect.x += rect.width;
612
+ v2 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 2) == 2, k_ItalicLabel, TMP_UIStyleManager.alignmentButtonMid) ? 2 : 0; // Italics
613
+ rect.x += rect.width;
614
+ v3 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 4) == 4, k_UnderlineLabel, TMP_UIStyleManager.alignmentButtonMid) ? 4 : 0; // Underline
615
+ rect.x += rect.width;
616
+ v7 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 64) == 64, k_StrikethroughLabel, TMP_UIStyleManager.alignmentButtonRight) ? 64 : 0; // Strikethrough
617
+
618
+ rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight + 2f);
619
+
620
+ rect.x += EditorGUIUtility.labelWidth;
621
+ rect.width -= EditorGUIUtility.labelWidth;
622
+
623
+ rect.width = Mathf.Max(25f, rect.width / 4f);
624
+
625
+ int selected = 0;
626
+
627
+ EditorGUI.BeginChangeCheck();
628
+ v4 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 8) == 8, k_LowercaseLabel, TMP_UIStyleManager.alignmentButtonLeft) ? 8 : 0; // Lowercase
629
+ if (EditorGUI.EndChangeCheck() && v4 > 0)
630
+ {
631
+ selected = v4;
632
+ }
633
+ rect.x += rect.width;
634
+ EditorGUI.BeginChangeCheck();
635
+ v5 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 16) == 16, k_UppercaseLabel, TMP_UIStyleManager.alignmentButtonMid) ? 16 : 0; // Uppercase
636
+ if (EditorGUI.EndChangeCheck() && v5 > 0)
637
+ {
638
+ selected = v5;
639
+ }
640
+ rect.x += rect.width;
641
+ EditorGUI.BeginChangeCheck();
642
+ v6 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 32) == 32, k_SmallcapsLabel, TMP_UIStyleManager.alignmentButtonRight) ? 32 : 0; // Smallcaps
643
+ if (EditorGUI.EndChangeCheck() && v6 > 0)
644
+ {
645
+ selected = v6;
646
+ }
647
+
648
+ if (selected > 0)
649
+ {
650
+ v4 = selected == 8 ? 8 : 0;
651
+ v5 = selected == 16 ? 16 : 0;
652
+ v6 = selected == 32 ? 32 : 0;
653
+ }
654
+ }
655
+
656
+ if (EditorGUI.EndChangeCheck())
657
+ {
658
+ m_FontStyleProp.intValue = v1 + v2 + v3 + v4 + v5 + v6 + v7;
659
+ m_HavePropertiesChanged = true;
660
+ }
661
+
662
+ // FONT SIZE
663
+ EditorGUI.BeginChangeCheck();
664
+
665
+ EditorGUI.BeginDisabledGroup(m_AutoSizingProp.boolValue);
666
+ EditorGUILayout.PropertyField(m_FontSizeProp, k_FontSizeLabel, GUILayout.MaxWidth(EditorGUIUtility.labelWidth + 50f));
667
+ EditorGUI.EndDisabledGroup();
668
+
669
+ if (EditorGUI.EndChangeCheck())
670
+ {
671
+ float fontSize = Mathf.Clamp(m_FontSizeProp.floatValue, 0, 32767);
672
+
673
+ m_FontSizeProp.floatValue = fontSize;
674
+ m_FontSizeBaseProp.floatValue = fontSize;
675
+ m_HavePropertiesChanged = true;
676
+ }
677
+
678
+ EditorGUI.indentLevel += 1;
679
+
680
+ EditorGUI.BeginChangeCheck();
681
+ EditorGUILayout.PropertyField(m_AutoSizingProp, k_AutoSizeLabel);
682
+ if (EditorGUI.EndChangeCheck())
683
+ {
684
+ if (m_AutoSizingProp.boolValue == false)
685
+ m_FontSizeProp.floatValue = m_FontSizeBaseProp.floatValue;
686
+
687
+ m_HavePropertiesChanged = true;
688
+ }
689
+
690
+ // Show auto sizing options
691
+ if (m_AutoSizingProp.boolValue)
692
+ {
693
+ rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight);
694
+
695
+ EditorGUI.PrefixLabel(rect, k_AutoSizeOptionsLabel);
696
+
697
+ int previousIndent = EditorGUI.indentLevel;
698
+
699
+ EditorGUI.indentLevel = 0;
700
+
701
+ rect.width = (rect.width - EditorGUIUtility.labelWidth) / 4f;
702
+ rect.x += EditorGUIUtility.labelWidth;
703
+
704
+ EditorGUIUtility.labelWidth = 24;
705
+ EditorGUI.BeginChangeCheck();
706
+ EditorGUI.PropertyField(rect, m_FontSizeMinProp, k_MinLabel);
707
+ if (EditorGUI.EndChangeCheck())
708
+ {
709
+ float minSize = m_FontSizeMinProp.floatValue;
710
+
711
+ minSize = Mathf.Max(0, minSize);
712
+
713
+ m_FontSizeMinProp.floatValue = Mathf.Min(minSize, m_FontSizeMaxProp.floatValue);
714
+ m_HavePropertiesChanged = true;
715
+ }
716
+ rect.x += rect.width;
717
+
718
+ EditorGUIUtility.labelWidth = 27;
719
+ EditorGUI.BeginChangeCheck();
720
+ EditorGUI.PropertyField(rect, m_FontSizeMaxProp, k_MaxLabel);
721
+ if (EditorGUI.EndChangeCheck())
722
+ {
723
+ float maxSize = Mathf.Clamp(m_FontSizeMaxProp.floatValue, 0, 32767);
724
+
725
+ m_FontSizeMaxProp.floatValue = Mathf.Max(m_FontSizeMinProp.floatValue, maxSize);
726
+ m_HavePropertiesChanged = true;
727
+ }
728
+ rect.x += rect.width;
729
+
730
+ EditorGUI.BeginChangeCheck();
731
+ EditorGUIUtility.labelWidth = 36;
732
+ EditorGUI.PropertyField(rect, m_CharWidthMaxAdjProp, k_WdLabel);
733
+ rect.x += rect.width;
734
+ EditorGUIUtility.labelWidth = 28;
735
+ EditorGUI.PropertyField(rect, m_LineSpacingMaxProp, k_LineLabel);
736
+
737
+ EditorGUIUtility.labelWidth = 0;
738
+
739
+ if (EditorGUI.EndChangeCheck())
740
+ {
741
+ m_CharWidthMaxAdjProp.floatValue = Mathf.Clamp(m_CharWidthMaxAdjProp.floatValue, 0, 50);
742
+ m_LineSpacingMaxProp.floatValue = Mathf.Min(0, m_LineSpacingMaxProp.floatValue);
743
+ m_HavePropertiesChanged = true;
744
+ }
745
+
746
+ EditorGUI.indentLevel = previousIndent;
747
+ }
748
+
749
+ EditorGUI.indentLevel -= 1;
750
+
751
+
752
+
753
+ EditorGUILayout.Space();
754
+ }
755
+
756
+ void DrawColor()
757
+ {
758
+ // FACE VERTEX COLOR
759
+ EditorGUI.BeginChangeCheck();
760
+ Color vertexColor = EditorGUILayout.ColorField(k_BaseColorLabel, m_FontColorProp.colorValue, false, true, false);
761
+ if (EditorGUI.EndChangeCheck())
762
+ {
763
+ m_FontColorProp.colorValue = vertexColor;
764
+ m_HavePropertiesChanged = true;
765
+ }
766
+
767
+ EditorGUI.BeginChangeCheck();
768
+ EditorGUILayout.PropertyField(m_EnableVertexGradientProp, k_ColorGradientLabel);
769
+ if (EditorGUI.EndChangeCheck())
770
+ {
771
+ m_HavePropertiesChanged = true;
772
+ }
773
+
774
+ EditorGUIUtility.fieldWidth = 0;
775
+
776
+ if (m_EnableVertexGradientProp.boolValue)
777
+ {
778
+ EditorGUI.indentLevel += 1;
779
+
780
+ EditorGUI.BeginChangeCheck();
781
+
782
+ EditorGUILayout.PropertyField(m_FontColorGradientPresetProp, k_ColorPresetLabel);
783
+
784
+ SerializedObject obj = null;
785
+
786
+ SerializedProperty colorMode;
787
+
788
+ SerializedProperty topLeft;
789
+ SerializedProperty topRight;
790
+ SerializedProperty bottomLeft;
791
+ SerializedProperty bottomRight;
792
+
793
+ if (m_FontColorGradientPresetProp.objectReferenceValue == null)
794
+ {
795
+ colorMode = m_ColorModeProp;
796
+ topLeft = m_FontColorGradientProp.FindPropertyRelative("topLeft");
797
+ topRight = m_FontColorGradientProp.FindPropertyRelative("topRight");
798
+ bottomLeft = m_FontColorGradientProp.FindPropertyRelative("bottomLeft");
799
+ bottomRight = m_FontColorGradientProp.FindPropertyRelative("bottomRight");
800
+ }
801
+ else
802
+ {
803
+ obj = new SerializedObject(m_FontColorGradientPresetProp.objectReferenceValue);
804
+ colorMode = obj.FindProperty("colorMode");
805
+ topLeft = obj.FindProperty("topLeft");
806
+ topRight = obj.FindProperty("topRight");
807
+ bottomLeft = obj.FindProperty("bottomLeft");
808
+ bottomRight = obj.FindProperty("bottomRight");
809
+ }
810
+
811
+ EditorGUILayout.PropertyField(colorMode, k_ColorModeLabel);
812
+
813
+ var rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2));
814
+
815
+ EditorGUI.PrefixLabel(rect, k_CorenerColorsLabel);
816
+
817
+ rect.x += EditorGUIUtility.labelWidth;
818
+ rect.width = rect.width - EditorGUIUtility.labelWidth;
819
+
820
+ switch ((ColorMode)colorMode.enumValueIndex)
821
+ {
822
+ case ColorMode.Single:
823
+ TMP_EditorUtility.DrawColorProperty(rect, topLeft);
824
+
825
+ topRight.colorValue = topLeft.colorValue;
826
+ bottomLeft.colorValue = topLeft.colorValue;
827
+ bottomRight.colorValue = topLeft.colorValue;
828
+ break;
829
+ case ColorMode.HorizontalGradient:
830
+ rect.width /= 2f;
831
+
832
+ TMP_EditorUtility.DrawColorProperty(rect, topLeft);
833
+
834
+ rect.x += rect.width;
835
+
836
+ TMP_EditorUtility.DrawColorProperty(rect, topRight);
837
+
838
+ bottomLeft.colorValue = topLeft.colorValue;
839
+ bottomRight.colorValue = topRight.colorValue;
840
+ break;
841
+ case ColorMode.VerticalGradient:
842
+ TMP_EditorUtility.DrawColorProperty(rect, topLeft);
843
+
844
+ rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2));
845
+ rect.x += EditorGUIUtility.labelWidth;
846
+
847
+ TMP_EditorUtility.DrawColorProperty(rect, bottomLeft);
848
+
849
+ topRight.colorValue = topLeft.colorValue;
850
+ bottomRight.colorValue = bottomLeft.colorValue;
851
+ break;
852
+ case ColorMode.FourCornersGradient:
853
+ rect.width /= 2f;
854
+
855
+ TMP_EditorUtility.DrawColorProperty(rect, topLeft);
856
+
857
+ rect.x += rect.width;
858
+
859
+ TMP_EditorUtility.DrawColorProperty(rect, topRight);
860
+
861
+ rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2));
862
+ rect.x += EditorGUIUtility.labelWidth;
863
+ rect.width = (rect.width - EditorGUIUtility.labelWidth) / 2f;
864
+
865
+ TMP_EditorUtility.DrawColorProperty(rect, bottomLeft);
866
+
867
+ rect.x += rect.width;
868
+
869
+ TMP_EditorUtility.DrawColorProperty(rect, bottomRight);
870
+ break;
871
+ }
872
+
873
+ if (EditorGUI.EndChangeCheck())
874
+ {
875
+ m_HavePropertiesChanged = true;
876
+ if (obj != null)
877
+ {
878
+ obj.ApplyModifiedProperties();
879
+ TMPro_EventManager.ON_COLOR_GRADIENT_PROPERTY_CHANGED(m_FontColorGradientPresetProp.objectReferenceValue as TMP_ColorGradient);
880
+ }
881
+ }
882
+
883
+ EditorGUI.indentLevel -= 1;
884
+ }
885
+
886
+ EditorGUILayout.PropertyField(m_OverrideHtmlColorProp, k_OverrideTagsLabel);
887
+
888
+ EditorGUILayout.Space();
889
+ }
890
+
891
+ void DrawSpacing()
892
+ {
893
+ // CHARACTER, LINE & PARAGRAPH SPACING
894
+ EditorGUI.BeginChangeCheck();
895
+
896
+ Rect rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight);
897
+
898
+ EditorGUI.PrefixLabel(rect, k_SpacingOptionsLabel);
899
+
900
+ int oldIndent = EditorGUI.indentLevel;
901
+ EditorGUI.indentLevel = 0;
902
+
903
+ rect.x += EditorGUIUtility.labelWidth;
904
+ rect.width = (rect.width - EditorGUIUtility.labelWidth - 3f) / 2f;
905
+
906
+ EditorGUIUtility.labelWidth = Mathf.Min(rect.width * 0.55f, 80f);
907
+
908
+ EditorGUI.PropertyField(rect, m_CharacterSpacingProp, k_CharacterSpacingLabel);
909
+ rect.x += rect.width + 3f;
910
+ EditorGUI.PropertyField(rect, m_WordSpacingProp, k_WordSpacingLabel);
911
+
912
+ rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight);
913
+ EditorGUIUtility.labelWidth = 0;
914
+ rect.x += EditorGUIUtility.labelWidth;
915
+ rect.width = (rect.width - EditorGUIUtility.labelWidth -3f) / 2f;
916
+ EditorGUIUtility.labelWidth = Mathf.Min(rect.width * 0.55f, 80f);
917
+
918
+ EditorGUI.PropertyField(rect, m_LineSpacingProp, k_LineSpacingLabel);
919
+ rect.x += rect.width + 3f;
920
+ EditorGUI.PropertyField(rect, m_ParagraphSpacingProp, k_ParagraphSpacingLabel);
921
+
922
+ EditorGUIUtility.labelWidth = 0;
923
+ EditorGUI.indentLevel = oldIndent;
924
+
925
+ if (EditorGUI.EndChangeCheck())
926
+ {
927
+ m_HavePropertiesChanged = true;
928
+ }
929
+
930
+ EditorGUILayout.Space();
931
+ }
932
+
933
+ void DrawAlignment()
934
+ {
935
+ // TEXT ALIGNMENT
936
+ EditorGUI.BeginChangeCheck();
937
+
938
+ Rect rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.currentViewWidth > 504 ? 20 : 40 + 3);
939
+
940
+ EditorGUI.PrefixLabel(rect, k_AlignmentLabel);
941
+ rect.x += EditorGUIUtility.labelWidth;
942
+
943
+ EditorGUI.PropertyField(rect, m_HorizontalAlignmentProp, GUIContent.none);
944
+ EditorGUI.PropertyField(rect, m_VerticalAlignmentProp, GUIContent.none);
945
+
946
+ // WRAPPING RATIOS shown if Justified mode is selected.
947
+ if (((HorizontalAlignmentOptions)m_HorizontalAlignmentProp.intValue & HorizontalAlignmentOptions.Justified) == HorizontalAlignmentOptions.Justified || ((HorizontalAlignmentOptions)m_HorizontalAlignmentProp.intValue & HorizontalAlignmentOptions.Flush) == HorizontalAlignmentOptions.Flush)
948
+ DrawPropertySlider(k_WrapMixLabel, m_WordWrappingRatiosProp);
949
+
950
+ if (EditorGUI.EndChangeCheck())
951
+ m_HavePropertiesChanged = true;
952
+
953
+ EditorGUILayout.Space();
954
+ }
955
+
956
+ void DrawWrappingOverflow()
957
+ {
958
+ // TEXT WRAPPING
959
+ EditorGUI.BeginChangeCheck();
960
+ int wrapSelection = EditorGUILayout.Popup(k_WrappingLabel, m_EnableWordWrappingProp.boolValue ? 1 : 0, k_WrappingOptions);
961
+ if (EditorGUI.EndChangeCheck())
962
+ {
963
+ m_EnableWordWrappingProp.boolValue = wrapSelection == 1;
964
+ m_HavePropertiesChanged = true;
965
+ m_TextComponent.m_isInputParsingRequired = true;
966
+ }
967
+
968
+ // TEXT OVERFLOW
969
+ EditorGUI.BeginChangeCheck();
970
+
971
+ if ((TextOverflowModes)m_TextOverflowModeProp.enumValueIndex == TextOverflowModes.Linked)
972
+ {
973
+ EditorGUILayout.BeginHorizontal();
974
+
975
+ float fieldWidth = EditorGUIUtility.fieldWidth;
976
+ EditorGUIUtility.fieldWidth = 65;
977
+ EditorGUILayout.PropertyField(m_TextOverflowModeProp, k_OverflowLabel);
978
+ EditorGUIUtility.fieldWidth = fieldWidth;
979
+
980
+ EditorGUILayout.PropertyField(m_LinkedTextComponentProp, GUIContent.none);
981
+
982
+ EditorGUILayout.EndHorizontal();
983
+
984
+ if (GUI.changed)
985
+ {
986
+ TMP_Text linkedComponent = m_LinkedTextComponentProp.objectReferenceValue as TMP_Text;
987
+
988
+ if (linkedComponent == null)
989
+ {
990
+ m_LinkedTextComponentProp.objectReferenceValue = null;
991
+
992
+ if (m_PreviousLinkedTextComponent != null)
993
+ m_TextComponent.ReleaseLinkedTextComponent(m_PreviousLinkedTextComponent);
994
+ }
995
+ else if (m_TextComponent.IsSelfOrLinkedAncestor(linkedComponent))
996
+ {
997
+ m_LinkedTextComponentProp.objectReferenceValue = m_PreviousLinkedTextComponent;
998
+ }
999
+ else
1000
+ {
1001
+ if (m_PreviousLinkedTextComponent != null)
1002
+ m_TextComponent.ReleaseLinkedTextComponent(m_PreviousLinkedTextComponent);
1003
+
1004
+ m_LinkedTextComponentProp.objectReferenceValue = linkedComponent;
1005
+ linkedComponent.parentLinkedComponent = m_TextComponent;
1006
+ m_PreviousLinkedTextComponent = linkedComponent;
1007
+ }
1008
+ }
1009
+ }
1010
+ else if ((TextOverflowModes)m_TextOverflowModeProp.enumValueIndex == TextOverflowModes.Page)
1011
+ {
1012
+ EditorGUILayout.BeginHorizontal();
1013
+ EditorGUILayout.PropertyField(m_TextOverflowModeProp, k_OverflowLabel);
1014
+ EditorGUILayout.PropertyField(m_PageToDisplayProp, GUIContent.none);
1015
+ EditorGUILayout.EndHorizontal();
1016
+
1017
+ if (m_PreviousLinkedTextComponent)
1018
+ {
1019
+ m_TextComponent.ReleaseLinkedTextComponent(m_PreviousLinkedTextComponent);
1020
+
1021
+ m_TextComponent.linkedTextComponent = null;
1022
+ }
1023
+ }
1024
+ else
1025
+ {
1026
+ EditorGUILayout.PropertyField(m_TextOverflowModeProp, k_OverflowLabel);
1027
+
1028
+ if (m_PreviousLinkedTextComponent)
1029
+ {
1030
+ m_TextComponent.ReleaseLinkedTextComponent(m_PreviousLinkedTextComponent);
1031
+
1032
+ m_TextComponent.linkedTextComponent = null;
1033
+ }
1034
+ }
1035
+
1036
+ if (EditorGUI.EndChangeCheck())
1037
+ {
1038
+ m_HavePropertiesChanged = true;
1039
+ m_TextComponent.m_isInputParsingRequired = true;
1040
+ }
1041
+
1042
+ EditorGUILayout.Space();
1043
+ }
1044
+
1045
+ protected abstract void DrawExtraSettings();
1046
+
1047
+ protected void DrawMargins()
1048
+ {
1049
+ EditorGUI.BeginChangeCheck();
1050
+ DrawMarginProperty(m_MarginProp, k_MarginsLabel);
1051
+ if (EditorGUI.EndChangeCheck())
1052
+ {
1053
+ m_HavePropertiesChanged = true;
1054
+ }
1055
+
1056
+ EditorGUILayout.Space();
1057
+ }
1058
+
1059
+ protected void DrawGeometrySorting()
1060
+ {
1061
+ EditorGUI.BeginChangeCheck();
1062
+
1063
+ EditorGUILayout.PropertyField(m_GeometrySortingOrderProp, k_GeometrySortingLabel);
1064
+
1065
+ if (EditorGUI.EndChangeCheck())
1066
+ m_HavePropertiesChanged = true;
1067
+
1068
+ EditorGUILayout.Space();
1069
+ }
1070
+
1071
+ protected void DrawIsTextObjectScaleStatic()
1072
+ {
1073
+ EditorGUI.BeginChangeCheck();
1074
+
1075
+ EditorGUILayout.PropertyField(m_IsTextObjectScaleStaticProp, k_IsTextObjectScaleStatic);
1076
+
1077
+ if (EditorGUI.EndChangeCheck())
1078
+ {
1079
+ m_TextComponent.isTextObjectScaleStatic = m_IsTextObjectScaleStaticProp.boolValue;
1080
+ m_HavePropertiesChanged = true;
1081
+ }
1082
+
1083
+ EditorGUILayout.Space();
1084
+ }
1085
+
1086
+
1087
+ protected void DrawRichText()
1088
+ {
1089
+ EditorGUI.BeginChangeCheck();
1090
+
1091
+ EditorGUILayout.PropertyField(m_IsRichTextProp, k_RichTextLabel);
1092
+ if (EditorGUI.EndChangeCheck())
1093
+ m_HavePropertiesChanged = true;
1094
+ }
1095
+
1096
+ protected void DrawParsing()
1097
+ {
1098
+ EditorGUI.BeginChangeCheck();
1099
+ EditorGUILayout.PropertyField(m_EnableEscapeCharacterParsingProp, k_EscapeCharactersLabel);
1100
+ EditorGUILayout.PropertyField(m_UseMaxVisibleDescenderProp, k_VisibleDescenderLabel);
1101
+
1102
+ if (EditorGUI.EndChangeCheck())
1103
+ m_HavePropertiesChanged = true;
1104
+
1105
+ EditorGUILayout.Space();
1106
+ }
1107
+
1108
+ protected void DrawSpriteAsset()
1109
+ {
1110
+ EditorGUI.BeginChangeCheck();
1111
+
1112
+ EditorGUILayout.PropertyField(m_SpriteAssetProp, k_SpriteAssetLabel, true);
1113
+
1114
+ if (EditorGUI.EndChangeCheck())
1115
+ m_HavePropertiesChanged = true;
1116
+
1117
+ EditorGUILayout.Space();
1118
+ }
1119
+
1120
+ protected void DrawStyleSheet()
1121
+ {
1122
+ EditorGUI.BeginChangeCheck();
1123
+
1124
+ EditorGUILayout.PropertyField(m_StyleSheetAssetProp, k_StyleSheetAssetLabel, true);
1125
+
1126
+ if (EditorGUI.EndChangeCheck())
1127
+ {
1128
+ m_StyleNames = GetStyleNames();
1129
+ m_HavePropertiesChanged = true;
1130
+ }
1131
+
1132
+ EditorGUILayout.Space();
1133
+ }
1134
+
1135
+ protected void DrawTextureMapping()
1136
+ {
1137
+ // TEXTURE MAPPING OPTIONS
1138
+ EditorGUI.BeginChangeCheck();
1139
+ EditorGUILayout.PropertyField(m_HorizontalMappingProp, k_HorizontalMappingLabel);
1140
+ EditorGUILayout.PropertyField(m_VerticalMappingProp, k_VerticalMappingLabel);
1141
+ if (EditorGUI.EndChangeCheck())
1142
+ {
1143
+ m_HavePropertiesChanged = true;
1144
+ }
1145
+
1146
+ // UV OPTIONS
1147
+ if (m_HorizontalMappingProp.enumValueIndex > 0)
1148
+ {
1149
+ EditorGUI.BeginChangeCheck();
1150
+ EditorGUILayout.PropertyField(m_UvLineOffsetProp, k_LineOffsetLabel, GUILayout.MinWidth(70f));
1151
+ if (EditorGUI.EndChangeCheck())
1152
+ {
1153
+ m_HavePropertiesChanged = true;
1154
+ }
1155
+ }
1156
+
1157
+ EditorGUILayout.Space();
1158
+ }
1159
+
1160
+ protected void DrawKerning()
1161
+ {
1162
+ // KERNING
1163
+ EditorGUI.BeginChangeCheck();
1164
+ EditorGUILayout.PropertyField(m_EnableKerningProp, k_KerningLabel);
1165
+ if (EditorGUI.EndChangeCheck())
1166
+ {
1167
+ m_HavePropertiesChanged = true;
1168
+ }
1169
+ }
1170
+
1171
+ protected void DrawPadding()
1172
+ {
1173
+ // EXTRA PADDING
1174
+ EditorGUI.BeginChangeCheck();
1175
+ EditorGUILayout.PropertyField(m_EnableExtraPaddingProp, k_PaddingLabel);
1176
+ if (EditorGUI.EndChangeCheck())
1177
+ {
1178
+ m_HavePropertiesChanged = true;
1179
+ m_CheckPaddingRequiredProp.boolValue = true;
1180
+ }
1181
+ }
1182
+
1183
+ /// <summary>
1184
+ /// Method to retrieve the material presets that match the currently selected font asset.
1185
+ /// </summary>
1186
+ protected GUIContent[] GetMaterialPresets()
1187
+ {
1188
+ TMP_FontAsset fontAsset = m_FontAssetProp.objectReferenceValue as TMP_FontAsset;
1189
+ if (fontAsset == null) return null;
1190
+
1191
+ m_MaterialPresets = TMP_EditorUtility.FindMaterialReferences(fontAsset);
1192
+ m_MaterialPresetNames = new GUIContent[m_MaterialPresets.Length];
1193
+
1194
+ m_MaterialPresetIndexLookup.Clear();
1195
+
1196
+ for (int i = 0; i < m_MaterialPresetNames.Length; i++)
1197
+ {
1198
+ m_MaterialPresetNames[i] = new GUIContent(m_MaterialPresets[i].name);
1199
+
1200
+ m_MaterialPresetIndexLookup.Add(m_MaterialPresets[i].GetInstanceID(), i);
1201
+
1202
+ //if (m_TargetMaterial.GetInstanceID() == m_MaterialPresets[i].GetInstanceID())
1203
+ // m_MaterialPresetSelectionIndex = i;
1204
+ }
1205
+
1206
+ m_IsPresetListDirty = false;
1207
+
1208
+ return m_MaterialPresetNames;
1209
+ }
1210
+
1211
+ protected GUIContent[] GetStyleNames()
1212
+ {
1213
+ k_AvailableStyles.Clear();
1214
+ m_TextStyleIndexLookup.Clear();
1215
+ m_Styles.Clear();
1216
+
1217
+ // First style on the list is always the Normal default style.
1218
+ TMP_Style styleNormal = TMP_Style.NormalStyle;
1219
+
1220
+ m_Styles.Add(styleNormal);
1221
+ m_TextStyleIndexLookup.Add(styleNormal.hashCode, 0);
1222
+
1223
+ k_AvailableStyles.Add(styleNormal.hashCode, styleNormal);
1224
+
1225
+ // Get styles from Style Sheet potentially assigned to the text object.
1226
+ TMP_StyleSheet localStyleSheet = (TMP_StyleSheet)m_StyleSheetAssetProp.objectReferenceValue;
1227
+
1228
+ if (localStyleSheet != null)
1229
+ {
1230
+ int styleCount = localStyleSheet.styles.Count;
1231
+
1232
+ for (int i = 0; i < styleCount; i++)
1233
+ {
1234
+ TMP_Style style = localStyleSheet.styles[i];
1235
+
1236
+ if (k_AvailableStyles.ContainsKey(style.hashCode) == false)
1237
+ {
1238
+ k_AvailableStyles.Add(style.hashCode, style);
1239
+ m_Styles.Add(style);
1240
+ m_TextStyleIndexLookup.Add(style.hashCode, m_TextStyleIndexLookup.Count);
1241
+ }
1242
+ }
1243
+ }
1244
+
1245
+ // Get styles from TMP Settings' default style sheet.
1246
+ TMP_StyleSheet globalStyleSheet = TMP_Settings.defaultStyleSheet;
1247
+
1248
+ if (globalStyleSheet != null)
1249
+ {
1250
+ int styleCount = globalStyleSheet.styles.Count;
1251
+
1252
+ for (int i = 0; i < styleCount; i++)
1253
+ {
1254
+ TMP_Style style = globalStyleSheet.styles[i];
1255
+
1256
+ if (k_AvailableStyles.ContainsKey(style.hashCode) == false)
1257
+ {
1258
+ k_AvailableStyles.Add(style.hashCode, style);
1259
+ m_Styles.Add(style);
1260
+ m_TextStyleIndexLookup.Add(style.hashCode, m_TextStyleIndexLookup.Count);
1261
+ }
1262
+ }
1263
+ }
1264
+
1265
+ // Create array that will contain the list of available styles.
1266
+ GUIContent[] styleNames = k_AvailableStyles.Values.Select(item => new GUIContent(item.name)).ToArray();
1267
+
1268
+ // Set text style index
1269
+ m_TextStyleIndexLookup.TryGetValue(m_TextStyleHashCodeProp.intValue, out m_StyleSelectionIndex);
1270
+
1271
+ return styleNames;
1272
+ }
1273
+
1274
+ // DRAW MARGIN PROPERTY
1275
+ protected void DrawMarginProperty(SerializedProperty property, GUIContent label)
1276
+ {
1277
+ Rect rect = EditorGUILayout.GetControlRect(false, 2 * 18);
1278
+
1279
+ EditorGUI.BeginProperty(rect, label, property);
1280
+
1281
+ Rect pos0 = new Rect(rect.x, rect.y + 2, rect.width - 15, 18);
1282
+
1283
+ float width = rect.width + 3;
1284
+ pos0.width = EditorGUIUtility.labelWidth;
1285
+ EditorGUI.PrefixLabel(pos0, label);
1286
+
1287
+ Vector4 margins = property.vector4Value;
1288
+
1289
+ float widthB = width - EditorGUIUtility.labelWidth;
1290
+ float fieldWidth = widthB / 4;
1291
+ pos0.width = Mathf.Max(fieldWidth - 5, 45f);
1292
+
1293
+ // Labels
1294
+ pos0.x = EditorGUIUtility.labelWidth + 15;
1295
+ margins.x = DrawMarginField(pos0, "Left", margins.x);
1296
+
1297
+ pos0.x += fieldWidth;
1298
+ margins.y = DrawMarginField(pos0, "Top", margins.y);
1299
+
1300
+ pos0.x += fieldWidth;
1301
+ margins.z = DrawMarginField(pos0, "Right", margins.z);
1302
+
1303
+ pos0.x += fieldWidth;
1304
+ margins.w = DrawMarginField(pos0, "Bottom", margins.w);
1305
+
1306
+ property.vector4Value = margins;
1307
+
1308
+ EditorGUI.EndProperty();
1309
+ }
1310
+
1311
+ float DrawMarginField(Rect position, string label, float value)
1312
+ {
1313
+ int controlId = GUIUtility.GetControlID(FocusType.Keyboard, position);
1314
+ EditorGUI.PrefixLabel(position, controlId, new GUIContent(label));
1315
+
1316
+ Rect dragZone = new Rect(position.x, position.y, position.width, position.height);
1317
+ position.y += EditorGUIUtility.singleLineHeight;
1318
+
1319
+ return EditorGUI.DoFloatField(EditorGUI.s_RecycledEditor, position, dragZone, controlId, value, EditorGUI.kFloatFieldFormatString, EditorStyles.numberField, true);
1320
+ }
1321
+
1322
+ protected void DrawPropertySlider(GUIContent label, SerializedProperty property)
1323
+ {
1324
+ Rect rect = EditorGUILayout.GetControlRect(false, 17);
1325
+
1326
+ GUIContent content = label ?? GUIContent.none;
1327
+ EditorGUI.Slider(new Rect(rect.x, rect.y, rect.width, rect.height), property, 0.0f, 1.0f, content);
1328
+ }
1329
+
1330
+ protected abstract bool IsMixSelectionTypes();
1331
+
1332
+ // Special Handling of Undo / Redo Events.
1333
+ protected abstract void OnUndoRedo();
1334
+
1335
+ }
1336
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_BaseEditorPanel.cs.meta ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 91950f78729ab144aa36e94690b28fad
3
+ MonoImporter:
4
+ serializedVersion: 2
5
+ defaultReferences: []
6
+ executionOrder: 0
7
+ icon: {instanceID: 0}
8
+ userData:
9
+ assetBundleName:
10
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_BaseShaderGUI.cs ADDED
@@ -0,0 +1,551 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using UnityEngine;
2
+ using UnityEditor;
3
+
4
+ namespace TMPro.EditorUtilities
5
+ {
6
+ /// <summary>Base class for TextMesh Pro shader GUIs.</summary>
7
+ public abstract class TMP_BaseShaderGUI : ShaderGUI
8
+ {
9
+ /// <summary>Representation of a #pragma shader_feature.</summary>
10
+ /// <description>It is assumed that the first feature option is for no keyword (underscores).</description>
11
+ protected class ShaderFeature
12
+ {
13
+ public string undoLabel;
14
+
15
+ public GUIContent label;
16
+
17
+ /// <summary>The keyword labels, for display. Include the no-keyword as the first option.</summary>
18
+ public GUIContent[] keywordLabels;
19
+
20
+ /// <summary>The shader keywords. Exclude the no-keyword option.</summary>
21
+ public string[] keywords;
22
+
23
+ int m_State;
24
+
25
+ public bool Active
26
+ {
27
+ get { return m_State >= 0; }
28
+ }
29
+
30
+ public int State
31
+ {
32
+ get { return m_State; }
33
+ }
34
+
35
+ public void ReadState(Material material)
36
+ {
37
+ for (int i = 0; i < keywords.Length; i++)
38
+ {
39
+ if (material.IsKeywordEnabled(keywords[i]))
40
+ {
41
+ m_State = i;
42
+ return;
43
+ }
44
+ }
45
+
46
+ m_State = -1;
47
+ }
48
+
49
+ public void SetActive(bool active, Material material)
50
+ {
51
+ m_State = active ? 0 : -1;
52
+ SetStateKeywords(material);
53
+ }
54
+
55
+ public void DoPopup(MaterialEditor editor, Material material)
56
+ {
57
+ EditorGUI.BeginChangeCheck();
58
+ int selection = EditorGUILayout.Popup(label, m_State + 1, keywordLabels);
59
+ if (EditorGUI.EndChangeCheck())
60
+ {
61
+ m_State = selection - 1;
62
+ editor.RegisterPropertyChangeUndo(undoLabel);
63
+ SetStateKeywords(material);
64
+ }
65
+ }
66
+
67
+ void SetStateKeywords(Material material)
68
+ {
69
+ for (int i = 0; i < keywords.Length; i++)
70
+ {
71
+ if (i == m_State)
72
+ {
73
+ material.EnableKeyword(keywords[i]);
74
+ }
75
+ else
76
+ {
77
+ material.DisableKeyword(keywords[i]);
78
+ }
79
+ }
80
+ }
81
+ }
82
+
83
+ static GUIContent s_TempLabel = new GUIContent();
84
+
85
+ protected static bool s_DebugExtended;
86
+
87
+ static int s_UndoRedoCount, s_LastSeenUndoRedoCount;
88
+
89
+ static float[][] s_TempFloats =
90
+ {
91
+ null, new float[1], new float[2], new float[3], new float[4]
92
+ };
93
+
94
+ protected static GUIContent[] s_XywhVectorLabels =
95
+ {
96
+ new GUIContent("X"),
97
+ new GUIContent("Y"),
98
+ new GUIContent("W", "Width"),
99
+ new GUIContent("H", "Height")
100
+ };
101
+
102
+ protected static GUIContent[] s_LbrtVectorLabels =
103
+ {
104
+ new GUIContent("L", "Left"),
105
+ new GUIContent("B", "Bottom"),
106
+ new GUIContent("R", "Right"),
107
+ new GUIContent("T", "Top")
108
+ };
109
+
110
+ protected static GUIContent[] s_CullingTypeLabels =
111
+ {
112
+ new GUIContent("Off"),
113
+ new GUIContent("Front"),
114
+ new GUIContent("Back")
115
+ };
116
+
117
+ static TMP_BaseShaderGUI()
118
+ {
119
+ // Keep track of how many undo/redo events happened.
120
+ Undo.undoRedoPerformed += () => s_UndoRedoCount += 1;
121
+ }
122
+
123
+ bool m_IsNewGUI = true;
124
+
125
+ float m_DragAndDropMinY;
126
+
127
+ protected MaterialEditor m_Editor;
128
+
129
+ protected Material m_Material;
130
+
131
+ protected MaterialProperty[] m_Properties;
132
+
133
+ void PrepareGUI()
134
+ {
135
+ m_IsNewGUI = false;
136
+ ShaderUtilities.GetShaderPropertyIDs();
137
+
138
+ // New GUI just got constructed. This happens in response to a selection,
139
+ // but also after undo/redo events.
140
+ if (s_LastSeenUndoRedoCount != s_UndoRedoCount)
141
+ {
142
+ // There's been at least one undo/redo since the last time this GUI got constructed.
143
+ // Maybe the undo/redo was for this material? Assume that is was.
144
+ TMPro_EventManager.ON_MATERIAL_PROPERTY_CHANGED(true, m_Material as Material);
145
+ }
146
+
147
+ s_LastSeenUndoRedoCount = s_UndoRedoCount;
148
+ }
149
+
150
+ public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
151
+ {
152
+ m_Editor = materialEditor;
153
+ m_Material = materialEditor.target as Material;
154
+ this.m_Properties = properties;
155
+
156
+ if (m_IsNewGUI)
157
+ {
158
+ PrepareGUI();
159
+ }
160
+
161
+ DoDragAndDropBegin();
162
+ EditorGUI.BeginChangeCheck();
163
+ DoGUI();
164
+ if (EditorGUI.EndChangeCheck())
165
+ {
166
+ TMPro_EventManager.ON_MATERIAL_PROPERTY_CHANGED(true, m_Material);
167
+ }
168
+
169
+ DoDragAndDropEnd();
170
+ }
171
+
172
+ /// <summary>Override this method to create the specific shader GUI.</summary>
173
+ protected abstract void DoGUI();
174
+
175
+ static string[] s_PanelStateLabel = new string[] { "\t- <i>Click to collapse</i> -", "\t- <i>Click to expand</i> -" };
176
+
177
+ protected bool BeginPanel(string panel, bool expanded)
178
+ {
179
+ EditorGUI.indentLevel = 0;
180
+
181
+ EditorGUILayout.BeginVertical(EditorStyles.helpBox);
182
+ Rect r = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20, 18));
183
+ r.x += 20;
184
+ r.width += 6;
185
+
186
+ bool enabled = GUI.enabled;
187
+ GUI.enabled = true;
188
+ expanded = TMP_EditorUtility.EditorToggle(r, expanded, new GUIContent(panel), TMP_UIStyleManager.panelTitle);
189
+ r.width -= 30;
190
+ EditorGUI.LabelField(r, new GUIContent(expanded ? s_PanelStateLabel[0] : s_PanelStateLabel[1]), TMP_UIStyleManager.rightLabel);
191
+ GUI.enabled = enabled;
192
+
193
+ EditorGUI.indentLevel += 1;
194
+ EditorGUI.BeginDisabledGroup(false);
195
+
196
+ return expanded;
197
+ }
198
+
199
+ protected bool BeginPanel(string panel, ShaderFeature feature, bool expanded, bool readState = true)
200
+ {
201
+ EditorGUI.indentLevel = 0;
202
+
203
+ if (readState)
204
+ {
205
+ feature.ReadState(m_Material);
206
+ }
207
+
208
+ EditorGUI.BeginChangeCheck();
209
+
210
+ EditorGUILayout.BeginVertical(EditorStyles.helpBox);
211
+ GUILayout.BeginHorizontal();
212
+
213
+ Rect r = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20, 20, GUILayout.Width(20f)));
214
+ bool active = EditorGUI.Toggle(r, feature.Active);
215
+
216
+ if (EditorGUI.EndChangeCheck())
217
+ {
218
+ m_Editor.RegisterPropertyChangeUndo(feature.undoLabel);
219
+ feature.SetActive(active, m_Material);
220
+ }
221
+
222
+ r = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20, 18));
223
+ r.width += 6;
224
+
225
+ bool enabled = GUI.enabled;
226
+ GUI.enabled = true;
227
+ expanded = TMP_EditorUtility.EditorToggle(r, expanded, new GUIContent(panel), TMP_UIStyleManager.panelTitle);
228
+ r.width -= 10;
229
+ EditorGUI.LabelField(r, new GUIContent(expanded ? s_PanelStateLabel[0] : s_PanelStateLabel[1]), TMP_UIStyleManager.rightLabel);
230
+ GUI.enabled = enabled;
231
+
232
+ GUILayout.EndHorizontal();
233
+
234
+ EditorGUI.indentLevel += 1;
235
+ EditorGUI.BeginDisabledGroup(!active);
236
+
237
+ return expanded;
238
+ }
239
+
240
+ public void EndPanel()
241
+ {
242
+ EditorGUI.EndDisabledGroup();
243
+ EditorGUI.indentLevel -= 1;
244
+ EditorGUILayout.EndVertical();
245
+ }
246
+
247
+ MaterialProperty BeginProperty(string name)
248
+ {
249
+ MaterialProperty property = FindProperty(name, m_Properties);
250
+ EditorGUI.BeginChangeCheck();
251
+ EditorGUI.showMixedValue = property.hasMixedValue;
252
+ m_Editor.BeginAnimatedCheck(Rect.zero, property);
253
+
254
+ return property;
255
+ }
256
+
257
+ bool EndProperty()
258
+ {
259
+ m_Editor.EndAnimatedCheck();
260
+ EditorGUI.showMixedValue = false;
261
+ return EditorGUI.EndChangeCheck();
262
+ }
263
+
264
+ protected void DoPopup(string name, string label, GUIContent[] options)
265
+ {
266
+ MaterialProperty property = BeginProperty(name);
267
+ s_TempLabel.text = label;
268
+ int index = EditorGUILayout.Popup(s_TempLabel, (int)property.floatValue, options);
269
+ if (EndProperty())
270
+ {
271
+ property.floatValue = index;
272
+ }
273
+ }
274
+
275
+ protected void DoCubeMap(string name, string label)
276
+ {
277
+ DoTexture(name, label, typeof(Cubemap));
278
+ }
279
+
280
+ protected void DoTexture2D(string name, string label, bool withTilingOffset = false, string[] speedNames = null)
281
+ {
282
+ DoTexture(name, label, typeof(Texture2D), withTilingOffset, speedNames);
283
+ }
284
+
285
+ void DoTexture(string name, string label, System.Type type, bool withTilingOffset = false, string[] speedNames = null)
286
+ {
287
+ MaterialProperty property = FindProperty(name, m_Properties);
288
+ m_Editor.BeginAnimatedCheck(Rect.zero, property);
289
+
290
+ Rect rect = EditorGUILayout.GetControlRect(true, 60f);
291
+ float totalWidth = rect.width;
292
+ rect.width = EditorGUIUtility.labelWidth + 60f;
293
+ s_TempLabel.text = label;
294
+
295
+ EditorGUI.BeginChangeCheck();
296
+ Object tex = EditorGUI.ObjectField(rect, s_TempLabel, property.textureValue, type, false);
297
+ if (EditorGUI.EndChangeCheck())
298
+ {
299
+ property.textureValue = tex as Texture;
300
+ }
301
+
302
+ rect.x += rect.width + 4f;
303
+ rect.width = totalWidth - rect.width - 4f;
304
+ rect.height = EditorGUIUtility.singleLineHeight;
305
+
306
+ if (withTilingOffset)
307
+ {
308
+ DoTilingOffset(rect, property);
309
+ rect.y += (rect.height + 2f) * 2f;
310
+ }
311
+
312
+ m_Editor.EndAnimatedCheck();
313
+
314
+ if (speedNames != null)
315
+ {
316
+ DoUVSpeed(rect, speedNames);
317
+ }
318
+ }
319
+
320
+ void DoTilingOffset(Rect rect, MaterialProperty property)
321
+ {
322
+ float labelWidth = EditorGUIUtility.labelWidth;
323
+ int indentLevel = EditorGUI.indentLevel;
324
+ EditorGUI.indentLevel = 0;
325
+ EditorGUIUtility.labelWidth = Mathf.Min(40f, rect.width * 0.20f);
326
+
327
+ Vector4 vector = property.textureScaleAndOffset;
328
+
329
+ bool changed = false;
330
+ float[] values = s_TempFloats[2];
331
+
332
+ s_TempLabel.text = "Tiling";
333
+ Rect vectorRect = EditorGUI.PrefixLabel(rect, s_TempLabel);
334
+ values[0] = vector.x;
335
+ values[1] = vector.y;
336
+
337
+ EditorGUI.BeginChangeCheck();
338
+ EditorGUI.MultiFloatField(vectorRect, s_XywhVectorLabels, values);
339
+ if (EditorGUI.EndChangeCheck())
340
+ {
341
+ vector.x = values[0];
342
+ vector.y = values[1];
343
+ changed = true;
344
+ }
345
+
346
+ rect.y += rect.height + 2f;
347
+ s_TempLabel.text = "Offset";
348
+ vectorRect = EditorGUI.PrefixLabel(rect, s_TempLabel);
349
+ values[0] = vector.z;
350
+ values[1] = vector.w;
351
+
352
+ EditorGUI.BeginChangeCheck();
353
+ EditorGUI.MultiFloatField(vectorRect, s_XywhVectorLabels, values);
354
+ if (EditorGUI.EndChangeCheck())
355
+ {
356
+ vector.z = values[0];
357
+ vector.w = values[1];
358
+ changed = true;
359
+ }
360
+
361
+ if (changed)
362
+ {
363
+ property.textureScaleAndOffset = vector;
364
+ }
365
+
366
+ EditorGUIUtility.labelWidth = labelWidth;
367
+ EditorGUI.indentLevel = indentLevel;
368
+ }
369
+
370
+ protected void DoUVSpeed(Rect rect, string[] names)
371
+ {
372
+ float labelWidth = EditorGUIUtility.labelWidth;
373
+ int indentLevel = EditorGUI.indentLevel;
374
+ EditorGUI.indentLevel = 0;
375
+ EditorGUIUtility.labelWidth = Mathf.Min(40f, rect.width * 0.20f);
376
+
377
+ s_TempLabel.text = "Speed";
378
+ rect = EditorGUI.PrefixLabel(rect, s_TempLabel);
379
+
380
+ EditorGUIUtility.labelWidth = 13f;
381
+ rect.width = rect.width * 0.5f - 1f;
382
+ DoFloat(rect, names[0], "X");
383
+ rect.x += rect.width + 2f;
384
+ DoFloat(rect, names[1], "Y");
385
+ EditorGUIUtility.labelWidth = labelWidth;
386
+ EditorGUI.indentLevel = indentLevel;
387
+ }
388
+
389
+ protected void DoToggle(string name, string label)
390
+ {
391
+ MaterialProperty property = BeginProperty(name);
392
+ s_TempLabel.text = label;
393
+ bool value = EditorGUILayout.Toggle(s_TempLabel, property.floatValue == 1f);
394
+ if (EndProperty())
395
+ {
396
+ property.floatValue = value ? 1f : 0f;
397
+ }
398
+ }
399
+
400
+ protected void DoFloat(string name, string label)
401
+ {
402
+ MaterialProperty property = BeginProperty(name);
403
+ Rect rect = EditorGUILayout.GetControlRect();
404
+ rect.width = EditorGUIUtility.labelWidth + 55f;
405
+ s_TempLabel.text = label;
406
+ float value = EditorGUI.FloatField(rect, s_TempLabel, property.floatValue);
407
+ if (EndProperty())
408
+ {
409
+ property.floatValue = value;
410
+ }
411
+ }
412
+
413
+ protected void DoColor(string name, string label)
414
+ {
415
+ MaterialProperty property = BeginProperty(name);
416
+ s_TempLabel.text = label;
417
+ Color value = EditorGUI.ColorField(EditorGUILayout.GetControlRect(), s_TempLabel, property.colorValue, false, true, true);
418
+ if (EndProperty())
419
+ {
420
+ property.colorValue = value;
421
+ }
422
+ }
423
+
424
+ void DoFloat(Rect rect, string name, string label)
425
+ {
426
+ MaterialProperty property = BeginProperty(name);
427
+ s_TempLabel.text = label;
428
+ float value = EditorGUI.FloatField(rect, s_TempLabel, property.floatValue);
429
+ if (EndProperty())
430
+ {
431
+ property.floatValue = value;
432
+ }
433
+ }
434
+
435
+ protected void DoSlider(string name, string label)
436
+ {
437
+ MaterialProperty property = BeginProperty(name);
438
+ Vector2 range = property.rangeLimits;
439
+ s_TempLabel.text = label;
440
+ float value = EditorGUI.Slider(
441
+ EditorGUILayout.GetControlRect(), s_TempLabel, property.floatValue, range.x, range.y
442
+ );
443
+ if (EndProperty())
444
+ {
445
+ property.floatValue = value;
446
+ }
447
+ }
448
+
449
+ protected void DoVector3(string name, string label)
450
+ {
451
+ MaterialProperty property = BeginProperty(name);
452
+ s_TempLabel.text = label;
453
+ Vector4 value = EditorGUILayout.Vector3Field(s_TempLabel, property.vectorValue);
454
+ if (EndProperty())
455
+ {
456
+ property.vectorValue = value;
457
+ }
458
+ }
459
+
460
+ protected void DoVector(string name, string label, GUIContent[] subLabels)
461
+ {
462
+ MaterialProperty property = BeginProperty(name);
463
+ Rect rect = EditorGUILayout.GetControlRect();
464
+ s_TempLabel.text = label;
465
+ rect = EditorGUI.PrefixLabel(rect, s_TempLabel);
466
+ Vector4 vector = property.vectorValue;
467
+
468
+ float[] values = s_TempFloats[subLabels.Length];
469
+ for (int i = 0; i < subLabels.Length; i++)
470
+ {
471
+ values[i] = vector[i];
472
+ }
473
+
474
+ EditorGUI.MultiFloatField(rect, subLabels, values);
475
+ if (EndProperty())
476
+ {
477
+ for (int i = 0; i < subLabels.Length; i++)
478
+ {
479
+ vector[i] = values[i];
480
+ }
481
+
482
+ property.vectorValue = vector;
483
+ }
484
+ }
485
+
486
+ void DoDragAndDropBegin()
487
+ {
488
+ m_DragAndDropMinY = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)).y;
489
+ }
490
+
491
+ void DoDragAndDropEnd()
492
+ {
493
+ Rect rect = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true));
494
+ Event evt = Event.current;
495
+ if (evt.type == EventType.DragUpdated)
496
+ {
497
+ DragAndDrop.visualMode = DragAndDropVisualMode.Generic;
498
+ evt.Use();
499
+ }
500
+ else if (
501
+ evt.type == EventType.DragPerform &&
502
+ Rect.MinMaxRect(rect.xMin, m_DragAndDropMinY, rect.xMax, rect.yMax).Contains(evt.mousePosition)
503
+ )
504
+ {
505
+ DragAndDrop.AcceptDrag();
506
+ evt.Use();
507
+ Material droppedMaterial = DragAndDrop.objectReferences[0] as Material;
508
+ if (droppedMaterial && droppedMaterial != m_Material)
509
+ {
510
+ PerformDrop(droppedMaterial);
511
+ }
512
+ }
513
+ }
514
+
515
+ void PerformDrop(Material droppedMaterial)
516
+ {
517
+ Texture droppedTex = droppedMaterial.GetTexture(ShaderUtilities.ID_MainTex);
518
+ if (!droppedTex)
519
+ {
520
+ return;
521
+ }
522
+
523
+ Texture currentTex = m_Material.GetTexture(ShaderUtilities.ID_MainTex);
524
+ TMP_FontAsset requiredFontAsset = null;
525
+ if (droppedTex != currentTex)
526
+ {
527
+ requiredFontAsset = TMP_EditorUtility.FindMatchingFontAsset(droppedMaterial);
528
+ if (!requiredFontAsset)
529
+ {
530
+ return;
531
+ }
532
+ }
533
+
534
+ foreach (GameObject o in Selection.gameObjects)
535
+ {
536
+ if (requiredFontAsset)
537
+ {
538
+ TMP_Text textComponent = o.GetComponent<TMP_Text>();
539
+ if (textComponent)
540
+ {
541
+ Undo.RecordObject(textComponent, "Font Asset Change");
542
+ textComponent.font = requiredFontAsset;
543
+ }
544
+ }
545
+
546
+ TMPro_EventManager.ON_DRAG_AND_DROP_MATERIAL_CHANGED(o, m_Material, droppedMaterial);
547
+ EditorUtility.SetDirty(o);
548
+ }
549
+ }
550
+ }
551
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_BaseShaderGUI.cs.meta ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 438efd46088d408d8a53f707fa68d976
3
+ timeCreated: 1469844810
4
+ licenseType: Pro
5
+ MonoImporter:
6
+ serializedVersion: 2
7
+ defaultReferences: []
8
+ executionOrder: 0
9
+ icon: {instanceID: 0}
10
+ userData:
11
+ assetBundleName:
12
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_BitmapShaderGUI.cs ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using UnityEngine;
2
+ using UnityEditor;
3
+
4
+ namespace TMPro.EditorUtilities
5
+ {
6
+ public class TMP_BitmapShaderGUI : TMP_BaseShaderGUI
7
+ {
8
+ static bool s_Face = true;
9
+
10
+ protected override void DoGUI()
11
+ {
12
+ s_Face = BeginPanel("Face", s_Face);
13
+ if (s_Face)
14
+ {
15
+ DoFacePanel();
16
+ }
17
+
18
+ EndPanel();
19
+
20
+ s_DebugExtended = BeginPanel("Debug Settings", s_DebugExtended);
21
+ if (s_DebugExtended)
22
+ {
23
+ DoDebugPanel();
24
+ }
25
+
26
+ EndPanel();
27
+ }
28
+
29
+ void DoFacePanel()
30
+ {
31
+ EditorGUI.indentLevel += 1;
32
+ if (m_Material.HasProperty(ShaderUtilities.ID_FaceTex))
33
+ {
34
+ DoColor("_FaceColor", "Color");
35
+ DoTexture2D("_FaceTex", "Texture", true);
36
+ }
37
+ else
38
+ {
39
+ DoColor("_Color", "Color");
40
+ DoSlider("_DiffusePower", "Diffuse Power");
41
+ }
42
+
43
+ EditorGUI.indentLevel -= 1;
44
+
45
+ EditorGUILayout.Space();
46
+ }
47
+
48
+ void DoDebugPanel()
49
+ {
50
+ EditorGUI.indentLevel += 1;
51
+ DoTexture2D("_MainTex", "Font Atlas");
52
+ if (m_Material.HasProperty(ShaderUtilities.ID_VertexOffsetX))
53
+ {
54
+ if (m_Material.HasProperty(ShaderUtilities.ID_Padding))
55
+ {
56
+ EditorGUILayout.Space();
57
+ DoFloat("_Padding", "Padding");
58
+ }
59
+
60
+ EditorGUILayout.Space();
61
+ DoFloat("_VertexOffsetX", "Offset X");
62
+ DoFloat("_VertexOffsetY", "Offset Y");
63
+ }
64
+
65
+ if (m_Material.HasProperty(ShaderUtilities.ID_MaskSoftnessX))
66
+ {
67
+ EditorGUILayout.Space();
68
+ DoFloat("_MaskSoftnessX", "Softness X");
69
+ DoFloat("_MaskSoftnessY", "Softness Y");
70
+ DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels);
71
+ }
72
+
73
+ if (m_Material.HasProperty(ShaderUtilities.ID_StencilID))
74
+ {
75
+ EditorGUILayout.Space();
76
+ DoFloat("_Stencil", "Stencil ID");
77
+ DoFloat("_StencilComp", "Stencil Comp");
78
+ }
79
+
80
+ if (m_Material.HasProperty(ShaderUtilities.ShaderTag_CullMode))
81
+ {
82
+ EditorGUILayout.Space();
83
+ DoPopup("_CullMode", "Cull Mode", s_CullingTypeLabels);
84
+ }
85
+
86
+ EditorGUILayout.Space();
87
+
88
+ EditorGUI.indentLevel -= 1;
89
+
90
+ EditorGUILayout.Space();
91
+ }
92
+ }
93
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_BitmapShaderGUI.cs.meta ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 806de5a9211448c8b65c8435ebb48dd4
3
+ timeCreated: 1469998850
4
+ licenseType: Pro
5
+ MonoImporter:
6
+ serializedVersion: 2
7
+ defaultReferences: []
8
+ executionOrder: 0
9
+ icon: {instanceID: 0}
10
+ userData:
11
+ assetBundleName:
12
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_CharacterPropertyDrawer.cs ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using UnityEngine;
2
+ using UnityEngine.TextCore;
3
+ using UnityEngine.TextCore.LowLevel;
4
+ using UnityEditor;
5
+ using System.Collections;
6
+
7
+
8
+ namespace TMPro.EditorUtilities
9
+ {
10
+ [CustomPropertyDrawer(typeof(TMP_Character))]
11
+ public class TMP_CharacterPropertyDrawer : PropertyDrawer
12
+ {
13
+ private string k_ColorProperty = "_Color";
14
+
15
+ int m_GlyphSelectedForEditing = -1;
16
+
17
+ public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
18
+ {
19
+ SerializedProperty prop_Unicode = property.FindPropertyRelative("m_Unicode");
20
+ SerializedProperty prop_GlyphIndex = property.FindPropertyRelative("m_GlyphIndex");
21
+ SerializedProperty prop_Scale = property.FindPropertyRelative("m_Scale");
22
+
23
+
24
+ GUIStyle style = new GUIStyle(EditorStyles.label);
25
+ style.richText = true;
26
+
27
+ EditorGUIUtility.labelWidth = 40f;
28
+ EditorGUIUtility.fieldWidth = 50;
29
+
30
+ Rect rect = new Rect(position.x + 50, position.y, position.width, 49);
31
+
32
+ // Display non-editable fields
33
+ if (GUI.enabled == false)
34
+ {
35
+ int unicode = prop_Unicode.intValue;
36
+ EditorGUI.LabelField(new Rect(rect.x, rect.y, 120f, 18), new GUIContent("Unicode: <color=#FFFF80>0x" + unicode.ToString("X") + "</color>"), style);
37
+ EditorGUI.LabelField(new Rect(rect.x + 115, rect.y, 120f, 18), unicode <= 0xFFFF ? new GUIContent("UTF16: <color=#FFFF80>\\u" + unicode.ToString("X4") + "</color>") : new GUIContent("UTF32: <color=#FFFF80>\\U" + unicode.ToString("X8") + "</color>"), style);
38
+ EditorGUI.LabelField(new Rect(rect.x, rect.y + 18, 120, 18), new GUIContent("Glyph ID: <color=#FFFF80>" + prop_GlyphIndex.intValue + "</color>"), style);
39
+ EditorGUI.LabelField(new Rect(rect.x, rect.y + 36, 80, 18), new GUIContent("Scale: <color=#FFFF80>" + prop_Scale.floatValue + "</color>"), style);
40
+
41
+ // Draw Glyph (if exists)
42
+ DrawGlyph(position, property);
43
+ }
44
+ else // Display editable fields
45
+ {
46
+ EditorGUIUtility.labelWidth = 55f;
47
+ GUI.SetNextControlName("Unicode Input");
48
+ EditorGUI.BeginChangeCheck();
49
+ string unicode = EditorGUI.TextField(new Rect(rect.x, rect.y, 120, 18), "Unicode:", prop_Unicode.intValue.ToString("X"));
50
+
51
+ if (GUI.GetNameOfFocusedControl() == "Unicode Input")
52
+ {
53
+ //Filter out unwanted characters.
54
+ char chr = Event.current.character;
55
+ if ((chr < '0' || chr > '9') && (chr < 'a' || chr > 'f') && (chr < 'A' || chr > 'F'))
56
+ {
57
+ Event.current.character = '\0';
58
+ }
59
+ }
60
+
61
+ if (EditorGUI.EndChangeCheck())
62
+ {
63
+ // Update Unicode value
64
+ prop_Unicode.intValue = TMP_TextUtilities.StringHexToInt(unicode);
65
+ }
66
+
67
+ // Cache current glyph index in case it needs to be restored if the new glyph index is invalid.
68
+ int currentGlyphIndex = prop_GlyphIndex.intValue;
69
+
70
+ EditorGUIUtility.labelWidth = 59f;
71
+ EditorGUI.BeginChangeCheck();
72
+ EditorGUI.DelayedIntField(new Rect(rect.x, rect.y + 18, 100, 18), prop_GlyphIndex, new GUIContent("Glyph ID:"));
73
+ if (EditorGUI.EndChangeCheck())
74
+ {
75
+ // Get a reference to the font asset
76
+ TMP_FontAsset fontAsset = property.serializedObject.targetObject as TMP_FontAsset;
77
+
78
+ // Make sure new glyph index is valid.
79
+ int elementIndex = fontAsset.glyphTable.FindIndex(item => item.index == prop_GlyphIndex.intValue);
80
+
81
+ if (elementIndex == -1)
82
+ prop_GlyphIndex.intValue = currentGlyphIndex;
83
+ else
84
+ fontAsset.IsFontAssetLookupTablesDirty = true;
85
+ }
86
+
87
+ int glyphIndex = prop_GlyphIndex.intValue;
88
+
89
+ // Reset glyph selection if new character has been selected.
90
+ if (GUI.enabled && m_GlyphSelectedForEditing != glyphIndex)
91
+ m_GlyphSelectedForEditing = -1;
92
+
93
+ // Display button to edit the glyph data.
94
+ if (GUI.Button(new Rect(rect.x + 120, rect.y + 18, 75, 18), new GUIContent("Edit Glyph")))
95
+ {
96
+ if (m_GlyphSelectedForEditing == -1)
97
+ m_GlyphSelectedForEditing = glyphIndex;
98
+ else
99
+ m_GlyphSelectedForEditing = -1;
100
+
101
+ // Button clicks should not result in potential change.
102
+ GUI.changed = false;
103
+ }
104
+
105
+ // Show the glyph property drawer if selected
106
+ if (glyphIndex == m_GlyphSelectedForEditing && GUI.enabled)
107
+ {
108
+ // Get a reference to the font asset
109
+ TMP_FontAsset fontAsset = property.serializedObject.targetObject as TMP_FontAsset;
110
+
111
+ if (fontAsset != null)
112
+ {
113
+ // Get the index of the glyph in the font asset glyph table.
114
+ int elementIndex = fontAsset.glyphTable.FindIndex(item => item.index == glyphIndex);
115
+
116
+ if (elementIndex != -1)
117
+ {
118
+ SerializedProperty prop_GlyphTable = property.serializedObject.FindProperty("m_GlyphTable");
119
+ SerializedProperty prop_Glyph = prop_GlyphTable.GetArrayElementAtIndex(elementIndex);
120
+
121
+ SerializedProperty prop_GlyphMetrics = prop_Glyph.FindPropertyRelative("m_Metrics");
122
+ SerializedProperty prop_GlyphRect = prop_Glyph.FindPropertyRelative("m_GlyphRect");
123
+
124
+ Rect newRect = EditorGUILayout.GetControlRect(false, 115);
125
+ EditorGUI.DrawRect(new Rect(newRect.x + 52, newRect.y - 20, newRect.width - 52, newRect.height - 5), new Color(0.1f, 0.1f, 0.1f, 0.45f));
126
+ EditorGUI.DrawRect(new Rect(newRect.x + 53, newRect.y - 19, newRect.width - 54, newRect.height - 7), new Color(0.3f, 0.3f, 0.3f, 0.8f));
127
+
128
+ // Display GlyphRect
129
+ newRect.x += 55;
130
+ newRect.y -= 18;
131
+ newRect.width += 5;
132
+ EditorGUI.PropertyField(newRect, prop_GlyphRect);
133
+
134
+ // Display GlyphMetrics
135
+ newRect.y += 45;
136
+ EditorGUI.PropertyField(newRect, prop_GlyphMetrics);
137
+
138
+ rect.y += 120;
139
+ }
140
+ }
141
+ }
142
+
143
+ EditorGUIUtility.labelWidth = 39f;
144
+ EditorGUI.PropertyField(new Rect(rect.x, rect.y + 36, 80, 18), prop_Scale, new GUIContent("Scale:"));
145
+
146
+ // Draw Glyph (if exists)
147
+ DrawGlyph(position, property);
148
+ }
149
+ }
150
+
151
+ public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
152
+ {
153
+ return 58;
154
+ }
155
+
156
+ void DrawGlyph(Rect position, SerializedProperty property)
157
+ {
158
+ // Get a reference to the atlas texture
159
+ TMP_FontAsset fontAsset = property.serializedObject.targetObject as TMP_FontAsset;
160
+
161
+ if (fontAsset == null)
162
+ return;
163
+
164
+ // Get a reference to the Glyph Table
165
+ SerializedProperty prop_GlyphTable = property.serializedObject.FindProperty("m_GlyphTable");
166
+ int glyphIndex = property.FindPropertyRelative("m_GlyphIndex").intValue;
167
+ int elementIndex = fontAsset.glyphTable.FindIndex(item => item.index == glyphIndex);
168
+
169
+ // Return if we can't find the glyph
170
+ if (elementIndex == -1)
171
+ return;
172
+
173
+ SerializedProperty prop_Glyph = prop_GlyphTable.GetArrayElementAtIndex(elementIndex);
174
+
175
+ // Get reference to atlas texture.
176
+ int atlasIndex = prop_Glyph.FindPropertyRelative("m_AtlasIndex").intValue;
177
+ Texture2D atlasTexture = fontAsset.atlasTextures.Length > atlasIndex ? fontAsset.atlasTextures[atlasIndex] : null;
178
+
179
+ if (atlasTexture == null)
180
+ return;
181
+
182
+ Material mat;
183
+ if (((GlyphRasterModes)fontAsset.atlasRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP)
184
+ {
185
+ mat = TMP_FontAssetEditor.internalBitmapMaterial;
186
+
187
+ if (mat == null)
188
+ return;
189
+
190
+ mat.mainTexture = atlasTexture;
191
+ mat.SetColor(k_ColorProperty, Color.white);
192
+ }
193
+ else
194
+ {
195
+ mat = TMP_FontAssetEditor.internalSDFMaterial;
196
+
197
+ if (mat == null)
198
+ return;
199
+
200
+ mat.mainTexture = atlasTexture;
201
+ mat.SetFloat(ShaderUtilities.ID_GradientScale, fontAsset.atlasPadding + 1);
202
+ }
203
+
204
+ // Draw glyph
205
+ Rect glyphDrawPosition = new Rect(position.x, position.y, 48, 58);
206
+
207
+ SerializedProperty glyphRectProperty = prop_Glyph.FindPropertyRelative("m_GlyphRect");
208
+
209
+ int padding = fontAsset.atlasPadding;
210
+
211
+ int glyphOriginX = glyphRectProperty.FindPropertyRelative("m_X").intValue - padding;
212
+ int glyphOriginY = glyphRectProperty.FindPropertyRelative("m_Y").intValue - padding;
213
+ int glyphWidth = glyphRectProperty.FindPropertyRelative("m_Width").intValue + padding * 2;
214
+ int glyphHeight = glyphRectProperty.FindPropertyRelative("m_Height").intValue + padding * 2;
215
+
216
+ float normalizedHeight = fontAsset.faceInfo.ascentLine - fontAsset.faceInfo.descentLine;
217
+ float scale = glyphDrawPosition.width / normalizedHeight;
218
+
219
+ // Compute the normalized texture coordinates
220
+ Rect texCoords = new Rect((float)glyphOriginX / atlasTexture.width, (float)glyphOriginY / atlasTexture.height, (float)glyphWidth / atlasTexture.width, (float)glyphHeight / atlasTexture.height);
221
+
222
+ if (Event.current.type == EventType.Repaint)
223
+ {
224
+ glyphDrawPosition.x += (glyphDrawPosition.width - glyphWidth * scale) / 2;
225
+ glyphDrawPosition.y += (glyphDrawPosition.height - glyphHeight * scale) / 2;
226
+ glyphDrawPosition.width = glyphWidth * scale;
227
+ glyphDrawPosition.height = glyphHeight * scale;
228
+
229
+ // Could switch to using the default material of the font asset which would require passing scale to the shader.
230
+ Graphics.DrawTexture(glyphDrawPosition, atlasTexture, texCoords, 0, 0, 0, 0, new Color(1f, 1f, 1f), mat);
231
+ }
232
+ }
233
+
234
+ }
235
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_CharacterPropertyDrawer.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 01ada73c4792aba4c937ff5d92cce866
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_ColorGradientAssetMenu.cs ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using UnityEditor;
2
+ using UnityEngine;
3
+ using System.IO;
4
+ using System.Collections;
5
+
6
+
7
+
8
+ namespace TMPro.EditorUtilities
9
+ {
10
+
11
+ public static class TMP_ColorGradientAssetMenu
12
+ {
13
+ [MenuItem("Assets/Create/TextMeshPro/Color Gradient", false, 115)]
14
+ public static void CreateColorGradient(MenuCommand context)
15
+ {
16
+ string filePath;
17
+
18
+ if (Selection.assetGUIDs.Length == 0)
19
+ filePath = "Assets/New TMP Color Gradient.asset";
20
+ else
21
+ filePath = AssetDatabase.GUIDToAssetPath(Selection.assetGUIDs[0]);
22
+
23
+ if (Directory.Exists(filePath))
24
+ {
25
+ filePath += "/New TMP Color Gradient.asset";
26
+ }
27
+ else
28
+ {
29
+ filePath = Path.GetDirectoryName(filePath) + "/New TMP Color Gradient.asset";
30
+ }
31
+
32
+ filePath = AssetDatabase.GenerateUniqueAssetPath(filePath);
33
+
34
+ // Create new Color Gradient Asset.
35
+ TMP_ColorGradient colorGradient = ScriptableObject.CreateInstance<TMP_ColorGradient>();
36
+
37
+ // Create Asset
38
+ AssetDatabase.CreateAsset(colorGradient, filePath);
39
+
40
+ //EditorUtility.SetDirty(colorGradient);
41
+
42
+ AssetDatabase.SaveAssets();
43
+
44
+ AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(colorGradient));
45
+
46
+ EditorUtility.FocusProjectWindow();
47
+ EditorGUIUtility.PingObject(colorGradient);
48
+ }
49
+ }
50
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_ColorGradientAssetMenu.cs.meta ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: d9647b571c5e44729b71d756b3d55317
3
+ timeCreated: 1468187791
4
+ licenseType: Pro
5
+ MonoImporter:
6
+ serializedVersion: 2
7
+ defaultReferences: []
8
+ executionOrder: 0
9
+ icon: {instanceID: 0}
10
+ userData:
11
+ assetBundleName:
12
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_ColorGradientEditor.cs ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using UnityEngine;
2
+ using UnityEditor;
3
+ using System.Collections;
4
+
5
+
6
+ namespace TMPro.EditorUtilities
7
+ {
8
+ [CustomEditor(typeof(TMP_ColorGradient))]
9
+ public class TMP_ColorGradientEditor : Editor
10
+ {
11
+ SerializedProperty m_ColorMode;
12
+ SerializedProperty m_TopLeftColor;
13
+ SerializedProperty m_TopRightColor;
14
+ SerializedProperty m_BottomLeftColor;
15
+ SerializedProperty m_BottomRightColor;
16
+
17
+ void OnEnable()
18
+ {
19
+ m_ColorMode = serializedObject.FindProperty("colorMode");
20
+ m_TopLeftColor = serializedObject.FindProperty("topLeft");
21
+ m_TopRightColor = serializedObject.FindProperty("topRight");
22
+ m_BottomLeftColor = serializedObject.FindProperty("bottomLeft");
23
+ m_BottomRightColor = serializedObject.FindProperty("bottomRight");
24
+ }
25
+
26
+ public override void OnInspectorGUI()
27
+ {
28
+ serializedObject.Update();
29
+
30
+ EditorGUI.BeginChangeCheck();
31
+ EditorGUILayout.PropertyField(m_ColorMode, new GUIContent("Color Mode"));
32
+ if (EditorGUI.EndChangeCheck())
33
+ {
34
+ switch ((ColorMode)m_ColorMode.enumValueIndex)
35
+ {
36
+ case ColorMode.Single:
37
+ m_TopRightColor.colorValue = m_TopLeftColor.colorValue;
38
+ m_BottomLeftColor.colorValue = m_TopLeftColor.colorValue;
39
+ m_BottomRightColor.colorValue = m_TopLeftColor.colorValue;
40
+ break;
41
+ case ColorMode.HorizontalGradient:
42
+ m_BottomLeftColor.colorValue = m_TopLeftColor.colorValue;
43
+ m_BottomRightColor.colorValue = m_TopRightColor.colorValue;
44
+ break;
45
+ case ColorMode.VerticalGradient:
46
+ m_TopRightColor.colorValue = m_TopLeftColor.colorValue;
47
+ m_BottomRightColor.colorValue = m_BottomLeftColor.colorValue;
48
+ break;
49
+ }
50
+ }
51
+ Rect rect;
52
+ switch ((ColorMode)m_ColorMode.enumValueIndex)
53
+ {
54
+ case ColorMode.Single:
55
+ EditorGUI.BeginChangeCheck();
56
+ rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2));
57
+ EditorGUI.PrefixLabel(rect, new GUIContent("Colors"));
58
+ rect.x += EditorGUIUtility.labelWidth;
59
+ rect.width = (rect.width - EditorGUIUtility.labelWidth) / (EditorGUIUtility.wideMode ? 1f : 2f);
60
+ TMP_EditorUtility.DrawColorProperty(rect, m_TopLeftColor);
61
+ if (EditorGUI.EndChangeCheck())
62
+ {
63
+ m_TopRightColor.colorValue = m_TopLeftColor.colorValue;
64
+ m_BottomLeftColor.colorValue = m_TopLeftColor.colorValue;
65
+ m_BottomRightColor.colorValue = m_TopLeftColor.colorValue;
66
+ }
67
+ break;
68
+
69
+ case ColorMode.HorizontalGradient:
70
+ rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2));
71
+ EditorGUI.PrefixLabel(rect, new GUIContent("Colors"));
72
+ rect.x += EditorGUIUtility.labelWidth;
73
+ rect.width = (rect.width - EditorGUIUtility.labelWidth) / 2f;
74
+
75
+ EditorGUI.BeginChangeCheck();
76
+ TMP_EditorUtility.DrawColorProperty(rect, m_TopLeftColor);
77
+ if (EditorGUI.EndChangeCheck())
78
+ {
79
+ m_BottomLeftColor.colorValue = m_TopLeftColor.colorValue;
80
+ }
81
+
82
+ rect.x += rect.width;
83
+
84
+ EditorGUI.BeginChangeCheck();
85
+ TMP_EditorUtility.DrawColorProperty(rect, m_TopRightColor);
86
+ if (EditorGUI.EndChangeCheck())
87
+ {
88
+ m_BottomRightColor.colorValue = m_TopRightColor.colorValue;
89
+ }
90
+ break;
91
+
92
+ case ColorMode.VerticalGradient:
93
+ rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2));
94
+ EditorGUI.PrefixLabel(rect, new GUIContent("Colors"));
95
+ rect.x += EditorGUIUtility.labelWidth;
96
+ rect.width = (rect.width - EditorGUIUtility.labelWidth) / (EditorGUIUtility.wideMode ? 1f : 2f);
97
+ rect.height = EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2);
98
+
99
+ EditorGUI.BeginChangeCheck();
100
+ TMP_EditorUtility.DrawColorProperty(rect, m_TopLeftColor);
101
+ if (EditorGUI.EndChangeCheck())
102
+ {
103
+ m_TopRightColor.colorValue = m_TopLeftColor.colorValue;
104
+ }
105
+
106
+ rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2));
107
+ rect.x += EditorGUIUtility.labelWidth;
108
+ rect.width = (rect.width - EditorGUIUtility.labelWidth) / (EditorGUIUtility.wideMode ? 1f : 2f);
109
+ rect.height = EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2);
110
+
111
+ EditorGUI.BeginChangeCheck();
112
+ TMP_EditorUtility.DrawColorProperty(rect, m_BottomLeftColor);
113
+ if (EditorGUI.EndChangeCheck())
114
+ {
115
+ m_BottomRightColor.colorValue = m_BottomLeftColor.colorValue;
116
+ }
117
+ break;
118
+
119
+ case ColorMode.FourCornersGradient:
120
+ rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2));
121
+ EditorGUI.PrefixLabel(rect, new GUIContent("Colors"));
122
+ rect.x += EditorGUIUtility.labelWidth;
123
+ rect.width = (rect.width - EditorGUIUtility.labelWidth) / 2f;
124
+ rect.height = EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2);
125
+
126
+ TMP_EditorUtility.DrawColorProperty(rect, m_TopLeftColor);
127
+ rect.x += rect.width;
128
+ TMP_EditorUtility.DrawColorProperty(rect, m_TopRightColor);
129
+
130
+ rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2));
131
+ rect.x += EditorGUIUtility.labelWidth;
132
+ rect.width = (rect.width - EditorGUIUtility.labelWidth) / 2f;
133
+ rect.height = EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2);
134
+
135
+ TMP_EditorUtility.DrawColorProperty(rect, m_BottomLeftColor);
136
+ rect.x += rect.width;
137
+ TMP_EditorUtility.DrawColorProperty(rect, m_BottomRightColor);
138
+ break;
139
+ }
140
+
141
+ if (serializedObject.ApplyModifiedProperties())
142
+ TMPro_EventManager.ON_COLOR_GRADIENT_PROPERTY_CHANGED(target as TMP_ColorGradient);
143
+
144
+ }
145
+ }
146
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_ColorGradientEditor.cs.meta ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: fcc60c1d6bb544d9b712b652f418ff3a
3
+ timeCreated: 1468400050
4
+ licenseType: Pro
5
+ MonoImporter:
6
+ serializedVersion: 2
7
+ defaultReferences: []
8
+ executionOrder: 0
9
+ icon: {instanceID: 0}
10
+ userData:
11
+ assetBundleName:
12
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_DropdownEditor.cs ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using UnityEngine;
2
+ using UnityEditor;
3
+ using UnityEditor.UI;
4
+ using UnityEngine.UI;
5
+
6
+ namespace TMPro.EditorUtilities
7
+ {
8
+ [CustomEditor(typeof(TMP_Dropdown), true)]
9
+ [CanEditMultipleObjects]
10
+ public class DropdownEditor : SelectableEditor
11
+ {
12
+ SerializedProperty m_Template;
13
+ SerializedProperty m_CaptionText;
14
+ SerializedProperty m_CaptionImage;
15
+ SerializedProperty m_Placeholder;
16
+ SerializedProperty m_ItemText;
17
+ SerializedProperty m_ItemImage;
18
+ SerializedProperty m_OnSelectionChanged;
19
+ SerializedProperty m_Value;
20
+ SerializedProperty m_AlphaFadeSpeed;
21
+ SerializedProperty m_Options;
22
+
23
+ protected override void OnEnable()
24
+ {
25
+ base.OnEnable();
26
+ m_Template = serializedObject.FindProperty("m_Template");
27
+ m_CaptionText = serializedObject.FindProperty("m_CaptionText");
28
+ m_CaptionImage = serializedObject.FindProperty("m_CaptionImage");
29
+ m_Placeholder = serializedObject.FindProperty("m_Placeholder");
30
+ m_ItemText = serializedObject.FindProperty("m_ItemText");
31
+ m_ItemImage = serializedObject.FindProperty("m_ItemImage");
32
+ m_OnSelectionChanged = serializedObject.FindProperty("m_OnValueChanged");
33
+ m_Value = serializedObject.FindProperty("m_Value");
34
+ m_AlphaFadeSpeed = serializedObject.FindProperty("m_AlphaFadeSpeed");
35
+ m_Options = serializedObject.FindProperty("m_Options");
36
+ }
37
+
38
+ public override void OnInspectorGUI()
39
+ {
40
+ base.OnInspectorGUI();
41
+ EditorGUILayout.Space();
42
+
43
+ serializedObject.Update();
44
+ EditorGUILayout.PropertyField(m_Template);
45
+ EditorGUILayout.PropertyField(m_CaptionText);
46
+ EditorGUILayout.PropertyField(m_CaptionImage);
47
+ EditorGUILayout.PropertyField(m_Placeholder);
48
+ EditorGUILayout.PropertyField(m_ItemText);
49
+ EditorGUILayout.PropertyField(m_ItemImage);
50
+ EditorGUILayout.PropertyField(m_Value);
51
+ EditorGUILayout.PropertyField(m_AlphaFadeSpeed);
52
+ EditorGUILayout.PropertyField(m_Options);
53
+ EditorGUILayout.PropertyField(m_OnSelectionChanged);
54
+ serializedObject.ApplyModifiedProperties();
55
+ }
56
+ }
57
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_DropdownEditor.cs.meta ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 6dbcf248c987476181a37f01a1814975
3
+ timeCreated: 1446377461
4
+ licenseType: Pro
5
+ MonoImporter:
6
+ serializedVersion: 2
7
+ defaultReferences: []
8
+ executionOrder: 0
9
+ icon: {instanceID: 0}
10
+ userData:
11
+ assetBundleName:
12
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_EditorCoroutine.cs ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using System.Collections;
3
+ using System.Collections.Generic;
4
+ using UnityEditor;
5
+ using UnityEngine;
6
+
7
+
8
+ namespace TMPro.EditorUtilities
9
+ {
10
+ /// <summary>
11
+ /// Simple implementation of coroutine working in the Unity Editor.
12
+ /// </summary>
13
+ public class TMP_EditorCoroutine
14
+ {
15
+ //private static Dictionary<int, EditorCoroutine> s_ActiveCoroutines;
16
+
17
+ readonly IEnumerator coroutine;
18
+
19
+ /// <summary>
20
+ /// Constructor
21
+ /// </summary>
22
+ /// <param name="routine"></param>
23
+ TMP_EditorCoroutine(IEnumerator routine)
24
+ {
25
+ this.coroutine = routine;
26
+ }
27
+
28
+
29
+ /// <summary>
30
+ /// Starts a new EditorCoroutine.
31
+ /// </summary>
32
+ /// <param name="newCoroutine">Coroutine</param>
33
+ /// <returns>new EditorCoroutine</returns>
34
+ public static TMP_EditorCoroutine StartCoroutine(IEnumerator routine)
35
+ {
36
+ TMP_EditorCoroutine coroutine = new TMP_EditorCoroutine(routine);
37
+ coroutine.Start();
38
+
39
+ // Add coroutine to tracking list
40
+ //if (s_ActiveCoroutines == null)
41
+ // s_ActiveCoroutines = new Dictionary<int, EditorCoroutine>();
42
+
43
+ // Add new instance of editor coroutine to dictionary.
44
+ //s_ActiveCoroutines.Add(coroutine.GetHashCode(), coroutine);
45
+
46
+ return coroutine;
47
+ }
48
+
49
+
50
+ /// <summary>
51
+ /// Clear delegate list
52
+ /// </summary>
53
+ //public static void StopAllEditorCoroutines()
54
+ //{
55
+ // EditorApplication.update = null;
56
+ //}
57
+
58
+
59
+ /// <summary>
60
+ /// Register callback for editor updates
61
+ /// </summary>
62
+ void Start()
63
+ {
64
+ EditorApplication.update += EditorUpdate;
65
+ }
66
+
67
+
68
+ /// <summary>
69
+ /// Unregister callback for editor updates.
70
+ /// </summary>
71
+ public void Stop()
72
+ {
73
+ if (EditorApplication.update != null)
74
+ EditorApplication.update -= EditorUpdate;
75
+
76
+ //s_ActiveCoroutines.Remove(this.GetHashCode());
77
+ }
78
+
79
+
80
+ /// <summary>
81
+ /// Delegate function called on editor updates.
82
+ /// </summary>
83
+ void EditorUpdate()
84
+ {
85
+ // Stop editor coroutine if it does not continue.
86
+ if (coroutine.MoveNext() == false)
87
+ Stop();
88
+
89
+ // Process the different types of EditorCoroutines.
90
+ if (coroutine.Current != null)
91
+ {
92
+
93
+ }
94
+ }
95
+ }
96
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.textmeshpro@3.0.1/Scripts/Editor/TMP_EditorCoroutine.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 27a0335dab59ec542aadd6636a5b4ebd
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant: