From 1e029173663757d42059acfe3a5013d7ae62a305 Mon Sep 17 00:00:00 2001 From: Edvinas Date: Wed, 4 Oct 2023 11:07:11 +0300 Subject: [PATCH] Initial commit --- .editorconfig | 15 + .gitattributes | 57 + .github/CONTRIBUTING.md | 9 + .github/README.md | 42 + .github/workflows/activation.yml | 22 + .github/workflows/ci.yml | 72 + .github/workflows/upm.yml | 46 + .gitignore | 62 + Assets/Plugins.meta | 8 + Assets/Plugins/TextMesh Pro.meta | 8 + .../Plugins/TextMesh Pro/Documentation.meta | 8 + .../TextMesh Pro User Guide 2016.pdf | Bin 0 -> 131 bytes .../TextMesh Pro User Guide 2016.pdf.meta | 7 + Assets/Plugins/TextMesh Pro/Fonts.meta | 8 + .../Fonts/LiberationSans - OFL.txt | 46 + .../Fonts/LiberationSans - OFL.txt.meta | 8 + .../TextMesh Pro/Fonts/LiberationSans.ttf | 3 + .../Fonts/LiberationSans.ttf.meta | 19 + Assets/Plugins/TextMesh Pro/Resources.meta | 8 + .../Resources/Fonts & Materials.meta | 9 + .../LiberationSans SDF - Drop Shadow.mat | 106 + .../LiberationSans SDF - Drop Shadow.mat.meta | 8 + .../LiberationSans SDF - Fallback.asset | 343 + .../LiberationSans SDF - Fallback.asset.meta | 8 + .../LiberationSans SDF - Outline.mat | 104 + .../LiberationSans SDF - Outline.mat.meta | 8 + .../LiberationSans SDF.asset | 7821 +++++++++++++++++ .../LiberationSans SDF.asset.meta | 8 + .../LineBreaking Following Characters.txt | 1 + ...LineBreaking Following Characters.txt.meta | 8 + .../LineBreaking Leading Characters.txt | 1 + .../LineBreaking Leading Characters.txt.meta | 8 + .../TextMesh Pro/Resources/Sprite Assets.meta | 9 + .../Resources/Sprite Assets/EmojiOne.asset | 659 ++ .../Sprite Assets/EmojiOne.asset.meta | 8 + .../TextMesh Pro/Resources/Style Sheets.meta | 9 + .../Style Sheets/Default Style Sheet.asset | 68 + .../Default Style Sheet.asset.meta | 8 + .../TextMesh Pro/Resources/TMP Settings.asset | 46 + .../Resources/TMP Settings.asset.meta | 8 + Assets/Plugins/TextMesh Pro/Shaders.meta | 8 + .../Shaders/TMP_Bitmap-Custom-Atlas.shader | 143 + .../TMP_Bitmap-Custom-Atlas.shader.meta | 9 + .../Shaders/TMP_Bitmap-Mobile.shader | 145 + .../Shaders/TMP_Bitmap-Mobile.shader.meta | 9 + .../TextMesh Pro/Shaders/TMP_Bitmap.shader | 143 + .../Shaders/TMP_Bitmap.shader.meta | 9 + .../Shaders/TMP_SDF Overlay.shader | 317 + .../Shaders/TMP_SDF Overlay.shader.meta | 9 + .../TextMesh Pro/Shaders/TMP_SDF SSD.shader | 310 + .../Shaders/TMP_SDF SSD.shader.meta | 9 + .../Shaders/TMP_SDF-Mobile Masking.shader | 247 + .../TMP_SDF-Mobile Masking.shader.meta | 9 + .../Shaders/TMP_SDF-Mobile Overlay.shader | 240 + .../TMP_SDF-Mobile Overlay.shader.meta | 9 + .../Shaders/TMP_SDF-Mobile SSD.shader | 106 + .../Shaders/TMP_SDF-Mobile SSD.shader.meta | 9 + .../Shaders/TMP_SDF-Mobile.shader | 240 + .../Shaders/TMP_SDF-Mobile.shader.meta | 9 + .../Shaders/TMP_SDF-Surface-Mobile.shader | 138 + .../TMP_SDF-Surface-Mobile.shader.meta | 9 + .../Shaders/TMP_SDF-Surface.shader | 158 + .../Shaders/TMP_SDF-Surface.shader.meta | 9 + .../TextMesh Pro/Shaders/TMP_SDF.shader | 317 + .../TextMesh Pro/Shaders/TMP_SDF.shader.meta | 9 + .../TextMesh Pro/Shaders/TMP_Sprite.shader | 116 + .../Shaders/TMP_Sprite.shader.meta | 9 + .../Plugins/TextMesh Pro/Shaders/TMPro.cginc | 84 + .../TextMesh Pro/Shaders/TMPro.cginc.meta | 9 + .../TextMesh Pro/Shaders/TMPro_Mobile.cginc | 157 + .../Shaders/TMPro_Mobile.cginc.meta | 9 + .../Shaders/TMPro_Properties.cginc | 85 + .../Shaders/TMPro_Properties.cginc.meta | 9 + .../TextMesh Pro/Shaders/TMPro_Surface.cginc | 101 + .../Shaders/TMPro_Surface.cginc.meta | 9 + Assets/Plugins/TextMesh Pro/Sprites.meta | 8 + .../Sprites/EmojiOne Attribution.txt | 3 + .../Sprites/EmojiOne Attribution.txt.meta | 7 + .../TextMesh Pro/Sprites/EmojiOne.json | 156 + .../TextMesh Pro/Sprites/EmojiOne.json.meta | 8 + .../Plugins/TextMesh Pro/Sprites/EmojiOne.png | 3 + .../TextMesh Pro/Sprites/EmojiOne.png.meta | 431 + Assets/Scenes.meta | 8 + Assets/Scenes/SampleScene.unity | 317 + Assets/Scenes/SampleScene.unity.meta | 7 + Packages/com.chark.build-tools/CHANGELOG.md | 10 + .../com.chark.build-tools/CHANGELOG.md.meta | 7 + .../Documentation~/README.md | 3 + Packages/com.chark.build-tools/Editor.meta | 3 + .../Editor/BuildConfiguration.cs | 308 + .../Editor/BuildConfiguration.cs.meta | 3 + .../Editor/BuildOptions.cs | 27 + .../Editor/BuildOptions.cs.meta | 3 + .../Editor/BuildToolsManagerWindow.cs | 105 + .../Editor/BuildToolsManagerWindow.cs.meta | 13 + .../Editor/BuildToolsTarget.cs | 47 + .../Editor/BuildToolsTarget.cs.meta | 3 + .../Editor/CHARK.BuildTools.Editor.asmdef | 15 + .../CHARK.BuildTools.Editor.asmdef.meta | 7 + .../Editor/Elements.meta | 3 + .../Elements/BuildConfigurationFoldout.cs | 29 + .../BuildConfigurationFoldout.cs.meta | 3 + .../BuildConfigurationFoldoutActions.cs | 40 + .../BuildConfigurationFoldoutActions.cs.meta | 3 + .../BuildConfigurationFoldoutContent.cs | 34 + .../BuildConfigurationFoldoutContent.cs.meta | 3 + .../Editor/Elements/BuildConfigurationList.cs | 59 + .../Elements/BuildConfigurationList.cs.meta | 3 + .../Elements/BuildConfigurationListItem.cs | 75 + .../BuildConfigurationListItem.cs.meta | 3 + .../Editor/PlayerBuilder.cs | 289 + .../Editor/PlayerBuilder.cs.meta | 3 + .../com.chark.build-tools/Editor/Styles.meta | 3 + .../Styles/BuildToolsManagerWindowStyles.uss | 74 + .../BuildToolsManagerWindowStyles.uss.meta | 3 + .../Editor/Utilities.meta | 3 + .../Utilities/BuildToolsAssetPostprocessor.cs | 26 + .../BuildToolsAssetPostprocessor.cs.meta | 3 + .../Utilities/BuildToolsEditorUtilities.cs | 84 + .../BuildToolsEditorUtilities.cs.meta | 3 + .../Utilities/CreateAssetMenuConstants.cs | 25 + .../CreateAssetMenuConstants.cs.meta | 3 + .../Editor/Utilities/MenuItemConstants.cs | 15 + .../Utilities/MenuItemConstants.cs.meta | 3 + Packages/com.chark.build-tools/LICENSE.md | 21 + .../com.chark.build-tools/LICENSE.md.meta | 7 + Packages/com.chark.build-tools/Samples.meta | 8 + .../Samples/CHARK.BuildTools.Samples.asmdef | 15 + .../CHARK.BuildTools.Samples.asmdef.meta | 7 + .../Samples/Defaults.meta | 8 + .../Samples/Defaults/ScriptableObjects.meta | 8 + .../AndroidBuildConfiguration.asset | 32 + .../AndroidBuildConfiguration.asset.meta | 8 + .../ArchiveAllBuildConfiguration.asset | 32 + .../ArchiveAllBuildConfiguration.asset.meta | 8 + .../WindowsBuildConfiguration.asset | 32 + .../WindowsBuildConfiguration.asset.meta | 8 + Packages/com.chark.build-tools/package.json | 27 + .../com.chark.build-tools/package.json.meta | 7 + Packages/manifest.json | 8 + Packages/packages-lock.json | 97 + ProjectSettings/AudioManager.asset | 19 + ProjectSettings/ClusterInputManager.asset | 6 + ProjectSettings/DynamicsManager.asset | 34 + ProjectSettings/EditorBuildSettings.asset | 11 + ProjectSettings/EditorSettings.asset | 47 + ProjectSettings/GraphicsSettings.asset | 63 + ProjectSettings/InputManager.asset | 295 + ProjectSettings/MemorySettings.asset | 35 + ProjectSettings/NavMeshAreas.asset | 91 + ProjectSettings/PackageManagerSettings.asset | 43 + ProjectSettings/Physics2DSettings.asset | 56 + ProjectSettings/PresetManager.asset | 7 + ProjectSettings/ProjectSettings.asset | 836 ++ ProjectSettings/ProjectVersion.txt | 2 + ProjectSettings/QualitySettings.asset | 232 + ProjectSettings/SceneTemplateSettings.json | 121 + ProjectSettings/TagManager.asset | 43 + ProjectSettings/TimeManager.asset | 9 + ProjectSettings/TimelineSettings.asset | 15 + ProjectSettings/UnityConnectSettings.asset | 35 + ProjectSettings/VFXManager.asset | 12 + ProjectSettings/VersionControlSettings.asset | 8 + ProjectSettings/XRSettings.asset | 10 + 164 files changed, 17561 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/README.md create mode 100644 .github/workflows/activation.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/upm.yml create mode 100644 .gitignore create mode 100644 Assets/Plugins.meta create mode 100644 Assets/Plugins/TextMesh Pro.meta create mode 100644 Assets/Plugins/TextMesh Pro/Documentation.meta create mode 100644 Assets/Plugins/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf create mode 100644 Assets/Plugins/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf.meta create mode 100644 Assets/Plugins/TextMesh Pro/Fonts.meta create mode 100644 Assets/Plugins/TextMesh Pro/Fonts/LiberationSans - OFL.txt create mode 100644 Assets/Plugins/TextMesh Pro/Fonts/LiberationSans - OFL.txt.meta create mode 100644 Assets/Plugins/TextMesh Pro/Fonts/LiberationSans.ttf create mode 100644 Assets/Plugins/TextMesh Pro/Fonts/LiberationSans.ttf.meta create mode 100644 Assets/Plugins/TextMesh Pro/Resources.meta create mode 100644 Assets/Plugins/TextMesh Pro/Resources/Fonts & Materials.meta create mode 100644 Assets/Plugins/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat create mode 100644 Assets/Plugins/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat.meta create mode 100644 Assets/Plugins/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset create mode 100644 Assets/Plugins/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset.meta create mode 100644 Assets/Plugins/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat create mode 100644 Assets/Plugins/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat.meta create mode 100644 Assets/Plugins/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset create mode 100644 Assets/Plugins/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset.meta create mode 100644 Assets/Plugins/TextMesh Pro/Resources/LineBreaking Following Characters.txt create mode 100644 Assets/Plugins/TextMesh Pro/Resources/LineBreaking Following Characters.txt.meta create mode 100644 Assets/Plugins/TextMesh Pro/Resources/LineBreaking Leading Characters.txt create mode 100644 Assets/Plugins/TextMesh Pro/Resources/LineBreaking Leading Characters.txt.meta create mode 100644 Assets/Plugins/TextMesh Pro/Resources/Sprite Assets.meta create mode 100644 Assets/Plugins/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset create mode 100644 Assets/Plugins/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset.meta create mode 100644 Assets/Plugins/TextMesh Pro/Resources/Style Sheets.meta create mode 100644 Assets/Plugins/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset create mode 100644 Assets/Plugins/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset.meta create mode 100644 Assets/Plugins/TextMesh Pro/Resources/TMP Settings.asset create mode 100644 Assets/Plugins/TextMesh Pro/Resources/TMP Settings.asset.meta create mode 100644 Assets/Plugins/TextMesh Pro/Shaders.meta create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader.meta create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader.meta create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap.shader create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap.shader.meta create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF Overlay.shader create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF Overlay.shader.meta create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF SSD.shader create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF SSD.shader.meta create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader.meta create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader.meta create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader.meta create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader.meta create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader.meta create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Surface.shader create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Surface.shader.meta create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF.shader create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF.shader.meta create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_Sprite.shader create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMP_Sprite.shader.meta create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMPro.cginc create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMPro.cginc.meta create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMPro_Mobile.cginc create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMPro_Mobile.cginc.meta create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMPro_Properties.cginc create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMPro_Properties.cginc.meta create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMPro_Surface.cginc create mode 100644 Assets/Plugins/TextMesh Pro/Shaders/TMPro_Surface.cginc.meta create mode 100644 Assets/Plugins/TextMesh Pro/Sprites.meta create mode 100644 Assets/Plugins/TextMesh Pro/Sprites/EmojiOne Attribution.txt create mode 100644 Assets/Plugins/TextMesh Pro/Sprites/EmojiOne Attribution.txt.meta create mode 100644 Assets/Plugins/TextMesh Pro/Sprites/EmojiOne.json create mode 100644 Assets/Plugins/TextMesh Pro/Sprites/EmojiOne.json.meta create mode 100644 Assets/Plugins/TextMesh Pro/Sprites/EmojiOne.png create mode 100644 Assets/Plugins/TextMesh Pro/Sprites/EmojiOne.png.meta create mode 100644 Assets/Scenes.meta create mode 100644 Assets/Scenes/SampleScene.unity create mode 100644 Assets/Scenes/SampleScene.unity.meta create mode 100644 Packages/com.chark.build-tools/CHANGELOG.md create mode 100644 Packages/com.chark.build-tools/CHANGELOG.md.meta create mode 100644 Packages/com.chark.build-tools/Documentation~/README.md create mode 100644 Packages/com.chark.build-tools/Editor.meta create mode 100644 Packages/com.chark.build-tools/Editor/BuildConfiguration.cs create mode 100644 Packages/com.chark.build-tools/Editor/BuildConfiguration.cs.meta create mode 100644 Packages/com.chark.build-tools/Editor/BuildOptions.cs create mode 100644 Packages/com.chark.build-tools/Editor/BuildOptions.cs.meta create mode 100644 Packages/com.chark.build-tools/Editor/BuildToolsManagerWindow.cs create mode 100644 Packages/com.chark.build-tools/Editor/BuildToolsManagerWindow.cs.meta create mode 100644 Packages/com.chark.build-tools/Editor/BuildToolsTarget.cs create mode 100644 Packages/com.chark.build-tools/Editor/BuildToolsTarget.cs.meta create mode 100644 Packages/com.chark.build-tools/Editor/CHARK.BuildTools.Editor.asmdef create mode 100644 Packages/com.chark.build-tools/Editor/CHARK.BuildTools.Editor.asmdef.meta create mode 100644 Packages/com.chark.build-tools/Editor/Elements.meta create mode 100644 Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldout.cs create mode 100644 Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldout.cs.meta create mode 100644 Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldoutActions.cs create mode 100644 Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldoutActions.cs.meta create mode 100644 Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldoutContent.cs create mode 100644 Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldoutContent.cs.meta create mode 100644 Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationList.cs create mode 100644 Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationList.cs.meta create mode 100644 Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationListItem.cs create mode 100644 Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationListItem.cs.meta create mode 100644 Packages/com.chark.build-tools/Editor/PlayerBuilder.cs create mode 100644 Packages/com.chark.build-tools/Editor/PlayerBuilder.cs.meta create mode 100644 Packages/com.chark.build-tools/Editor/Styles.meta create mode 100644 Packages/com.chark.build-tools/Editor/Styles/BuildToolsManagerWindowStyles.uss create mode 100644 Packages/com.chark.build-tools/Editor/Styles/BuildToolsManagerWindowStyles.uss.meta create mode 100644 Packages/com.chark.build-tools/Editor/Utilities.meta create mode 100644 Packages/com.chark.build-tools/Editor/Utilities/BuildToolsAssetPostprocessor.cs create mode 100644 Packages/com.chark.build-tools/Editor/Utilities/BuildToolsAssetPostprocessor.cs.meta create mode 100644 Packages/com.chark.build-tools/Editor/Utilities/BuildToolsEditorUtilities.cs create mode 100644 Packages/com.chark.build-tools/Editor/Utilities/BuildToolsEditorUtilities.cs.meta create mode 100644 Packages/com.chark.build-tools/Editor/Utilities/CreateAssetMenuConstants.cs create mode 100644 Packages/com.chark.build-tools/Editor/Utilities/CreateAssetMenuConstants.cs.meta create mode 100644 Packages/com.chark.build-tools/Editor/Utilities/MenuItemConstants.cs create mode 100644 Packages/com.chark.build-tools/Editor/Utilities/MenuItemConstants.cs.meta create mode 100644 Packages/com.chark.build-tools/LICENSE.md create mode 100644 Packages/com.chark.build-tools/LICENSE.md.meta create mode 100644 Packages/com.chark.build-tools/Samples.meta create mode 100644 Packages/com.chark.build-tools/Samples/CHARK.BuildTools.Samples.asmdef create mode 100644 Packages/com.chark.build-tools/Samples/CHARK.BuildTools.Samples.asmdef.meta create mode 100644 Packages/com.chark.build-tools/Samples/Defaults.meta create mode 100644 Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects.meta create mode 100644 Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/AndroidBuildConfiguration.asset create mode 100644 Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/AndroidBuildConfiguration.asset.meta create mode 100644 Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/ArchiveAllBuildConfiguration.asset create mode 100644 Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/ArchiveAllBuildConfiguration.asset.meta create mode 100644 Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/WindowsBuildConfiguration.asset create mode 100644 Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/WindowsBuildConfiguration.asset.meta create mode 100644 Packages/com.chark.build-tools/package.json create mode 100644 Packages/com.chark.build-tools/package.json.meta create mode 100644 Packages/manifest.json create mode 100644 Packages/packages-lock.json create mode 100644 ProjectSettings/AudioManager.asset create mode 100644 ProjectSettings/ClusterInputManager.asset create mode 100644 ProjectSettings/DynamicsManager.asset create mode 100644 ProjectSettings/EditorBuildSettings.asset create mode 100644 ProjectSettings/EditorSettings.asset create mode 100644 ProjectSettings/GraphicsSettings.asset create mode 100644 ProjectSettings/InputManager.asset create mode 100644 ProjectSettings/MemorySettings.asset create mode 100644 ProjectSettings/NavMeshAreas.asset create mode 100644 ProjectSettings/PackageManagerSettings.asset create mode 100644 ProjectSettings/Physics2DSettings.asset create mode 100644 ProjectSettings/PresetManager.asset create mode 100644 ProjectSettings/ProjectSettings.asset create mode 100644 ProjectSettings/ProjectVersion.txt create mode 100644 ProjectSettings/QualitySettings.asset create mode 100644 ProjectSettings/SceneTemplateSettings.json create mode 100644 ProjectSettings/TagManager.asset create mode 100644 ProjectSettings/TimeManager.asset create mode 100644 ProjectSettings/TimelineSettings.asset create mode 100644 ProjectSettings/UnityConnectSettings.asset create mode 100644 ProjectSettings/VFXManager.asset create mode 100644 ProjectSettings/VersionControlSettings.asset create mode 100644 ProjectSettings/XRSettings.asset diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..f58db97 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +max_line_length = 100 +indent_style = space +indent_size = 4 +charset = utf-8 + +[*.cs] +trim_trailing_whitespace = true +insert_final_newline = true +end_of_line = crlf + +[*.{md,json,yml}] +indent_size = 2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..d1f1f45 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,57 @@ +# Unity +*.cs diff=csharp text +*.cginc text +*.shader text +*.mat merge=unityyamlmerge eol=lf +*.anim merge=unityyamlmerge eol=lf +*.unity merge=unityyamlmerge eol=lf +*.prefab merge=unityyamlmerge eol=lf +*.physicsMaterial2D merge=unityyamlmerge eol=lf +*.physicMaterial merge=unityyamlmerge eol=lf +*.asset merge=unityyamlmerge eol=lf +*.meta merge=unityyamlmerge eol=lf +*.controller merge=unityyamlmerge eol=lf + +# Line endings +packages-lock.json text eol=lf + +# Image +*.jpg filter=lfs diff=lfs merge=lfs -text +*.jpeg filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.gif filter=lfs diff=lfs merge=lfs -text +*.psd filter=lfs diff=lfs merge=lfs -text +*.ai filter=lfs diff=lfs merge=lfs -text + +# Audio +*.mp3 filter=lfs diff=lfs merge=lfs -text +*.wav filter=lfs diff=lfs merge=lfs -text +*.ogg filter=lfs diff=lfs merge=lfs -text +*.aiff filter=lfs diff=lfs merge=lfs -text + +# FMOD +*.bank filter=lfs diff=lfs merge=lfs -text + +# Video +*.mp4 filter=lfs diff=lfs merge=lfs -text +*.mov filter=lfs diff=lfs merge=lfs -text + +# 3D Objects +*.FBX filter=lfs diff=lfs merge=lfs -text +*.fbx filter=lfs diff=lfs merge=lfs -text +*.blend filter=lfs diff=lfs merge=lfs -text +*.obj filter=lfs diff=lfs merge=lfs -text + +# Other +*.a filter=lfs diff=lfs merge=lfs -text +*.exr filter=lfs diff=lfs merge=lfs -text +*.tga filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.dll filter=lfs diff=lfs merge=lfs -text +*.unitypackage filter=lfs diff=lfs merge=lfs -text +*.aif filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.rns filter=lfs diff=lfs merge=lfs -text +*.reason filter=lfs diff=lfs merge=lfs -text +*.lxo filter=lfs diff=lfs merge=lfs -text diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..a876f5a --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,9 @@ +# Contributing + +If you found a bug or want to add a feature, you are more than welcome to make a Pull Request! + +When doing so, make sure to: + +- Follow similar code style which is used in other scripts. +- Add test cases to the appropriate [Test Assemblies](../Packages/com.chark.built-tools/Tests). +- Use [Samples](../Packages/com.chark.build-tools/Samples) directory to prototype and test features. diff --git a/.github/README.md b/.github/README.md new file mode 100644 index 0000000..affe479 --- /dev/null +++ b/.github/README.md @@ -0,0 +1,42 @@ +# Scriptable Scenes + +[![Unity 2022.3+](https://img.shields.io/badge/unity-2022.3%2B-blue.svg)](https://unity3d.com/get-unity/download) +[![Actions Status](https://github.com/chark/build-tools/workflows/CI/badge.svg)](https://github.com/chark/build-tools/actions) + + Editor utilities for quickly automating builds. + +

+ +

+ +:warning: **Warning, this is a preview package, expect breaking changes between releases!** + +## Features + +- Quickly create build configurations via Scriptable Objects +- Run multiple builds in sequence +- Archive support + +## Installation + +This package can be installed via the Package Manager by [Installing from a Git URL](https://docs.unity3d.com/Manual/upm-ui-giturl.html): + +```text +https://github.com/chark/build-tools.git#upm +``` + +Alternatively, manually install by adding the following entry to `Packages/manifest.json`: +```json +{ + "com.chark.scriptable-scenes": "https://github.com/chark/build-tools.git#upm" +} +``` + +If you'd like to install a specific release, replace `upm` suffix with version number, e.g., `v0.0.1`. You can find all releases [here](https://github.com/chark/build-tools/releases). + +## Links + +- [Documentation](../Packages/com.chark.build-tools/Documentation~/README.md) +- [Contributing](CONTRIBUTING.md) +- [Changelog](../Packages/com.chark.build-tools/CHANGELOG.md) +- [License](../Packages/com.chark.build-tools/LICENSE.md) diff --git a/.github/workflows/activation.yml b/.github/workflows/activation.yml new file mode 100644 index 0000000..615c7f3 --- /dev/null +++ b/.github/workflows/activation.yml @@ -0,0 +1,22 @@ +name: Acquire activation file + +on: + workflow_dispatch: { } + +jobs: + activation: + name: Request manual activation file 🔑 + runs-on: ubuntu-latest + steps: + + # Request manual activation file + - name: Request manual activation file + id: getManualLicenseFile + uses: game-ci/unity-request-activation-file@v2 + + # Upload artifact (Unity_v20XX.X.XXXX.alf) + - name: Expose as artifact + uses: actions/upload-artifact@v2 + with: + name: ${{ steps.getManualLicenseFile.outputs.filePath }} + path: ${{ steps.getManualLicenseFile.outputs.filePath }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e0191ad --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,72 @@ +# See: https://game.ci/docs/github/getting-started +name: CI + +on: + workflow_dispatch: { } + push: + branches: [ master ] + pull_request: + branches: [ master ] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + name: Unity Tests Workflow + runs-on: ubuntu-latest + timeout-minutes: 60 + + strategy: + matrix: + unityVersion: + - 2022.3.10f1 + + steps: + + # Checkout (without LFS) + - name: Checkout Repository + uses: actions/checkout@v2 + + # Git LFS + - name: Create LFS file list + run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id + + - name: Restore LFS cache + uses: actions/cache@v2 + id: lfs-cache + with: + path: .git/lfs + key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }} + + - name: Git LFS Pull + run: | + git lfs pull + git add . + git reset --hard + + # Cache + - uses: actions/cache@v2 + with: + path: Library + key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }} + restore-keys: | + Library- + + # Test + - name: Run Tests + uses: game-ci/unity-test-runner@v3.0.0 + id: tests + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} + + # Test Results + - name: Upload Test Results + uses: actions/upload-artifact@v2 + if: always() + with: + name: Test Results + path: ${{ steps.tests.outputs.artifactsPath }} diff --git a/.github/workflows/upm.yml b/.github/workflows/upm.yml new file mode 100644 index 0000000..b142e7f --- /dev/null +++ b/.github/workflows/upm.yml @@ -0,0 +1,46 @@ +name: UPM +on: + workflow_dispatch: + inputs: + branch: + description: 'Branch' + required: true + default: 'upm' + +jobs: + deploy-upm: + name: Deploy to UPM branch + runs-on: ubuntu-latest + + env: + PACKAGE_DIR: Packages/com.chark.scriptable-scenes + SAMPLE_SRC_DIR: Samples + SAMPLE_DST_DIR: Samples~ + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Create '${{ github.event.inputs.branch }}' branch from '${{ env.PACKAGE_DIR }}' directory + run: | + git branch -d '${{ github.event.inputs.branch }}' &> /dev/null || echo '${{ github.event.inputs.branch }} branch not found' + git subtree split -P '${{ env.PACKAGE_DIR }}' -b '${{ github.event.inputs.branch }}' + git checkout '${{ github.event.inputs.branch }}' + + - name: Move '${{ env.SAMPLE_SRC_DIR }}' directory to '${{ env.SAMPLE_DST_DIR }}' + run: | + rm -f '${{ env.SAMPLE_SRC_DIR }}.meta' + git mv '${{ env.SAMPLE_SRC_DIR }}' '${{ env.SAMPLE_DST_DIR }}' + + git config --global user.name 'github-bot' + git config --global user.email 'github-bot@users.noreply.github.com' + + git add '${{ env.SAMPLE_SRC_DIR }}.meta' + git add '${{ env.SAMPLE_DST_DIR }}' + + git commit -m "Move '${{ env.SAMPLE_SRC_DIR }}' directory to '${{ env.SAMPLE_DST_DIR }}'" + + - name: Push '${{ github.event.inputs.branch }}' branch + run: | + git push -f -u origin '${{ github.event.inputs.branch }}' diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..986a80a --- /dev/null +++ b/.gitignore @@ -0,0 +1,62 @@ +[Ll]ibrary/ +[Tt]emp/ +[Oo]bj/ +[Bb]uild/ +[Bb]uilds/ +[Ll]ogs/ + +# Never ignore Asset meta data +![Aa]ssets/**/*.meta + +# Visual Studio cache directory +.vs/ + +# Gradle cache directory +.gradle/ + +# Autogenerated VS/MD/Consulo solution and project files. +ExportedObj/ +.consulo/ +*.csproj +*.unityproj +*.sln +*.suo +*.tmp +*.user +*.userprefs +*.pidb +*.booproj +*.svd +*.pdb +*.mdb +*.opendb +*.VC.db + +# Unity3D generated meta files +*.pidb.meta +*.pdb.meta +*.mdb.meta + +# Unity3D generated file on crash reports +sysinfo.txt + +# Builds +*.apk +*.unitypackage + +# Crashlytics generated file +crashlytics-build.properties + +# Unity user settings +UserSettings/ + +# Rider +.idea/ + +# Tests +InitTestScene*.unity +InitTestScene*.unity.meta + +# Odin Inspector (used for testing) +Assets/Plugins/Sirenix +Assets/Plugins/Sirenix.meta diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta new file mode 100644 index 0000000..8fa4214 --- /dev/null +++ b/Assets/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c5665464338b894449d308e5bec7413d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro.meta b/Assets/Plugins/TextMesh Pro.meta new file mode 100644 index 0000000..f9da8b5 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f54d1bd14bd3ca042bd867b519fee8cc +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Documentation.meta b/Assets/Plugins/TextMesh Pro/Documentation.meta new file mode 100644 index 0000000..afa527a --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Documentation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8e7e8f5a82a3a134e91c54efd2274ea9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf b/Assets/Plugins/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1db4e05f71cb3c0a4fe878e9969e7935e93ed148 GIT binary patch literal 131 zcmWN?NfN>!5CFh?Ucm<#40ff80>* + m_ClosingDefinition: '*' + m_OpeningTagArray: 3c00000073000000690000007a000000650000003d00000032000000650000006d0000003e0000003c000000620000003e0000003c000000230000003400000030000000660000006600000038000000300000003e0000002a000000 + m_ClosingTagArray: 2a0000003c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000 + - m_Name: Quote + m_HashCode: 92254330 + m_OpeningDefinition: + m_ClosingDefinition: + m_OpeningTagArray: 3c000000690000003e0000003c00000073000000690000007a000000650000003d0000003700000035000000250000003e0000003c0000006d000000610000007200000067000000690000006e0000003d0000003100000030000000250000003e000000 + m_ClosingTagArray: 3c0000002f000000690000003e0000003c0000002f00000073000000690000007a000000650000003e0000003c0000002f00000077000000690000006400000074000000680000003e0000003c0000002f0000006d000000610000007200000067000000690000006e0000003e000000 + - m_Name: Link + m_HashCode: 2687968 + m_OpeningDefinition: <#40a0ff> + m_ClosingDefinition: + m_OpeningTagArray: 3c000000750000003e0000003c000000230000003400000030000000610000003000000066000000660000003e0000003c0000006c000000690000006e0000006b0000003d0000002200000049000000440000005f0000003000000031000000220000003e000000 + m_ClosingTagArray: 3c0000002f000000750000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f0000006c000000690000006e0000006b0000003e000000 + - m_Name: Title + m_HashCode: 98732960 + m_OpeningDefinition: + m_ClosingDefinition: + m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000003200000035000000250000003e0000003c000000620000003e0000003c000000610000006c00000069000000670000006e0000003d00000063000000650000006e0000007400000065000000720000003e000000 + m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000610000006c00000069000000670000006e0000003e000000 + - m_Name: H2 + m_HashCode: 2426 + m_OpeningDefinition: <#4080FF> + m_ClosingDefinition: + m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000002e00000035000000650000006d0000003e0000003c000000620000003e0000003c000000230000003400000030000000380000003000000046000000460000003e000000 + m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000 + - m_Name: H3 + m_HashCode: 2427 + m_OpeningDefinition: <#FF8040> + m_ClosingDefinition: + m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000002e0000003100000037000000650000006d0000003e0000003c000000620000003e0000003c000000230000004600000046000000380000003000000034000000300000003e000000 + m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000 + - m_Name: C1 + m_HashCode: 2194 + m_OpeningDefinition: + m_ClosingDefinition: + m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000006600000066000000660000006600000034000000300000003e000000 + m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e000000 + - m_Name: C2 + m_HashCode: 2193 + m_OpeningDefinition: + m_ClosingDefinition: + m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000006600000066000000340000003000000046000000460000003e0000003c00000073000000690000007a000000650000003d000000310000003200000035000000250000003e000000 + m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f00000073000000690000007a000000650000003e000000 + - m_Name: C3 + m_HashCode: 2192 + m_OpeningDefinition: + m_ClosingDefinition: + m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000003800000030000000410000003000000046000000460000003e0000003c000000620000003e000000 + m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f000000620000003e000000 diff --git a/Assets/Plugins/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset.meta b/Assets/Plugins/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset.meta new file mode 100644 index 0000000..95fd96e --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f952c082cb03451daed3ee968ac6c63e +timeCreated: 1432805430 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Resources/TMP Settings.asset b/Assets/Plugins/TextMesh Pro/Resources/TMP Settings.asset new file mode 100644 index 0000000..c09a92f --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Resources/TMP Settings.asset @@ -0,0 +1,46 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2705215ac5b84b70bacc50632be6e391, type: 3} + m_Name: TMP Settings + m_EditorClassIdentifier: + m_enableWordWrapping: 1 + m_enableKerning: 1 + m_enableExtraPadding: 0 + m_enableTintAllSprites: 0 + m_enableParseEscapeCharacters: 1 + m_EnableRaycastTarget: 1 + m_GetFontFeaturesAtRuntime: 1 + m_missingGlyphCharacter: 0 + m_warningsDisabled: 0 + m_defaultFontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_defaultFontAssetPath: Fonts & Materials/ + m_defaultFontSize: 36 + m_defaultAutoSizeMinRatio: 0.5 + m_defaultAutoSizeMaxRatio: 2 + m_defaultTextMeshProTextContainerSize: {x: 20, y: 5} + m_defaultTextMeshProUITextContainerSize: {x: 200, y: 50} + m_autoSizeTextContainer: 0 + m_fallbackFontAssets: [] + m_matchMaterialPreset: 1 + m_defaultSpriteAsset: {fileID: 11400000, guid: c41005c129ba4d66911b75229fd70b45, + type: 2} + m_defaultSpriteAssetPath: Sprite Assets/ + m_enableEmojiSupport: 1 + m_MissingCharacterSpriteUnicode: 0 + m_defaultColorGradientPresetsPath: Color Gradient Presets/ + m_defaultStyleSheet: {fileID: 11400000, guid: f952c082cb03451daed3ee968ac6c63e, + type: 2} + m_StyleSheetsResourcePath: + m_leadingCharacters: {fileID: 4900000, guid: d82c1b31c7e74239bff1220585707d2b, type: 3} + m_followingCharacters: {fileID: 4900000, guid: fade42e8bc714b018fac513c043d323b, + type: 3} + m_UseModernHangulLineBreakingRules: 0 diff --git a/Assets/Plugins/TextMesh Pro/Resources/TMP Settings.asset.meta b/Assets/Plugins/TextMesh Pro/Resources/TMP Settings.asset.meta new file mode 100644 index 0000000..32db384 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Resources/TMP Settings.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3f5b5dff67a942289a9defa416b206f3 +timeCreated: 1436653997 +licenseType: Pro +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Shaders.meta b/Assets/Plugins/TextMesh Pro/Shaders.meta new file mode 100644 index 0000000..29a90a6 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e9f693669af91aa45ad615fc681ed29f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader b/Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader new file mode 100644 index 0000000..bab2b2c --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader @@ -0,0 +1,143 @@ +Shader "TextMeshPro/Bitmap Custom Atlas" { + +Properties { + _MainTex ("Font Atlas", 2D) = "white" {} + _FaceTex ("Font Texture", 2D) = "white" {} + [HDR]_FaceColor ("Text Color", Color) = (1,1,1,1) + + _VertexOffsetX ("Vertex OffsetX", float) = 0 + _VertexOffsetY ("Vertex OffsetY", float) = 0 + _MaskSoftnessX ("Mask SoftnessX", float) = 0 + _MaskSoftnessY ("Mask SoftnessY", float) = 0 + + _ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767) + _Padding ("Padding", float) = 0 + + _StencilComp("Stencil Comparison", Float) = 8 + _Stencil("Stencil ID", Float) = 0 + _StencilOp("Stencil Operation", Float) = 0 + _StencilWriteMask("Stencil Write Mask", Float) = 255 + _StencilReadMask("Stencil Read Mask", Float) = 255 + + _CullMode("Cull Mode", Float) = 0 + _ColorMask("Color Mask", Float) = 15 +} + +SubShader{ + + Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" } + + Stencil + { + Ref[_Stencil] + Comp[_StencilComp] + Pass[_StencilOp] + ReadMask[_StencilReadMask] + WriteMask[_StencilWriteMask] + } + + + Lighting Off + Cull [_CullMode] + ZTest [unity_GUIZTestMode] + ZWrite Off + Fog { Mode Off } + Blend SrcAlpha OneMinusSrcAlpha + ColorMask[_ColorMask] + + Pass { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #pragma multi_compile __ UNITY_UI_CLIP_RECT + #pragma multi_compile __ UNITY_UI_ALPHACLIP + + + #include "UnityCG.cginc" + + struct appdata_t { + float4 vertex : POSITION; + fixed4 color : COLOR; + float2 texcoord0 : TEXCOORD0; + float2 texcoord1 : TEXCOORD1; + }; + + struct v2f { + float4 vertex : SV_POSITION; + fixed4 color : COLOR; + float2 texcoord0 : TEXCOORD0; + float2 texcoord1 : TEXCOORD1; + float4 mask : TEXCOORD2; + }; + + uniform sampler2D _MainTex; + uniform sampler2D _FaceTex; + uniform float4 _FaceTex_ST; + uniform fixed4 _FaceColor; + + uniform float _VertexOffsetX; + uniform float _VertexOffsetY; + uniform float4 _ClipRect; + uniform float _MaskSoftnessX; + uniform float _MaskSoftnessY; + + float2 UnpackUV(float uv) + { + float2 output; + output.x = floor(uv / 4096); + output.y = uv - 4096 * output.x; + + return output * 0.001953125; + } + + v2f vert (appdata_t v) + { + float4 vert = v.vertex; + vert.x += _VertexOffsetX; + vert.y += _VertexOffsetY; + + vert.xy += (vert.w * 0.5) / _ScreenParams.xy; + + float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert)); + + fixed4 faceColor = v.color; + faceColor *= _FaceColor; + + v2f OUT; + OUT.vertex = vPosition; + OUT.color = faceColor; + OUT.texcoord0 = v.texcoord0; + OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex); + float2 pixelSize = vPosition.w; + pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1])); + + // Clamp _ClipRect to 16bit. + float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); + OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)); + + return OUT; + } + + fixed4 frag (v2f IN) : SV_Target + { + fixed4 color = tex2D(_MainTex, IN.texcoord0) * tex2D(_FaceTex, IN.texcoord1) * IN.color; + + // Alternative implementation to UnityGet2DClipping with support for softness. + #if UNITY_UI_CLIP_RECT + half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw); + color *= m.x * m.y; + #endif + + #if UNITY_UI_ALPHACLIP + clip(color.a - 0.001); + #endif + + return color; + } + ENDCG + } +} + + CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI" +} diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader.meta b/Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader.meta new file mode 100644 index 0000000..0a416c8 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 48bb5f55d8670e349b6e614913f9d910 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader b/Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader new file mode 100644 index 0000000..006a271 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader @@ -0,0 +1,145 @@ +Shader "TextMeshPro/Mobile/Bitmap" { + +Properties { + _MainTex ("Font Atlas", 2D) = "white" {} + [HDR]_Color ("Text Color", Color) = (1,1,1,1) + _DiffusePower ("Diffuse Power", Range(1.0,4.0)) = 1.0 + + _VertexOffsetX("Vertex OffsetX", float) = 0 + _VertexOffsetY("Vertex OffsetY", float) = 0 + _MaskSoftnessX("Mask SoftnessX", float) = 0 + _MaskSoftnessY("Mask SoftnessY", float) = 0 + + _ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767) + + _StencilComp("Stencil Comparison", Float) = 8 + _Stencil("Stencil ID", Float) = 0 + _StencilOp("Stencil Operation", Float) = 0 + _StencilWriteMask("Stencil Write Mask", Float) = 255 + _StencilReadMask("Stencil Read Mask", Float) = 255 + + _CullMode("Cull Mode", Float) = 0 + _ColorMask("Color Mask", Float) = 15 +} + +SubShader { + + Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } + + Stencil + { + Ref[_Stencil] + Comp[_StencilComp] + Pass[_StencilOp] + ReadMask[_StencilReadMask] + WriteMask[_StencilWriteMask] + } + + + Lighting Off + Cull [_CullMode] + ZTest [unity_GUIZTestMode] + ZWrite Off + Fog { Mode Off } + Blend SrcAlpha OneMinusSrcAlpha + ColorMask[_ColorMask] + + Pass { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma multi_compile __ UNITY_UI_CLIP_RECT + #pragma multi_compile __ UNITY_UI_ALPHACLIP + + + #include "UnityCG.cginc" + + struct appdata_t { + float4 vertex : POSITION; + fixed4 color : COLOR; + float2 texcoord0 : TEXCOORD0; + float2 texcoord1 : TEXCOORD1; + }; + + struct v2f { + float4 vertex : POSITION; + fixed4 color : COLOR; + float2 texcoord0 : TEXCOORD0; + float4 mask : TEXCOORD2; + }; + + sampler2D _MainTex; + fixed4 _Color; + float _DiffusePower; + + uniform float _VertexOffsetX; + uniform float _VertexOffsetY; + uniform float4 _ClipRect; + uniform float _MaskSoftnessX; + uniform float _MaskSoftnessY; + + v2f vert (appdata_t v) + { + v2f OUT; + float4 vert = v.vertex; + vert.x += _VertexOffsetX; + vert.y += _VertexOffsetY; + + vert.xy += (vert.w * 0.5) / _ScreenParams.xy; + + OUT.vertex = UnityPixelSnap(UnityObjectToClipPos(vert)); + OUT.color = v.color; + OUT.color *= _Color; + OUT.color.rgb *= _DiffusePower; + OUT.texcoord0 = v.texcoord0; + + float2 pixelSize = OUT.vertex.w; + //pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1])); + + // Clamp _ClipRect to 16bit. + float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); + OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)); + + return OUT; + } + + fixed4 frag (v2f IN) : COLOR + { + fixed4 color = fixed4(IN.color.rgb, IN.color.a * tex2D(_MainTex, IN.texcoord0).a); + + // Alternative implementation to UnityGet2DClipping with support for softness. + #if UNITY_UI_CLIP_RECT + half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw); + color *= m.x * m.y; + #endif + + #if UNITY_UI_ALPHACLIP + clip(color.a - 0.001); + #endif + + return color; + } + ENDCG + } +} + +SubShader { + Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } + Lighting Off Cull Off ZTest Always ZWrite Off Fog { Mode Off } + Blend SrcAlpha OneMinusSrcAlpha + BindChannels { + Bind "Color", color + Bind "Vertex", vertex + Bind "TexCoord", texcoord0 + } + Pass { + SetTexture [_MainTex] { + constantColor [_Color] combine constant * primary, constant * texture + } + } +} + +CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI" +} diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader.meta b/Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader.meta new file mode 100644 index 0000000..d5fb125 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1e3b057af24249748ff873be7fafee47 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap.shader b/Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap.shader new file mode 100644 index 0000000..8ce4937 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap.shader @@ -0,0 +1,143 @@ +Shader "TextMeshPro/Bitmap" { + +Properties { + _MainTex ("Font Atlas", 2D) = "white" {} + _FaceTex ("Font Texture", 2D) = "white" {} + [HDR]_FaceColor ("Text Color", Color) = (1,1,1,1) + + _VertexOffsetX ("Vertex OffsetX", float) = 0 + _VertexOffsetY ("Vertex OffsetY", float) = 0 + _MaskSoftnessX ("Mask SoftnessX", float) = 0 + _MaskSoftnessY ("Mask SoftnessY", float) = 0 + + _ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767) + + _StencilComp("Stencil Comparison", Float) = 8 + _Stencil("Stencil ID", Float) = 0 + _StencilOp("Stencil Operation", Float) = 0 + _StencilWriteMask("Stencil Write Mask", Float) = 255 + _StencilReadMask("Stencil Read Mask", Float) = 255 + + _CullMode("Cull Mode", Float) = 0 + _ColorMask("Color Mask", Float) = 15 +} + +SubShader{ + + Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" } + + Stencil + { + Ref[_Stencil] + Comp[_StencilComp] + Pass[_StencilOp] + ReadMask[_StencilReadMask] + WriteMask[_StencilWriteMask] + } + + + Lighting Off + Cull [_CullMode] + ZTest [unity_GUIZTestMode] + ZWrite Off + Fog { Mode Off } + Blend SrcAlpha OneMinusSrcAlpha + ColorMask[_ColorMask] + + Pass { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + + #pragma multi_compile __ UNITY_UI_CLIP_RECT + #pragma multi_compile __ UNITY_UI_ALPHACLIP + + + #include "UnityCG.cginc" + + struct appdata_t { + float4 vertex : POSITION; + fixed4 color : COLOR; + float2 texcoord0 : TEXCOORD0; + float2 texcoord1 : TEXCOORD1; + }; + + struct v2f { + float4 vertex : SV_POSITION; + fixed4 color : COLOR; + float2 texcoord0 : TEXCOORD0; + float2 texcoord1 : TEXCOORD1; + float4 mask : TEXCOORD2; + }; + + uniform sampler2D _MainTex; + uniform sampler2D _FaceTex; + uniform float4 _FaceTex_ST; + uniform fixed4 _FaceColor; + + uniform float _VertexOffsetX; + uniform float _VertexOffsetY; + uniform float4 _ClipRect; + uniform float _MaskSoftnessX; + uniform float _MaskSoftnessY; + + float2 UnpackUV(float uv) + { + float2 output; + output.x = floor(uv / 4096); + output.y = uv - 4096 * output.x; + + return output * 0.001953125; + } + + v2f vert (appdata_t v) + { + float4 vert = v.vertex; + vert.x += _VertexOffsetX; + vert.y += _VertexOffsetY; + + vert.xy += (vert.w * 0.5) / _ScreenParams.xy; + + float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert)); + + fixed4 faceColor = v.color; + faceColor *= _FaceColor; + + v2f OUT; + OUT.vertex = vPosition; + OUT.color = faceColor; + OUT.texcoord0 = v.texcoord0; + OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex); + float2 pixelSize = vPosition.w; + pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1])); + + // Clamp _ClipRect to 16bit. + float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); + OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)); + + return OUT; + } + + fixed4 frag (v2f IN) : SV_Target + { + fixed4 color = tex2D(_MainTex, IN.texcoord0); + color = fixed4 (tex2D(_FaceTex, IN.texcoord1).rgb * IN.color.rgb, IN.color.a * color.a); + + // Alternative implementation to UnityGet2DClipping with support for softness. + #if UNITY_UI_CLIP_RECT + half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw); + color *= m.x * m.y; + #endif + + #if UNITY_UI_ALPHACLIP + clip(color.a - 0.001); + #endif + + return color; + } + ENDCG + } +} + + CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI" +} diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap.shader.meta b/Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap.shader.meta new file mode 100644 index 0000000..7eb1870 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_Bitmap.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 128e987d567d4e2c824d754223b3f3b0 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF Overlay.shader b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF Overlay.shader new file mode 100644 index 0000000..c50c593 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF Overlay.shader @@ -0,0 +1,317 @@ +Shader "TextMeshPro/Distance Field Overlay" { + +Properties { + _FaceTex ("Face Texture", 2D) = "white" {} + _FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0 + _FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0 + [HDR]_FaceColor ("Face Color", Color) = (1,1,1,1) + _FaceDilate ("Face Dilate", Range(-1,1)) = 0 + + [HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1) + _OutlineTex ("Outline Texture", 2D) = "white" {} + _OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0 + _OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0 + _OutlineWidth ("Outline Thickness", Range(0, 1)) = 0 + _OutlineSoftness ("Outline Softness", Range(0,1)) = 0 + + _Bevel ("Bevel", Range(0,1)) = 0.5 + _BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0 + _BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0 + _BevelClamp ("Bevel Clamp", Range(0,1)) = 0 + _BevelRoundness ("Bevel Roundness", Range(0,1)) = 0 + + _LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416 + [HDR]_SpecularColor ("Specular", Color) = (1,1,1,1) + _SpecularPower ("Specular", Range(0,4)) = 2.0 + _Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10 + _Diffuse ("Diffuse", Range(0,1)) = 0.5 + _Ambient ("Ambient", Range(1,0)) = 0.5 + + _BumpMap ("Normal map", 2D) = "bump" {} + _BumpOutline ("Bump Outline", Range(0,1)) = 0 + _BumpFace ("Bump Face", Range(0,1)) = 0 + + _ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1) + _ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1) + _Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ } + _EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0) + + + [HDR]_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5) + _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 + _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 + _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 + _UnderlaySoftness ("Border Softness", Range(0,1)) = 0 + + [HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5) + _GlowOffset ("Offset", Range(-1,1)) = 0 + _GlowInner ("Inner", Range(0,1)) = 0.05 + _GlowOuter ("Outer", Range(0,1)) = 0.05 + _GlowPower ("Falloff", Range(1, 0)) = 0.75 + + _WeightNormal ("Weight Normal", float) = 0 + _WeightBold ("Weight Bold", float) = 0.5 + + _ShaderFlags ("Flags", float) = 0 + _ScaleRatioA ("Scale RatioA", float) = 1 + _ScaleRatioB ("Scale RatioB", float) = 1 + _ScaleRatioC ("Scale RatioC", float) = 1 + + _MainTex ("Font Atlas", 2D) = "white" {} + _TextureWidth ("Texture Width", float) = 512 + _TextureHeight ("Texture Height", float) = 512 + _GradientScale ("Gradient Scale", float) = 5.0 + _ScaleX ("Scale X", float) = 1.0 + _ScaleY ("Scale Y", float) = 1.0 + _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 + _Sharpness ("Sharpness", Range(-1,1)) = 0 + + _VertexOffsetX ("Vertex OffsetX", float) = 0 + _VertexOffsetY ("Vertex OffsetY", float) = 0 + + _MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767) + _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) + _MaskSoftnessX ("Mask SoftnessX", float) = 0 + _MaskSoftnessY ("Mask SoftnessY", float) = 0 + + _StencilComp ("Stencil Comparison", Float) = 8 + _Stencil ("Stencil ID", Float) = 0 + _StencilOp ("Stencil Operation", Float) = 0 + _StencilWriteMask ("Stencil Write Mask", Float) = 255 + _StencilReadMask ("Stencil Read Mask", Float) = 255 + + _CullMode ("Cull Mode", Float) = 0 + _ColorMask ("Color Mask", Float) = 15 +} + +SubShader { + + Tags + { + "Queue"="Overlay" + "IgnoreProjector"="True" + "RenderType"="Transparent" + } + + Stencil + { + Ref [_Stencil] + Comp [_StencilComp] + Pass [_StencilOp] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + } + + Cull [_CullMode] + ZWrite Off + Lighting Off + Fog { Mode Off } + ZTest Always + Blend One OneMinusSrcAlpha + ColorMask [_ColorMask] + + Pass { + CGPROGRAM + #pragma target 3.0 + #pragma vertex VertShader + #pragma fragment PixShader + #pragma shader_feature __ BEVEL_ON + #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER + #pragma shader_feature __ GLOW_ON + + #pragma multi_compile __ UNITY_UI_CLIP_RECT + #pragma multi_compile __ UNITY_UI_ALPHACLIP + + #include "UnityCG.cginc" + #include "UnityUI.cginc" + #include "TMPro_Properties.cginc" + #include "TMPro.cginc" + + struct vertex_t { + UNITY_VERTEX_INPUT_INSTANCE_ID + float4 position : POSITION; + float3 normal : NORMAL; + fixed4 color : COLOR; + float2 texcoord0 : TEXCOORD0; + float2 texcoord1 : TEXCOORD1; + }; + + + struct pixel_t { + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + float4 position : SV_POSITION; + fixed4 color : COLOR; + float2 atlas : TEXCOORD0; // Atlas + float4 param : TEXCOORD1; // alphaClip, scale, bias, weight + float4 mask : TEXCOORD2; // Position in object space(xy), pixel Size(zw) + float3 viewDir : TEXCOORD3; + + #if (UNDERLAY_ON || UNDERLAY_INNER) + float4 texcoord2 : TEXCOORD4; // u,v, scale, bias + fixed4 underlayColor : COLOR1; + #endif + float4 textures : TEXCOORD5; + }; + + // Used by Unity internally to handle Texture Tiling and Offset. + float4 _FaceTex_ST; + float4 _OutlineTex_ST; + + pixel_t VertShader(vertex_t input) + { + pixel_t output; + + UNITY_INITIALIZE_OUTPUT(pixel_t, output); + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input,output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + float bold = step(input.texcoord1.y, 0); + + float4 vert = input.position; + vert.x += _VertexOffsetX; + vert.y += _VertexOffsetY; + + float4 vPosition = UnityObjectToClipPos(vert); + + float2 pixelSize = vPosition.w; + pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy)); + float scale = rsqrt(dot(pixelSize, pixelSize)); + scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1); + if (UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert))))); + + float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0; + weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5; + + float bias =(.5 - weight) + (.5 / scale); + + float alphaClip = (1.0 - _OutlineWidth*_ScaleRatioA - _OutlineSoftness*_ScaleRatioA); + + #if GLOW_ON + alphaClip = min(alphaClip, 1.0 - _GlowOffset * _ScaleRatioB - _GlowOuter * _ScaleRatioB); + #endif + + alphaClip = alphaClip / 2.0 - ( .5 / scale) - weight; + + #if (UNDERLAY_ON || UNDERLAY_INNER) + float4 underlayColor = _UnderlayColor; + underlayColor.rgb *= underlayColor.a; + + float bScale = scale; + bScale /= 1 + ((_UnderlaySoftness*_ScaleRatioC) * bScale); + float bBias = (0.5 - weight) * bScale - 0.5 - ((_UnderlayDilate * _ScaleRatioC) * 0.5 * bScale); + + float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth; + float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight; + float2 bOffset = float2(x, y); + #endif + + // Generate UV for the Masking Texture + float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); + float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy); + + // Support for texture tiling and offset + float2 textureUV = UnpackUV(input.texcoord1.x); + float2 faceUV = TRANSFORM_TEX(textureUV, _FaceTex); + float2 outlineUV = TRANSFORM_TEX(textureUV, _OutlineTex); + + + output.position = vPosition; + output.color = input.color; + output.atlas = input.texcoord0; + output.param = float4(alphaClip, scale, bias, weight); + output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)); + output.viewDir = mul((float3x3)_EnvMatrix, _WorldSpaceCameraPos.xyz - mul(unity_ObjectToWorld, vert).xyz); + #if (UNDERLAY_ON || UNDERLAY_INNER) + output.texcoord2 = float4(input.texcoord0 + bOffset, bScale, bBias); + output.underlayColor = underlayColor; + #endif + output.textures = float4(faceUV, outlineUV); + + return output; + } + + + fixed4 PixShader(pixel_t input) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(input); + + float c = tex2D(_MainTex, input.atlas).a; + + #ifndef UNDERLAY_ON + clip(c - input.param.x); + #endif + + float scale = input.param.y; + float bias = input.param.z; + float weight = input.param.w; + float sd = (bias - c) * scale; + + float outline = (_OutlineWidth * _ScaleRatioA) * scale; + float softness = (_OutlineSoftness * _ScaleRatioA) * scale; + + half4 faceColor = _FaceColor; + half4 outlineColor = _OutlineColor; + + faceColor.rgb *= input.color.rgb; + + faceColor *= tex2D(_FaceTex, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y); + outlineColor *= tex2D(_OutlineTex, input.textures.zw + float2(_OutlineUVSpeedX, _OutlineUVSpeedY) * _Time.y); + + faceColor = GetColor(sd, faceColor, outlineColor, outline, softness); + + #if BEVEL_ON + float3 dxy = float3(0.5 / _TextureWidth, 0.5 / _TextureHeight, 0); + float3 n = GetSurfaceNormal(input.atlas, weight, dxy); + + float3 bump = UnpackNormal(tex2D(_BumpMap, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y)).xyz; + bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5)); + n = normalize(n- bump); + + float3 light = normalize(float3(sin(_LightAngle), cos(_LightAngle), -1.0)); + + float3 col = GetSpecular(n, light); + faceColor.rgb += col*faceColor.a; + faceColor.rgb *= 1-(dot(n, light)*_Diffuse); + faceColor.rgb *= lerp(_Ambient, 1, n.z*n.z); + + fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n)); + faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a; + #endif + + #if UNDERLAY_ON + float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z; + faceColor += input.underlayColor * saturate(d - input.texcoord2.w) * (1 - faceColor.a); + #endif + + #if UNDERLAY_INNER + float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z; + faceColor += input.underlayColor * (1 - saturate(d - input.texcoord2.w)) * saturate(1 - sd) * (1 - faceColor.a); + #endif + + #if GLOW_ON + float4 glowColor = GetGlowColor(sd, scale); + faceColor.rgb += glowColor.rgb * glowColor.a; + #endif + + // Alternative implementation to UnityGet2DClipping with support for softness. + #if UNITY_UI_CLIP_RECT + half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw); + faceColor *= m.x * m.y; + #endif + + #if UNITY_UI_ALPHACLIP + clip(faceColor.a - 0.001); + #endif + + return faceColor * input.color.a; + } + + ENDCG + } +} + +Fallback "TextMeshPro/Mobile/Distance Field" +CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" +} diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF Overlay.shader.meta b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF Overlay.shader.meta new file mode 100644 index 0000000..56284e9 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF Overlay.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: dd89cf5b9246416f84610a006f916af7 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF SSD.shader b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF SSD.shader new file mode 100644 index 0000000..ed48574 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF SSD.shader @@ -0,0 +1,310 @@ +Shader "TextMeshPro/Distance Field SSD" { + +Properties { + _FaceTex ("Face Texture", 2D) = "white" {} + _FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0 + _FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0 + [HDR]_FaceColor ("Face Color", Color) = (1,1,1,1) + _FaceDilate ("Face Dilate", Range(-1,1)) = 0 + + [HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1) + _OutlineTex ("Outline Texture", 2D) = "white" {} + _OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0 + _OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0 + _OutlineWidth ("Outline Thickness", Range(0, 1)) = 0 + _OutlineSoftness ("Outline Softness", Range(0,1)) = 0 + + _Bevel ("Bevel", Range(0,1)) = 0.5 + _BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0 + _BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0 + _BevelClamp ("Bevel Clamp", Range(0,1)) = 0 + _BevelRoundness ("Bevel Roundness", Range(0,1)) = 0 + + _LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416 + [HDR]_SpecularColor ("Specular", Color) = (1,1,1,1) + _SpecularPower ("Specular", Range(0,4)) = 2.0 + _Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10 + _Diffuse ("Diffuse", Range(0,1)) = 0.5 + _Ambient ("Ambient", Range(1,0)) = 0.5 + + _BumpMap ("Normal map", 2D) = "bump" {} + _BumpOutline ("Bump Outline", Range(0,1)) = 0 + _BumpFace ("Bump Face", Range(0,1)) = 0 + + _ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1) + _ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1) + _Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ } + _EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0) + + + [HDR]_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5) + _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 + _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 + _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 + _UnderlaySoftness ("Border Softness", Range(0,1)) = 0 + + [HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5) + _GlowOffset ("Offset", Range(-1,1)) = 0 + _GlowInner ("Inner", Range(0,1)) = 0.05 + _GlowOuter ("Outer", Range(0,1)) = 0.05 + _GlowPower ("Falloff", Range(1, 0)) = 0.75 + + _WeightNormal ("Weight Normal", float) = 0 + _WeightBold ("Weight Bold", float) = 0.5 + + _ShaderFlags ("Flags", float) = 0 + _ScaleRatioA ("Scale RatioA", float) = 1 + _ScaleRatioB ("Scale RatioB", float) = 1 + _ScaleRatioC ("Scale RatioC", float) = 1 + + _MainTex ("Font Atlas", 2D) = "white" {} + _TextureWidth ("Texture Width", float) = 512 + _TextureHeight ("Texture Height", float) = 512 + _GradientScale ("Gradient Scale", float) = 5.0 + _ScaleX ("Scale X", float) = 1.0 + _ScaleY ("Scale Y", float) = 1.0 + _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 + _Sharpness ("Sharpness", Range(-1,1)) = 0 + + _VertexOffsetX ("Vertex OffsetX", float) = 0 + _VertexOffsetY ("Vertex OffsetY", float) = 0 + + _MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767) + _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) + _MaskSoftnessX ("Mask SoftnessX", float) = 0 + _MaskSoftnessY ("Mask SoftnessY", float) = 0 + + _StencilComp ("Stencil Comparison", Float) = 8 + _Stencil ("Stencil ID", Float) = 0 + _StencilOp ("Stencil Operation", Float) = 0 + _StencilWriteMask ("Stencil Write Mask", Float) = 255 + _StencilReadMask ("Stencil Read Mask", Float) = 255 + + _CullMode ("Cull Mode", Float) = 0 + _ColorMask ("Color Mask", Float) = 15 +} + +SubShader { + Tags + { + "Queue" = "Transparent" + "IgnoreProjector" = "True" + "RenderType" = "Transparent" + } + + Stencil + { + Ref[_Stencil] + Comp[_StencilComp] + Pass[_StencilOp] + ReadMask[_StencilReadMask] + WriteMask[_StencilWriteMask] + } + + Cull[_CullMode] + ZWrite Off + Lighting Off + Fog { Mode Off } + ZTest[unity_GUIZTestMode] + Blend One OneMinusSrcAlpha + ColorMask[_ColorMask] + + Pass { + CGPROGRAM + #pragma target 3.0 + #pragma vertex VertShader + #pragma fragment PixShader + #pragma shader_feature __ BEVEL_ON + #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER + #pragma shader_feature __ GLOW_ON + #pragma shader_feature __ FORCE_LINEAR + + #pragma multi_compile __ UNITY_UI_CLIP_RECT + #pragma multi_compile __ UNITY_UI_ALPHACLIP + + #include "UnityCG.cginc" + #include "UnityUI.cginc" + #include "TMPro_Properties.cginc" + #include "TMPro.cginc" + + struct vertex_t { + UNITY_VERTEX_INPUT_INSTANCE_ID + float4 position : POSITION; + float3 normal : NORMAL; + float4 color : COLOR; + float2 texcoord0 : TEXCOORD0; + float2 texcoord1 : TEXCOORD1; + }; + + + struct pixel_t { + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + float4 position : SV_POSITION; + float4 color : COLOR; + float2 atlas : TEXCOORD0; + float weight : TEXCOORD1; + float2 mask : TEXCOORD2; // Position in object space(xy) + float3 viewDir : TEXCOORD3; + + #if (UNDERLAY_ON || UNDERLAY_INNER) + float2 texcoord2 : TEXCOORD4; + float4 underlayColor : COLOR1; + #endif + float4 textures : TEXCOORD5; + }; + + // Used by Unity internally to handle Texture Tiling and Offset. + float4 _FaceTex_ST; + float4 _OutlineTex_ST; + + float4 SRGBToLinear(float4 rgba) { + return float4(lerp(rgba.rgb / 12.92f, pow((rgba.rgb + 0.055f) / 1.055f, 2.4f), step(0.04045f, rgba.rgb)), rgba.a); + } + + pixel_t VertShader(vertex_t input) + { + pixel_t output; + + UNITY_INITIALIZE_OUTPUT(pixel_t, output); + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input,output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + float bold = step(input.texcoord1.y, 0); + + float4 vert = input.position; + vert.x += _VertexOffsetX; + vert.y += _VertexOffsetY; + + float4 vPosition = UnityObjectToClipPos(vert); + + float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0; + weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5; + + #if (UNDERLAY_ON || UNDERLAY_INNER) + float4 underlayColor = _UnderlayColor; + underlayColor.rgb *= underlayColor.a; + + float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth; + float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight; + float2 bOffset = float2(x, y); + #endif + + // Generate UV for the Masking Texture + float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); + + // Support for texture tiling and offset + float2 textureUV = UnpackUV(input.texcoord1.x); + float2 faceUV = TRANSFORM_TEX(textureUV, _FaceTex); + float2 outlineUV = TRANSFORM_TEX(textureUV, _OutlineTex); + + float4 color = input.color; + #if (FORCE_LINEAR && !UNITY_COLORSPACE_GAMMA) + color = SRGBToLinear(input.color); + #endif + + output.position = vPosition; + output.color = color; + output.atlas = input.texcoord0; + output.weight = weight; + output.mask = half2(vert.xy * 2 - clampedRect.xy - clampedRect.zw); + output.viewDir = mul((float3x3)_EnvMatrix, _WorldSpaceCameraPos.xyz - mul(unity_ObjectToWorld, vert).xyz); + #if (UNDERLAY_ON || UNDERLAY_INNER) + output.texcoord2 = input.texcoord0 + bOffset; + output.underlayColor = underlayColor; + #endif + output.textures = float4(faceUV, outlineUV); + + return output; + } + + + fixed4 PixShader(pixel_t input) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(input); + + float c = tex2D(_MainTex, input.atlas).a; + + float2 pixelSize = float2(ddx(input.atlas.y), ddy(input.atlas.y)); + pixelSize *= _TextureWidth * .75; + float scale = rsqrt(dot(pixelSize, pixelSize)) * _GradientScale * (_Sharpness + 1); + + float weight = input.weight; + float bias = (.5 - weight) + (.5 / scale); + float sd = (bias - c) * scale; + + float outline = (_OutlineWidth * _ScaleRatioA) * scale; + float softness = (_OutlineSoftness * _ScaleRatioA) * scale; + + half4 faceColor = _FaceColor; + half4 outlineColor = _OutlineColor; + + faceColor.rgb *= input.color.rgb; + + faceColor *= tex2D(_FaceTex, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y); + outlineColor *= tex2D(_OutlineTex, input.textures.zw + float2(_OutlineUVSpeedX, _OutlineUVSpeedY) * _Time.y); + + faceColor = GetColor(sd, faceColor, outlineColor, outline, softness); + + #if BEVEL_ON + float3 dxy = float3(0.5 / _TextureWidth, 0.5 / _TextureHeight, 0); + float3 n = GetSurfaceNormal(input.atlas, weight, dxy); + + float3 bump = UnpackNormal(tex2D(_BumpMap, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y)).xyz; + bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5)); + n = normalize(n - bump); + + float3 light = normalize(float3(sin(_LightAngle), cos(_LightAngle), -1.0)); + + float3 col = GetSpecular(n, light); + faceColor.rgb += col * faceColor.a; + faceColor.rgb *= 1 - (dot(n, light) * _Diffuse); + faceColor.rgb *= lerp(_Ambient, 1, n.z * n.z); + + fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n)); + faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a; + #endif + + #if (UNDERLAY_ON || UNDERLAY_INNER) + float bScale = scale; + bScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * bScale); + float bBias = (0.5 - weight) * bScale - 0.5 - ((_UnderlayDilate * _ScaleRatioC) * 0.5 * bScale); + #endif + + #if UNDERLAY_ON + float d = tex2D(_MainTex, input.texcoord2.xy).a * bScale; + faceColor += input.underlayColor * saturate(d - bBias) * (1 - faceColor.a); + #endif + + #if UNDERLAY_INNER + float d = tex2D(_MainTex, input.texcoord2.xy).a * bScale; + faceColor += input.underlayColor * (1 - saturate(d - bBias)) * saturate(1 - sd) * (1 - faceColor.a); + #endif + + #if GLOW_ON + float4 glowColor = GetGlowColor(sd, scale); + faceColor.rgb += glowColor.rgb * glowColor.a; + #endif + + // Alternative implementation to UnityGet2DClipping with support for softness. + #if UNITY_UI_CLIP_RECT + float2 maskZW = 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + (1 / scale)); + half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * maskZW); + faceColor *= m.x * m.y; + #endif + + #if UNITY_UI_ALPHACLIP + clip(faceColor.a - 0.001); + #endif + + return faceColor * input.color.a; + } + + ENDCG + } +} + +Fallback "TextMeshPro/Mobile/Distance Field" +CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" +} diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF SSD.shader.meta b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF SSD.shader.meta new file mode 100644 index 0000000..08cd8ae --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF SSD.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 14eb328de4b8eb245bb7cea29e4ac00b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader new file mode 100644 index 0000000..7019aaf --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader @@ -0,0 +1,247 @@ +// Simplified SDF shader: +// - No Shading Option (bevel / bump / env map) +// - No Glow Option +// - Softness is applied on both side of the outline + +Shader "TextMeshPro/Mobile/Distance Field - Masking" { + +Properties { + [HDR]_FaceColor ("Face Color", Color) = (1,1,1,1) + _FaceDilate ("Face Dilate", Range(-1,1)) = 0 + + [HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1) + _OutlineWidth ("Outline Thickness", Range(0,1)) = 0 + _OutlineSoftness ("Outline Softness", Range(0,1)) = 0 + + [HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5) + _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 + _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 + _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 + _UnderlaySoftness ("Border Softness", Range(0,1)) = 0 + + _WeightNormal ("Weight Normal", float) = 0 + _WeightBold ("Weight Bold", float) = .5 + + _ShaderFlags ("Flags", float) = 0 + _ScaleRatioA ("Scale RatioA", float) = 1 + _ScaleRatioB ("Scale RatioB", float) = 1 + _ScaleRatioC ("Scale RatioC", float) = 1 + + _MainTex ("Font Atlas", 2D) = "white" {} + _TextureWidth ("Texture Width", float) = 512 + _TextureHeight ("Texture Height", float) = 512 + _GradientScale ("Gradient Scale", float) = 5 + _ScaleX ("Scale X", float) = 1 + _ScaleY ("Scale Y", float) = 1 + _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 + _Sharpness ("Sharpness", Range(-1,1)) = 0 + + _VertexOffsetX ("Vertex OffsetX", float) = 0 + _VertexOffsetY ("Vertex OffsetY", float) = 0 + + _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) + _MaskSoftnessX ("Mask SoftnessX", float) = 0 + _MaskSoftnessY ("Mask SoftnessY", float) = 0 + _MaskTex ("Mask Texture", 2D) = "white" {} + _MaskInverse ("Inverse", float) = 0 + _MaskEdgeColor ("Edge Color", Color) = (1,1,1,1) + _MaskEdgeSoftness ("Edge Softness", Range(0, 1)) = 0.01 + _MaskWipeControl ("Wipe Position", Range(0, 1)) = 0.5 + + _StencilComp ("Stencil Comparison", Float) = 8 + _Stencil ("Stencil ID", Float) = 0 + _StencilOp ("Stencil Operation", Float) = 0 + _StencilWriteMask ("Stencil Write Mask", Float) = 255 + _StencilReadMask ("Stencil Read Mask", Float) = 255 + + _CullMode ("Cull Mode", Float) = 0 + _ColorMask ("Color Mask", Float) = 15 +} + +SubShader { + Tags + { + "Queue"="Transparent" + "IgnoreProjector"="True" + "RenderType"="Transparent" + } + + + Stencil + { + Ref [_Stencil] + Comp [_StencilComp] + Pass [_StencilOp] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + } + + Cull [_CullMode] + ZWrite Off + Lighting Off + Fog { Mode Off } + ZTest [unity_GUIZTestMode] + Blend One OneMinusSrcAlpha + ColorMask [_ColorMask] + + Pass { + CGPROGRAM + #pragma vertex VertShader + #pragma fragment PixShader + #pragma shader_feature __ OUTLINE_ON + #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER + + #pragma multi_compile __ UNITY_UI_CLIP_RECT + #pragma multi_compile __ UNITY_UI_ALPHACLIP + + + #include "UnityCG.cginc" + #include "UnityUI.cginc" + #include "TMPro_Properties.cginc" + + struct vertex_t { + float4 vertex : POSITION; + float3 normal : NORMAL; + fixed4 color : COLOR; + float2 texcoord0 : TEXCOORD0; + float2 texcoord1 : TEXCOORD1; + }; + + struct pixel_t { + float4 vertex : SV_POSITION; + fixed4 faceColor : COLOR; + fixed4 outlineColor : COLOR1; + float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV + half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w) + half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw) + #if (UNDERLAY_ON | UNDERLAY_INNER) + float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved + half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y) + #endif + }; + + float _MaskWipeControl; + float _MaskEdgeSoftness; + fixed4 _MaskEdgeColor; + bool _MaskInverse; + + pixel_t VertShader(vertex_t input) + { + float bold = step(input.texcoord1.y, 0); + + float4 vert = input.vertex; + vert.x += _VertexOffsetX; + vert.y += _VertexOffsetY; + float4 vPosition = UnityObjectToClipPos(vert); + + float2 pixelSize = vPosition.w; + pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy)); + + float scale = rsqrt(dot(pixelSize, pixelSize)); + scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1); + if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert))))); + + float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0; + weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5; + + float layerScale = scale; + + scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale); + float bias = (0.5 - weight) * scale - 0.5; + float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale; + + float opacity = input.color.a; + #if (UNDERLAY_ON | UNDERLAY_INNER) + opacity = 1.0; + #endif + + fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor; + faceColor.rgb *= faceColor.a; + + fixed4 outlineColor = _OutlineColor; + outlineColor.a *= opacity; + outlineColor.rgb *= outlineColor.a; + outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2)))); + + #if (UNDERLAY_ON | UNDERLAY_INNER) + + layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale); + float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale); + + float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth; + float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight; + float2 layerOffset = float2(x, y); + #endif + + // Generate UV for the Masking Texture + float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); + float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy); + + // Structure for pixel shader + pixel_t output = { + vPosition, + faceColor, + outlineColor, + float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y), + half4(scale, bias - outline, bias + outline, bias), + half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)), + #if (UNDERLAY_ON | UNDERLAY_INNER) + float4(input.texcoord0 + layerOffset, input.color.a, 0), + half2(layerScale, layerBias), + #endif + }; + + return output; + } + + + // PIXEL SHADER + fixed4 PixShader(pixel_t input) : SV_Target + { + half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x; + half4 c = input.faceColor * saturate(d - input.param.w); + + #ifdef OUTLINE_ON + c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z)); + c *= saturate(d - input.param.y); + #endif + + #if UNDERLAY_ON + d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x; + c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a); + #endif + + #if UNDERLAY_INNER + half sd = saturate(d - input.param.z); + d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x; + c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a); + #endif + + // Alternative implementation to UnityGet2DClipping with support for softness. + //#if UNITY_UI_CLIP_RECT + half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw); + c *= m.x * m.y; + //#endif + + float a = abs(_MaskInverse - tex2D(_MaskTex, input.texcoord0.zw).a); + float t = a + (1 - _MaskWipeControl) * _MaskEdgeSoftness - _MaskWipeControl; + a = saturate(t / _MaskEdgeSoftness); + c.rgb = lerp(_MaskEdgeColor.rgb*c.a, c.rgb, a); + c *= a; + + #if (UNDERLAY_ON | UNDERLAY_INNER) + c *= input.texcoord1.z; + #endif + + #if UNITY_UI_ALPHACLIP + clip(c.a - 0.001); + #endif + + return c; + } + ENDCG + } +} + +CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" +} diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader.meta b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader.meta new file mode 100644 index 0000000..3cbdbbb --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bc1ede39bf3643ee8e493720e4259791 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader new file mode 100644 index 0000000..ce82bed --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader @@ -0,0 +1,240 @@ +// Simplified SDF shader: +// - No Shading Option (bevel / bump / env map) +// - No Glow Option +// - Softness is applied on both side of the outline + +Shader "TextMeshPro/Mobile/Distance Field Overlay" { + +Properties { + [HDR]_FaceColor ("Face Color", Color) = (1,1,1,1) + _FaceDilate ("Face Dilate", Range(-1,1)) = 0 + + [HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1) + _OutlineWidth ("Outline Thickness", Range(0,1)) = 0 + _OutlineSoftness ("Outline Softness", Range(0,1)) = 0 + + [HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5) + _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 + _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 + _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 + _UnderlaySoftness ("Border Softness", Range(0,1)) = 0 + + _WeightNormal ("Weight Normal", float) = 0 + _WeightBold ("Weight Bold", float) = .5 + + _ShaderFlags ("Flags", float) = 0 + _ScaleRatioA ("Scale RatioA", float) = 1 + _ScaleRatioB ("Scale RatioB", float) = 1 + _ScaleRatioC ("Scale RatioC", float) = 1 + + _MainTex ("Font Atlas", 2D) = "white" {} + _TextureWidth ("Texture Width", float) = 512 + _TextureHeight ("Texture Height", float) = 512 + _GradientScale ("Gradient Scale", float) = 5 + _ScaleX ("Scale X", float) = 1 + _ScaleY ("Scale Y", float) = 1 + _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 + _Sharpness ("Sharpness", Range(-1,1)) = 0 + + _VertexOffsetX ("Vertex OffsetX", float) = 0 + _VertexOffsetY ("Vertex OffsetY", float) = 0 + + _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) + _MaskSoftnessX ("Mask SoftnessX", float) = 0 + _MaskSoftnessY ("Mask SoftnessY", float) = 0 + + _StencilComp ("Stencil Comparison", Float) = 8 + _Stencil ("Stencil ID", Float) = 0 + _StencilOp ("Stencil Operation", Float) = 0 + _StencilWriteMask ("Stencil Write Mask", Float) = 255 + _StencilReadMask ("Stencil Read Mask", Float) = 255 + + _CullMode ("Cull Mode", Float) = 0 + _ColorMask ("Color Mask", Float) = 15 +} + +SubShader { + Tags + { + "Queue"="Overlay" + "IgnoreProjector"="True" + "RenderType"="Transparent" + } + + + Stencil + { + Ref [_Stencil] + Comp [_StencilComp] + Pass [_StencilOp] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + } + + Cull [_CullMode] + ZWrite Off + Lighting Off + Fog { Mode Off } + ZTest Always + Blend One OneMinusSrcAlpha + ColorMask [_ColorMask] + + Pass { + CGPROGRAM + #pragma vertex VertShader + #pragma fragment PixShader + #pragma shader_feature __ OUTLINE_ON + #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER + + #pragma multi_compile __ UNITY_UI_CLIP_RECT + #pragma multi_compile __ UNITY_UI_ALPHACLIP + + #include "UnityCG.cginc" + #include "UnityUI.cginc" + #include "TMPro_Properties.cginc" + + struct vertex_t { + UNITY_VERTEX_INPUT_INSTANCE_ID + float4 vertex : POSITION; + float3 normal : NORMAL; + fixed4 color : COLOR; + float2 texcoord0 : TEXCOORD0; + float2 texcoord1 : TEXCOORD1; + }; + + struct pixel_t { + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + float4 vertex : SV_POSITION; + fixed4 faceColor : COLOR; + fixed4 outlineColor : COLOR1; + float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV + half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w) + half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw) + #if (UNDERLAY_ON | UNDERLAY_INNER) + float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved + half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y) + #endif + }; + + + pixel_t VertShader(vertex_t input) + { + pixel_t output; + + UNITY_INITIALIZE_OUTPUT(pixel_t, output); + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + float bold = step(input.texcoord1.y, 0); + + float4 vert = input.vertex; + vert.x += _VertexOffsetX; + vert.y += _VertexOffsetY; + float4 vPosition = UnityObjectToClipPos(vert); + + float2 pixelSize = vPosition.w; + pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy)); + + float scale = rsqrt(dot(pixelSize, pixelSize)); + scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1); + if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert))))); + + float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0; + weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5; + + float layerScale = scale; + + scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale); + float bias = (0.5 - weight) * scale - 0.5; + float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale; + + float opacity = input.color.a; + #if (UNDERLAY_ON | UNDERLAY_INNER) + opacity = 1.0; + #endif + + fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor; + faceColor.rgb *= faceColor.a; + + fixed4 outlineColor = _OutlineColor; + outlineColor.a *= opacity; + outlineColor.rgb *= outlineColor.a; + outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2)))); + + #if (UNDERLAY_ON | UNDERLAY_INNER) + layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale); + float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale); + + float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth; + float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight; + float2 layerOffset = float2(x, y); + #endif + + // Generate UV for the Masking Texture + float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); + float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy); + + // Populate structure for pixel shader + output.vertex = vPosition; + output.faceColor = faceColor; + output.outlineColor = outlineColor; + output.texcoord0 = float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y); + output.param = half4(scale, bias - outline, bias + outline, bias); + output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)); + #if (UNDERLAY_ON || UNDERLAY_INNER) + output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0); + output.underlayParam = half2(layerScale, layerBias); + #endif + + return output; + } + + + // PIXEL SHADER + fixed4 PixShader(pixel_t input) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(input); + + half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x; + half4 c = input.faceColor * saturate(d - input.param.w); + + #ifdef OUTLINE_ON + c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z)); + c *= saturate(d - input.param.y); + #endif + + #if UNDERLAY_ON + d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x; + c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a); + #endif + + #if UNDERLAY_INNER + half sd = saturate(d - input.param.z); + d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x; + c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a); + #endif + + // Alternative implementation to UnityGet2DClipping with support for softness. + #if UNITY_UI_CLIP_RECT + half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw); + c *= m.x * m.y; + #endif + + #if (UNDERLAY_ON | UNDERLAY_INNER) + c *= input.texcoord1.z; + #endif + + #if UNITY_UI_ALPHACLIP + clip(c.a - 0.001); + #endif + + return c; + } + ENDCG + } +} + +CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" +} diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader.meta b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader.meta new file mode 100644 index 0000000..e6b149e --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a02a7d8c237544f1962732b55a9aebf1 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader new file mode 100644 index 0000000..df4d5b0 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader @@ -0,0 +1,106 @@ +// Simplified SDF shader: +// - No Shading Option (bevel / bump / env map) +// - No Glow Option +// - Softness is applied on both side of the outline + +Shader "TextMeshPro/Mobile/Distance Field SSD" { + +Properties { + [HDR]_FaceColor ("Face Color", Color) = (1,1,1,1) + _FaceDilate ("Face Dilate", Range(-1,1)) = 0 + + [HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1) + _OutlineWidth ("Outline Thickness", Range(0,1)) = 0 + _OutlineSoftness ("Outline Softness", Range(0,1)) = 0 + + [HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5) + _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 + _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 + _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 + _UnderlaySoftness ("Border Softness", Range(0,1)) = 0 + + _WeightNormal ("Weight Normal", float) = 0 + _WeightBold ("Weight Bold", float) = .5 + + _ShaderFlags ("Flags", float) = 0 + _ScaleRatioA ("Scale RatioA", float) = 1 + _ScaleRatioB ("Scale RatioB", float) = 1 + _ScaleRatioC ("Scale RatioC", float) = 1 + + _MainTex ("Font Atlas", 2D) = "white" {} + _TextureWidth ("Texture Width", float) = 512 + _TextureHeight ("Texture Height", float) = 512 + _GradientScale ("Gradient Scale", float) = 5 + _ScaleX ("Scale X", float) = 1 + _ScaleY ("Scale Y", float) = 1 + _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 + _Sharpness ("Sharpness", Range(-1,1)) = 0 + + _VertexOffsetX ("Vertex OffsetX", float) = 0 + _VertexOffsetY ("Vertex OffsetY", float) = 0 + + _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) + _MaskSoftnessX ("Mask SoftnessX", float) = 0 + _MaskSoftnessY ("Mask SoftnessY", float) = 0 + _MaskTex ("Mask Texture", 2D) = "white" {} + _MaskInverse ("Inverse", float) = 0 + _MaskEdgeColor ("Edge Color", Color) = (1,1,1,1) + _MaskEdgeSoftness ("Edge Softness", Range(0, 1)) = 0.01 + _MaskWipeControl ("Wipe Position", Range(0, 1)) = 0.5 + + _StencilComp ("Stencil Comparison", Float) = 8 + _Stencil ("Stencil ID", Float) = 0 + _StencilOp ("Stencil Operation", Float) = 0 + _StencilWriteMask ("Stencil Write Mask", Float) = 255 + _StencilReadMask ("Stencil Read Mask", Float) = 255 + + _CullMode ("Cull Mode", Float) = 0 + _ColorMask ("Color Mask", Float) = 15 +} + +SubShader { + Tags { + "Queue"="Transparent" + "IgnoreProjector"="True" + "RenderType"="Transparent" + } + + Stencil + { + Ref [_Stencil] + Comp [_StencilComp] + Pass [_StencilOp] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + } + + Cull [_CullMode] + ZWrite Off + Lighting Off + Fog { Mode Off } + ZTest [unity_GUIZTestMode] + Blend One OneMinusSrcAlpha + ColorMask [_ColorMask] + + Pass { + CGPROGRAM + #pragma vertex VertShader + #pragma fragment PixShader + #pragma shader_feature __ OUTLINE_ON + #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER + + #pragma multi_compile __ UNITY_UI_CLIP_RECT + #pragma multi_compile __ UNITY_UI_ALPHACLIP + + #include "UnityCG.cginc" + #include "UnityUI.cginc" + #include "TMPro_Properties.cginc" + + #include "TMPro_Mobile.cginc" + + ENDCG + } +} + +CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" +} diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader.meta b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader.meta new file mode 100644 index 0000000..9b84c13 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c8d12adcee749c344b8117cf7c7eb912 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader new file mode 100644 index 0000000..d3f5866 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader @@ -0,0 +1,240 @@ +// Simplified SDF shader: +// - No Shading Option (bevel / bump / env map) +// - No Glow Option +// - Softness is applied on both side of the outline + +Shader "TextMeshPro/Mobile/Distance Field" { + +Properties { + [HDR]_FaceColor ("Face Color", Color) = (1,1,1,1) + _FaceDilate ("Face Dilate", Range(-1,1)) = 0 + + [HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1) + _OutlineWidth ("Outline Thickness", Range(0,1)) = 0 + _OutlineSoftness ("Outline Softness", Range(0,1)) = 0 + + [HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5) + _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 + _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 + _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 + _UnderlaySoftness ("Border Softness", Range(0,1)) = 0 + + _WeightNormal ("Weight Normal", float) = 0 + _WeightBold ("Weight Bold", float) = .5 + + _ShaderFlags ("Flags", float) = 0 + _ScaleRatioA ("Scale RatioA", float) = 1 + _ScaleRatioB ("Scale RatioB", float) = 1 + _ScaleRatioC ("Scale RatioC", float) = 1 + + _MainTex ("Font Atlas", 2D) = "white" {} + _TextureWidth ("Texture Width", float) = 512 + _TextureHeight ("Texture Height", float) = 512 + _GradientScale ("Gradient Scale", float) = 5 + _ScaleX ("Scale X", float) = 1 + _ScaleY ("Scale Y", float) = 1 + _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 + _Sharpness ("Sharpness", Range(-1,1)) = 0 + + _VertexOffsetX ("Vertex OffsetX", float) = 0 + _VertexOffsetY ("Vertex OffsetY", float) = 0 + + _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) + _MaskSoftnessX ("Mask SoftnessX", float) = 0 + _MaskSoftnessY ("Mask SoftnessY", float) = 0 + + _StencilComp ("Stencil Comparison", Float) = 8 + _Stencil ("Stencil ID", Float) = 0 + _StencilOp ("Stencil Operation", Float) = 0 + _StencilWriteMask ("Stencil Write Mask", Float) = 255 + _StencilReadMask ("Stencil Read Mask", Float) = 255 + + _CullMode ("Cull Mode", Float) = 0 + _ColorMask ("Color Mask", Float) = 15 +} + +SubShader { + Tags + { + "Queue"="Transparent" + "IgnoreProjector"="True" + "RenderType"="Transparent" + } + + + Stencil + { + Ref [_Stencil] + Comp [_StencilComp] + Pass [_StencilOp] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + } + + Cull [_CullMode] + ZWrite Off + Lighting Off + Fog { Mode Off } + ZTest [unity_GUIZTestMode] + Blend One OneMinusSrcAlpha + ColorMask [_ColorMask] + + Pass { + CGPROGRAM + #pragma vertex VertShader + #pragma fragment PixShader + #pragma shader_feature __ OUTLINE_ON + #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER + + #pragma multi_compile __ UNITY_UI_CLIP_RECT + #pragma multi_compile __ UNITY_UI_ALPHACLIP + + #include "UnityCG.cginc" + #include "UnityUI.cginc" + #include "TMPro_Properties.cginc" + + struct vertex_t { + UNITY_VERTEX_INPUT_INSTANCE_ID + float4 vertex : POSITION; + float3 normal : NORMAL; + fixed4 color : COLOR; + float2 texcoord0 : TEXCOORD0; + float2 texcoord1 : TEXCOORD1; + }; + + struct pixel_t { + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + float4 vertex : SV_POSITION; + fixed4 faceColor : COLOR; + fixed4 outlineColor : COLOR1; + float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV + half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w) + half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw) + #if (UNDERLAY_ON | UNDERLAY_INNER) + float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved + half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y) + #endif + }; + + + pixel_t VertShader(vertex_t input) + { + pixel_t output; + + UNITY_INITIALIZE_OUTPUT(pixel_t, output); + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + float bold = step(input.texcoord1.y, 0); + + float4 vert = input.vertex; + vert.x += _VertexOffsetX; + vert.y += _VertexOffsetY; + float4 vPosition = UnityObjectToClipPos(vert); + + float2 pixelSize = vPosition.w; + pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy)); + + float scale = rsqrt(dot(pixelSize, pixelSize)); + scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1); + if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert))))); + + float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0; + weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5; + + float layerScale = scale; + + scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale); + float bias = (0.5 - weight) * scale - 0.5; + float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale; + + float opacity = input.color.a; + #if (UNDERLAY_ON | UNDERLAY_INNER) + opacity = 1.0; + #endif + + fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor; + faceColor.rgb *= faceColor.a; + + fixed4 outlineColor = _OutlineColor; + outlineColor.a *= opacity; + outlineColor.rgb *= outlineColor.a; + outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2)))); + + #if (UNDERLAY_ON | UNDERLAY_INNER) + layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale); + float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale); + + float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth; + float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight; + float2 layerOffset = float2(x, y); + #endif + + // Generate UV for the Masking Texture + float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); + float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy); + + // Populate structure for pixel shader + output.vertex = vPosition; + output.faceColor = faceColor; + output.outlineColor = outlineColor; + output.texcoord0 = float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y); + output.param = half4(scale, bias - outline, bias + outline, bias); + output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)); + #if (UNDERLAY_ON || UNDERLAY_INNER) + output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0); + output.underlayParam = half2(layerScale, layerBias); + #endif + + return output; + } + + + // PIXEL SHADER + fixed4 PixShader(pixel_t input) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(input); + + half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x; + half4 c = input.faceColor * saturate(d - input.param.w); + + #ifdef OUTLINE_ON + c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z)); + c *= saturate(d - input.param.y); + #endif + + #if UNDERLAY_ON + d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x; + c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a); + #endif + + #if UNDERLAY_INNER + half sd = saturate(d - input.param.z); + d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x; + c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a); + #endif + + // Alternative implementation to UnityGet2DClipping with support for softness. + #if UNITY_UI_CLIP_RECT + half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw); + c *= m.x * m.y; + #endif + + #if (UNDERLAY_ON | UNDERLAY_INNER) + c *= input.texcoord1.z; + #endif + + #if UNITY_UI_ALPHACLIP + clip(c.a - 0.001); + #endif + + return c; + } + ENDCG + } +} + +CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" +} diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader.meta b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader.meta new file mode 100644 index 0000000..2ac6e76 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fe393ace9b354375a9cb14cdbbc28be4 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader new file mode 100644 index 0000000..be764ae --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader @@ -0,0 +1,138 @@ +// Simplified version of the SDF Surface shader : +// - No support for Bevel, Bump or envmap +// - Diffuse only lighting +// - Fully supports only 1 directional light. Other lights can affect it, but it will be per-vertex/SH. + +Shader "TextMeshPro/Mobile/Distance Field (Surface)" { + +Properties { + _FaceTex ("Fill Texture", 2D) = "white" {} + [HDR]_FaceColor ("Fill Color", Color) = (1,1,1,1) + _FaceDilate ("Face Dilate", Range(-1,1)) = 0 + + [HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1) + _OutlineTex ("Outline Texture", 2D) = "white" {} + _OutlineWidth ("Outline Thickness", Range(0, 1)) = 0 + _OutlineSoftness ("Outline Softness", Range(0,1)) = 0 + + [HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5) + _GlowOffset ("Offset", Range(-1,1)) = 0 + _GlowInner ("Inner", Range(0,1)) = 0.05 + _GlowOuter ("Outer", Range(0,1)) = 0.05 + _GlowPower ("Falloff", Range(1, 0)) = 0.75 + + _WeightNormal ("Weight Normal", float) = 0 + _WeightBold ("Weight Bold", float) = 0.5 + + // Should not be directly exposed to the user + _ShaderFlags ("Flags", float) = 0 + _ScaleRatioA ("Scale RatioA", float) = 1 + _ScaleRatioB ("Scale RatioB", float) = 1 + _ScaleRatioC ("Scale RatioC", float) = 1 + + _MainTex ("Font Atlas", 2D) = "white" {} + _TextureWidth ("Texture Width", float) = 512 + _TextureHeight ("Texture Height", float) = 512 + _GradientScale ("Gradient Scale", float) = 5.0 + _ScaleX ("Scale X", float) = 1.0 + _ScaleY ("Scale Y", float) = 1.0 + _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 + _Sharpness ("Sharpness", Range(-1,1)) = 0 + + _VertexOffsetX ("Vertex OffsetX", float) = 0 + _VertexOffsetY ("Vertex OffsetY", float) = 0 + + _CullMode ("Cull Mode", Float) = 0 + //_MaskCoord ("Mask Coords", vector) = (0,0,0,0) + //_MaskSoftness ("Mask Softness", float) = 0 +} + +SubShader { + + Tags { + "Queue"="Transparent" + "IgnoreProjector"="True" + "RenderType"="Transparent" + } + + LOD 300 + Cull [_CullMode] + + CGPROGRAM + #pragma surface PixShader Lambert alpha:blend vertex:VertShader noforwardadd nolightmap nodirlightmap + #pragma target 3.0 + #pragma shader_feature __ GLOW_ON + + #include "TMPro_Properties.cginc" + #include "TMPro.cginc" + + half _FaceShininess; + half _OutlineShininess; + + struct Input + { + fixed4 color : COLOR; + float2 uv_MainTex; + float2 uv2_FaceTex; + float2 uv2_OutlineTex; + float2 param; // Weight, Scale + float3 viewDirEnv; + }; + + #include "TMPro_Surface.cginc" + + ENDCG + + // Pass to render object as a shadow caster + Pass + { + Name "Caster" + Tags { "LightMode" = "ShadowCaster" } + Offset 1, 1 + + Fog {Mode Off} + ZWrite On ZTest LEqual Cull Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_shadowcaster + #include "UnityCG.cginc" + + struct v2f { + V2F_SHADOW_CASTER; + float2 uv : TEXCOORD1; + float2 uv2 : TEXCOORD3; + float alphaClip : TEXCOORD2; + }; + + uniform float4 _MainTex_ST; + uniform float4 _OutlineTex_ST; + float _OutlineWidth; + float _FaceDilate; + float _ScaleRatioA; + + v2f vert( appdata_base v ) + { + v2f o; + TRANSFER_SHADOW_CASTER(o) + o.uv = TRANSFORM_TEX(v.texcoord, _MainTex); + o.uv2 = TRANSFORM_TEX(v.texcoord, _OutlineTex); + o.alphaClip = o.alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _FaceDilate * _ScaleRatioA) / 2; + return o; + } + + uniform sampler2D _MainTex; + + float4 frag(v2f i) : COLOR + { + fixed4 texcol = tex2D(_MainTex, i.uv).a; + clip(texcol.a - i.alphaClip); + SHADOW_CASTER_FRAGMENT(i) + } + ENDCG + } +} + +CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" +} diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader.meta b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader.meta new file mode 100644 index 0000000..bff8b7a --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 85187c2149c549c5b33f0cdb02836b17 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Surface.shader b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Surface.shader new file mode 100644 index 0000000..bcb2bb2 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Surface.shader @@ -0,0 +1,158 @@ +Shader "TextMeshPro/Distance Field (Surface)" { + +Properties { + _FaceTex ("Fill Texture", 2D) = "white" {} + _FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0 + _FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0 + [HDR]_FaceColor ("Fill Color", Color) = (1,1,1,1) + _FaceDilate ("Face Dilate", Range(-1,1)) = 0 + + [HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1) + _OutlineTex ("Outline Texture", 2D) = "white" {} + _OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0 + _OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0 + _OutlineWidth ("Outline Thickness", Range(0, 1)) = 0 + _OutlineSoftness ("Outline Softness", Range(0,1)) = 0 + + _Bevel ("Bevel", Range(0,1)) = 0.5 + _BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0 + _BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0 + _BevelClamp ("Bevel Clamp", Range(0,1)) = 0 + _BevelRoundness ("Bevel Roundness", Range(0,1)) = 0 + + _BumpMap ("Normalmap", 2D) = "bump" {} + _BumpOutline ("Bump Outline", Range(0,1)) = 0.5 + _BumpFace ("Bump Face", Range(0,1)) = 0.5 + + _ReflectFaceColor ("Face Color", Color) = (0,0,0,1) + _ReflectOutlineColor ("Outline Color", Color) = (0,0,0,1) + _Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ } + _EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0) + [HDR]_SpecColor ("Specular Color", Color) = (0,0,0,1) + + _FaceShininess ("Face Shininess", Range(0,1)) = 0 + _OutlineShininess ("Outline Shininess", Range(0,1)) = 0 + + [HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5) + _GlowOffset ("Offset", Range(-1,1)) = 0 + _GlowInner ("Inner", Range(0,1)) = 0.05 + _GlowOuter ("Outer", Range(0,1)) = 0.05 + _GlowPower ("Falloff", Range(1, 0)) = 0.75 + + _WeightNormal ("Weight Normal", float) = 0 + _WeightBold ("Weight Bold", float) = 0.5 + + // Should not be directly exposed to the user + _ShaderFlags ("Flags", float) = 0 + _ScaleRatioA ("Scale RatioA", float) = 1 + _ScaleRatioB ("Scale RatioB", float) = 1 + _ScaleRatioC ("Scale RatioC", float) = 1 + + _MainTex ("Font Atlas", 2D) = "white" {} + _TextureWidth ("Texture Width", float) = 512 + _TextureHeight ("Texture Height", float) = 512 + _GradientScale ("Gradient Scale", float) = 5.0 + _ScaleX ("Scale X", float) = 1.0 + _ScaleY ("Scale Y", float) = 1.0 + _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 + _Sharpness ("Sharpness", Range(-1,1)) = 0 + + _VertexOffsetX ("Vertex OffsetX", float) = 0 + _VertexOffsetY ("Vertex OffsetY", float) = 0 + + _CullMode ("Cull Mode", Float) = 0 + //_MaskCoord ("Mask Coords", vector) = (0,0,0,0) + //_MaskSoftness ("Mask Softness", float) = 0 +} + +SubShader { + + Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } + + LOD 300 + Cull [_CullMode] + + CGPROGRAM + #pragma surface PixShader BlinnPhong alpha:blend vertex:VertShader nolightmap nodirlightmap + #pragma target 3.0 + #pragma shader_feature __ GLOW_ON + #pragma glsl + + #include "TMPro_Properties.cginc" + #include "TMPro.cginc" + + half _FaceShininess; + half _OutlineShininess; + + struct Input + { + fixed4 color : COLOR; + float2 uv_MainTex; + float2 uv2_FaceTex; + float2 uv2_OutlineTex; + float2 param; // Weight, Scale + float3 viewDirEnv; + }; + + + #define BEVEL_ON 1 + #include "TMPro_Surface.cginc" + + ENDCG + + // Pass to render object as a shadow caster + Pass + { + Name "Caster" + Tags { "LightMode" = "ShadowCaster" } + Offset 1, 1 + + Fog {Mode Off} + ZWrite On + ZTest LEqual + Cull Off + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_shadowcaster + #include "UnityCG.cginc" + + struct v2f { + V2F_SHADOW_CASTER; + float2 uv : TEXCOORD1; + float2 uv2 : TEXCOORD3; + float alphaClip : TEXCOORD2; + }; + + uniform float4 _MainTex_ST; + uniform float4 _OutlineTex_ST; + float _OutlineWidth; + float _FaceDilate; + float _ScaleRatioA; + + v2f vert( appdata_base v ) + { + v2f o; + TRANSFER_SHADOW_CASTER(o) + o.uv = TRANSFORM_TEX(v.texcoord, _MainTex); + o.uv2 = TRANSFORM_TEX(v.texcoord, _OutlineTex); + o.alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _FaceDilate * _ScaleRatioA) / 2; + return o; + } + + uniform sampler2D _MainTex; + + float4 frag(v2f i) : COLOR + { + fixed4 texcol = tex2D(_MainTex, i.uv).a; + clip(texcol.a - i.alphaClip); + SHADOW_CASTER_FRAGMENT(i) + } + ENDCG + } +} + +CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" +} + diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Surface.shader.meta b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Surface.shader.meta new file mode 100644 index 0000000..26e814c --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF-Surface.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f7ada0af4f174f0694ca6a487b8f543d +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF.shader b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF.shader new file mode 100644 index 0000000..011ee19 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF.shader @@ -0,0 +1,317 @@ +Shader "TextMeshPro/Distance Field" { + +Properties { + _FaceTex ("Face Texture", 2D) = "white" {} + _FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0 + _FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0 + [HDR]_FaceColor ("Face Color", Color) = (1,1,1,1) + _FaceDilate ("Face Dilate", Range(-1,1)) = 0 + + [HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1) + _OutlineTex ("Outline Texture", 2D) = "white" {} + _OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0 + _OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0 + _OutlineWidth ("Outline Thickness", Range(0, 1)) = 0 + _OutlineSoftness ("Outline Softness", Range(0,1)) = 0 + + _Bevel ("Bevel", Range(0,1)) = 0.5 + _BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0 + _BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0 + _BevelClamp ("Bevel Clamp", Range(0,1)) = 0 + _BevelRoundness ("Bevel Roundness", Range(0,1)) = 0 + + _LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416 + [HDR]_SpecularColor ("Specular", Color) = (1,1,1,1) + _SpecularPower ("Specular", Range(0,4)) = 2.0 + _Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10 + _Diffuse ("Diffuse", Range(0,1)) = 0.5 + _Ambient ("Ambient", Range(1,0)) = 0.5 + + _BumpMap ("Normal map", 2D) = "bump" {} + _BumpOutline ("Bump Outline", Range(0,1)) = 0 + _BumpFace ("Bump Face", Range(0,1)) = 0 + + _ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1) + _ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1) + _Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ } + _EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0) + + + [HDR]_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5) + _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 + _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 + _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 + _UnderlaySoftness ("Border Softness", Range(0,1)) = 0 + + [HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5) + _GlowOffset ("Offset", Range(-1,1)) = 0 + _GlowInner ("Inner", Range(0,1)) = 0.05 + _GlowOuter ("Outer", Range(0,1)) = 0.05 + _GlowPower ("Falloff", Range(1, 0)) = 0.75 + + _WeightNormal ("Weight Normal", float) = 0 + _WeightBold ("Weight Bold", float) = 0.5 + + _ShaderFlags ("Flags", float) = 0 + _ScaleRatioA ("Scale RatioA", float) = 1 + _ScaleRatioB ("Scale RatioB", float) = 1 + _ScaleRatioC ("Scale RatioC", float) = 1 + + _MainTex ("Font Atlas", 2D) = "white" {} + _TextureWidth ("Texture Width", float) = 512 + _TextureHeight ("Texture Height", float) = 512 + _GradientScale ("Gradient Scale", float) = 5.0 + _ScaleX ("Scale X", float) = 1.0 + _ScaleY ("Scale Y", float) = 1.0 + _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 + _Sharpness ("Sharpness", Range(-1,1)) = 0 + + _VertexOffsetX ("Vertex OffsetX", float) = 0 + _VertexOffsetY ("Vertex OffsetY", float) = 0 + + _MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767) + _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) + _MaskSoftnessX ("Mask SoftnessX", float) = 0 + _MaskSoftnessY ("Mask SoftnessY", float) = 0 + + _StencilComp ("Stencil Comparison", Float) = 8 + _Stencil ("Stencil ID", Float) = 0 + _StencilOp ("Stencil Operation", Float) = 0 + _StencilWriteMask ("Stencil Write Mask", Float) = 255 + _StencilReadMask ("Stencil Read Mask", Float) = 255 + + _CullMode ("Cull Mode", Float) = 0 + _ColorMask ("Color Mask", Float) = 15 +} + +SubShader { + + Tags + { + "Queue"="Transparent" + "IgnoreProjector"="True" + "RenderType"="Transparent" + } + + Stencil + { + Ref [_Stencil] + Comp [_StencilComp] + Pass [_StencilOp] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + } + + Cull [_CullMode] + ZWrite Off + Lighting Off + Fog { Mode Off } + ZTest [unity_GUIZTestMode] + Blend One OneMinusSrcAlpha + ColorMask [_ColorMask] + + Pass { + CGPROGRAM + #pragma target 3.0 + #pragma vertex VertShader + #pragma fragment PixShader + #pragma shader_feature __ BEVEL_ON + #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER + #pragma shader_feature __ GLOW_ON + + #pragma multi_compile __ UNITY_UI_CLIP_RECT + #pragma multi_compile __ UNITY_UI_ALPHACLIP + + #include "UnityCG.cginc" + #include "UnityUI.cginc" + #include "TMPro_Properties.cginc" + #include "TMPro.cginc" + + struct vertex_t { + UNITY_VERTEX_INPUT_INSTANCE_ID + float4 position : POSITION; + float3 normal : NORMAL; + fixed4 color : COLOR; + float2 texcoord0 : TEXCOORD0; + float2 texcoord1 : TEXCOORD1; + }; + + + struct pixel_t { + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + float4 position : SV_POSITION; + fixed4 color : COLOR; + float2 atlas : TEXCOORD0; // Atlas + float4 param : TEXCOORD1; // alphaClip, scale, bias, weight + float4 mask : TEXCOORD2; // Position in object space(xy), pixel Size(zw) + float3 viewDir : TEXCOORD3; + + #if (UNDERLAY_ON || UNDERLAY_INNER) + float4 texcoord2 : TEXCOORD4; // u,v, scale, bias + fixed4 underlayColor : COLOR1; + #endif + float4 textures : TEXCOORD5; + }; + + // Used by Unity internally to handle Texture Tiling and Offset. + float4 _FaceTex_ST; + float4 _OutlineTex_ST; + + pixel_t VertShader(vertex_t input) + { + pixel_t output; + + UNITY_INITIALIZE_OUTPUT(pixel_t, output); + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input,output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + float bold = step(input.texcoord1.y, 0); + + float4 vert = input.position; + vert.x += _VertexOffsetX; + vert.y += _VertexOffsetY; + + float4 vPosition = UnityObjectToClipPos(vert); + + float2 pixelSize = vPosition.w; + pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy)); + float scale = rsqrt(dot(pixelSize, pixelSize)); + scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1); + if (UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert))))); + + float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0; + weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5; + + float bias =(.5 - weight) + (.5 / scale); + + float alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _OutlineSoftness * _ScaleRatioA); + + #if GLOW_ON + alphaClip = min(alphaClip, 1.0 - _GlowOffset * _ScaleRatioB - _GlowOuter * _ScaleRatioB); + #endif + + alphaClip = alphaClip / 2.0 - ( .5 / scale) - weight; + + #if (UNDERLAY_ON || UNDERLAY_INNER) + float4 underlayColor = _UnderlayColor; + underlayColor.rgb *= underlayColor.a; + + float bScale = scale; + bScale /= 1 + ((_UnderlaySoftness*_ScaleRatioC) * bScale); + float bBias = (0.5 - weight) * bScale - 0.5 - ((_UnderlayDilate * _ScaleRatioC) * 0.5 * bScale); + + float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth; + float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight; + float2 bOffset = float2(x, y); + #endif + + // Generate UV for the Masking Texture + float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); + float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy); + + // Support for texture tiling and offset + float2 textureUV = UnpackUV(input.texcoord1.x); + float2 faceUV = TRANSFORM_TEX(textureUV, _FaceTex); + float2 outlineUV = TRANSFORM_TEX(textureUV, _OutlineTex); + + + output.position = vPosition; + output.color = input.color; + output.atlas = input.texcoord0; + output.param = float4(alphaClip, scale, bias, weight); + output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)); + output.viewDir = mul((float3x3)_EnvMatrix, _WorldSpaceCameraPos.xyz - mul(unity_ObjectToWorld, vert).xyz); + #if (UNDERLAY_ON || UNDERLAY_INNER) + output.texcoord2 = float4(input.texcoord0 + bOffset, bScale, bBias); + output.underlayColor = underlayColor; + #endif + output.textures = float4(faceUV, outlineUV); + + return output; + } + + + fixed4 PixShader(pixel_t input) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(input); + + float c = tex2D(_MainTex, input.atlas).a; + + #ifndef UNDERLAY_ON + clip(c - input.param.x); + #endif + + float scale = input.param.y; + float bias = input.param.z; + float weight = input.param.w; + float sd = (bias - c) * scale; + + float outline = (_OutlineWidth * _ScaleRatioA) * scale; + float softness = (_OutlineSoftness * _ScaleRatioA) * scale; + + half4 faceColor = _FaceColor; + half4 outlineColor = _OutlineColor; + + faceColor.rgb *= input.color.rgb; + + faceColor *= tex2D(_FaceTex, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y); + outlineColor *= tex2D(_OutlineTex, input.textures.zw + float2(_OutlineUVSpeedX, _OutlineUVSpeedY) * _Time.y); + + faceColor = GetColor(sd, faceColor, outlineColor, outline, softness); + + #if BEVEL_ON + float3 dxy = float3(0.5 / _TextureWidth, 0.5 / _TextureHeight, 0); + float3 n = GetSurfaceNormal(input.atlas, weight, dxy); + + float3 bump = UnpackNormal(tex2D(_BumpMap, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y)).xyz; + bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5)); + n = normalize(n- bump); + + float3 light = normalize(float3(sin(_LightAngle), cos(_LightAngle), -1.0)); + + float3 col = GetSpecular(n, light); + faceColor.rgb += col*faceColor.a; + faceColor.rgb *= 1-(dot(n, light)*_Diffuse); + faceColor.rgb *= lerp(_Ambient, 1, n.z*n.z); + + fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n)); + faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a; + #endif + + #if UNDERLAY_ON + float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z; + faceColor += input.underlayColor * saturate(d - input.texcoord2.w) * (1 - faceColor.a); + #endif + + #if UNDERLAY_INNER + float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z; + faceColor += input.underlayColor * (1 - saturate(d - input.texcoord2.w)) * saturate(1 - sd) * (1 - faceColor.a); + #endif + + #if GLOW_ON + float4 glowColor = GetGlowColor(sd, scale); + faceColor.rgb += glowColor.rgb * glowColor.a; + #endif + + // Alternative implementation to UnityGet2DClipping with support for softness. + #if UNITY_UI_CLIP_RECT + half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw); + faceColor *= m.x * m.y; + #endif + + #if UNITY_UI_ALPHACLIP + clip(faceColor.a - 0.001); + #endif + + return faceColor * input.color.a; + } + + ENDCG + } +} + +Fallback "TextMeshPro/Mobile/Distance Field" +CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" +} diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF.shader.meta b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF.shader.meta new file mode 100644 index 0000000..e1cf3f3 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_SDF.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 68e6db2ebdc24f95958faec2be5558d6 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_Sprite.shader b/Assets/Plugins/TextMesh Pro/Shaders/TMP_Sprite.shader new file mode 100644 index 0000000..e8283a7 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_Sprite.shader @@ -0,0 +1,116 @@ +Shader "TextMeshPro/Sprite" +{ + Properties + { + [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} + _Color ("Tint", Color) = (1,1,1,1) + + _StencilComp ("Stencil Comparison", Float) = 8 + _Stencil ("Stencil ID", Float) = 0 + _StencilOp ("Stencil Operation", Float) = 0 + _StencilWriteMask ("Stencil Write Mask", Float) = 255 + _StencilReadMask ("Stencil Read Mask", Float) = 255 + + _CullMode ("Cull Mode", Float) = 0 + _ColorMask ("Color Mask", Float) = 15 + _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) + + [Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0 + } + + SubShader + { + Tags + { + "Queue"="Transparent" + "IgnoreProjector"="True" + "RenderType"="Transparent" + "PreviewType"="Plane" + "CanUseSpriteAtlas"="True" + } + + Stencil + { + Ref [_Stencil] + Comp [_StencilComp] + Pass [_StencilOp] + ReadMask [_StencilReadMask] + WriteMask [_StencilWriteMask] + } + + Cull [_CullMode] + Lighting Off + ZWrite Off + ZTest [unity_GUIZTestMode] + Blend SrcAlpha OneMinusSrcAlpha + ColorMask [_ColorMask] + + Pass + { + Name "Default" + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma target 2.0 + + #include "UnityCG.cginc" + #include "UnityUI.cginc" + + #pragma multi_compile __ UNITY_UI_CLIP_RECT + #pragma multi_compile __ UNITY_UI_ALPHACLIP + + struct appdata_t + { + float4 vertex : POSITION; + float4 color : COLOR; + float2 texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct v2f + { + float4 vertex : SV_POSITION; + fixed4 color : COLOR; + float2 texcoord : TEXCOORD0; + float4 worldPosition : TEXCOORD1; + UNITY_VERTEX_OUTPUT_STEREO + }; + + sampler2D _MainTex; + fixed4 _Color; + fixed4 _TextureSampleAdd; + float4 _ClipRect; + float4 _MainTex_ST; + + v2f vert(appdata_t v) + { + v2f OUT; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT); + OUT.worldPosition = v.vertex; + OUT.vertex = UnityObjectToClipPos(OUT.worldPosition); + + OUT.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex); + + OUT.color = v.color * _Color; + return OUT; + } + + fixed4 frag(v2f IN) : SV_Target + { + half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color; + + #ifdef UNITY_UI_CLIP_RECT + color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect); + #endif + + #ifdef UNITY_UI_ALPHACLIP + clip (color.a - 0.001); + #endif + + return color; + } + ENDCG + } + } +} diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMP_Sprite.shader.meta b/Assets/Plugins/TextMesh Pro/Shaders/TMP_Sprite.shader.meta new file mode 100644 index 0000000..50ba195 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMP_Sprite.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: cf81c85f95fe47e1a27f6ae460cf182c +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMPro.cginc b/Assets/Plugins/TextMesh Pro/Shaders/TMPro.cginc new file mode 100644 index 0000000..5898130 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMPro.cginc @@ -0,0 +1,84 @@ +float2 UnpackUV(float uv) +{ + float2 output; + output.x = floor(uv / 4096); + output.y = uv - 4096 * output.x; + + return output * 0.001953125; +} + +fixed4 GetColor(half d, fixed4 faceColor, fixed4 outlineColor, half outline, half softness) +{ + half faceAlpha = 1-saturate((d - outline * 0.5 + softness * 0.5) / (1.0 + softness)); + half outlineAlpha = saturate((d + outline * 0.5)) * sqrt(min(1.0, outline)); + + faceColor.rgb *= faceColor.a; + outlineColor.rgb *= outlineColor.a; + + faceColor = lerp(faceColor, outlineColor, outlineAlpha); + + faceColor *= faceAlpha; + + return faceColor; +} + +float3 GetSurfaceNormal(float4 h, float bias) +{ + bool raisedBevel = step(1, fmod(_ShaderFlags, 2)); + + h += bias+_BevelOffset; + + float bevelWidth = max(.01, _OutlineWidth+_BevelWidth); + + // Track outline + h -= .5; + h /= bevelWidth; + h = saturate(h+.5); + + if(raisedBevel) h = 1 - abs(h*2.0 - 1.0); + h = lerp(h, sin(h*3.141592/2.0), _BevelRoundness); + h = min(h, 1.0-_BevelClamp); + h *= _Bevel * bevelWidth * _GradientScale * -2.0; + + float3 va = normalize(float3(1.0, 0.0, h.y - h.x)); + float3 vb = normalize(float3(0.0, -1.0, h.w - h.z)); + + return cross(va, vb); +} + +float3 GetSurfaceNormal(float2 uv, float bias, float3 delta) +{ + // Read "height field" + float4 h = {tex2D(_MainTex, uv - delta.xz).a, + tex2D(_MainTex, uv + delta.xz).a, + tex2D(_MainTex, uv - delta.zy).a, + tex2D(_MainTex, uv + delta.zy).a}; + + return GetSurfaceNormal(h, bias); +} + +float3 GetSpecular(float3 n, float3 l) +{ + float spec = pow(max(0.0, dot(n, l)), _Reflectivity); + return _SpecularColor.rgb * spec * _SpecularPower; +} + +float4 GetGlowColor(float d, float scale) +{ + float glow = d - (_GlowOffset*_ScaleRatioB) * 0.5 * scale; + float t = lerp(_GlowInner, (_GlowOuter * _ScaleRatioB), step(0.0, glow)) * 0.5 * scale; + glow = saturate(abs(glow/(1.0 + t))); + glow = 1.0-pow(glow, _GlowPower); + glow *= sqrt(min(1.0, t)); // Fade off glow thinner than 1 screen pixel + return float4(_GlowColor.rgb, saturate(_GlowColor.a * glow * 2)); +} + +float4 BlendARGB(float4 overlying, float4 underlying) +{ + overlying.rgb *= overlying.a; + underlying.rgb *= underlying.a; + float3 blended = overlying.rgb + ((1-overlying.a)*underlying.rgb); + float alpha = underlying.a + (1-underlying.a)*overlying.a; + return float4(blended, alpha); +} + diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMPro.cginc.meta b/Assets/Plugins/TextMesh Pro/Shaders/TMPro.cginc.meta new file mode 100644 index 0000000..0d6eb56 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMPro.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 407bc68d299748449bbf7f48ee690f8d +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMPro_Mobile.cginc b/Assets/Plugins/TextMesh Pro/Shaders/TMPro_Mobile.cginc new file mode 100644 index 0000000..5969fec --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMPro_Mobile.cginc @@ -0,0 +1,157 @@ +struct vertex_t { + UNITY_VERTEX_INPUT_INSTANCE_ID + float4 position : POSITION; + float3 normal : NORMAL; + float4 color : COLOR; + float2 texcoord0 : TEXCOORD0; + float2 texcoord1 : TEXCOORD1; +}; + +struct pixel_t { + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + float4 position : SV_POSITION; + float4 faceColor : COLOR; + float4 outlineColor : COLOR1; + float4 texcoord0 : TEXCOORD0; + float4 param : TEXCOORD1; // weight, scaleRatio + float2 mask : TEXCOORD2; + #if (UNDERLAY_ON || UNDERLAY_INNER) + float4 texcoord2 : TEXCOORD3; + float4 underlayColor : COLOR2; + #endif +}; + +float4 SRGBToLinear(float4 rgba) { + return float4(lerp(rgba.rgb / 12.92f, pow((rgba.rgb + 0.055f) / 1.055f, 2.4f), step(0.04045f, rgba.rgb)), rgba.a); +} + +pixel_t VertShader(vertex_t input) +{ + pixel_t output; + + UNITY_INITIALIZE_OUTPUT(pixel_t, output); + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + float bold = step(input.texcoord1.y, 0); + + float4 vert = input.position; + vert.x += _VertexOffsetX; + vert.y += _VertexOffsetY; + + float4 vPosition = UnityObjectToClipPos(vert); + + float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0; + weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5; + + // Generate UV for the Masking Texture + float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); + float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy); + + float4 color = input.color; + #if (FORCE_LINEAR && !UNITY_COLORSPACE_GAMMA) + color = SRGBToLinear(input.color); + #endif + + float opacity = color.a; + #if (UNDERLAY_ON | UNDERLAY_INNER) + opacity = 1.0; + #endif + + float4 faceColor = float4(color.rgb, opacity) * _FaceColor; + faceColor.rgb *= faceColor.a; + + float4 outlineColor = _OutlineColor; + outlineColor.a *= opacity; + outlineColor.rgb *= outlineColor.a; + + output.position = vPosition; + output.faceColor = faceColor; + output.outlineColor = outlineColor; + output.texcoord0 = float4(input.texcoord0.xy, maskUV.xy); + output.param = float4(0.5 - weight, 1.3333 * _GradientScale * (_Sharpness + 1) / _TextureWidth, _OutlineWidth * _ScaleRatioA * 0.5, 0); + + float2 mask = float2(0, 0); + #if UNITY_UI_CLIP_RECT + mask = vert.xy * 2 - clampedRect.xy - clampedRect.zw; + #endif + output.mask = mask; + + #if (UNDERLAY_ON || UNDERLAY_INNER) + float4 underlayColor = _UnderlayColor; + underlayColor.rgb *= underlayColor.a; + + float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth; + float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight; + + output.texcoord2 = float4(input.texcoord0 + float2(x, y), input.color.a, 0); + output.underlayColor = underlayColor; + #endif + + return output; +} + +float4 PixShader(pixel_t input) : SV_Target +{ + UNITY_SETUP_INSTANCE_ID(input); + + float d = tex2D(_MainTex, input.texcoord0.xy).a; + + float2 UV = input.texcoord0.xy; + float scale = rsqrt(abs(ddx(UV.x) * ddy(UV.y) - ddy(UV.x) * ddx(UV.y))) * input.param.y; + + #if (UNDERLAY_ON | UNDERLAY_INNER) + float layerScale = scale; + layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale); + float layerBias = input.param.x * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale); + #endif + + scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale); + + float4 faceColor = input.faceColor * saturate((d - input.param.x) * scale + 0.5); + + #ifdef OUTLINE_ON + float4 outlineColor = lerp(input.faceColor, input.outlineColor, sqrt(min(1.0, input.param.z * scale * 2))); + faceColor = lerp(outlineColor, input.faceColor, saturate((d - input.param.x - input.param.z) * scale + 0.5)); + faceColor *= saturate((d - input.param.x + input.param.z) * scale + 0.5); + #endif + + #if UNDERLAY_ON + d = tex2D(_MainTex, input.texcoord2.xy).a * layerScale; + faceColor += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - layerBias) * (1 - faceColor.a); + #endif + + #if UNDERLAY_INNER + float bias = input.param.x * scale - 0.5; + float sd = saturate(d * scale - bias - input.param.z); + d = tex2D(_MainTex, input.texcoord2.xy).a * layerScale; + faceColor += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - layerBias)) * sd * (1 - faceColor.a); + #endif + + #ifdef MASKING + float a = abs(_MaskInverse - tex2D(_MaskTex, input.texcoord0.zw).a); + float t = a + (1 - _MaskWipeControl) * _MaskEdgeSoftness - _MaskWipeControl; + a = saturate(t / _MaskEdgeSoftness); + faceColor.rgb = lerp(_MaskEdgeColor.rgb * faceColor.a, faceColor.rgb, a); + faceColor *= a; + #endif + + // Alternative implementation to UnityGet2DClipping with support for softness + #if UNITY_UI_CLIP_RECT + float2 maskZW = 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + (1 / scale)); + float2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * maskZW); + faceColor *= m.x * m.y; + #endif + + #if (UNDERLAY_ON | UNDERLAY_INNER) + faceColor *= input.texcoord2.z; + #endif + + #if UNITY_UI_ALPHACLIP + clip(faceColor.a - 0.001); + #endif + + return faceColor; +} diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMPro_Mobile.cginc.meta b/Assets/Plugins/TextMesh Pro/Shaders/TMPro_Mobile.cginc.meta new file mode 100644 index 0000000..4415e50 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMPro_Mobile.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c334973cef89a9840b0b0c507e0377ab +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMPro_Properties.cginc b/Assets/Plugins/TextMesh Pro/Shaders/TMPro_Properties.cginc new file mode 100644 index 0000000..2e96258 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMPro_Properties.cginc @@ -0,0 +1,85 @@ +// UI Editable properties +uniform sampler2D _FaceTex; // Alpha : Signed Distance +uniform float _FaceUVSpeedX; +uniform float _FaceUVSpeedY; +uniform fixed4 _FaceColor; // RGBA : Color + Opacity +uniform float _FaceDilate; // v[ 0, 1] +uniform float _OutlineSoftness; // v[ 0, 1] + +uniform sampler2D _OutlineTex; // RGBA : Color + Opacity +uniform float _OutlineUVSpeedX; +uniform float _OutlineUVSpeedY; +uniform fixed4 _OutlineColor; // RGBA : Color + Opacity +uniform float _OutlineWidth; // v[ 0, 1] + +uniform float _Bevel; // v[ 0, 1] +uniform float _BevelOffset; // v[-1, 1] +uniform float _BevelWidth; // v[-1, 1] +uniform float _BevelClamp; // v[ 0, 1] +uniform float _BevelRoundness; // v[ 0, 1] + +uniform sampler2D _BumpMap; // Normal map +uniform float _BumpOutline; // v[ 0, 1] +uniform float _BumpFace; // v[ 0, 1] + +uniform samplerCUBE _Cube; // Cube / sphere map +uniform fixed4 _ReflectFaceColor; // RGB intensity +uniform fixed4 _ReflectOutlineColor; +//uniform float _EnvTiltX; // v[-1, 1] +//uniform float _EnvTiltY; // v[-1, 1] +uniform float3 _EnvMatrixRotation; +uniform float4x4 _EnvMatrix; + +uniform fixed4 _SpecularColor; // RGB intensity +uniform float _LightAngle; // v[ 0,Tau] +uniform float _SpecularPower; // v[ 0, 1] +uniform float _Reflectivity; // v[ 5, 15] +uniform float _Diffuse; // v[ 0, 1] +uniform float _Ambient; // v[ 0, 1] + +uniform fixed4 _UnderlayColor; // RGBA : Color + Opacity +uniform float _UnderlayOffsetX; // v[-1, 1] +uniform float _UnderlayOffsetY; // v[-1, 1] +uniform float _UnderlayDilate; // v[-1, 1] +uniform float _UnderlaySoftness; // v[ 0, 1] + +uniform fixed4 _GlowColor; // RGBA : Color + Intesity +uniform float _GlowOffset; // v[-1, 1] +uniform float _GlowOuter; // v[ 0, 1] +uniform float _GlowInner; // v[ 0, 1] +uniform float _GlowPower; // v[ 1, 1/(1+4*4)] + +// API Editable properties +uniform float _ShaderFlags; +uniform float _WeightNormal; +uniform float _WeightBold; + +uniform float _ScaleRatioA; +uniform float _ScaleRatioB; +uniform float _ScaleRatioC; + +uniform float _VertexOffsetX; +uniform float _VertexOffsetY; + +//uniform float _UseClipRect; +uniform float _MaskID; +uniform sampler2D _MaskTex; +uniform float4 _MaskCoord; +uniform float4 _ClipRect; // bottom left(x,y) : top right(z,w) +//uniform float _MaskWipeControl; +//uniform float _MaskEdgeSoftness; +//uniform fixed4 _MaskEdgeColor; +//uniform bool _MaskInverse; + +uniform float _MaskSoftnessX; +uniform float _MaskSoftnessY; + +// Font Atlas properties +uniform sampler2D _MainTex; +uniform float _TextureWidth; +uniform float _TextureHeight; +uniform float _GradientScale; +uniform float _ScaleX; +uniform float _ScaleY; +uniform float _PerspectiveFilter; +uniform float _Sharpness; diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMPro_Properties.cginc.meta b/Assets/Plugins/TextMesh Pro/Shaders/TMPro_Properties.cginc.meta new file mode 100644 index 0000000..7b37f2f --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMPro_Properties.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3997e2241185407d80309a82f9148466 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMPro_Surface.cginc b/Assets/Plugins/TextMesh Pro/Shaders/TMPro_Surface.cginc new file mode 100644 index 0000000..622ae87 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMPro_Surface.cginc @@ -0,0 +1,101 @@ +void VertShader(inout appdata_full v, out Input data) +{ + v.vertex.x += _VertexOffsetX; + v.vertex.y += _VertexOffsetY; + + UNITY_INITIALIZE_OUTPUT(Input, data); + + float bold = step(v.texcoord1.y, 0); + + // Generate normal for backface + float3 view = ObjSpaceViewDir(v.vertex); + v.normal *= sign(dot(v.normal, view)); + +#if USE_DERIVATIVE + data.param.y = 1; +#else + float4 vert = v.vertex; + float4 vPosition = UnityObjectToClipPos(vert); + float2 pixelSize = vPosition.w; + + pixelSize /= float2(_ScaleX, _ScaleY) * mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy); + float scale = rsqrt(dot(pixelSize, pixelSize)); + scale *= abs(v.texcoord1.y) * _GradientScale * (_Sharpness + 1); + scale = lerp(scale * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(v.normal.xyz), normalize(WorldSpaceViewDir(vert))))); + data.param.y = scale; +#endif + + data.param.x = (lerp(_WeightNormal, _WeightBold, bold) / 4.0 + _FaceDilate) * _ScaleRatioA * 0.5; // + + v.texcoord1.xy = UnpackUV(v.texcoord1.x); + data.viewDirEnv = mul((float3x3)_EnvMatrix, WorldSpaceViewDir(v.vertex)); +} + +void PixShader(Input input, inout SurfaceOutput o) +{ + +#if USE_DERIVATIVE + float2 pixelSize = float2(ddx(input.uv_MainTex.y), ddy(input.uv_MainTex.y)); + pixelSize *= _TextureWidth * .75; + float scale = rsqrt(dot(pixelSize, pixelSize)) * _GradientScale * (_Sharpness + 1); +#else + float scale = input.param.y; +#endif + + // Signed distance + float c = tex2D(_MainTex, input.uv_MainTex).a; + float sd = (.5 - c - input.param.x) * scale + .5; + float outline = _OutlineWidth*_ScaleRatioA * scale; + float softness = _OutlineSoftness*_ScaleRatioA * scale; + + // Color & Alpha + float4 faceColor = _FaceColor; + float4 outlineColor = _OutlineColor; + faceColor *= input.color; + outlineColor.a *= input.color.a; + faceColor *= tex2D(_FaceTex, float2(input.uv2_FaceTex.x + _FaceUVSpeedX * _Time.y, input.uv2_FaceTex.y + _FaceUVSpeedY * _Time.y)); + outlineColor *= tex2D(_OutlineTex, float2(input.uv2_OutlineTex.x + _OutlineUVSpeedX * _Time.y, input.uv2_OutlineTex.y + _OutlineUVSpeedY * _Time.y)); + faceColor = GetColor(sd, faceColor, outlineColor, outline, softness); + faceColor.rgb /= max(faceColor.a, 0.0001); + +#if BEVEL_ON + float3 delta = float3(1.0 / _TextureWidth, 1.0 / _TextureHeight, 0.0); + + float4 smp4x = {tex2D(_MainTex, input.uv_MainTex - delta.xz).a, + tex2D(_MainTex, input.uv_MainTex + delta.xz).a, + tex2D(_MainTex, input.uv_MainTex - delta.zy).a, + tex2D(_MainTex, input.uv_MainTex + delta.zy).a }; + + // Face Normal + float3 n = GetSurfaceNormal(smp4x, input.param.x); + + // Bumpmap + float3 bump = UnpackNormal(tex2D(_BumpMap, input.uv2_FaceTex.xy)).xyz; + bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5)); + bump = lerp(float3(0, 0, 1), bump, faceColor.a); + n = normalize(n - bump); + + // Cubemap reflection + fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDirEnv, mul((float3x3)unity_ObjectToWorld, n))); + float3 emission = reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a; +#else + float3 n = float3(0, 0, -1); + float3 emission = float3(0, 0, 0); +#endif + +#if GLOW_ON + float4 glowColor = GetGlowColor(sd, scale); + glowColor.a *= input.color.a; + emission += glowColor.rgb*glowColor.a; + faceColor = BlendARGB(glowColor, faceColor); + faceColor.rgb /= max(faceColor.a, 0.0001); +#endif + + // Set Standard output structure + o.Albedo = faceColor.rgb; + o.Normal = -n; + o.Emission = emission; + o.Specular = lerp(_FaceShininess, _OutlineShininess, saturate(sd + outline * 0.5)); + o.Gloss = 1; + o.Alpha = faceColor.a; +} diff --git a/Assets/Plugins/TextMesh Pro/Shaders/TMPro_Surface.cginc.meta b/Assets/Plugins/TextMesh Pro/Shaders/TMPro_Surface.cginc.meta new file mode 100644 index 0000000..41ef4b1 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Shaders/TMPro_Surface.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d930090c0cd643c7b55f19a38538c162 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Sprites.meta b/Assets/Plugins/TextMesh Pro/Sprites.meta new file mode 100644 index 0000000..8b699e5 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Sprites.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d0603b6d5186471b96c778c3949c7ce2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Sprites/EmojiOne Attribution.txt b/Assets/Plugins/TextMesh Pro/Sprites/EmojiOne Attribution.txt new file mode 100644 index 0000000..384180a --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Sprites/EmojiOne Attribution.txt @@ -0,0 +1,3 @@ +This sample of beautiful emojis are provided by EmojiOne https://www.emojione.com/ + +Please visit their website to view the complete set of their emojis and review their licensing terms. \ No newline at end of file diff --git a/Assets/Plugins/TextMesh Pro/Sprites/EmojiOne Attribution.txt.meta b/Assets/Plugins/TextMesh Pro/Sprites/EmojiOne Attribution.txt.meta new file mode 100644 index 0000000..0d30e65 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Sprites/EmojiOne Attribution.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 381dcb09d5029d14897e55f98031fca5 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Sprites/EmojiOne.json b/Assets/Plugins/TextMesh Pro/Sprites/EmojiOne.json new file mode 100644 index 0000000..6c4e50b --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Sprites/EmojiOne.json @@ -0,0 +1,156 @@ +{"frames": [ + +{ + "filename": "1f60a.png", + "frame": {"x":0,"y":0,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f60b.png", + "frame": {"x":128,"y":0,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f60d.png", + "frame": {"x":256,"y":0,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f60e.png", + "frame": {"x":384,"y":0,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f600.png", + "frame": {"x":0,"y":128,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f601.png", + "frame": {"x":128,"y":128,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f602.png", + "frame": {"x":256,"y":128,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f603.png", + "frame": {"x":384,"y":128,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f604.png", + "frame": {"x":0,"y":256,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f605.png", + "frame": {"x":128,"y":256,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f606.png", + "frame": {"x":256,"y":256,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f609.png", + "frame": {"x":384,"y":256,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f618.png", + "frame": {"x":0,"y":384,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f923.png", + "frame": {"x":128,"y":384,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "263a.png", + "frame": {"x":256,"y":384,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "2639.png", + "frame": {"x":384,"y":384,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}], +"meta": { + "app": "http://www.codeandweb.com/texturepacker", + "version": "1.0", + "image": "EmojiOne.png", + "format": "RGBA8888", + "size": {"w":512,"h":512}, + "scale": "1", + "smartupdate": "$TexturePacker:SmartUpdate:196a26a2e149d875b91ffc8fa3581e76:fc928c7e275404b7e0649307410475cb:424723c3774975ddb2053fd5c4b85f6e$" +} +} diff --git a/Assets/Plugins/TextMesh Pro/Sprites/EmojiOne.json.meta b/Assets/Plugins/TextMesh Pro/Sprites/EmojiOne.json.meta new file mode 100644 index 0000000..762cf15 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Sprites/EmojiOne.json.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8f05276190cf498a8153f6cbe761d4e6 +timeCreated: 1480316860 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/TextMesh Pro/Sprites/EmojiOne.png b/Assets/Plugins/TextMesh Pro/Sprites/EmojiOne.png new file mode 100644 index 0000000..63e49d0 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Sprites/EmojiOne.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a87b965a701de3dc31d7401e542b1fc946587f912c51d7a26e46ade9f098bd1a +size 112319 diff --git a/Assets/Plugins/TextMesh Pro/Sprites/EmojiOne.png.meta b/Assets/Plugins/TextMesh Pro/Sprites/EmojiOne.png.meta new file mode 100644 index 0000000..c9fa1a7 --- /dev/null +++ b/Assets/Plugins/TextMesh Pro/Sprites/EmojiOne.png.meta @@ -0,0 +1,431 @@ +fileFormatVersion: 2 +guid: dffef66376be4fa480fb02b19edbe903 +TextureImporter: + fileIDToRecycleName: + 21300000: EmojiOne_0 + 21300002: EmojiOne_1 + 21300004: EmojiOne_2 + 21300006: EmojiOne_3 + 21300008: EmojiOne_4 + 21300010: EmojiOne_6 + 21300012: EmojiOne_7 + 21300014: EmojiOne_8 + 21300016: EmojiOne_9 + 21300018: EmojiOne_10 + 21300020: EmojiOne_11 + 21300022: EmojiOne_12 + 21300024: EmojiOne_13 + 21300026: EmojiOne_5 + 21300028: EmojiOne_14 + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 2 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 512 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 512 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 512 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 512 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: EmojiOne_0 + rect: + serializedVersion: 2 + x: 0 + y: 384 + width: 128 + height: 128 + alignment: 0 + pivot: {x: 0.5, y: 0.5} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 4bcc36da2108f2c4ba3de5c921d25c3c + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: EmojiOne_1 + rect: + serializedVersion: 2 + x: 128 + y: 384 + width: 128 + height: 128 + alignment: 0 + pivot: {x: 0.5, y: 0.5} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: e9eea8093eaeaee4d901c4553f572c22 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: EmojiOne_2 + rect: + serializedVersion: 2 + x: 256 + y: 384 + width: 128 + height: 128 + alignment: 0 + pivot: {x: 0.5, y: 0.5} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 49451da35411dcc42a3692e39b0fde70 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: EmojiOne_3 + rect: + serializedVersion: 2 + x: 384 + y: 384 + width: 128 + height: 128 + alignment: 0 + pivot: {x: 0.5, y: 0.5} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: f65709664b924904790c850a50ca82bc + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: EmojiOne_4 + rect: + serializedVersion: 2 + x: 0 + y: 256 + width: 128 + height: 128 + alignment: 0 + pivot: {x: 0.5, y: 0.5} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 5b92c568a5ec9ad4b9ed90e271f1c9a8 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: EmojiOne_6 + rect: + serializedVersion: 2 + x: 256 + y: 256 + width: 128 + height: 128 + alignment: 0 + pivot: {x: 0.5, y: 0.5} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: b10f2b48b7281594bb8a24a6511a35af + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: EmojiOne_7 + rect: + serializedVersion: 2 + x: 384 + y: 256 + width: 128 + height: 128 + alignment: 0 + pivot: {x: 0.5, y: 0.5} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 10a600f9329dc2246a897e89f4d283cd + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: EmojiOne_8 + rect: + serializedVersion: 2 + x: 0 + y: 128 + width: 128 + height: 128 + alignment: 0 + pivot: {x: 0.5, y: 0.5} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 66cffa363b90ab14787d8a5b90cf4502 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: EmojiOne_9 + rect: + serializedVersion: 2 + x: 128 + y: 128 + width: 128 + height: 128 + alignment: 0 + pivot: {x: 0.5, y: 0.5} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 55cf3d409c9b89349b1e1bdc1cc224ad + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: EmojiOne_10 + rect: + serializedVersion: 2 + x: 256 + y: 128 + width: 128 + height: 128 + alignment: 0 + pivot: {x: 0.5, y: 0.5} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 2a9e58eaf96feef42bcefa1cf257193f + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: EmojiOne_11 + rect: + serializedVersion: 2 + x: 384 + y: 128 + width: 128 + height: 128 + alignment: 0 + pivot: {x: 0.5, y: 0.5} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 2489120affc155840ae6a7be2e93ce19 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: EmojiOne_12 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 128 + height: 128 + alignment: 0 + pivot: {x: 0.5, y: 0.5} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 412349a150598d14da4d7140df5c0286 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: EmojiOne_13 + rect: + serializedVersion: 2 + x: 128 + y: 0 + width: 128 + height: 128 + alignment: 0 + pivot: {x: 0.5, y: 0.5} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: a937464b42bb3634782dea34c6becb6c + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: EmojiOne_5 + rect: + serializedVersion: 2 + x: 256 + y: 0 + width: 128 + height: 128 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: b0f933b217682124dbfc5e6b89abe3d0 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: EmojiOne_14 + rect: + serializedVersion: 2 + x: 128 + y: 256 + width: 128 + height: 128 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: f7235c763afe4434e8bb666750a41096 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 3e32d8f5477abfc43b19066e8ad5032e + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes.meta b/Assets/Scenes.meta new file mode 100644 index 0000000..efcd08d --- /dev/null +++ b/Assets/Scenes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: af2057b02021c9741996af1b36b59bfe +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity new file mode 100644 index 0000000..e22b19e --- /dev/null +++ b/Assets/Scenes/SampleScene.unity @@ -0,0 +1,317 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &932618869 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 932618871} + - component: {fileID: 932618870} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &932618870 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 932618869} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &932618871 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 932618869} + serializedVersion: 2 + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &2128167059 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2128167062} + - component: {fileID: 2128167061} + - component: {fileID: 2128167060} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &2128167060 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2128167059} + m_Enabled: 1 +--- !u!20 &2128167061 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2128167059} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &2128167062 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2128167059} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 2128167062} + - {fileID: 932618871} diff --git a/Assets/Scenes/SampleScene.unity.meta b/Assets/Scenes/SampleScene.unity.meta new file mode 100644 index 0000000..f1969d0 --- /dev/null +++ b/Assets/Scenes/SampleScene.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f944e22ca81aba644a6b10652036a47d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.chark.build-tools/CHANGELOG.md b/Packages/com.chark.build-tools/CHANGELOG.md new file mode 100644 index 0000000..5e39cf2 --- /dev/null +++ b/Packages/com.chark.build-tools/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project +adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v0.0.1](https://github.com/chark/build-tools/compare/v0.0.1) - 2023-10-05 + +Initial preview version. diff --git a/Packages/com.chark.build-tools/CHANGELOG.md.meta b/Packages/com.chark.build-tools/CHANGELOG.md.meta new file mode 100644 index 0000000..007d3e5 --- /dev/null +++ b/Packages/com.chark.build-tools/CHANGELOG.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4f8e8e2db881cf14cb18e27e71f77c6b +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.chark.build-tools/Documentation~/README.md b/Packages/com.chark.build-tools/Documentation~/README.md new file mode 100644 index 0000000..fb184cd --- /dev/null +++ b/Packages/com.chark.build-tools/Documentation~/README.md @@ -0,0 +1,3 @@ +# Documentation + +W.I.P :( diff --git a/Packages/com.chark.build-tools/Editor.meta b/Packages/com.chark.build-tools/Editor.meta new file mode 100644 index 0000000..d77339e --- /dev/null +++ b/Packages/com.chark.build-tools/Editor.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 4e7e9d3fad504a98bbeed5a11f83bdad +timeCreated: 1676207318 \ No newline at end of file diff --git a/Packages/com.chark.build-tools/Editor/BuildConfiguration.cs b/Packages/com.chark.build-tools/Editor/BuildConfiguration.cs new file mode 100644 index 0000000..e574941 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/BuildConfiguration.cs @@ -0,0 +1,308 @@ +using System; +using System.Collections.Generic; +using CHARK.BuildTools.Editor.Utilities; +using UnityEngine; + +namespace CHARK.BuildTools.Editor +{ + /// + /// Configuration which represents a build. + /// + [CreateAssetMenu( + fileName = CreateAssetMenuConstants.BaseFileName + nameof(BuildConfiguration), + menuName = CreateAssetMenuConstants.BaseMenuName + "/Build Configuration", + order = CreateAssetMenuConstants.BaseOrder + )] + internal sealed class BuildConfiguration : ScriptableObject, ICloneable + { +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.FoldoutGroup("General", Expanded = true)] +#else + [Header("General")] +#endif + [SerializeField] + private string configurationName; + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.FoldoutGroup("Player", Expanded = true)] +#else + [Header("Player")] +#endif + [SerializeField] + private bool isDevelopmentBuild; + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.FoldoutGroup("Player", Expanded = true)] +#endif + [SerializeField] + private bool isShowBuiltPlayer = true; + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.FoldoutGroup("Player", Expanded = true)] +#endif + [SerializeField] + private bool isAutoRunPlayer; + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.FoldoutGroup("Player", Expanded = true)] + [Sirenix.OdinInspector.PropertySpace] + [Sirenix.OdinInspector.ListDrawerSettings(DefaultExpandedState = true)] +#endif + [SerializeField] + private List buildTargets = new() + { + BuildToolsTarget.StandaloneWindows64, + }; + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.FoldoutGroup("Directories", Expanded = true)] +#else + [Header("Directories")] +#endif + [SerializeField] + private string buildDirectory = "Builds"; + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.FoldoutGroup("Directories", Expanded = true)] +#endif + [SerializeField] + private string archiveDirectory = "Builds"; + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.FoldoutGroup("Naming", Expanded = true)] +#else + [Header("Naming")] +#endif + [SerializeField] + private string buildNameOverride = ""; + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.FoldoutGroup("Naming", Expanded = true)] +#endif + [SerializeField] + private string buildVersionOverride = ""; + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.FoldoutGroup("Naming", Expanded = true)] +#endif + [SerializeField] + private string buildNameDelimiter = " "; + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.FoldoutGroup("Naming", Expanded = true)] +#endif + [SerializeField] + private string buildDateTimeFormat = "yyyyMMHHmm"; + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.FoldoutGroup("Naming", Expanded = true)] +#endif + [Space] + [SerializeField] + private bool isAppendVersionToBuildName = true; + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.FoldoutGroup("Naming", Expanded = true)] +#endif + [SerializeField] + private bool isAppendPlatformToBuildName = true; + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.FoldoutGroup("Naming", Expanded = true)] +#endif + [SerializeField] + private bool isAppendDateToBuildName = true; + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.FoldoutGroup("Archive", Expanded = true)] +#else + [Header("Archive")] +#endif + [SerializeField] + private bool isArchive; + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.FoldoutGroup("Archive", Expanded = true)] +#endif + [SerializeField] + private bool isAppendVersionToArchiveName = true; + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.FoldoutGroup("Archive", Expanded = true)] +#endif + [SerializeField] + private bool isAppendPlatformToArchiveName = true; + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.FoldoutGroup("Archive", Expanded = true)] +#endif + [SerializeField] + private bool isAppendDateToArchiveName = true; + + /// + /// User-friendly configuration name. + /// + internal string Name + { + get + { + if (string.IsNullOrWhiteSpace(configurationName)) + { + return GetDefaultName(); + } + + return configurationName; + } + } + + /// + /// Is this a development build? + /// + internal bool IsDevelopmentBuild => isDevelopmentBuild; + + /// + /// Should the player directory) (build directory) be shown when the build finishes? + /// + internal bool IsShowBuiltPlayer => isShowBuiltPlayer; + + /// + /// Should the player automatically start when the build finishes? + /// + internal bool IsAutoRunPlayer + { + get => isAutoRunPlayer; + set => isAutoRunPlayer = value; + } + + /// + /// Platform we're building for. + /// + internal IEnumerable BuildTargets => buildTargets; + + /// + /// Output directory. + /// + internal string BuildDirectory => buildDirectory; + + /// + /// Archive output directory. + /// + internal string ArchiveDirectory => archiveDirectory; + + /// + /// Build name, defaults to . + /// + internal string BuildName + { + get + { + if (string.IsNullOrWhiteSpace(buildNameOverride)) + { + return Application.productName; + } + + return buildNameOverride; + } + } + + /// + /// Build version, defaults to . + /// + internal string BuildVersion + { + get + { + if (string.IsNullOrWhiteSpace(buildVersionOverride)) + { + return Application.version; + } + + return buildVersionOverride; + } + } + + /// + /// Separator used when concentrating build name with date and other components. + /// + internal string BuildNameDelimiter => buildNameDelimiter; + + /// + /// Date suffix format. + /// + internal string BuildDateTimeFormat => buildDateTimeFormat; + + /// + /// Should be appended to the build name? + /// + internal bool IsAppendVersionToBuildName => isAppendVersionToBuildName; + + /// + /// Should be appended to the build name? + /// + internal bool IsAppendPlatformToBuildName => isAppendPlatformToBuildName; + + /// + /// Should build date (formatted with ) be appended to the + /// build name? + /// + internal bool IsAppendDateToBuildName => isAppendDateToBuildName; + + /// + /// Should the build be archived? + /// + internal bool IsArchive + { + get => isArchive; + set => isArchive = value; + } + + /// + /// Should be appended to the archive name? + /// + internal bool IsAppendVersionToArchiveName => isAppendVersionToArchiveName; + + /// + /// Should be appended to the archive name? + /// + internal bool IsAppendPlatformToArchiveName => isAppendPlatformToArchiveName; + + /// + /// Should build date (formatted with ) be appended to the + /// archive name? + /// + internal bool IsAppendDateToArchiveName => isAppendDateToArchiveName; + + public object Clone() + { + return MemberwiseClone(); + } + + private string GetDefaultName() + { + var title = string.Join(", ", buildTargets); + var parts = new List(); + + if (isAutoRunPlayer) + { + parts.Add("autorun"); + } + + if (isArchive) + { + parts.Add("archive"); + } + + if (isDevelopmentBuild) + { + parts.Add("dev"); + } + + if (parts.Count > 0) + { + title += $" ({string.Join(", ", parts)})"; + } + + return title; + } + } +} diff --git a/Packages/com.chark.build-tools/Editor/BuildConfiguration.cs.meta b/Packages/com.chark.build-tools/Editor/BuildConfiguration.cs.meta new file mode 100644 index 0000000..733f009 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/BuildConfiguration.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e8d2cb70b1df4848be5d78abadd43e6b +timeCreated: 1695765096 \ No newline at end of file diff --git a/Packages/com.chark.build-tools/Editor/BuildOptions.cs b/Packages/com.chark.build-tools/Editor/BuildOptions.cs new file mode 100644 index 0000000..c51ef22 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/BuildOptions.cs @@ -0,0 +1,27 @@ +using System; + +namespace CHARK.BuildTools.Editor +{ + internal sealed class BuildOptions + { + /// + /// Configuration to build. + /// + internal BuildConfiguration Configuration { get; } + + /// + /// Date time of the build. Useful to set this when doing bulk builds. + /// + internal DateTime DateTime { get; set; } = DateTime.Now; + + /// + /// Build target we're building right now. + /// + internal BuildToolsTarget BuildTarget { get; set; } + + internal BuildOptions(BuildConfiguration configuration) + { + Configuration = configuration; + } + } +} diff --git a/Packages/com.chark.build-tools/Editor/BuildOptions.cs.meta b/Packages/com.chark.build-tools/Editor/BuildOptions.cs.meta new file mode 100644 index 0000000..810b9f9 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/BuildOptions.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 351bef78d47f42278446571a962aebab +timeCreated: 1695764645 \ No newline at end of file diff --git a/Packages/com.chark.build-tools/Editor/BuildToolsManagerWindow.cs b/Packages/com.chark.build-tools/Editor/BuildToolsManagerWindow.cs new file mode 100644 index 0000000..b62a7c9 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/BuildToolsManagerWindow.cs @@ -0,0 +1,105 @@ +using System.Collections.Generic; +using CHARK.BuildTools.Editor.Elements; +using CHARK.BuildTools.Editor.Utilities; +using UnityEditor; +using UnityEngine; +using UnityEngine.UIElements; + +namespace CHARK.BuildTools.Editor +{ + /// + /// Window used to manage build settings. + /// + internal sealed class BuildToolsManagerWindow : EditorWindow + { + [SerializeField] + private StyleSheet styleSheet; + + private readonly List buildConfigurations = new(); + private BuildConfigurationList listView; + + [MenuItem( + MenuItemConstants.BaseWindowItemName + "/Build Tools", + priority = MenuItemConstants.BaseWindowPriority + )] + private static void ShowWindow() + { + var sceneManagerWindow = GetWindow(); + sceneManagerWindow.titleContent = new GUIContent("Build Tools"); + + var minSize = sceneManagerWindow.minSize; + minSize.x = 100f; + minSize.y = 100f; + sceneManagerWindow.minSize = minSize; + + sceneManagerWindow.Show(); + } + + private void OnEnable() + { + BuildToolsEditorUtilities.OnEditorStateChanged += OnEditorStateChanged; + + BindUIElements(); + SetupElements(); + SetupStyleSheets(); + } + + private void OnDisable() + { + BuildToolsEditorUtilities.OnEditorStateChanged -= OnEditorStateChanged; + } + + private void SetupElements() + { + rootVisualElement.AddToClassList("content"); + + listView = new BuildConfigurationList(buildConfigurations); + listView.OnSortOrderChanged += OnListViewSortOrderChanged; + listView.OnBuildButtonClicked += OnListViewBuildButtonClicked; + + rootVisualElement.AddToClassList("window-content"); + rootVisualElement.Add(listView); + } + + private void SetupStyleSheets() + { + rootVisualElement.styleSheets.Add(styleSheet); + } + + private void BindUIElements() + { + BindListView(); + } + + private void BindListView() + { + buildConfigurations.Clear(); + buildConfigurations.AddRange(BuildToolsEditorUtilities.GetBuildConfigurations()); + listView?.RefreshItems(); + } + + private void OnEditorStateChanged() + { + BindUIElements(); + } + + private void OnListViewSortOrderChanged() + { + for (var index = 0; index < buildConfigurations.Count; index++) + { + var configuration = buildConfigurations[index]; + if (configuration.GetDisplayOrder() == index) + { + continue; + } + + configuration.SetDisplayOrder(index); + } + } + + private static void OnListViewBuildButtonClicked(BuildConfiguration configuration) + { + PlayerBuilder.BuildAndLog(configuration); + } + } +} diff --git a/Packages/com.chark.build-tools/Editor/BuildToolsManagerWindow.cs.meta b/Packages/com.chark.build-tools/Editor/BuildToolsManagerWindow.cs.meta new file mode 100644 index 0000000..ba6511a --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/BuildToolsManagerWindow.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 4da7da9398064669ac48e17acf5bc15a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: + - m_ViewDataDictionary: {instanceID: 0} + - styleSheet: {fileID: 7433441132597879392, guid: e995fa0aa8324eb1a8dedb2cad8162b8, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.chark.build-tools/Editor/BuildToolsTarget.cs b/Packages/com.chark.build-tools/Editor/BuildToolsTarget.cs new file mode 100644 index 0000000..f0a9a2b --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/BuildToolsTarget.cs @@ -0,0 +1,47 @@ +using UnityEditor; + +namespace CHARK.BuildTools.Editor +{ + /// + /// Target platform, used instead of in order to restrict supported + /// platforms. + /// + internal enum BuildToolsTarget + { +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.LabelText("StandaloneWindows")] +#endif + StandaloneWindows, + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.LabelText("StandaloneWindows64")] +#endif + StandaloneWindows64, + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.LabelText("Android")] +#endif + Android, + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.LabelText("StandaloneLinux64")] +#endif + StandaloneLinux64, + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.LabelText("StandaloneOSX")] +#endif + StandaloneOSX, + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.LabelText("iOS")] +#endif + // ReSharper disable once InconsistentNaming + iOS, + +#if ODIN_INSPECTOR + [Sirenix.OdinInspector.LabelText("WebGL")] +#endif + WebGL, + } +} diff --git a/Packages/com.chark.build-tools/Editor/BuildToolsTarget.cs.meta b/Packages/com.chark.build-tools/Editor/BuildToolsTarget.cs.meta new file mode 100644 index 0000000..42726c0 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/BuildToolsTarget.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 351f9e68527c41c497a8d3214535c9d1 +timeCreated: 1695764005 \ No newline at end of file diff --git a/Packages/com.chark.build-tools/Editor/CHARK.BuildTools.Editor.asmdef b/Packages/com.chark.build-tools/Editor/CHARK.BuildTools.Editor.asmdef new file mode 100644 index 0000000..821e0d3 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/CHARK.BuildTools.Editor.asmdef @@ -0,0 +1,15 @@ +{ + "name": "CHARK.BuildTools.Editor", + "rootNamespace": "CHARK.BuildTools", + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Packages/com.chark.build-tools/Editor/CHARK.BuildTools.Editor.asmdef.meta b/Packages/com.chark.build-tools/Editor/CHARK.BuildTools.Editor.asmdef.meta new file mode 100644 index 0000000..64a7335 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/CHARK.BuildTools.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c274b5de65b23c3499c4f6503ee9c76f +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.chark.build-tools/Editor/Elements.meta b/Packages/com.chark.build-tools/Editor/Elements.meta new file mode 100644 index 0000000..27c47aa --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Elements.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: ec0f047cd9f9475fb3ceea917326c6cd +timeCreated: 1695982284 \ No newline at end of file diff --git a/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldout.cs b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldout.cs new file mode 100644 index 0000000..c0ecdd5 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldout.cs @@ -0,0 +1,29 @@ +using UnityEngine.UIElements; + +namespace CHARK.BuildTools.Editor.Elements +{ + internal sealed class BuildConfigurationFoldout : Foldout + { + internal BuildConfigurationFoldout() + { + value = false; + } + + internal void AddHeader(VisualElement element) + { + var toggle = this.Q(); + toggle.Add(element); + } + + internal void AddContent(VisualElement element) + { + Add(element); + } + + internal void Bind(BuildConfiguration configuration) + { + tooltip = configuration.Name; + text = configuration.Name; + } + } +} diff --git a/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldout.cs.meta b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldout.cs.meta new file mode 100644 index 0000000..159dd05 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldout.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 88d417b57312427798b5c409b17a33f2 +timeCreated: 1695982575 \ No newline at end of file diff --git a/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldoutActions.cs b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldoutActions.cs new file mode 100644 index 0000000..e7892f3 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldoutActions.cs @@ -0,0 +1,40 @@ +using System; +using UnityEngine.UIElements; + +namespace CHARK.BuildTools.Editor.Elements +{ + internal sealed class BuildConfigurationFoldoutActions : VisualElement + { + private Button buildButton; + + internal event Action OnBuildButtonClicked; + + internal BuildConfigurationFoldoutActions() + { + InitializeBuildButton(); + } + + internal void Bind(BuildConfiguration configuration) + { + buildButton.tooltip = $"Build configuration \"{configuration.Name}\""; + } + + private void InitializeBuildButton() + { + buildButton = new Button + { + text = "Build", + tooltip = "Build this configuration", + }; + + buildButton.clicked += OnActionsBuildButtonClicked; + + Add(buildButton); + } + + private void OnActionsBuildButtonClicked() + { + OnBuildButtonClicked?.Invoke(); + } + } +} diff --git a/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldoutActions.cs.meta b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldoutActions.cs.meta new file mode 100644 index 0000000..8ba6598 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldoutActions.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a66443f656b64e77b59daa1255e9954d +timeCreated: 1695982575 \ No newline at end of file diff --git a/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldoutContent.cs b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldoutContent.cs new file mode 100644 index 0000000..00e0441 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldoutContent.cs @@ -0,0 +1,34 @@ +using UnityEditor.Search; +using UnityEngine.UIElements; + +namespace CHARK.BuildTools.Editor.Elements +{ + internal sealed class BuildConfigurationFoldoutContent : VisualElement + { + private const string ReadonlyUssClassName = "readonly"; + + private ObjectField objectField; + + internal BuildConfigurationFoldoutContent() + { + InitializeObjectField(); + } + + internal void Bind(BuildConfiguration configuration) + { + objectField.value = configuration; + } + + private void InitializeObjectField() + { + objectField = new ObjectField + { + label = "Build Configuration", + }; + + objectField.AddToClassList(ReadonlyUssClassName); + + Add(objectField); + } + } +} diff --git a/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldoutContent.cs.meta b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldoutContent.cs.meta new file mode 100644 index 0000000..14ab2a2 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationFoldoutContent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 302e0c81480648a19547745a98b5c300 +timeCreated: 1695982575 \ No newline at end of file diff --git a/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationList.cs b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationList.cs new file mode 100644 index 0000000..e4332a8 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationList.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using UnityEngine.UIElements; + +namespace CHARK.BuildTools.Editor.Elements +{ + internal sealed class BuildConfigurationList : ListView + { + private readonly List configurations; + + internal event Action OnBuildButtonClicked; + + internal event Action OnSortOrderChanged; + + internal BuildConfigurationList(List configurations) + { + this.configurations = configurations; + + showAlternatingRowBackgrounds = AlternatingRowBackground.All; + virtualizationMethod = CollectionVirtualizationMethod.DynamicHeight; + selectionType = SelectionType.None; + reorderMode = ListViewReorderMode.Animated; + reorderable = true; + + itemsSource = configurations; + makeItem = MakeItem; + bindItem = BindItem; + + itemIndexChanged += OnItemSortOrderChanged; + } + + private BuildConfigurationListItem MakeItem() + { + var item = new BuildConfigurationListItem(); + + item.OnBuildButtonClicked += OnItemBuildButtonClicked; + + return item; + } + + private void BindItem(VisualElement element, int index) + { + var collection = configurations[index]; + var item = (BuildConfigurationListItem)element; + + item.Bind(collection); + } + + private void OnItemSortOrderChanged(int srcIndex, int dstIndex) + { + OnSortOrderChanged?.Invoke(); + } + + private void OnItemBuildButtonClicked(BuildConfiguration configuration) + { + OnBuildButtonClicked?.Invoke(configuration); + } + } +} diff --git a/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationList.cs.meta b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationList.cs.meta new file mode 100644 index 0000000..e34205e --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationList.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f9dfa4ae85a249c4984b4ceaffd2753d +timeCreated: 1695982575 \ No newline at end of file diff --git a/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationListItem.cs b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationListItem.cs new file mode 100644 index 0000000..004a980 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationListItem.cs @@ -0,0 +1,75 @@ +using System; +using UnityEditor; +using UnityEditor.UIElements; +using UnityEngine.UIElements; + +namespace CHARK.BuildTools.Editor.Elements +{ + internal sealed class BuildConfigurationListItem : VisualElement + { + private BuildConfiguration configuration; + + private BuildConfigurationFoldout foldout; + private BuildConfigurationFoldoutActions actions; + private BuildConfigurationFoldoutContent content; + + internal event Action OnBuildButtonClicked; + + internal BuildConfigurationListItem() + { + InitializeFoldout(); + InitializeActions(); + InitializeContent(); + } + + internal void Bind(BuildConfiguration newConfiguration) + { + var oldCollection = configuration; + + configuration = newConfiguration; + + if (oldCollection != newConfiguration) + { + this.Unbind(); + this.TrackSerializedObjectValue( + new SerializedObject(configuration), + _ => Bind() + ); + } + + Bind(); + } + + private void Bind() + { + foldout.Bind(configuration); + actions.Bind(configuration); + content.Bind(configuration); + } + + private void InitializeFoldout() + { + foldout = new BuildConfigurationFoldout(); + Add(foldout); + } + + private void InitializeActions() + { + actions = new BuildConfigurationFoldoutActions(); + actions.OnBuildButtonClicked += OnActionsBuildButtonClicked; + + foldout.AddHeader(actions); + } + + private void InitializeContent() + { + content = new BuildConfigurationFoldoutContent(); + foldout.AddContent(content); + } + + private void OnActionsBuildButtonClicked() + { + OnBuildButtonClicked?.Invoke(configuration); + } + } +} diff --git a/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationListItem.cs.meta b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationListItem.cs.meta new file mode 100644 index 0000000..d2853e1 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Elements/BuildConfigurationListItem.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 194dfccab7384b88bf34eea8da3560c7 +timeCreated: 1695982575 \ No newline at end of file diff --git a/Packages/com.chark.build-tools/Editor/PlayerBuilder.cs b/Packages/com.chark.build-tools/Editor/PlayerBuilder.cs new file mode 100644 index 0000000..f4df534 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/PlayerBuilder.cs @@ -0,0 +1,289 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Unity.SharpZipLib.Core; +using Unity.SharpZipLib.Zip; +using Unity.SharpZipLib.Zip.Compression; +using UnityEditor; +using UnityEditor.Build.Reporting; +using UnityEngine; + +namespace CHARK.BuildTools.Editor +{ + // This script is based on: https://github.com/game-ci/documentation/blob/main/example/BuildScript.cs + internal static class PlayerBuilder + { + private const Deflater.CompressionLevel ArchiveCompressionLevel = + Deflater.CompressionLevel.BEST_COMPRESSION; + + private const string BurstDebugInformationDirectorySuffix = "_BurstDebugInformation_DoNotShip"; + private const string BuildArchiveExtension = "zip"; + + /// + /// Build application using given and log the results. + /// + internal static void BuildAndLog(BuildConfiguration configuration) + { + var dateTime = DateTime.Now; + + foreach (var buildTarget in configuration.BuildTargets) + { + var buildOptions = new BuildOptions(configuration) + { + BuildTarget = buildTarget, + DateTime = dateTime, + }; + + try + { + var buildReport = Build(buildOptions); + buildReport.Log(); + } + catch (Exception exception) + { + Debug.LogError($"Could not build configuration: {configuration.Name}"); + Debug.LogException(exception); + } + } + } + + private static BuildReport Build(BuildOptions buildOptions) + { + var playerOptions = CreateBuildPlayerOptions(buildOptions); + var buildReport = BuildPipeline.BuildPlayer(playerOptions); + + if (buildOptions.Configuration.IsArchive) + { + Archive(buildOptions); + } + + return buildReport; + } + + private static void Log(this BuildReport report) + { + var summary = report.summary; + var result = summary.result; + + var resultString = GetBuildResultString(summary.totalErrors, result); + Debug.Log( + "" + + $"\nBuild for {summary.platform.ToString()} {resultString}!" + + $"\nOutput Path: {summary.outputPath}" + + $"\nDuration: {summary.totalTime.ToString()}" + + $"\nWarnings: {summary.totalWarnings.ToString()}" + + $"\nErrors: {summary.totalErrors.ToString()}" + + $"\nSize: {((int)(summary.totalSize / 1024f / 1024f)).ToString()} MB" + ); + } + + private static BuildPlayerOptions CreateBuildPlayerOptions(BuildOptions buildOptions) + { + return new BuildPlayerOptions + { + scenes = GetEnabledScenePaths(), + locationPathName = GetBuildPath(buildOptions), + options = CreateBuildOptions(buildOptions), + target = GetUnityBuildTarget(buildOptions), + }; + } + + private static string[] GetEnabledScenePaths() + { + var scenePaths = new List(); + var scenes = EditorBuildSettings.scenes; + + foreach (var scene in scenes) + { + if (scene.enabled == false) + { + continue; + } + + var scenePath = scene.path; + scenePaths.Add(scenePath); + } + + return scenePaths.ToArray(); + } + + private static UnityEditor.BuildOptions CreateBuildOptions(BuildOptions buildOptions) + { + var settings = buildOptions.Configuration; + var options = UnityEditor.BuildOptions.None; + + if (settings.IsDevelopmentBuild) + { + options |= UnityEditor.BuildOptions.Development; + } + + if (settings.IsShowBuiltPlayer) + { + options |= UnityEditor.BuildOptions.ShowBuiltPlayer; + } + + if (settings.IsAutoRunPlayer) + { + options |= UnityEditor.BuildOptions.AutoRunPlayer; + } + + return options; + } + + private static void Archive(BuildOptions buildOptions) + { + var buildPath = GetBuildPath(buildOptions); + var buildDirectoryPath = Path.GetDirectoryName(buildPath); + var archiveFilePath = GetArchiveFilePath(buildOptions); + + Archive(buildDirectoryPath, archiveFilePath); + } + + private static string GetBuildPath(BuildOptions buildOptions) + { + var settings = buildOptions.Configuration; + var parts = new List { settings.BuildName }; + + if (settings.IsAppendVersionToBuildName) + { + parts.Add(settings.BuildVersion); + } + + var platform = GetBuildPlatformName(buildOptions.BuildTarget); + if (settings.IsAppendPlatformToBuildName) + { + parts.Add(platform); + } + + if (settings.IsAppendDateToBuildName) + { + parts.Add(buildOptions.DateTime.ToString(settings.BuildDateTimeFormat)); + } + + var buildFileExtension = GetFileExtension(buildOptions.BuildTarget); + var buildFileName = $"{string.Join(settings.BuildNameDelimiter, parts)}." + + $"{buildFileExtension}"; + + var buildDirectory = settings.BuildDirectory; + + if (string.IsNullOrWhiteSpace(buildDirectory) == false) + { + return Path.Combine(buildDirectory, platform, buildFileName); + } + + return Path.Combine(platform, buildFileName); + } + + private static string GetArchiveFilePath(BuildOptions buildOptions) + { + var settings = buildOptions.Configuration; + var parts = new List { settings.BuildName }; + + if (settings.IsAppendVersionToArchiveName) + { + parts.Add(settings.BuildVersion); + } + + if (settings.IsAppendPlatformToArchiveName) + { + var targetName = GetBuildPlatformName(buildOptions.BuildTarget); + parts.Add(targetName); + } + + if (settings.IsAppendDateToArchiveName) + { + parts.Add(buildOptions.DateTime.ToString(settings.BuildDateTimeFormat)); + } + + var archiveFileName = $"{string.Join(settings.BuildNameDelimiter, parts)}." + + $"{BuildArchiveExtension}"; + + var archiveDirectory = settings.ArchiveDirectory; + + if (string.IsNullOrWhiteSpace(archiveDirectory) == false) + { + return Path.Combine(archiveDirectory, archiveFileName); + } + + return archiveFileName; + } + + private static string GetBuildPlatformName(BuildToolsTarget target) + { + return target.ToString(); + } + + private static BuildTarget GetUnityBuildTarget(BuildOptions buildOptions) + { + return Enum.Parse(buildOptions.BuildTarget.ToString()); + } + + private static string GetFileExtension(BuildToolsTarget target) + { + return target switch + { + BuildToolsTarget.StandaloneWindows => "exe", + BuildToolsTarget.StandaloneWindows64 => "exe", + BuildToolsTarget.Android => "apk", + BuildToolsTarget.StandaloneLinux64 => "x86_64", + BuildToolsTarget.StandaloneOSX => "app", + BuildToolsTarget.iOS => "ipa", + BuildToolsTarget.WebGL => "html", + _ => throw new Exception($"Unsupported target: {target}"), + }; + } + + private static void Archive(string sourceDirectoryPath, string destinationFilePath) + { + var fastZip = new FastZip + { + CreateEmptyDirectories = true, + CompressionLevel = ArchiveCompressionLevel, + }; + + fastZip.CreateZip( + destinationFilePath, + sourceDirectoryPath, + true, + new ArchiveFileFilter(), + new ArchiveDirectoryFilter() + ); + } + + private static string GetBuildResultString(int errorCount, BuildResult result) + { + if (errorCount > 0) + { + return "Failed"; + } + + switch (result) + { + case BuildResult.Succeeded: + return "Succeeded"; + case BuildResult.Failed: + return "Failed"; + case BuildResult.Cancelled: + return "Canceled"; + default: + return $"{result.ToString()}"; + } + } + + private sealed class ArchiveFileFilter : IScanFilter + { + public bool IsMatch(string name) + { + return true; + } + } + + private sealed class ArchiveDirectoryFilter : IScanFilter + { + public bool IsMatch(string name) + { + return name.EndsWith(BurstDebugInformationDirectorySuffix) == false; + } + } + } +} diff --git a/Packages/com.chark.build-tools/Editor/PlayerBuilder.cs.meta b/Packages/com.chark.build-tools/Editor/PlayerBuilder.cs.meta new file mode 100644 index 0000000..a3ea208 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/PlayerBuilder.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 102fe618101e46e19a08f147812ff7d6 +timeCreated: 1676207507 \ No newline at end of file diff --git a/Packages/com.chark.build-tools/Editor/Styles.meta b/Packages/com.chark.build-tools/Editor/Styles.meta new file mode 100644 index 0000000..3c3232c --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Styles.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 4d719fc4255248a9b2963de5a634da88 +timeCreated: 1695815067 \ No newline at end of file diff --git a/Packages/com.chark.build-tools/Editor/Styles/BuildToolsManagerWindowStyles.uss b/Packages/com.chark.build-tools/Editor/Styles/BuildToolsManagerWindowStyles.uss new file mode 100644 index 0000000..acfd990 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Styles/BuildToolsManagerWindowStyles.uss @@ -0,0 +1,74 @@ +/* Window content */ +VisualElement.window-content { + padding: 4px; +} + +/* General list styling */ +BuildConfigurationList VisualElement.unity-list-view__reorderable-handle { + /* Center drag handle */ + display: flex; + flex-direction: column; + justify-content: center; + + padding-top: 0; +} + +BuildConfigurationList VisualElement.unity-list-view__reorderable-item__container { + /* Fix weird padding added to each item */ + padding-left: 0; + padding-right: 0; +} + +BuildConfigurationList Toggle.unity-foldout__toggle { + /* Fix foldout toggles having inconsistent margins */ + margin: 2px; +} + +BuildConfigurationList Toggle.unity-foldout__toggle VisualElement.unity-foldout__input { + /* Shrink labels - actions take precedence */ + flex-shrink: 1; +} + +BuildConfigurationList Toggle.unity-foldout__toggle Label.unity-foldout__text { + /* General label styling in foldouts */ + -unity-text-align: middle-left; + -unity-font-style: bold; +} + +/* Foldout actions styling */ +BuildConfigurationFoldoutActions { + margin-left: auto; + + display: flex; + flex-direction: row; + align-items: center; + justify-content: flex-end; + + flex-shrink: 0; + height: 100%; +} + +BuildConfigurationFoldoutActions Button { + min-width: 20px; + width: 45px; + + padding: 1px; + margin: 1px; +} + +/* Foldout content styling (adjust responsive sizing a bit) */ +BuildConfigurationFoldoutContent > * > Label { + min-width: 0; + width: 135px; + + overflow: hidden; + flex-shrink: 1; +} + +BuildConfigurationFoldoutContent > * > VisualElement { + min-width: 140px; +} + +BuildConfigurationFoldoutContent ObjectField.readonly ObjectFieldSelector { + display: none; +} diff --git a/Packages/com.chark.build-tools/Editor/Styles/BuildToolsManagerWindowStyles.uss.meta b/Packages/com.chark.build-tools/Editor/Styles/BuildToolsManagerWindowStyles.uss.meta new file mode 100644 index 0000000..742412f --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Styles/BuildToolsManagerWindowStyles.uss.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e995fa0aa8324eb1a8dedb2cad8162b8 +timeCreated: 1695815079 \ No newline at end of file diff --git a/Packages/com.chark.build-tools/Editor/Utilities.meta b/Packages/com.chark.build-tools/Editor/Utilities.meta new file mode 100644 index 0000000..a7db848 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Utilities.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 42aed6ed66624ac7898760d24346ad69 +timeCreated: 1695584392 \ No newline at end of file diff --git a/Packages/com.chark.build-tools/Editor/Utilities/BuildToolsAssetPostprocessor.cs b/Packages/com.chark.build-tools/Editor/Utilities/BuildToolsAssetPostprocessor.cs new file mode 100644 index 0000000..ab40d9f --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Utilities/BuildToolsAssetPostprocessor.cs @@ -0,0 +1,26 @@ +using UnityEditor; + +namespace CHARK.BuildTools.Editor.Utilities +{ + /// + /// Reloads assigned to + /// . + /// + internal sealed class BuildToolsAssetPostprocessor : AssetPostprocessor + { + private static void OnPostprocessAllAssets( + string[] importedAssets, + string[] deletedAssets, + string[] movedAssets, + string[] movedFromAssetPaths + ) + { + if (importedAssets.Length == 0 && deletedAssets.Length == 0) + { + return; + } + + BuildToolsEditorUtilities.TriggerEditorStateChange(); + } + } +} diff --git a/Packages/com.chark.build-tools/Editor/Utilities/BuildToolsAssetPostprocessor.cs.meta b/Packages/com.chark.build-tools/Editor/Utilities/BuildToolsAssetPostprocessor.cs.meta new file mode 100644 index 0000000..79a8273 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Utilities/BuildToolsAssetPostprocessor.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: cc81f94ae3c34ac799537e822e0010b5 +timeCreated: 1695821398 \ No newline at end of file diff --git a/Packages/com.chark.build-tools/Editor/Utilities/BuildToolsEditorUtilities.cs b/Packages/com.chark.build-tools/Editor/Utilities/BuildToolsEditorUtilities.cs new file mode 100644 index 0000000..597cfd3 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Utilities/BuildToolsEditorUtilities.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using Object = UnityEngine.Object; + +namespace CHARK.BuildTools.Editor.Utilities +{ + /// + /// General utilities for interacting with assets in + /// Editor scripts. + /// + internal static class BuildToolsEditorUtilities + { + /// + /// Called when editor state changes and Build Tools editors should reload. This event + /// will be called when: + ///
    + ///
  • An asset gets deleted or created
  • + ///
+ ///
+ internal static event Action OnEditorStateChanged; + + /// + /// Enumerable of all in the project. + /// + internal static IEnumerable GetBuildConfigurations() + { + return AssetDatabase + .FindAssets($"t:{typeof(BuildConfiguration)}") + .Select(AssetDatabase.GUIDToAssetPath) + .Select(AssetDatabase.LoadAssetAtPath) + .OrderBy(collection => collection.GetDisplayOrder()) + .ThenBy(collection => collection.Name) + .ToList(); + } + + /// + /// The sort order at which to display the given in Editor + /// lists. + /// + internal static int GetDisplayOrder(this BuildConfiguration configuration) + { + var key = GeDisplayOrderKey(configuration); + return EditorPrefs.GetInt(key, 0); + } + + /// + /// Set the sort order at which to display the given in + /// Editor lists. + /// + internal static void SetDisplayOrder( + this BuildConfiguration configuration, + int order + ) + { + var key = configuration.GeDisplayOrderKey(); + EditorPrefs.SetInt(key, order); + } + + /// + /// Invoke . + /// + internal static void TriggerEditorStateChange() + { + OnEditorStateChanged?.Invoke(); + } + + private static string GeDisplayOrderKey(this Object collection) + { + var prefix = typeof(BuildConfiguration).FullName; + const string function = nameof(GeDisplayOrderKey); + var target = collection.GetGuid(); + + return $"{prefix}_{function}_{target}"; + } + + private static string GetGuid(this Object obj) + { + var assetPath = AssetDatabase.GetAssetPath(obj); + return AssetDatabase.AssetPathToGUID(assetPath); + } + } +} diff --git a/Packages/com.chark.build-tools/Editor/Utilities/BuildToolsEditorUtilities.cs.meta b/Packages/com.chark.build-tools/Editor/Utilities/BuildToolsEditorUtilities.cs.meta new file mode 100644 index 0000000..a6bdb56 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Utilities/BuildToolsEditorUtilities.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: d3781a3114ad46b6b8218cbea4fe0aeb +timeCreated: 1695811803 \ No newline at end of file diff --git a/Packages/com.chark.build-tools/Editor/Utilities/CreateAssetMenuConstants.cs b/Packages/com.chark.build-tools/Editor/Utilities/CreateAssetMenuConstants.cs new file mode 100644 index 0000000..9d6de1b --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Utilities/CreateAssetMenuConstants.cs @@ -0,0 +1,25 @@ +using UnityEngine; + +namespace CHARK.BuildTools.Editor.Utilities +{ + /// + /// Constants for . + /// + internal static class CreateAssetMenuConstants + { + /// + /// Base file name (prefix). + /// + internal const string BaseFileName = "New "; + + /// + /// Base menu name (sub-menu category). + /// + internal const string BaseMenuName = "CHARK/Build Tools"; + + /// + /// Base menu order. + /// + internal const int BaseOrder = -1000; + } +} diff --git a/Packages/com.chark.build-tools/Editor/Utilities/CreateAssetMenuConstants.cs.meta b/Packages/com.chark.build-tools/Editor/Utilities/CreateAssetMenuConstants.cs.meta new file mode 100644 index 0000000..85a4e17 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Utilities/CreateAssetMenuConstants.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 67721da4d36e4038a2a62bb3a365a4f4 +timeCreated: 1695584372 \ No newline at end of file diff --git a/Packages/com.chark.build-tools/Editor/Utilities/MenuItemConstants.cs b/Packages/com.chark.build-tools/Editor/Utilities/MenuItemConstants.cs new file mode 100644 index 0000000..6c364f3 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Utilities/MenuItemConstants.cs @@ -0,0 +1,15 @@ +namespace CHARK.BuildTools.Editor.Utilities +{ + internal static class MenuItemConstants + { + /// + /// Base menu item name for Window menu items. + /// + internal const string BaseWindowItemName = "Window/CHARK"; + + /// + /// Base menu item priority for Window menu items. + /// + internal const int BaseWindowPriority = -1000; + } +} diff --git a/Packages/com.chark.build-tools/Editor/Utilities/MenuItemConstants.cs.meta b/Packages/com.chark.build-tools/Editor/Utilities/MenuItemConstants.cs.meta new file mode 100644 index 0000000..071a6b6 --- /dev/null +++ b/Packages/com.chark.build-tools/Editor/Utilities/MenuItemConstants.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: bc3ea0435ff647d6bbb65a733842d15a +timeCreated: 1695758860 \ No newline at end of file diff --git a/Packages/com.chark.build-tools/LICENSE.md b/Packages/com.chark.build-tools/LICENSE.md new file mode 100644 index 0000000..5169581 --- /dev/null +++ b/Packages/com.chark.build-tools/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 CHARK + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Packages/com.chark.build-tools/LICENSE.md.meta b/Packages/com.chark.build-tools/LICENSE.md.meta new file mode 100644 index 0000000..62ad318 --- /dev/null +++ b/Packages/com.chark.build-tools/LICENSE.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bd0398f5a51237e488aaf4a30635d065 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.chark.build-tools/Samples.meta b/Packages/com.chark.build-tools/Samples.meta new file mode 100644 index 0000000..81f34a3 --- /dev/null +++ b/Packages/com.chark.build-tools/Samples.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 500c9fe4dfe452b4d9f2d41004528f2d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.chark.build-tools/Samples/CHARK.BuildTools.Samples.asmdef b/Packages/com.chark.build-tools/Samples/CHARK.BuildTools.Samples.asmdef new file mode 100644 index 0000000..777e970 --- /dev/null +++ b/Packages/com.chark.build-tools/Samples/CHARK.BuildTools.Samples.asmdef @@ -0,0 +1,15 @@ +{ + "name": "CHARK.BuildTools.Samples", + "rootNamespace": "CHARK.BuildTools", + "references": [ + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Packages/com.chark.build-tools/Samples/CHARK.BuildTools.Samples.asmdef.meta b/Packages/com.chark.build-tools/Samples/CHARK.BuildTools.Samples.asmdef.meta new file mode 100644 index 0000000..69982fc --- /dev/null +++ b/Packages/com.chark.build-tools/Samples/CHARK.BuildTools.Samples.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c90bf8c3afa414b4bb7d4e53517e3e65 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.chark.build-tools/Samples/Defaults.meta b/Packages/com.chark.build-tools/Samples/Defaults.meta new file mode 100644 index 0000000..61c4412 --- /dev/null +++ b/Packages/com.chark.build-tools/Samples/Defaults.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8fe8145bdcc400b48bb258abd91f71a3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects.meta b/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects.meta new file mode 100644 index 0000000..fa71762 --- /dev/null +++ b/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0a76c5c8e845b894b8226f89d78bd9a9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/AndroidBuildConfiguration.asset b/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/AndroidBuildConfiguration.asset new file mode 100644 index 0000000..bbd4bc5 --- /dev/null +++ b/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/AndroidBuildConfiguration.asset @@ -0,0 +1,32 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e8d2cb70b1df4848be5d78abadd43e6b, type: 3} + m_Name: AndroidBuildConfiguration + m_EditorClassIdentifier: + configurationName: + isDevelopmentBuild: 0 + isShowBuiltPlayer: 1 + isAutoRunPlayer: 0 + buildTargets: 01000000 + buildDirectory: Builds + archiveDirectory: Builds + buildNameOverride: + buildVersionOverride: + buildNameDelimiter: ' ' + buildDateTimeFormat: yyyyMMHHmm + isAppendVersionToBuildName: 1 + isAppendPlatformToBuildName: 1 + isAppendDateToBuildName: 1 + isArchive: 0 + isAppendVersionToArchiveName: 1 + isAppendPlatformToArchiveName: 1 + isAppendDateToArchiveName: 1 diff --git a/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/AndroidBuildConfiguration.asset.meta b/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/AndroidBuildConfiguration.asset.meta new file mode 100644 index 0000000..ecbda65 --- /dev/null +++ b/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/AndroidBuildConfiguration.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f41738e48eaba84409ef05f80bffdbf7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/ArchiveAllBuildConfiguration.asset b/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/ArchiveAllBuildConfiguration.asset new file mode 100644 index 0000000..8f6a230 --- /dev/null +++ b/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/ArchiveAllBuildConfiguration.asset @@ -0,0 +1,32 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e8d2cb70b1df4848be5d78abadd43e6b, type: 3} + m_Name: ArchiveAllBuildConfiguration + m_EditorClassIdentifier: + configurationName: + isDevelopmentBuild: 0 + isShowBuiltPlayer: 1 + isAutoRunPlayer: 0 + buildTargets: 01000000 + buildDirectory: Builds + archiveDirectory: Builds + buildNameOverride: + buildVersionOverride: + buildNameDelimiter: ' ' + buildDateTimeFormat: yyyyMMHHmm + isAppendVersionToBuildName: 1 + isAppendPlatformToBuildName: 1 + isAppendDateToBuildName: 1 + isArchive: 0 + isAppendVersionToArchiveName: 1 + isAppendPlatformToArchiveName: 1 + isAppendDateToArchiveName: 1 diff --git a/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/ArchiveAllBuildConfiguration.asset.meta b/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/ArchiveAllBuildConfiguration.asset.meta new file mode 100644 index 0000000..5e2c536 --- /dev/null +++ b/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/ArchiveAllBuildConfiguration.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f3e8ae56d8f947548b2825fe0f5b15e6 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/WindowsBuildConfiguration.asset b/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/WindowsBuildConfiguration.asset new file mode 100644 index 0000000..7282288 --- /dev/null +++ b/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/WindowsBuildConfiguration.asset @@ -0,0 +1,32 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e8d2cb70b1df4848be5d78abadd43e6b, type: 3} + m_Name: WindowsBuildConfiguration + m_EditorClassIdentifier: + configurationName: + isDevelopmentBuild: 0 + isShowBuiltPlayer: 1 + isAutoRunPlayer: 0 + buildTargets: 01000000 + buildDirectory: Builds + archiveDirectory: Builds + buildNameOverride: + buildVersionOverride: + buildNameDelimiter: ' ' + buildDateTimeFormat: yyyyMMHHmm + isAppendVersionToBuildName: 1 + isAppendPlatformToBuildName: 1 + isAppendDateToBuildName: 1 + isArchive: 0 + isAppendVersionToArchiveName: 1 + isAppendPlatformToArchiveName: 1 + isAppendDateToArchiveName: 1 diff --git a/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/WindowsBuildConfiguration.asset.meta b/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/WindowsBuildConfiguration.asset.meta new file mode 100644 index 0000000..ac0c550 --- /dev/null +++ b/Packages/com.chark.build-tools/Samples/Defaults/ScriptableObjects/WindowsBuildConfiguration.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b12d28c3e70ca664cad9fcd9b5423974 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.chark.build-tools/package.json b/Packages/com.chark.build-tools/package.json new file mode 100644 index 0000000..47a107f --- /dev/null +++ b/Packages/com.chark.build-tools/package.json @@ -0,0 +1,27 @@ +{ + "name": "com.chark.build-tools", + "displayName": "Build Tools", + "author": { + "name": "CHARK", + "url": "https://chark.io" + }, + "version": "0.0.1", + "unity": "2022.3", + "description": "Editor utilities for quickly automating builds", + "keywords": [ + "unity", + "editor", + "builds", + "automation" + ], + "samples": [ + { + "displayName": "Defaults", + "description": "Set of build configurations to be used as a starting point.", + "path": "Samples~/Defaults" + } + ], + "dependencies": { + "com.unity.sharp-zip-lib": "1.3.2-preview" + } +} diff --git a/Packages/com.chark.build-tools/package.json.meta b/Packages/com.chark.build-tools/package.json.meta new file mode 100644 index 0000000..7e9cefa --- /dev/null +++ b/Packages/com.chark.build-tools/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 61084590ff13b3d408e3b96b66c20036 +PackageManifestImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/manifest.json b/Packages/manifest.json new file mode 100644 index 0000000..d9bfaea --- /dev/null +++ b/Packages/manifest.json @@ -0,0 +1,8 @@ +{ + "dependencies": { + "com.unity.ai.navigation": "1.1.4", + "com.unity.ide.rider": "3.0.25", + "com.unity.test-framework": "1.1.33", + "com.unity.textmeshpro": "3.0.6" + } +} diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json new file mode 100644 index 0000000..dc8f15b --- /dev/null +++ b/Packages/packages-lock.json @@ -0,0 +1,97 @@ +{ + "dependencies": { + "com.chark.build-tools": { + "version": "file:com.chark.build-tools", + "depth": 0, + "source": "embedded", + "dependencies": { + "com.unity.sharp-zip-lib": "1.3.2-preview" + } + }, + "com.unity.ai.navigation": { + "version": "1.1.4", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.modules.ai": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.ext.nunit": { + "version": "1.0.6", + "depth": 1, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, + "com.unity.ide.rider": { + "version": "3.0.25", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.ext.nunit": "1.0.6" + }, + "url": "https://packages.unity.com" + }, + "com.unity.sharp-zip-lib": { + "version": "1.3.2-preview", + "depth": 1, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, + "com.unity.test-framework": { + "version": "1.1.33", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.ext.nunit": "1.0.6", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.textmeshpro": { + "version": "3.0.6", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.ugui": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.ugui": { + "version": "1.0.0", + "depth": 1, + "source": "builtin", + "dependencies": { + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.imgui": "1.0.0" + } + }, + "com.unity.modules.ai": { + "version": "1.0.0", + "depth": 1, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.imgui": { + "version": "1.0.0", + "depth": 1, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.jsonserialize": { + "version": "1.0.0", + "depth": 1, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.ui": { + "version": "1.0.0", + "depth": 2, + "source": "builtin", + "dependencies": {} + } + } +} diff --git a/ProjectSettings/AudioManager.asset b/ProjectSettings/AudioManager.asset new file mode 100644 index 0000000..07ebfb0 --- /dev/null +++ b/ProjectSettings/AudioManager.asset @@ -0,0 +1,19 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!11 &1 +AudioManager: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Volume: 1 + Rolloff Scale: 1 + Doppler Factor: 1 + Default Speaker Mode: 2 + m_SampleRate: 0 + m_DSPBufferSize: 1024 + m_VirtualVoiceCount: 512 + m_RealVoiceCount: 32 + m_SpatializerPlugin: + m_AmbisonicDecoderPlugin: + m_DisableAudio: 0 + m_VirtualizeEffects: 1 + m_RequestedDSPBufferSize: 1024 diff --git a/ProjectSettings/ClusterInputManager.asset b/ProjectSettings/ClusterInputManager.asset new file mode 100644 index 0000000..e7886b2 --- /dev/null +++ b/ProjectSettings/ClusterInputManager.asset @@ -0,0 +1,6 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!236 &1 +ClusterInputManager: + m_ObjectHideFlags: 0 + m_Inputs: [] diff --git a/ProjectSettings/DynamicsManager.asset b/ProjectSettings/DynamicsManager.asset new file mode 100644 index 0000000..cdc1f3e --- /dev/null +++ b/ProjectSettings/DynamicsManager.asset @@ -0,0 +1,34 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!55 &1 +PhysicsManager: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_Gravity: {x: 0, y: -9.81, z: 0} + m_DefaultMaterial: {fileID: 0} + m_BounceThreshold: 2 + m_SleepThreshold: 0.005 + m_DefaultContactOffset: 0.01 + m_DefaultSolverIterations: 6 + m_DefaultSolverVelocityIterations: 1 + m_QueriesHitBackfaces: 0 + m_QueriesHitTriggers: 1 + m_EnableAdaptiveForce: 0 + m_ClothInterCollisionDistance: 0 + m_ClothInterCollisionStiffness: 0 + m_ContactsGeneration: 1 + m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + m_AutoSimulation: 1 + m_AutoSyncTransforms: 0 + m_ReuseCollisionCallbacks: 1 + m_ClothInterCollisionSettingsToggle: 0 + m_ContactPairsMode: 0 + m_BroadphaseType: 0 + m_WorldBounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 250, y: 250, z: 250} + m_WorldSubdivisions: 8 + m_FrictionType: 0 + m_EnableEnhancedDeterminism: 0 + m_EnableUnifiedHeightmaps: 1 + m_DefaultMaxAngluarSpeed: 7 diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset new file mode 100644 index 0000000..33863a4 --- /dev/null +++ b/ProjectSettings/EditorBuildSettings.asset @@ -0,0 +1,11 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1045 &1 +EditorBuildSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Scenes: + - enabled: 1 + path: Assets/Scenes/SampleScene.unity + guid: f944e22ca81aba644a6b10652036a47d + m_configObjects: {} diff --git a/ProjectSettings/EditorSettings.asset b/ProjectSettings/EditorSettings.asset new file mode 100644 index 0000000..d98f9bf --- /dev/null +++ b/ProjectSettings/EditorSettings.asset @@ -0,0 +1,47 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!159 &1 +EditorSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_SerializationMode: 2 + m_LineEndingsForNewScripts: 0 + m_DefaultBehaviorMode: 0 + m_PrefabRegularEnvironment: {fileID: 0} + m_PrefabUIEnvironment: {fileID: 0} + m_SpritePackerMode: 0 + m_SpritePackerCacheSize: 10 + m_SpritePackerPaddingPower: 1 + m_Bc7TextureCompressor: 0 + m_EtcTextureCompressorBehavior: 1 + m_EtcTextureFastCompressor: 1 + m_EtcTextureNormalCompressor: 2 + m_EtcTextureBestCompressor: 4 + m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref + m_ProjectGenerationRootNamespace: CHARK.BuildTools + m_EnableTextureStreamingInEditMode: 1 + m_EnableTextureStreamingInPlayMode: 1 + m_EnableEditorAsyncCPUTextureLoading: 0 + m_AsyncShaderCompilation: 1 + m_PrefabModeAllowAutoSave: 1 + m_EnterPlayModeOptionsEnabled: 0 + m_EnterPlayModeOptions: 3 + m_GameObjectNamingDigits: 1 + m_GameObjectNamingScheme: 0 + m_AssetNamingUsesSpace: 1 + m_InspectorUseIMGUIDefaultInspector: 0 + m_UseLegacyProbeSampleCount: 0 + m_SerializeInlineMappingsOnOneLine: 1 + m_DisableCookiesInLightmapper: 0 + m_AssetPipelineMode: 1 + m_RefreshImportMode: 0 + m_CacheServerMode: 0 + m_CacheServerEndpoint: + m_CacheServerNamespacePrefix: default + m_CacheServerEnableDownload: 1 + m_CacheServerEnableUpload: 1 + m_CacheServerEnableAuth: 0 + m_CacheServerEnableTls: 0 + m_CacheServerValidationMode: 2 + m_CacheServerDownloadBatchSize: 128 + m_EnableEnlightenBakedGI: 0 diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset new file mode 100644 index 0000000..43369e3 --- /dev/null +++ b/ProjectSettings/GraphicsSettings.asset @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!30 &1 +GraphicsSettings: + m_ObjectHideFlags: 0 + serializedVersion: 13 + m_Deferred: + m_Mode: 1 + m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} + m_DeferredReflections: + m_Mode: 1 + m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} + m_ScreenSpaceShadows: + m_Mode: 1 + m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} + m_LegacyDeferred: + m_Mode: 1 + m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} + m_DepthNormals: + m_Mode: 1 + m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} + m_MotionVectors: + m_Mode: 1 + m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} + m_LightHalo: + m_Mode: 1 + m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} + m_LensFlare: + m_Mode: 1 + m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} + m_AlwaysIncludedShaders: + - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} + m_PreloadedShaders: [] + m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, + type: 0} + m_CustomRenderPipeline: {fileID: 0} + m_TransparencySortMode: 0 + m_TransparencySortAxis: {x: 0, y: 0, z: 1} + m_DefaultRenderingPath: 1 + m_DefaultMobileRenderingPath: 1 + m_TierSettings: [] + m_LightmapStripping: 0 + m_FogStripping: 0 + m_InstancingStripping: 0 + m_LightmapKeepPlain: 1 + m_LightmapKeepDirCombined: 1 + m_LightmapKeepDynamicPlain: 1 + m_LightmapKeepDynamicDirCombined: 1 + m_LightmapKeepShadowMask: 1 + m_LightmapKeepSubtractive: 1 + m_FogKeepLinear: 1 + m_FogKeepExp: 1 + m_FogKeepExp2: 1 + m_AlbedoSwatchInfos: [] + m_LightsUseLinearIntensity: 0 + m_LightsUseColorTemperature: 0 + m_LogWhenShaderIsCompiled: 0 + m_AllowEnlightenSupportForUpgradedProject: 0 diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset new file mode 100644 index 0000000..17c8f53 --- /dev/null +++ b/ProjectSettings/InputManager.asset @@ -0,0 +1,295 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!13 &1 +InputManager: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Axes: + - serializedVersion: 3 + m_Name: Horizontal + descriptiveName: + descriptiveNegativeName: + negativeButton: left + positiveButton: right + altNegativeButton: a + altPositiveButton: d + gravity: 3 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Vertical + descriptiveName: + descriptiveNegativeName: + negativeButton: down + positiveButton: up + altNegativeButton: s + altPositiveButton: w + gravity: 3 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire1 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left ctrl + altNegativeButton: + altPositiveButton: mouse 0 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire2 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left alt + altNegativeButton: + altPositiveButton: mouse 1 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire3 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left shift + altNegativeButton: + altPositiveButton: mouse 2 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Jump + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: space + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse X + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse Y + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 1 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse ScrollWheel + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 2 + joyNum: 0 + - serializedVersion: 3 + m_Name: Horizontal + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 0 + invert: 0 + type: 2 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Vertical + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 0 + invert: 1 + type: 2 + axis: 1 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire1 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 0 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire2 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 1 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire3 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 2 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Jump + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 3 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Submit + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: return + altNegativeButton: + altPositiveButton: joystick button 0 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Submit + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: enter + altNegativeButton: + altPositiveButton: space + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Cancel + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: escape + altNegativeButton: + altPositiveButton: joystick button 1 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 diff --git a/ProjectSettings/MemorySettings.asset b/ProjectSettings/MemorySettings.asset new file mode 100644 index 0000000..5b5face --- /dev/null +++ b/ProjectSettings/MemorySettings.asset @@ -0,0 +1,35 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!387306366 &1 +MemorySettings: + m_ObjectHideFlags: 0 + m_EditorMemorySettings: + m_MainAllocatorBlockSize: -1 + m_ThreadAllocatorBlockSize: -1 + m_MainGfxBlockSize: -1 + m_ThreadGfxBlockSize: -1 + m_CacheBlockSize: -1 + m_TypetreeBlockSize: -1 + m_ProfilerBlockSize: -1 + m_ProfilerEditorBlockSize: -1 + m_BucketAllocatorGranularity: -1 + m_BucketAllocatorBucketsCount: -1 + m_BucketAllocatorBlockSize: -1 + m_BucketAllocatorBlockCount: -1 + m_ProfilerBucketAllocatorGranularity: -1 + m_ProfilerBucketAllocatorBucketsCount: -1 + m_ProfilerBucketAllocatorBlockSize: -1 + m_ProfilerBucketAllocatorBlockCount: -1 + m_TempAllocatorSizeMain: -1 + m_JobTempAllocatorBlockSize: -1 + m_BackgroundJobTempAllocatorBlockSize: -1 + m_JobTempAllocatorReducedBlockSize: -1 + m_TempAllocatorSizeGIBakingWorker: -1 + m_TempAllocatorSizeNavMeshWorker: -1 + m_TempAllocatorSizeAudioWorker: -1 + m_TempAllocatorSizeCloudWorker: -1 + m_TempAllocatorSizeGfx: -1 + m_TempAllocatorSizeJobWorker: -1 + m_TempAllocatorSizeBackgroundWorker: -1 + m_TempAllocatorSizePreloadManager: -1 + m_PlatformMemorySettings: {} diff --git a/ProjectSettings/NavMeshAreas.asset b/ProjectSettings/NavMeshAreas.asset new file mode 100644 index 0000000..3b0b7c3 --- /dev/null +++ b/ProjectSettings/NavMeshAreas.asset @@ -0,0 +1,91 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!126 &1 +NavMeshProjectSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + areas: + - name: Walkable + cost: 1 + - name: Not Walkable + cost: 1 + - name: Jump + cost: 2 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + m_LastAgentTypeID: -887442657 + m_Settings: + - serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.75 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_SettingNames: + - Humanoid diff --git a/ProjectSettings/PackageManagerSettings.asset b/ProjectSettings/PackageManagerSettings.asset new file mode 100644 index 0000000..be4a797 --- /dev/null +++ b/ProjectSettings/PackageManagerSettings.asset @@ -0,0 +1,43 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 61 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_EnablePreviewPackages: 0 + m_EnablePackageDependencies: 0 + m_AdvancedSettingsExpanded: 1 + m_ScopedRegistriesSettingsExpanded: 1 + oneTimeWarningShown: 0 + m_Registries: + - m_Id: main + m_Name: + m_Url: https://packages.unity.com + m_Scopes: [] + m_IsDefault: 1 + m_Capabilities: 7 + m_UserSelectedRegistryName: + m_UserAddingNewScopedRegistry: 0 + m_RegistryInfoDraft: + m_ErrorMessage: + m_Original: + m_Id: + m_Name: + m_Url: + m_Scopes: [] + m_IsDefault: 0 + m_Capabilities: 0 + m_Modified: 0 + m_Name: + m_Url: + m_Scopes: + - + m_SelectedScopeIndex: 0 diff --git a/ProjectSettings/Physics2DSettings.asset b/ProjectSettings/Physics2DSettings.asset new file mode 100644 index 0000000..47880b1 --- /dev/null +++ b/ProjectSettings/Physics2DSettings.asset @@ -0,0 +1,56 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!19 &1 +Physics2DSettings: + m_ObjectHideFlags: 0 + serializedVersion: 4 + m_Gravity: {x: 0, y: -9.81} + m_DefaultMaterial: {fileID: 0} + m_VelocityIterations: 8 + m_PositionIterations: 3 + m_VelocityThreshold: 1 + m_MaxLinearCorrection: 0.2 + m_MaxAngularCorrection: 8 + m_MaxTranslationSpeed: 100 + m_MaxRotationSpeed: 360 + m_BaumgarteScale: 0.2 + m_BaumgarteTimeOfImpactScale: 0.75 + m_TimeToSleep: 0.5 + m_LinearSleepTolerance: 0.01 + m_AngularSleepTolerance: 2 + m_DefaultContactOffset: 0.01 + m_JobOptions: + serializedVersion: 2 + useMultithreading: 0 + useConsistencySorting: 0 + m_InterpolationPosesPerJob: 100 + m_NewContactsPerJob: 30 + m_CollideContactsPerJob: 100 + m_ClearFlagsPerJob: 200 + m_ClearBodyForcesPerJob: 200 + m_SyncDiscreteFixturesPerJob: 50 + m_SyncContinuousFixturesPerJob: 50 + m_FindNearestContactsPerJob: 100 + m_UpdateTriggerContactsPerJob: 100 + m_IslandSolverCostThreshold: 100 + m_IslandSolverBodyCostScale: 1 + m_IslandSolverContactCostScale: 10 + m_IslandSolverJointCostScale: 10 + m_IslandSolverBodiesPerJob: 50 + m_IslandSolverContactsPerJob: 50 + m_AutoSimulation: 1 + m_QueriesHitTriggers: 1 + m_QueriesStartInColliders: 1 + m_CallbacksOnDisable: 1 + m_ReuseCollisionCallbacks: 1 + m_AutoSyncTransforms: 0 + m_AlwaysShowColliders: 0 + m_ShowColliderSleep: 1 + m_ShowColliderContacts: 0 + m_ShowColliderAABB: 0 + m_ContactArrowScale: 0.2 + m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} + m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} + m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} + m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} + m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff diff --git a/ProjectSettings/PresetManager.asset b/ProjectSettings/PresetManager.asset new file mode 100644 index 0000000..67a94da --- /dev/null +++ b/ProjectSettings/PresetManager.asset @@ -0,0 +1,7 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1386491679 &1 +PresetManager: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_DefaultPresets: {} diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset new file mode 100644 index 0000000..b4fcd83 --- /dev/null +++ b/ProjectSettings/ProjectSettings.asset @@ -0,0 +1,836 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!129 &1 +PlayerSettings: + m_ObjectHideFlags: 0 + serializedVersion: 26 + productGUID: 822aabb0fe7b8e24aae90672393afcaf + AndroidProfiler: 0 + AndroidFilterTouchesWhenObscured: 0 + AndroidEnableSustainedPerformanceMode: 0 + defaultScreenOrientation: 4 + targetDevice: 2 + useOnDemandResources: 0 + accelerometerFrequency: 60 + companyName: CHARK + productName: build-tools + defaultCursor: {fileID: 0} + cursorHotspot: {x: 0, y: 0} + m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} + m_ShowUnitySplashScreen: 1 + m_ShowUnitySplashLogo: 1 + m_SplashScreenOverlayOpacity: 1 + m_SplashScreenAnimation: 1 + m_SplashScreenLogoStyle: 1 + m_SplashScreenDrawMode: 0 + m_SplashScreenBackgroundAnimationZoom: 1 + m_SplashScreenLogoAnimationZoom: 1 + m_SplashScreenBackgroundLandscapeAspect: 1 + m_SplashScreenBackgroundPortraitAspect: 1 + m_SplashScreenBackgroundLandscapeUvs: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + m_SplashScreenBackgroundPortraitUvs: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + m_SplashScreenLogos: [] + m_VirtualRealitySplashScreen: {fileID: 0} + m_HolographicTrackingLossScreen: {fileID: 0} + defaultScreenWidth: 1024 + defaultScreenHeight: 768 + defaultScreenWidthWeb: 960 + defaultScreenHeightWeb: 600 + m_StereoRenderingPath: 0 + m_ActiveColorSpace: 0 + m_SpriteBatchVertexThreshold: 300 + m_MTRendering: 1 + mipStripping: 0 + numberOfMipsStripped: 0 + numberOfMipsStrippedPerMipmapLimitGroup: {} + m_StackTraceTypes: 010000000100000001000000010000000100000001000000 + iosShowActivityIndicatorOnLoading: -1 + androidShowActivityIndicatorOnLoading: -1 + iosUseCustomAppBackgroundBehavior: 0 + allowedAutorotateToPortrait: 1 + allowedAutorotateToPortraitUpsideDown: 1 + allowedAutorotateToLandscapeRight: 1 + allowedAutorotateToLandscapeLeft: 1 + useOSAutorotation: 1 + use32BitDisplayBuffer: 1 + preserveFramebufferAlpha: 0 + disableDepthAndStencilBuffers: 0 + androidStartInFullscreen: 1 + androidRenderOutsideSafeArea: 1 + androidUseSwappy: 1 + androidBlitType: 0 + androidResizableWindow: 0 + androidDefaultWindowWidth: 1920 + androidDefaultWindowHeight: 1080 + androidMinimumWindowWidth: 400 + androidMinimumWindowHeight: 300 + androidFullscreenMode: 1 + defaultIsNativeResolution: 1 + macRetinaSupport: 1 + runInBackground: 1 + captureSingleScreen: 0 + muteOtherAudioSources: 0 + Prepare IOS For Recording: 0 + Force IOS Speakers When Recording: 0 + deferSystemGesturesMode: 0 + hideHomeButton: 0 + submitAnalytics: 1 + usePlayerLog: 1 + dedicatedServerOptimizations: 0 + bakeCollisionMeshes: 0 + forceSingleInstance: 0 + useFlipModelSwapchain: 1 + resizableWindow: 0 + useMacAppStoreValidation: 0 + macAppStoreCategory: public.app-category.games + gpuSkinning: 1 + xboxPIXTextureCapture: 0 + xboxEnableAvatar: 0 + xboxEnableKinect: 0 + xboxEnableKinectAutoTracking: 0 + xboxEnableFitness: 0 + visibleInBackground: 1 + allowFullscreenSwitch: 1 + fullscreenMode: 1 + xboxSpeechDB: 0 + xboxEnableHeadOrientation: 0 + xboxEnableGuest: 0 + xboxEnablePIXSampling: 0 + metalFramebufferOnly: 0 + xboxOneResolution: 0 + xboxOneSResolution: 0 + xboxOneXResolution: 3 + xboxOneMonoLoggingLevel: 0 + xboxOneLoggingLevel: 1 + xboxOneDisableEsram: 0 + xboxOneEnableTypeOptimization: 0 + xboxOnePresentImmediateThreshold: 0 + switchQueueCommandMemory: 0 + switchQueueControlMemory: 16384 + switchQueueComputeMemory: 262144 + switchNVNShaderPoolsGranularity: 33554432 + switchNVNDefaultPoolsGranularity: 16777216 + switchNVNOtherPoolsGranularity: 16777216 + switchGpuScratchPoolGranularity: 2097152 + switchAllowGpuScratchShrinking: 0 + switchNVNMaxPublicTextureIDCount: 0 + switchNVNMaxPublicSamplerIDCount: 0 + switchNVNGraphicsFirmwareMemory: 32 + switchMaxWorkerMultiple: 8 + stadiaPresentMode: 0 + stadiaTargetFramerate: 0 + vulkanNumSwapchainBuffers: 3 + vulkanEnableSetSRGBWrite: 0 + vulkanEnablePreTransform: 0 + vulkanEnableLateAcquireNextImage: 0 + vulkanEnableCommandBufferRecycling: 1 + loadStoreDebugModeEnabled: 0 + bundleVersion: 0.0.1 + preloadedAssets: [] + metroInputSource: 0 + wsaTransparentSwapchain: 0 + m_HolographicPauseOnTrackingLoss: 1 + xboxOneDisableKinectGpuReservation: 1 + xboxOneEnable7thCore: 1 + vrSettings: + enable360StereoCapture: 0 + isWsaHolographicRemotingEnabled: 0 + enableFrameTimingStats: 0 + enableOpenGLProfilerGPURecorders: 1 + useHDRDisplay: 0 + hdrBitDepth: 0 + m_ColorGamuts: 00000000 + targetPixelDensity: 30 + resolutionScalingMode: 0 + resetResolutionOnWindowResize: 0 + androidSupportedAspectRatio: 1 + androidMaxAspectRatio: 2.1 + applicationIdentifier: + Standalone: com.CHARK.build-tools + buildNumber: + Standalone: 0 + VisionOS: 0 + iPhone: 0 + tvOS: 0 + overrideDefaultApplicationIdentifier: 0 + AndroidBundleVersionCode: 1 + AndroidMinSdkVersion: 22 + AndroidTargetSdkVersion: 0 + AndroidPreferredInstallLocation: 1 + aotOptions: + stripEngineCode: 1 + iPhoneStrippingLevel: 0 + iPhoneScriptCallOptimization: 0 + ForceInternetPermission: 0 + ForceSDCardPermission: 0 + CreateWallpaper: 0 + APKExpansionFiles: 0 + keepLoadedShadersAlive: 0 + StripUnusedMeshComponents: 1 + strictShaderVariantMatching: 0 + VertexChannelCompressionMask: 4054 + iPhoneSdkVersion: 988 + iOSTargetOSVersionString: 12.0 + tvOSSdkVersion: 0 + tvOSRequireExtendedGameController: 0 + tvOSTargetOSVersionString: 12.0 + VisionOSSdkVersion: 0 + VisionOSTargetOSVersionString: 1.0 + uIPrerenderedIcon: 0 + uIRequiresPersistentWiFi: 0 + uIRequiresFullScreen: 1 + uIStatusBarHidden: 1 + uIExitOnSuspend: 0 + uIStatusBarStyle: 0 + appleTVSplashScreen: {fileID: 0} + appleTVSplashScreen2x: {fileID: 0} + tvOSSmallIconLayers: [] + tvOSSmallIconLayers2x: [] + tvOSLargeIconLayers: [] + tvOSLargeIconLayers2x: [] + tvOSTopShelfImageLayers: [] + tvOSTopShelfImageLayers2x: [] + tvOSTopShelfImageWideLayers: [] + tvOSTopShelfImageWideLayers2x: [] + iOSLaunchScreenType: 0 + iOSLaunchScreenPortrait: {fileID: 0} + iOSLaunchScreenLandscape: {fileID: 0} + iOSLaunchScreenBackgroundColor: + serializedVersion: 2 + rgba: 0 + iOSLaunchScreenFillPct: 100 + iOSLaunchScreenSize: 100 + iOSLaunchScreenCustomXibPath: + iOSLaunchScreeniPadType: 0 + iOSLaunchScreeniPadImage: {fileID: 0} + iOSLaunchScreeniPadBackgroundColor: + serializedVersion: 2 + rgba: 0 + iOSLaunchScreeniPadFillPct: 100 + iOSLaunchScreeniPadSize: 100 + iOSLaunchScreeniPadCustomXibPath: + iOSLaunchScreenCustomStoryboardPath: + iOSLaunchScreeniPadCustomStoryboardPath: + iOSDeviceRequirements: [] + iOSURLSchemes: [] + macOSURLSchemes: [] + iOSBackgroundModes: 0 + iOSMetalForceHardShadows: 0 + metalEditorSupport: 1 + metalAPIValidation: 1 + iOSRenderExtraFrameOnPause: 0 + iosCopyPluginsCodeInsteadOfSymlink: 0 + appleDeveloperTeamID: + iOSManualSigningProvisioningProfileID: + tvOSManualSigningProvisioningProfileID: + VisionOSManualSigningProvisioningProfileID: + iOSManualSigningProvisioningProfileType: 0 + tvOSManualSigningProvisioningProfileType: 0 + VisionOSManualSigningProvisioningProfileType: 0 + appleEnableAutomaticSigning: 0 + iOSRequireARKit: 0 + iOSAutomaticallyDetectAndAddCapabilities: 1 + appleEnableProMotion: 0 + shaderPrecisionModel: 0 + clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea + templatePackageId: com.unity.template.3d@5.0.4 + templateDefaultScene: Assets/Scenes/SampleScene.unity + useCustomMainManifest: 0 + useCustomLauncherManifest: 0 + useCustomMainGradleTemplate: 0 + useCustomLauncherGradleManifest: 0 + useCustomBaseGradleTemplate: 0 + useCustomGradlePropertiesTemplate: 0 + useCustomGradleSettingsTemplate: 0 + useCustomProguardFile: 0 + AndroidTargetArchitectures: 1 + AndroidTargetDevices: 0 + AndroidSplashScreenScale: 0 + androidSplashScreen: {fileID: 0} + AndroidKeystoreName: + AndroidKeyaliasName: + AndroidEnableArmv9SecurityFeatures: 0 + AndroidBuildApkPerCpuArchitecture: 0 + AndroidTVCompatibility: 0 + AndroidIsGame: 1 + AndroidEnableTango: 0 + androidEnableBanner: 1 + androidUseLowAccuracyLocation: 0 + androidUseCustomKeystore: 0 + m_AndroidBanners: + - width: 320 + height: 180 + banner: {fileID: 0} + androidGamepadSupportLevel: 0 + chromeosInputEmulation: 1 + AndroidMinifyRelease: 0 + AndroidMinifyDebug: 0 + AndroidValidateAppBundleSize: 1 + AndroidAppBundleSizeToValidate: 150 + m_BuildTargetIcons: [] + m_BuildTargetPlatformIcons: + - m_BuildTarget: Android + m_Icons: + - m_Textures: [] + m_Width: 432 + m_Height: 432 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 324 + m_Height: 324 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 216 + m_Height: 216 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 162 + m_Height: 162 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 108 + m_Height: 108 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 81 + m_Height: 81 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 192 + m_Height: 192 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 144 + m_Height: 144 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 96 + m_Height: 96 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 72 + m_Height: 72 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 48 + m_Height: 48 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 36 + m_Height: 36 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 192 + m_Height: 192 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 144 + m_Height: 144 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 96 + m_Height: 96 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 72 + m_Height: 72 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 48 + m_Height: 48 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 36 + m_Height: 36 + m_Kind: 0 + m_SubKind: + m_BuildTargetBatching: + - m_BuildTarget: Standalone + m_StaticBatching: 1 + m_DynamicBatching: 0 + - m_BuildTarget: tvOS + m_StaticBatching: 1 + m_DynamicBatching: 0 + - m_BuildTarget: Android + m_StaticBatching: 1 + m_DynamicBatching: 0 + - m_BuildTarget: iPhone + m_StaticBatching: 1 + m_DynamicBatching: 0 + - m_BuildTarget: WebGL + m_StaticBatching: 0 + m_DynamicBatching: 0 + m_BuildTargetShaderSettings: [] + m_BuildTargetGraphicsJobs: + - m_BuildTarget: MacStandaloneSupport + m_GraphicsJobs: 0 + - m_BuildTarget: Switch + m_GraphicsJobs: 1 + - m_BuildTarget: MetroSupport + m_GraphicsJobs: 1 + - m_BuildTarget: AppleTVSupport + m_GraphicsJobs: 0 + - m_BuildTarget: BJMSupport + m_GraphicsJobs: 1 + - m_BuildTarget: LinuxStandaloneSupport + m_GraphicsJobs: 1 + - m_BuildTarget: PS4Player + m_GraphicsJobs: 1 + - m_BuildTarget: iOSSupport + m_GraphicsJobs: 0 + - m_BuildTarget: WindowsStandaloneSupport + m_GraphicsJobs: 1 + - m_BuildTarget: XboxOnePlayer + m_GraphicsJobs: 1 + - m_BuildTarget: LuminSupport + m_GraphicsJobs: 0 + - m_BuildTarget: AndroidPlayer + m_GraphicsJobs: 0 + - m_BuildTarget: WebGLSupport + m_GraphicsJobs: 0 + m_BuildTargetGraphicsJobMode: + - m_BuildTarget: PS4Player + m_GraphicsJobMode: 0 + - m_BuildTarget: XboxOnePlayer + m_GraphicsJobMode: 0 + m_BuildTargetGraphicsAPIs: + - m_BuildTarget: AndroidPlayer + m_APIs: 150000000b000000 + m_Automatic: 1 + - m_BuildTarget: iOSSupport + m_APIs: 10000000 + m_Automatic: 1 + - m_BuildTarget: AppleTVSupport + m_APIs: 10000000 + m_Automatic: 1 + - m_BuildTarget: WebGLSupport + m_APIs: 0b000000 + m_Automatic: 1 + m_BuildTargetVRSettings: + - m_BuildTarget: Standalone + m_Enabled: 0 + m_Devices: + - Oculus + - OpenVR + m_DefaultShaderChunkSizeInMB: 16 + m_DefaultShaderChunkCount: 0 + openGLRequireES31: 0 + openGLRequireES31AEP: 0 + openGLRequireES32: 0 + m_TemplateCustomTags: {} + mobileMTRendering: + Android: 1 + iPhone: 1 + tvOS: 1 + m_BuildTargetGroupLightmapEncodingQuality: [] + m_BuildTargetGroupHDRCubemapEncodingQuality: [] + m_BuildTargetGroupLightmapSettings: [] + m_BuildTargetGroupLoadStoreDebugModeSettings: [] + m_BuildTargetNormalMapEncoding: [] + m_BuildTargetDefaultTextureCompressionFormat: [] + playModeTestRunnerEnabled: 0 + runPlayModeTestAsEditModeTest: 0 + actionOnDotNetUnhandledException: 1 + enableInternalProfiler: 0 + logObjCUncaughtExceptions: 1 + enableCrashReportAPI: 0 + cameraUsageDescription: + locationUsageDescription: + microphoneUsageDescription: + bluetoothUsageDescription: + macOSTargetOSVersion: 10.13.0 + switchNMETAOverride: + switchNetLibKey: + switchSocketMemoryPoolSize: 6144 + switchSocketAllocatorPoolSize: 128 + switchSocketConcurrencyLimit: 14 + switchScreenResolutionBehavior: 2 + switchUseCPUProfiler: 0 + switchEnableFileSystemTrace: 0 + switchUseGOLDLinker: 0 + switchLTOSetting: 0 + switchApplicationID: 0x01004b9000490000 + switchNSODependencies: + switchCompilerFlags: + switchTitleNames_0: + switchTitleNames_1: + switchTitleNames_2: + switchTitleNames_3: + switchTitleNames_4: + switchTitleNames_5: + switchTitleNames_6: + switchTitleNames_7: + switchTitleNames_8: + switchTitleNames_9: + switchTitleNames_10: + switchTitleNames_11: + switchTitleNames_12: + switchTitleNames_13: + switchTitleNames_14: + switchTitleNames_15: + switchPublisherNames_0: + switchPublisherNames_1: + switchPublisherNames_2: + switchPublisherNames_3: + switchPublisherNames_4: + switchPublisherNames_5: + switchPublisherNames_6: + switchPublisherNames_7: + switchPublisherNames_8: + switchPublisherNames_9: + switchPublisherNames_10: + switchPublisherNames_11: + switchPublisherNames_12: + switchPublisherNames_13: + switchPublisherNames_14: + switchPublisherNames_15: + switchIcons_0: {fileID: 0} + switchIcons_1: {fileID: 0} + switchIcons_2: {fileID: 0} + switchIcons_3: {fileID: 0} + switchIcons_4: {fileID: 0} + switchIcons_5: {fileID: 0} + switchIcons_6: {fileID: 0} + switchIcons_7: {fileID: 0} + switchIcons_8: {fileID: 0} + switchIcons_9: {fileID: 0} + switchIcons_10: {fileID: 0} + switchIcons_11: {fileID: 0} + switchIcons_12: {fileID: 0} + switchIcons_13: {fileID: 0} + switchIcons_14: {fileID: 0} + switchIcons_15: {fileID: 0} + switchSmallIcons_0: {fileID: 0} + switchSmallIcons_1: {fileID: 0} + switchSmallIcons_2: {fileID: 0} + switchSmallIcons_3: {fileID: 0} + switchSmallIcons_4: {fileID: 0} + switchSmallIcons_5: {fileID: 0} + switchSmallIcons_6: {fileID: 0} + switchSmallIcons_7: {fileID: 0} + switchSmallIcons_8: {fileID: 0} + switchSmallIcons_9: {fileID: 0} + switchSmallIcons_10: {fileID: 0} + switchSmallIcons_11: {fileID: 0} + switchSmallIcons_12: {fileID: 0} + switchSmallIcons_13: {fileID: 0} + switchSmallIcons_14: {fileID: 0} + switchSmallIcons_15: {fileID: 0} + switchManualHTML: + switchAccessibleURLs: + switchLegalInformation: + switchMainThreadStackSize: 1048576 + switchPresenceGroupId: + switchLogoHandling: 0 + switchReleaseVersion: 0 + switchDisplayVersion: 1.0.0 + switchStartupUserAccount: 0 + switchSupportedLanguagesMask: 0 + switchLogoType: 0 + switchApplicationErrorCodeCategory: + switchUserAccountSaveDataSize: 0 + switchUserAccountSaveDataJournalSize: 0 + switchApplicationAttribute: 0 + switchCardSpecSize: -1 + switchCardSpecClock: -1 + switchRatingsMask: 0 + switchRatingsInt_0: 0 + switchRatingsInt_1: 0 + switchRatingsInt_2: 0 + switchRatingsInt_3: 0 + switchRatingsInt_4: 0 + switchRatingsInt_5: 0 + switchRatingsInt_6: 0 + switchRatingsInt_7: 0 + switchRatingsInt_8: 0 + switchRatingsInt_9: 0 + switchRatingsInt_10: 0 + switchRatingsInt_11: 0 + switchRatingsInt_12: 0 + switchLocalCommunicationIds_0: + switchLocalCommunicationIds_1: + switchLocalCommunicationIds_2: + switchLocalCommunicationIds_3: + switchLocalCommunicationIds_4: + switchLocalCommunicationIds_5: + switchLocalCommunicationIds_6: + switchLocalCommunicationIds_7: + switchParentalControl: 0 + switchAllowsScreenshot: 1 + switchAllowsVideoCapturing: 1 + switchAllowsRuntimeAddOnContentInstall: 0 + switchDataLossConfirmation: 0 + switchUserAccountLockEnabled: 0 + switchSystemResourceMemory: 16777216 + switchSupportedNpadStyles: 22 + switchNativeFsCacheSize: 32 + switchIsHoldTypeHorizontal: 0 + switchSupportedNpadCount: 8 + switchEnableTouchScreen: 1 + switchSocketConfigEnabled: 0 + switchTcpInitialSendBufferSize: 32 + switchTcpInitialReceiveBufferSize: 64 + switchTcpAutoSendBufferSizeMax: 256 + switchTcpAutoReceiveBufferSizeMax: 256 + switchUdpSendBufferSize: 9 + switchUdpReceiveBufferSize: 42 + switchSocketBufferEfficiency: 4 + switchSocketInitializeEnabled: 1 + switchNetworkInterfaceManagerInitializeEnabled: 1 + switchPlayerConnectionEnabled: 1 + switchUseNewStyleFilepaths: 0 + switchUseLegacyFmodPriorities: 0 + switchUseMicroSleepForYield: 1 + switchEnableRamDiskSupport: 0 + switchMicroSleepForYieldTime: 25 + switchRamDiskSpaceSize: 12 + ps4NPAgeRating: 12 + ps4NPTitleSecret: + ps4NPTrophyPackPath: + ps4ParentalLevel: 11 + ps4ContentID: ED1633-NPXX51362_00-0000000000000000 + ps4Category: 0 + ps4MasterVersion: 01.00 + ps4AppVersion: 01.00 + ps4AppType: 0 + ps4ParamSfxPath: + ps4VideoOutPixelFormat: 0 + ps4VideoOutInitialWidth: 1920 + ps4VideoOutBaseModeInitialWidth: 1920 + ps4VideoOutReprojectionRate: 60 + ps4PronunciationXMLPath: + ps4PronunciationSIGPath: + ps4BackgroundImagePath: + ps4StartupImagePath: + ps4StartupImagesFolder: + ps4IconImagesFolder: + ps4SaveDataImagePath: + ps4SdkOverride: + ps4BGMPath: + ps4ShareFilePath: + ps4ShareOverlayImagePath: + ps4PrivacyGuardImagePath: + ps4ExtraSceSysFile: + ps4NPtitleDatPath: + ps4RemotePlayKeyAssignment: -1 + ps4RemotePlayKeyMappingDir: + ps4PlayTogetherPlayerCount: 0 + ps4EnterButtonAssignment: 1 + ps4ApplicationParam1: 0 + ps4ApplicationParam2: 0 + ps4ApplicationParam3: 0 + ps4ApplicationParam4: 0 + ps4DownloadDataSize: 0 + ps4GarlicHeapSize: 2048 + ps4ProGarlicHeapSize: 2560 + playerPrefsMaxSize: 32768 + ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ + ps4pnSessions: 1 + ps4pnPresence: 1 + ps4pnFriends: 1 + ps4pnGameCustomData: 1 + playerPrefsSupport: 0 + enableApplicationExit: 0 + resetTempFolder: 1 + restrictedAudioUsageRights: 0 + ps4UseResolutionFallback: 0 + ps4ReprojectionSupport: 0 + ps4UseAudio3dBackend: 0 + ps4UseLowGarlicFragmentationMode: 1 + ps4SocialScreenEnabled: 0 + ps4ScriptOptimizationLevel: 0 + ps4Audio3dVirtualSpeakerCount: 14 + ps4attribCpuUsage: 0 + ps4PatchPkgPath: + ps4PatchLatestPkgPath: + ps4PatchChangeinfoPath: + ps4PatchDayOne: 0 + ps4attribUserManagement: 0 + ps4attribMoveSupport: 0 + ps4attrib3DSupport: 0 + ps4attribShareSupport: 0 + ps4attribExclusiveVR: 0 + ps4disableAutoHideSplash: 0 + ps4videoRecordingFeaturesUsed: 0 + ps4contentSearchFeaturesUsed: 0 + ps4CompatibilityPS5: 0 + ps4AllowPS5Detection: 0 + ps4GPU800MHz: 1 + ps4attribEyeToEyeDistanceSettingVR: 0 + ps4IncludedModules: [] + ps4attribVROutputEnabled: 0 + monoEnv: + splashScreenBackgroundSourceLandscape: {fileID: 0} + splashScreenBackgroundSourcePortrait: {fileID: 0} + blurSplashScreenBackground: 1 + spritePackerPolicy: + webGLMemorySize: 16 + webGLExceptionSupport: 1 + webGLNameFilesAsHashes: 0 + webGLShowDiagnostics: 0 + webGLDataCaching: 1 + webGLDebugSymbols: 0 + webGLEmscriptenArgs: + webGLModulesDirectory: + webGLTemplate: APPLICATION:Default + webGLAnalyzeBuildSize: 0 + webGLUseEmbeddedResources: 0 + webGLCompressionFormat: 1 + webGLWasmArithmeticExceptions: 0 + webGLLinkerTarget: 1 + webGLThreadsSupport: 0 + webGLDecompressionFallback: 0 + webGLInitialMemorySize: 32 + webGLMaximumMemorySize: 2048 + webGLMemoryGrowthMode: 2 + webGLMemoryLinearGrowthStep: 16 + webGLMemoryGeometricGrowthStep: 0.2 + webGLMemoryGeometricGrowthCap: 96 + webGLPowerPreference: 2 + scriptingDefineSymbols: + Standalone: + additionalCompilerArguments: {} + platformArchitecture: {} + scriptingBackend: {} + il2cppCompilerConfiguration: {} + il2cppCodeGeneration: {} + managedStrippingLevel: + EmbeddedLinux: 1 + GameCoreScarlett: 1 + GameCoreXboxOne: 1 + Nintendo Switch: 1 + PS4: 1 + PS5: 1 + QNX: 1 + Stadia: 1 + VisionOS: 1 + WebGL: 1 + Windows Store Apps: 1 + XboxOne: 1 + iPhone: 1 + tvOS: 1 + incrementalIl2cppBuild: {} + suppressCommonWarnings: 1 + allowUnsafeCode: 0 + useDeterministicCompilation: 1 + additionalIl2CppArgs: + scriptingRuntimeVersion: 1 + gcIncremental: 1 + gcWBarrierValidation: 0 + apiCompatibilityLevelPerPlatform: {} + m_RenderingPath: 1 + m_MobileRenderingPath: 1 + metroPackageName: Template_3D + metroPackageVersion: + metroCertificatePath: + metroCertificatePassword: + metroCertificateSubject: + metroCertificateIssuer: + metroCertificateNotAfter: 0000000000000000 + metroApplicationDescription: Template_3D + wsaImages: {} + metroTileShortName: + metroTileShowName: 0 + metroMediumTileShowName: 0 + metroLargeTileShowName: 0 + metroWideTileShowName: 0 + metroSupportStreamingInstall: 0 + metroLastRequiredScene: 0 + metroDefaultTileSize: 1 + metroTileForegroundText: 2 + metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} + metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} + metroSplashScreenUseBackgroundColor: 0 + platformCapabilities: {} + metroTargetDeviceFamilies: {} + metroFTAName: + metroFTAFileTypes: [] + metroProtocolName: + vcxProjDefaultLanguage: + XboxOneProductId: + XboxOneUpdateKey: + XboxOneSandboxId: + XboxOneContentId: + XboxOneTitleId: + XboxOneSCId: + XboxOneGameOsOverridePath: + XboxOnePackagingOverridePath: + XboxOneAppManifestOverridePath: + XboxOneVersion: 1.0.0.0 + XboxOnePackageEncryption: 0 + XboxOnePackageUpdateGranularity: 2 + XboxOneDescription: + XboxOneLanguage: + - enus + XboxOneCapability: [] + XboxOneGameRating: {} + XboxOneIsContentPackage: 0 + XboxOneEnhancedXboxCompatibilityMode: 0 + XboxOneEnableGPUVariability: 1 + XboxOneSockets: {} + XboxOneSplashScreen: {fileID: 0} + XboxOneAllowedProductIds: [] + XboxOnePersistentLocalStorageSize: 0 + XboxOneXTitleMemory: 8 + XboxOneOverrideIdentityName: + XboxOneOverrideIdentityPublisher: + vrEditorSettings: {} + cloudServicesEnabled: + UNet: 1 + luminIcon: + m_Name: + m_ModelFolderPath: + m_PortalFolderPath: + luminCert: + m_CertPath: + m_SignPackage: 1 + luminIsChannelApp: 0 + luminVersion: + m_VersionCode: 1 + m_VersionName: + hmiPlayerDataPath: + hmiForceSRGBBlit: 1 + embeddedLinuxEnableGamepadInput: 1 + hmiLogStartupTiming: 0 + hmiCpuConfiguration: + apiCompatibilityLevel: 6 + activeInputHandler: 0 + windowsGamepadBackendHint: 0 + cloudProjectId: + framebufferDepthMemorylessMode: 0 + qualitySettingsNames: [] + projectName: + organizationId: + cloudEnabled: 0 + legacyClampBlendShapeWeights: 0 + hmiLoadingImage: {fileID: 0} + platformRequiresReadableAssets: 0 + virtualTexturingSupportEnabled: 0 + insecureHttpOption: 0 diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt new file mode 100644 index 0000000..88bb9cf --- /dev/null +++ b/ProjectSettings/ProjectVersion.txt @@ -0,0 +1,2 @@ +m_EditorVersion: 2022.3.10f1 +m_EditorVersionWithRevision: 2022.3.10f1 (ff3792e53c62) diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset new file mode 100644 index 0000000..7b7658d --- /dev/null +++ b/ProjectSettings/QualitySettings.asset @@ -0,0 +1,232 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!47 &1 +QualitySettings: + m_ObjectHideFlags: 0 + serializedVersion: 5 + m_CurrentQuality: 5 + m_QualitySettings: + - serializedVersion: 2 + name: Very Low + pixelLightCount: 0 + shadows: 0 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 15 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + blendWeights: 1 + textureQuality: 1 + anisotropicTextures: 0 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + vSyncCount: 0 + lodBias: 0.3 + maximumLODLevel: 0 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 4 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Low + pixelLightCount: 0 + shadows: 0 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 20 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + blendWeights: 2 + textureQuality: 0 + anisotropicTextures: 0 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + vSyncCount: 0 + lodBias: 0.4 + maximumLODLevel: 0 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 16 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Medium + pixelLightCount: 1 + shadows: 1 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 20 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + blendWeights: 2 + textureQuality: 0 + anisotropicTextures: 1 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + vSyncCount: 1 + lodBias: 0.7 + maximumLODLevel: 0 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 64 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: High + pixelLightCount: 2 + shadows: 2 + shadowResolution: 1 + shadowProjection: 1 + shadowCascades: 2 + shadowDistance: 40 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + blendWeights: 2 + textureQuality: 0 + anisotropicTextures: 1 + antiAliasing: 0 + softParticles: 0 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + vSyncCount: 1 + lodBias: 1 + maximumLODLevel: 0 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 256 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Very High + pixelLightCount: 3 + shadows: 2 + shadowResolution: 2 + shadowProjection: 1 + shadowCascades: 2 + shadowDistance: 70 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + blendWeights: 4 + textureQuality: 0 + anisotropicTextures: 2 + antiAliasing: 2 + softParticles: 1 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + vSyncCount: 1 + lodBias: 1.5 + maximumLODLevel: 0 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 1024 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Ultra + pixelLightCount: 4 + shadows: 2 + shadowResolution: 2 + shadowProjection: 1 + shadowCascades: 4 + shadowDistance: 150 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + blendWeights: 4 + textureQuality: 0 + anisotropicTextures: 2 + antiAliasing: 2 + softParticles: 1 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + vSyncCount: 1 + lodBias: 2 + maximumLODLevel: 0 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 4096 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + m_PerPlatformDefaultQuality: + Android: 2 + Lumin: 5 + Nintendo 3DS: 5 + Nintendo Switch: 5 + PS4: 5 + PSP2: 2 + Stadia: 5 + Standalone: 5 + WebGL: 3 + Windows Store Apps: 5 + XboxOne: 5 + iPhone: 2 + tvOS: 2 diff --git a/ProjectSettings/SceneTemplateSettings.json b/ProjectSettings/SceneTemplateSettings.json new file mode 100644 index 0000000..5e97f83 --- /dev/null +++ b/ProjectSettings/SceneTemplateSettings.json @@ -0,0 +1,121 @@ +{ + "templatePinStates": [], + "dependencyTypeInfos": [ + { + "userAdded": false, + "type": "UnityEngine.AnimationClip", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEditor.Animations.AnimatorController", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.AnimatorOverrideController", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEditor.Audio.AudioMixerController", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.ComputeShader", + "defaultInstantiationMode": 1 + }, + { + "userAdded": false, + "type": "UnityEngine.Cubemap", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.GameObject", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEditor.LightingDataAsset", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.LightingSettings", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.Material", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEditor.MonoScript", + "defaultInstantiationMode": 1 + }, + { + "userAdded": false, + "type": "UnityEngine.PhysicMaterial", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.PhysicsMaterial2D", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.Rendering.VolumeProfile", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEditor.SceneAsset", + "defaultInstantiationMode": 1 + }, + { + "userAdded": false, + "type": "UnityEngine.Shader", + "defaultInstantiationMode": 1 + }, + { + "userAdded": false, + "type": "UnityEngine.ShaderVariantCollection", + "defaultInstantiationMode": 1 + }, + { + "userAdded": false, + "type": "UnityEngine.Texture", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.Texture2D", + "defaultInstantiationMode": 0 + }, + { + "userAdded": false, + "type": "UnityEngine.Timeline.TimelineAsset", + "defaultInstantiationMode": 0 + } + ], + "defaultDependencyTypeInfo": { + "userAdded": false, + "type": "", + "defaultInstantiationMode": 1 + }, + "newSceneOverride": 0 +} \ No newline at end of file diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset new file mode 100644 index 0000000..1c92a78 --- /dev/null +++ b/ProjectSettings/TagManager.asset @@ -0,0 +1,43 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!78 &1 +TagManager: + serializedVersion: 2 + tags: [] + layers: + - Default + - TransparentFX + - Ignore Raycast + - + - Water + - UI + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + m_SortingLayers: + - name: Default + uniqueID: 0 + locked: 0 diff --git a/ProjectSettings/TimeManager.asset b/ProjectSettings/TimeManager.asset new file mode 100644 index 0000000..558a017 --- /dev/null +++ b/ProjectSettings/TimeManager.asset @@ -0,0 +1,9 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!5 &1 +TimeManager: + m_ObjectHideFlags: 0 + Fixed Timestep: 0.02 + Maximum Allowed Timestep: 0.33333334 + m_TimeScale: 1 + Maximum Particle Timestep: 0.03 diff --git a/ProjectSettings/TimelineSettings.asset b/ProjectSettings/TimelineSettings.asset new file mode 100644 index 0000000..b4fbdb0 --- /dev/null +++ b/ProjectSettings/TimelineSettings.asset @@ -0,0 +1,15 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 61 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a287be6c49135cd4f9b2b8666c39d999, type: 3} + m_Name: + m_EditorClassIdentifier: + assetDefaultFramerate: 60 diff --git a/ProjectSettings/UnityConnectSettings.asset b/ProjectSettings/UnityConnectSettings.asset new file mode 100644 index 0000000..6125b30 --- /dev/null +++ b/ProjectSettings/UnityConnectSettings.asset @@ -0,0 +1,35 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!310 &1 +UnityConnectSettings: + m_ObjectHideFlags: 0 + serializedVersion: 1 + m_Enabled: 0 + m_TestMode: 0 + m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events + m_EventUrl: https://cdp.cloud.unity3d.com/v1/events + m_ConfigUrl: https://config.uca.cloud.unity3d.com + m_DashboardUrl: https://dashboard.unity3d.com + m_TestInitMode: 0 + CrashReportingSettings: + m_EventUrl: https://perf-events.cloud.unity3d.com + m_Enabled: 0 + m_LogBufferSize: 10 + m_CaptureEditorExceptions: 1 + UnityPurchasingSettings: + m_Enabled: 0 + m_TestMode: 0 + UnityAnalyticsSettings: + m_Enabled: 0 + m_TestMode: 0 + m_InitializeOnStartup: 1 + UnityAdsSettings: + m_Enabled: 0 + m_InitializeOnStartup: 1 + m_TestMode: 0 + m_IosGameId: + m_AndroidGameId: + m_GameIds: {} + m_GameId: + PerformanceReportingSettings: + m_Enabled: 0 diff --git a/ProjectSettings/VFXManager.asset b/ProjectSettings/VFXManager.asset new file mode 100644 index 0000000..3a95c98 --- /dev/null +++ b/ProjectSettings/VFXManager.asset @@ -0,0 +1,12 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!937362698 &1 +VFXManager: + m_ObjectHideFlags: 0 + m_IndirectShader: {fileID: 0} + m_CopyBufferShader: {fileID: 0} + m_SortShader: {fileID: 0} + m_StripUpdateShader: {fileID: 0} + m_RenderPipeSettingsPath: + m_FixedTimeStep: 0.016666668 + m_MaxDeltaTime: 0.05 diff --git a/ProjectSettings/VersionControlSettings.asset b/ProjectSettings/VersionControlSettings.asset new file mode 100644 index 0000000..dca2881 --- /dev/null +++ b/ProjectSettings/VersionControlSettings.asset @@ -0,0 +1,8 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!890905787 &1 +VersionControlSettings: + m_ObjectHideFlags: 0 + m_Mode: Visible Meta Files + m_CollabEditorSettings: + inProgressEnabled: 1 diff --git a/ProjectSettings/XRSettings.asset b/ProjectSettings/XRSettings.asset new file mode 100644 index 0000000..482590c --- /dev/null +++ b/ProjectSettings/XRSettings.asset @@ -0,0 +1,10 @@ +{ + "m_SettingKeys": [ + "VR Device Disabled", + "VR Device User Alert" + ], + "m_SettingValues": [ + "False", + "False" + ] +} \ No newline at end of file