├── .gitattributes
├── .gitignore
├── .idea
└── .idea.UnityPatternCombo
│ └── .idea
│ ├── .gitignore
│ ├── encodings.xml
│ └── indexLayout.xml
├── .vsconfig
├── Assets
├── Settings.meta
├── Settings
│ ├── SampleSceneProfile.asset
│ ├── SampleSceneProfile.asset.meta
│ ├── URP-Balanced-Renderer.asset
│ ├── URP-Balanced-Renderer.asset.meta
│ ├── URP-Balanced.asset
│ └── URP-Balanced.asset.meta
├── TextMesh Pro.meta
├── TextMesh Pro
│ ├── Shaders.meta
│ └── Shaders
│ │ ├── TMP_Bitmap-Custom-Atlas.shader
│ │ ├── TMP_Bitmap-Custom-Atlas.shader.meta
│ │ ├── TMP_Bitmap-Mobile.shader
│ │ ├── TMP_Bitmap-Mobile.shader.meta
│ │ ├── TMP_Bitmap.shader
│ │ ├── TMP_Bitmap.shader.meta
│ │ ├── TMP_SDF Overlay.shader
│ │ ├── TMP_SDF Overlay.shader.meta
│ │ ├── TMP_SDF SSD.shader
│ │ ├── TMP_SDF SSD.shader.meta
│ │ ├── TMP_SDF-Mobile Masking.shader
│ │ ├── TMP_SDF-Mobile Masking.shader.meta
│ │ ├── TMP_SDF-Mobile Overlay.shader
│ │ ├── TMP_SDF-Mobile Overlay.shader.meta
│ │ ├── TMP_SDF-Mobile SSD.shader
│ │ ├── TMP_SDF-Mobile SSD.shader.meta
│ │ ├── TMP_SDF-Mobile.shader
│ │ ├── TMP_SDF-Mobile.shader.meta
│ │ ├── TMP_SDF-Surface-Mobile.shader
│ │ ├── TMP_SDF-Surface-Mobile.shader.meta
│ │ ├── TMP_SDF-Surface.shader
│ │ ├── TMP_SDF-Surface.shader.meta
│ │ ├── TMP_SDF.shader
│ │ ├── TMP_SDF.shader.meta
│ │ ├── TMP_Sprite.shader
│ │ ├── TMP_Sprite.shader.meta
│ │ ├── TMPro.cginc
│ │ ├── TMPro.cginc.meta
│ │ ├── TMPro_Mobile.cginc
│ │ ├── TMPro_Mobile.cginc.meta
│ │ ├── TMPro_Properties.cginc
│ │ ├── TMPro_Properties.cginc.meta
│ │ ├── TMPro_Surface.cginc
│ │ └── TMPro_Surface.cginc.meta
├── UnityDefaultRuntimeTheme.tss
├── UnityDefaultRuntimeTheme.tss.meta
├── UnityPatternCombo.meta
├── UnityPatternCombo
│ ├── ComboScripts.meta
│ ├── ComboScripts
│ │ ├── Action.meta
│ │ ├── Action
│ │ │ ├── ButtonActionCommands.cs
│ │ │ ├── ButtonActionCommands.cs.meta
│ │ │ ├── ButtonActionController.cs
│ │ │ ├── ButtonActionController.cs.meta
│ │ │ ├── ComboActionCommandFactory.cs
│ │ │ ├── ComboActionCommandFactory.cs.meta
│ │ │ ├── ComboActionCommands.cs
│ │ │ ├── ComboActionCommands.cs.meta
│ │ │ ├── ComboActionQueueManager.cs
│ │ │ ├── ComboActionQueueManager.cs.meta
│ │ │ ├── ComboMatchEngine.cs
│ │ │ ├── ComboMatchEngine.cs.meta
│ │ │ ├── ComboUpB.cs
│ │ │ ├── ComboUpB.cs.meta
│ │ │ ├── ComboXXY.cs
│ │ │ ├── ComboXXY.cs.meta
│ │ │ ├── DPadActionController.cs
│ │ │ ├── DPadActionController.cs.meta
│ │ │ ├── GameplayActionCommandInvoker.cs
│ │ │ ├── GameplayActionCommandInvoker.cs.meta
│ │ │ ├── GameplayActionInitializer.cs
│ │ │ ├── GameplayActionInitializer.cs.meta
│ │ │ ├── IComboRule.cs
│ │ │ ├── IComboRule.cs.meta
│ │ │ ├── IGameplayActionCommand.cs
│ │ │ └── IGameplayActionCommand.cs.meta
│ │ ├── ComboEventSystem.cs
│ │ ├── ComboEventSystem.cs.meta
│ │ ├── Display.meta
│ │ ├── Display
│ │ │ ├── ButtonDisplay.cs
│ │ │ ├── ButtonDisplay.cs.meta
│ │ │ ├── ButtonDisplayCommands.cs
│ │ │ ├── ButtonDisplayCommands.cs.meta
│ │ │ ├── ButtonDisplayController.cs
│ │ │ ├── ButtonDisplayController.cs.meta
│ │ │ ├── ButtonDisplayInitializer.cs
│ │ │ ├── ButtonDisplayInitializer.cs.meta
│ │ │ ├── ButtonDisplayPool.cs
│ │ │ ├── ButtonDisplayPool.cs.meta
│ │ │ ├── ButtonDisplaySettingsSO.cs
│ │ │ ├── ButtonDisplaySettingsSO.cs.meta
│ │ │ ├── ComboDisplayCommandFactory.cs
│ │ │ ├── ComboDisplayCommandFactory.cs.meta
│ │ │ ├── ComboDisplayCommandHandler.cs
│ │ │ ├── ComboDisplayCommandHandler.cs.meta
│ │ │ ├── ComboDisplayCommands.cs
│ │ │ ├── ComboDisplayCommands.cs.meta
│ │ │ ├── ComboDisplayTextClimber.cs
│ │ │ ├── ComboDisplayTextClimber.cs.meta
│ │ │ ├── DPadDisplay.cs
│ │ │ ├── DPadDisplay.cs.meta
│ │ │ ├── DPadDisplayController.cs
│ │ │ ├── DPadDisplayController.cs.meta
│ │ │ ├── GameplayDisplayCommandInvoker.cs
│ │ │ ├── GameplayDisplayCommandInvoker.cs.meta
│ │ │ ├── IGameplayDisplayCommand.cs
│ │ │ └── IGameplayDisplayCommand.cs.meta
│ │ ├── PlayerMovement.cs
│ │ ├── PlayerMovement.cs.meta
│ │ ├── SideFighterControls.cs
│ │ ├── SideFighterControls.cs.meta
│ │ ├── SideFighterControls.inputactions
│ │ └── SideFighterControls.inputactions.meta
│ ├── PatternComboAssets.meta
│ ├── PatternComboAssets
│ │ ├── ButtonDisplaySettings.asset
│ │ ├── ButtonDisplaySettings.asset.meta
│ │ ├── DPadDown.png
│ │ ├── DPadDown.png.meta
│ │ ├── DPadLeft.png
│ │ ├── DPadLeft.png.meta
│ │ ├── DPadRight.png
│ │ ├── DPadRight.png.meta
│ │ ├── DPadUp.png
│ │ ├── DPadUp.png.meta
│ │ ├── GameplayButton.prefab
│ │ ├── GameplayButton.prefab.meta
│ │ ├── TMPFonts.meta
│ │ └── TMPFonts
│ │ │ ├── FiraCode-Medium SDF.asset
│ │ │ ├── FiraCode-Medium SDF.asset.meta
│ │ │ ├── INTER-BOLD SDF.asset
│ │ │ ├── INTER-BOLD SDF.asset.meta
│ │ │ ├── ROBOTO-REGULAR SDF.asset
│ │ │ └── ROBOTO-REGULAR SDF.asset.meta
│ ├── PatternComboDemo.unity
│ └── PatternComboDemo.unity.meta
├── UniversalRenderPipelineGlobalSettings.asset
└── UniversalRenderPipelineGlobalSettings.asset.meta
├── LICENSE
├── Packages
├── manifest.json
└── packages-lock.json
├── ProjectSettings
├── AudioManager.asset
├── BurstAotSettings_StandaloneWindows.json
├── ClusterInputManager.asset
├── CommonBurstAotSettings.json
├── DynamicsManager.asset
├── EditorBuildSettings.asset
├── EditorSettings.asset
├── GraphicsSettings.asset
├── InputManager.asset
├── MemorySettings.asset
├── NavMeshAreas.asset
├── PackageManagerSettings.asset
├── Packages
│ └── com.unity.services.core
│ │ └── Settings.json
├── Physics2DSettings.asset
├── PresetManager.asset
├── ProjectSettings.asset
├── ProjectVersion.txt
├── QualitySettings.asset
├── SceneTemplateSettings.json
├── ShaderGraphSettings.asset
├── TagManager.asset
├── TimeManager.asset
├── URPProjectSettings.asset
├── UnityConnectSettings.asset
├── VFXManager.asset
└── VersionControlSettings.asset
├── README.md
└── ThirdPartyNotices.md
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # This .gitignore file should be placed at the root of your Unity project directory
2 | #
3 | # Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore
4 | #
5 | /[Ll]ibrary/
6 | /[Tt]emp/
7 | /[Oo]bj/
8 | /[Bb]uild/
9 | /[Bb]uilds/
10 | /[Ll]ogs/
11 | /[Uu]ser[Ss]ettings/
12 | /[Aa]ssets/TextMesh Pro/
13 |
14 | # MemoryCaptures can get excessive in size.
15 | # They also could contain extremely sensitive data
16 | /[Mm]emoryCaptures/
17 |
18 | # Recordings can get excessive in size
19 | /[Rr]ecordings/
20 |
21 | # Uncomment this line if you wish to ignore the asset store tools plugin
22 | # /[Aa]ssets/AssetStoreTools*
23 |
24 | # Autogenerated Jetbrains Rider plugin
25 | /[Aa]ssets/Plugins/Editor/JetBrains*
26 |
27 | # JetBrains Rider/IntelliJ IDEA configuration folder
28 | .idea/
29 |
30 | # Visual Studio cache directory
31 | .vs/
32 |
33 | # Gradle cache directory
34 | .gradle/
35 |
36 | # Autogenerated VS/MD/Consulo solution and project files
37 | ExportedObj/
38 | .consulo/
39 | *.csproj
40 | *.unityproj
41 | *.sln
42 | *.suo
43 | *.tmp
44 | *.user
45 | *.userprefs
46 | *.pidb
47 | *.booproj
48 | *.svd
49 | *.pdb
50 | *.mdb
51 | *.opendb
52 | *.VC.db
53 |
54 | # Unity3D generated meta files
55 | *.pidb.meta
56 | *.pdb.meta
57 | *.mdb.meta
58 |
59 | # Unity3D generated file on crash reports
60 | sysinfo.txt
61 |
62 | # Builds
63 | *.apk
64 | *.aab
65 | *.unitypackage
66 | *.app
67 |
68 | # Crashlytics generated file
69 | crashlytics-build.properties
70 |
71 | # Packed Addressables
72 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
73 |
74 | # Temporary auto-generated Android Assets
75 | /[Aa]ssets/[Ss]treamingAssets/aa.meta
76 | /[Aa]ssets/[Ss]treamingAssets/aa/*
77 |
--------------------------------------------------------------------------------
/.idea/.idea.UnityPatternCombo/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Rider ignored files
5 | /modules.xml
6 | /projectSettingsUpdater.xml
7 | /.idea.UnityPatternCombo.iml
8 | /contentModel.xml
9 | # Editor-based HTTP Client requests
10 | /httpRequests/
11 | # Datasource local storage ignored files
12 | /dataSources/
13 | /dataSources.local.xml
14 |
--------------------------------------------------------------------------------
/.idea/.idea.UnityPatternCombo/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/.idea.UnityPatternCombo/.idea/indexLayout.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.vsconfig:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0",
3 | "components": [
4 | "Microsoft.VisualStudio.Workload.ManagedGame"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/Assets/Settings.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 709f11a7f3c4041caa4ef136ea32d874
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Settings/SampleSceneProfile.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &-7893295128165547882
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 3
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: 0b2db86121404754db890f4c8dfe81b2, type: 3}
13 | m_Name: Bloom
14 | m_EditorClassIdentifier:
15 | active: 1
16 | m_AdvancedMode: 0
17 | threshold:
18 | m_OverrideState: 1
19 | m_Value: 1
20 | min: 0
21 | intensity:
22 | m_OverrideState: 1
23 | m_Value: 1
24 | min: 0
25 | scatter:
26 | m_OverrideState: 0
27 | m_Value: 0.7
28 | min: 0
29 | max: 1
30 | clamp:
31 | m_OverrideState: 0
32 | m_Value: 65472
33 | min: 0
34 | tint:
35 | m_OverrideState: 0
36 | m_Value: {r: 1, g: 1, b: 1, a: 1}
37 | hdr: 0
38 | showAlpha: 0
39 | showEyeDropper: 1
40 | highQualityFiltering:
41 | m_OverrideState: 0
42 | m_Value: 0
43 | skipIterations:
44 | m_OverrideState: 0
45 | m_Value: 1
46 | min: 0
47 | max: 16
48 | dirtTexture:
49 | m_OverrideState: 0
50 | m_Value: {fileID: 0}
51 | dirtIntensity:
52 | m_OverrideState: 0
53 | m_Value: 0
54 | min: 0
55 | --- !u!114 &-7011558710299706105
56 | MonoBehaviour:
57 | m_ObjectHideFlags: 3
58 | m_CorrespondingSourceObject: {fileID: 0}
59 | m_PrefabInstance: {fileID: 0}
60 | m_PrefabAsset: {fileID: 0}
61 | m_GameObject: {fileID: 0}
62 | m_Enabled: 1
63 | m_EditorHideFlags: 0
64 | m_Script: {fileID: 11500000, guid: 899c54efeace73346a0a16faa3afe726, type: 3}
65 | m_Name: Vignette
66 | m_EditorClassIdentifier:
67 | active: 1
68 | m_AdvancedMode: 0
69 | color:
70 | m_OverrideState: 0
71 | m_Value: {r: 0, g: 0, b: 0, a: 1}
72 | hdr: 0
73 | showAlpha: 0
74 | showEyeDropper: 1
75 | center:
76 | m_OverrideState: 0
77 | m_Value: {x: 0.5, y: 0.5}
78 | intensity:
79 | m_OverrideState: 1
80 | m_Value: 0.25
81 | min: 0
82 | max: 1
83 | smoothness:
84 | m_OverrideState: 1
85 | m_Value: 0.4
86 | min: 0.01
87 | max: 1
88 | rounded:
89 | m_OverrideState: 0
90 | m_Value: 0
91 | --- !u!114 &11400000
92 | MonoBehaviour:
93 | m_ObjectHideFlags: 0
94 | m_CorrespondingSourceObject: {fileID: 0}
95 | m_PrefabInstance: {fileID: 0}
96 | m_PrefabAsset: {fileID: 0}
97 | m_GameObject: {fileID: 0}
98 | m_Enabled: 1
99 | m_EditorHideFlags: 0
100 | m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
101 | m_Name: SampleSceneProfile
102 | m_EditorClassIdentifier:
103 | components:
104 | - {fileID: 849379129802519247}
105 | - {fileID: -7893295128165547882}
106 | - {fileID: -7011558710299706105}
107 | --- !u!114 &849379129802519247
108 | MonoBehaviour:
109 | m_ObjectHideFlags: 3
110 | m_CorrespondingSourceObject: {fileID: 0}
111 | m_PrefabInstance: {fileID: 0}
112 | m_PrefabAsset: {fileID: 0}
113 | m_GameObject: {fileID: 0}
114 | m_Enabled: 1
115 | m_EditorHideFlags: 0
116 | m_Script: {fileID: 11500000, guid: 97c23e3b12dc18c42a140437e53d3951, type: 3}
117 | m_Name: Tonemapping
118 | m_EditorClassIdentifier:
119 | active: 1
120 | m_AdvancedMode: 0
121 | mode:
122 | m_OverrideState: 1
123 | m_Value: 1
124 |
--------------------------------------------------------------------------------
/Assets/Settings/SampleSceneProfile.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a6560a915ef98420e9faacc1c7438823
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 0
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Settings/URP-Balanced-Renderer.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3}
13 | m_Name: URP-Balanced-Renderer
14 | m_EditorClassIdentifier:
15 | debugShaders:
16 | debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, type: 3}
17 | hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3}
18 | m_RendererFeatures: []
19 | m_RendererFeatureMap:
20 | m_UseNativeRenderPass: 0
21 | postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
22 | shaders:
23 | blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3}
24 | copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3}
25 | screenSpaceShadowPS: {fileID: 0}
26 | samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3}
27 | stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3}
28 | fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3}
29 | fallbackLoadingPS: {fileID: 4800000, guid: 7f888aff2ac86494babad1c2c5daeee2, type: 3}
30 | materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3}
31 | coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3}
32 | coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b, type: 3}
33 | blitHDROverlay: {fileID: 4800000, guid: a89bee29cffa951418fc1e2da94d1959, type: 3}
34 | cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf, type: 3}
35 | objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486, type: 3}
36 | dataDrivenLensFlare: {fileID: 4800000, guid: 6cda457ac28612740adb23da5d39ea92, type: 3}
37 | m_AssetVersion: 2
38 | m_OpaqueLayerMask:
39 | serializedVersion: 2
40 | m_Bits: 4294967295
41 | m_TransparentLayerMask:
42 | serializedVersion: 2
43 | m_Bits: 4294967295
44 | m_DefaultStencilState:
45 | overrideStencilState: 0
46 | stencilReference: 0
47 | stencilCompareFunction: 8
48 | passOperation: 2
49 | failOperation: 0
50 | zFailOperation: 0
51 | m_ShadowTransparentReceive: 1
52 | m_RenderingMode: 0
53 | m_DepthPrimingMode: 0
54 | m_CopyDepthMode: 0
55 | m_AccurateGbufferNormals: 0
56 | m_IntermediateTextureMode: 1
57 |
--------------------------------------------------------------------------------
/Assets/Settings/URP-Balanced-Renderer.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e634585d5c4544dd297acaee93dc2beb
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Settings/URP-Balanced.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
13 | m_Name: URP-Balanced
14 | m_EditorClassIdentifier:
15 | k_AssetVersion: 11
16 | k_AssetPreviousVersion: 11
17 | m_RendererType: 1
18 | m_RendererData: {fileID: 0}
19 | m_RendererDataList:
20 | - {fileID: 11400000, guid: e634585d5c4544dd297acaee93dc2beb, type: 2}
21 | m_DefaultRendererIndex: 0
22 | m_RequireDepthTexture: 0
23 | m_RequireOpaqueTexture: 0
24 | m_OpaqueDownsampling: 1
25 | m_SupportsTerrainHoles: 1
26 | m_SupportsHDR: 1
27 | m_HDRColorBufferPrecision: 0
28 | m_MSAA: 1
29 | m_RenderScale: 1
30 | m_UpscalingFilter: 0
31 | m_FsrOverrideSharpness: 0
32 | m_FsrSharpness: 0.92
33 | m_EnableLODCrossFade: 1
34 | m_LODCrossFadeDitheringType: 1
35 | m_ShEvalMode: 0
36 | m_MainLightRenderingMode: 1
37 | m_MainLightShadowsSupported: 1
38 | m_MainLightShadowmapResolution: 1024
39 | m_AdditionalLightsRenderingMode: 1
40 | m_AdditionalLightsPerObjectLimit: 2
41 | m_AdditionalLightShadowsSupported: 0
42 | m_AdditionalLightsShadowmapResolution: 512
43 | m_AdditionalLightsShadowResolutionTierLow: 128
44 | m_AdditionalLightsShadowResolutionTierMedium: 256
45 | m_AdditionalLightsShadowResolutionTierHigh: 512
46 | m_ReflectionProbeBlending: 0
47 | m_ReflectionProbeBoxProjection: 0
48 | m_ShadowDistance: 50
49 | m_ShadowCascadeCount: 1
50 | m_Cascade2Split: 0.25
51 | m_Cascade3Split: {x: 0.1, y: 0.3}
52 | m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
53 | m_CascadeBorder: 0.1
54 | m_ShadowDepthBias: 1
55 | m_ShadowNormalBias: 1
56 | m_AnyShadowsSupported: 1
57 | m_SoftShadowsSupported: 1
58 | m_ConservativeEnclosingSphere: 0
59 | m_NumIterationsEnclosingSphere: 64
60 | m_SoftShadowQuality: 2
61 | m_AdditionalLightsCookieResolution: 512
62 | m_AdditionalLightsCookieFormat: 1
63 | m_UseSRPBatcher: 1
64 | m_SupportsDynamicBatching: 0
65 | m_MixedLightingSupported: 1
66 | m_SupportsLightCookies: 1
67 | m_SupportsLightLayers: 0
68 | m_DebugLevel: 0
69 | m_StoreActionsOptimization: 0
70 | m_EnableRenderGraph: 0
71 | m_UseAdaptivePerformance: 1
72 | m_ColorGradingMode: 0
73 | m_ColorGradingLutSize: 32
74 | m_UseFastSRGBLinearConversion: 0
75 | m_SupportDataDrivenLensFlare: 1
76 | m_ShadowType: 1
77 | m_LocalShadowsSupported: 0
78 | m_LocalShadowsAtlasResolution: 256
79 | m_MaxPixelLights: 0
80 | m_ShadowAtlasResolution: 256
81 | m_VolumeFrameworkUpdateMode: 0
82 | m_Textures:
83 | blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3}
84 | bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3}
85 | m_PrefilteringModeMainLightShadows: 1
86 | m_PrefilteringModeAdditionalLight: 4
87 | m_PrefilteringModeAdditionalLightShadows: 1
88 | m_PrefilterXRKeywords: 0
89 | m_PrefilteringModeForwardPlus: 1
90 | m_PrefilteringModeDeferredRendering: 1
91 | m_PrefilteringModeScreenSpaceOcclusion: 1
92 | m_PrefilterDebugKeywords: 0
93 | m_PrefilterWriteRenderingLayers: 0
94 | m_PrefilterHDROutput: 0
95 | m_PrefilterSSAODepthNormals: 0
96 | m_PrefilterSSAOSourceDepthLow: 0
97 | m_PrefilterSSAOSourceDepthMedium: 0
98 | m_PrefilterSSAOSourceDepthHigh: 0
99 | m_PrefilterSSAOInterleaved: 0
100 | m_PrefilterSSAOBlueNoise: 0
101 | m_PrefilterSSAOSampleCountLow: 0
102 | m_PrefilterSSAOSampleCountMedium: 0
103 | m_PrefilterSSAOSampleCountHigh: 0
104 | m_PrefilterDBufferMRT1: 0
105 | m_PrefilterDBufferMRT2: 0
106 | m_PrefilterDBufferMRT3: 0
107 | m_PrefilterScreenCoord: 0
108 | m_PrefilterNativeRenderPass: 0
109 | m_ShaderVariantLogLevel: 0
110 | m_ShadowCascades: 0
111 |
--------------------------------------------------------------------------------
/Assets/Settings/URP-Balanced.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e1260c1148f6143b28bae5ace5e9c5d1
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 0
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f54d1bd14bd3ca042bd867b519fee8cc
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e9f693669af91aa45ad615fc681ed29f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader:
--------------------------------------------------------------------------------
1 | Shader "TextMeshPro/Bitmap Custom Atlas" {
2 |
3 | Properties {
4 | _MainTex ("Font Atlas", 2D) = "white" {}
5 | _FaceTex ("Font Texture", 2D) = "white" {}
6 | [HDR]_FaceColor ("Text Color", Color) = (1,1,1,1)
7 |
8 | _VertexOffsetX ("Vertex OffsetX", float) = 0
9 | _VertexOffsetY ("Vertex OffsetY", float) = 0
10 | _MaskSoftnessX ("Mask SoftnessX", float) = 0
11 | _MaskSoftnessY ("Mask SoftnessY", float) = 0
12 |
13 | _ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
14 | _Padding ("Padding", float) = 0
15 |
16 | _StencilComp("Stencil Comparison", Float) = 8
17 | _Stencil("Stencil ID", Float) = 0
18 | _StencilOp("Stencil Operation", Float) = 0
19 | _StencilWriteMask("Stencil Write Mask", Float) = 255
20 | _StencilReadMask("Stencil Read Mask", Float) = 255
21 |
22 | _CullMode("Cull Mode", Float) = 0
23 | _ColorMask("Color Mask", Float) = 15
24 | }
25 |
26 | SubShader{
27 |
28 | Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
29 |
30 | Stencil
31 | {
32 | Ref[_Stencil]
33 | Comp[_StencilComp]
34 | Pass[_StencilOp]
35 | ReadMask[_StencilReadMask]
36 | WriteMask[_StencilWriteMask]
37 | }
38 |
39 |
40 | Lighting Off
41 | Cull [_CullMode]
42 | ZTest [unity_GUIZTestMode]
43 | ZWrite Off
44 | Fog { Mode Off }
45 | Blend SrcAlpha OneMinusSrcAlpha
46 | ColorMask[_ColorMask]
47 |
48 | Pass {
49 | CGPROGRAM
50 | #pragma vertex vert
51 | #pragma fragment frag
52 |
53 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
54 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
55 |
56 |
57 | #include "UnityCG.cginc"
58 |
59 | struct appdata_t {
60 | float4 vertex : POSITION;
61 | fixed4 color : COLOR;
62 | float2 texcoord0 : TEXCOORD0;
63 | float2 texcoord1 : TEXCOORD1;
64 | };
65 |
66 | struct v2f {
67 | float4 vertex : SV_POSITION;
68 | fixed4 color : COLOR;
69 | float2 texcoord0 : TEXCOORD0;
70 | float2 texcoord1 : TEXCOORD1;
71 | float4 mask : TEXCOORD2;
72 | };
73 |
74 | uniform sampler2D _MainTex;
75 | uniform sampler2D _FaceTex;
76 | uniform float4 _FaceTex_ST;
77 | uniform fixed4 _FaceColor;
78 |
79 | uniform float _VertexOffsetX;
80 | uniform float _VertexOffsetY;
81 | uniform float4 _ClipRect;
82 | uniform float _MaskSoftnessX;
83 | uniform float _MaskSoftnessY;
84 |
85 | float2 UnpackUV(float uv)
86 | {
87 | float2 output;
88 | output.x = floor(uv / 4096);
89 | output.y = uv - 4096 * output.x;
90 |
91 | return output * 0.001953125;
92 | }
93 |
94 | v2f vert (appdata_t v)
95 | {
96 | float4 vert = v.vertex;
97 | vert.x += _VertexOffsetX;
98 | vert.y += _VertexOffsetY;
99 |
100 | vert.xy += (vert.w * 0.5) / _ScreenParams.xy;
101 |
102 | float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert));
103 |
104 | fixed4 faceColor = v.color;
105 | faceColor *= _FaceColor;
106 |
107 | v2f OUT;
108 | OUT.vertex = vPosition;
109 | OUT.color = faceColor;
110 | OUT.texcoord0 = v.texcoord0;
111 | OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex);
112 | float2 pixelSize = vPosition.w;
113 | pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
114 |
115 | // Clamp _ClipRect to 16bit.
116 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
117 | OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
118 |
119 | return OUT;
120 | }
121 |
122 | fixed4 frag (v2f IN) : SV_Target
123 | {
124 | fixed4 color = tex2D(_MainTex, IN.texcoord0) * tex2D(_FaceTex, IN.texcoord1) * IN.color;
125 |
126 | // Alternative implementation to UnityGet2DClipping with support for softness.
127 | #if UNITY_UI_CLIP_RECT
128 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
129 | color *= m.x * m.y;
130 | #endif
131 |
132 | #if UNITY_UI_ALPHACLIP
133 | clip(color.a - 0.001);
134 | #endif
135 |
136 | return color;
137 | }
138 | ENDCG
139 | }
140 | }
141 |
142 | CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI"
143 | }
144 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 48bb5f55d8670e349b6e614913f9d910
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader:
--------------------------------------------------------------------------------
1 | Shader "TextMeshPro/Mobile/Bitmap" {
2 |
3 | Properties {
4 | _MainTex ("Font Atlas", 2D) = "white" {}
5 | [HDR]_Color ("Text Color", Color) = (1,1,1,1)
6 | _DiffusePower ("Diffuse Power", Range(1.0,4.0)) = 1.0
7 |
8 | _VertexOffsetX("Vertex OffsetX", float) = 0
9 | _VertexOffsetY("Vertex OffsetY", float) = 0
10 | _MaskSoftnessX("Mask SoftnessX", float) = 0
11 | _MaskSoftnessY("Mask SoftnessY", float) = 0
12 |
13 | _ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
14 |
15 | _StencilComp("Stencil Comparison", Float) = 8
16 | _Stencil("Stencil ID", Float) = 0
17 | _StencilOp("Stencil Operation", Float) = 0
18 | _StencilWriteMask("Stencil Write Mask", Float) = 255
19 | _StencilReadMask("Stencil Read Mask", Float) = 255
20 |
21 | _CullMode("Cull Mode", Float) = 0
22 | _ColorMask("Color Mask", Float) = 15
23 | }
24 |
25 | SubShader {
26 |
27 | Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
28 |
29 | Stencil
30 | {
31 | Ref[_Stencil]
32 | Comp[_StencilComp]
33 | Pass[_StencilOp]
34 | ReadMask[_StencilReadMask]
35 | WriteMask[_StencilWriteMask]
36 | }
37 |
38 |
39 | Lighting Off
40 | Cull [_CullMode]
41 | ZTest [unity_GUIZTestMode]
42 | ZWrite Off
43 | Fog { Mode Off }
44 | Blend SrcAlpha OneMinusSrcAlpha
45 | ColorMask[_ColorMask]
46 |
47 | Pass {
48 | CGPROGRAM
49 | #pragma vertex vert
50 | #pragma fragment frag
51 | #pragma fragmentoption ARB_precision_hint_fastest
52 |
53 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
54 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
55 |
56 |
57 | #include "UnityCG.cginc"
58 |
59 | struct appdata_t {
60 | float4 vertex : POSITION;
61 | fixed4 color : COLOR;
62 | float2 texcoord0 : TEXCOORD0;
63 | float2 texcoord1 : TEXCOORD1;
64 | };
65 |
66 | struct v2f {
67 | float4 vertex : POSITION;
68 | fixed4 color : COLOR;
69 | float2 texcoord0 : TEXCOORD0;
70 | float4 mask : TEXCOORD2;
71 | };
72 |
73 | sampler2D _MainTex;
74 | fixed4 _Color;
75 | float _DiffusePower;
76 |
77 | uniform float _VertexOffsetX;
78 | uniform float _VertexOffsetY;
79 | uniform float4 _ClipRect;
80 | uniform float _MaskSoftnessX;
81 | uniform float _MaskSoftnessY;
82 |
83 | v2f vert (appdata_t v)
84 | {
85 | v2f OUT;
86 | float4 vert = v.vertex;
87 | vert.x += _VertexOffsetX;
88 | vert.y += _VertexOffsetY;
89 |
90 | vert.xy += (vert.w * 0.5) / _ScreenParams.xy;
91 |
92 | OUT.vertex = UnityPixelSnap(UnityObjectToClipPos(vert));
93 | OUT.color = v.color;
94 | OUT.color *= _Color;
95 | OUT.color.rgb *= _DiffusePower;
96 | OUT.texcoord0 = v.texcoord0;
97 |
98 | float2 pixelSize = OUT.vertex.w;
99 | //pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
100 |
101 | // Clamp _ClipRect to 16bit.
102 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
103 | OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
104 |
105 | return OUT;
106 | }
107 |
108 | fixed4 frag (v2f IN) : COLOR
109 | {
110 | fixed4 color = fixed4(IN.color.rgb, IN.color.a * tex2D(_MainTex, IN.texcoord0).a);
111 |
112 | // Alternative implementation to UnityGet2DClipping with support for softness.
113 | #if UNITY_UI_CLIP_RECT
114 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
115 | color *= m.x * m.y;
116 | #endif
117 |
118 | #if UNITY_UI_ALPHACLIP
119 | clip(color.a - 0.001);
120 | #endif
121 |
122 | return color;
123 | }
124 | ENDCG
125 | }
126 | }
127 |
128 | SubShader {
129 | Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
130 | Lighting Off Cull Off ZTest Always ZWrite Off Fog { Mode Off }
131 | Blend SrcAlpha OneMinusSrcAlpha
132 | BindChannels {
133 | Bind "Color", color
134 | Bind "Vertex", vertex
135 | Bind "TexCoord", texcoord0
136 | }
137 | Pass {
138 | SetTexture [_MainTex] {
139 | constantColor [_Color] combine constant * primary, constant * texture
140 | }
141 | }
142 | }
143 |
144 | CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI"
145 | }
146 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1e3b057af24249748ff873be7fafee47
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_Bitmap.shader:
--------------------------------------------------------------------------------
1 | Shader "TextMeshPro/Bitmap" {
2 |
3 | Properties {
4 | _MainTex ("Font Atlas", 2D) = "white" {}
5 | _FaceTex ("Font Texture", 2D) = "white" {}
6 | [HDR]_FaceColor ("Text Color", Color) = (1,1,1,1)
7 |
8 | _VertexOffsetX ("Vertex OffsetX", float) = 0
9 | _VertexOffsetY ("Vertex OffsetY", float) = 0
10 | _MaskSoftnessX ("Mask SoftnessX", float) = 0
11 | _MaskSoftnessY ("Mask SoftnessY", float) = 0
12 |
13 | _ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
14 |
15 | _StencilComp("Stencil Comparison", Float) = 8
16 | _Stencil("Stencil ID", Float) = 0
17 | _StencilOp("Stencil Operation", Float) = 0
18 | _StencilWriteMask("Stencil Write Mask", Float) = 255
19 | _StencilReadMask("Stencil Read Mask", Float) = 255
20 |
21 | _CullMode("Cull Mode", Float) = 0
22 | _ColorMask("Color Mask", Float) = 15
23 | }
24 |
25 | SubShader{
26 |
27 | Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
28 |
29 | Stencil
30 | {
31 | Ref[_Stencil]
32 | Comp[_StencilComp]
33 | Pass[_StencilOp]
34 | ReadMask[_StencilReadMask]
35 | WriteMask[_StencilWriteMask]
36 | }
37 |
38 |
39 | Lighting Off
40 | Cull [_CullMode]
41 | ZTest [unity_GUIZTestMode]
42 | ZWrite Off
43 | Fog { Mode Off }
44 | Blend SrcAlpha OneMinusSrcAlpha
45 | ColorMask[_ColorMask]
46 |
47 | Pass {
48 | CGPROGRAM
49 | #pragma vertex vert
50 | #pragma fragment frag
51 |
52 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
53 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
54 |
55 |
56 | #include "UnityCG.cginc"
57 |
58 | struct appdata_t {
59 | float4 vertex : POSITION;
60 | fixed4 color : COLOR;
61 | float2 texcoord0 : TEXCOORD0;
62 | float2 texcoord1 : TEXCOORD1;
63 | };
64 |
65 | struct v2f {
66 | float4 vertex : SV_POSITION;
67 | fixed4 color : COLOR;
68 | float2 texcoord0 : TEXCOORD0;
69 | float2 texcoord1 : TEXCOORD1;
70 | float4 mask : TEXCOORD2;
71 | };
72 |
73 | uniform sampler2D _MainTex;
74 | uniform sampler2D _FaceTex;
75 | uniform float4 _FaceTex_ST;
76 | uniform fixed4 _FaceColor;
77 |
78 | uniform float _VertexOffsetX;
79 | uniform float _VertexOffsetY;
80 | uniform float4 _ClipRect;
81 | uniform float _MaskSoftnessX;
82 | uniform float _MaskSoftnessY;
83 |
84 | float2 UnpackUV(float uv)
85 | {
86 | float2 output;
87 | output.x = floor(uv / 4096);
88 | output.y = uv - 4096 * output.x;
89 |
90 | return output * 0.001953125;
91 | }
92 |
93 | v2f vert (appdata_t v)
94 | {
95 | float4 vert = v.vertex;
96 | vert.x += _VertexOffsetX;
97 | vert.y += _VertexOffsetY;
98 |
99 | vert.xy += (vert.w * 0.5) / _ScreenParams.xy;
100 |
101 | float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert));
102 |
103 | fixed4 faceColor = v.color;
104 | faceColor *= _FaceColor;
105 |
106 | v2f OUT;
107 | OUT.vertex = vPosition;
108 | OUT.color = faceColor;
109 | OUT.texcoord0 = v.texcoord0;
110 | OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex);
111 | float2 pixelSize = vPosition.w;
112 | pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
113 |
114 | // Clamp _ClipRect to 16bit.
115 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
116 | OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
117 |
118 | return OUT;
119 | }
120 |
121 | fixed4 frag (v2f IN) : SV_Target
122 | {
123 | fixed4 color = tex2D(_MainTex, IN.texcoord0);
124 | color = fixed4 (tex2D(_FaceTex, IN.texcoord1).rgb * IN.color.rgb, IN.color.a * color.a);
125 |
126 | // Alternative implementation to UnityGet2DClipping with support for softness.
127 | #if UNITY_UI_CLIP_RECT
128 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
129 | color *= m.x * m.y;
130 | #endif
131 |
132 | #if UNITY_UI_ALPHACLIP
133 | clip(color.a - 0.001);
134 | #endif
135 |
136 | return color;
137 | }
138 | ENDCG
139 | }
140 | }
141 |
142 | CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI"
143 | }
144 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_Bitmap.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 128e987d567d4e2c824d754223b3f3b0
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF Overlay.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dd89cf5b9246416f84610a006f916af7
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF SSD.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 14eb328de4b8eb245bb7cea29e4ac00b
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bc1ede39bf3643ee8e493720e4259791
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a02a7d8c237544f1962732b55a9aebf1
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader:
--------------------------------------------------------------------------------
1 | // Simplified SDF shader:
2 | // - No Shading Option (bevel / bump / env map)
3 | // - No Glow Option
4 | // - Softness is applied on both side of the outline
5 |
6 | Shader "TextMeshPro/Mobile/Distance Field SSD" {
7 |
8 | Properties {
9 | [HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
10 | _FaceDilate ("Face Dilate", Range(-1,1)) = 0
11 |
12 | [HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
13 | _OutlineWidth ("Outline Thickness", Range(0,1)) = 0
14 | _OutlineSoftness ("Outline Softness", Range(0,1)) = 0
15 |
16 | [HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
17 | _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
18 | _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
19 | _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
20 | _UnderlaySoftness ("Border Softness", Range(0,1)) = 0
21 |
22 | _WeightNormal ("Weight Normal", float) = 0
23 | _WeightBold ("Weight Bold", float) = .5
24 |
25 | _ShaderFlags ("Flags", float) = 0
26 | _ScaleRatioA ("Scale RatioA", float) = 1
27 | _ScaleRatioB ("Scale RatioB", float) = 1
28 | _ScaleRatioC ("Scale RatioC", float) = 1
29 |
30 | _MainTex ("Font Atlas", 2D) = "white" {}
31 | _TextureWidth ("Texture Width", float) = 512
32 | _TextureHeight ("Texture Height", float) = 512
33 | _GradientScale ("Gradient Scale", float) = 5
34 | _ScaleX ("Scale X", float) = 1
35 | _ScaleY ("Scale Y", float) = 1
36 | _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
37 | _Sharpness ("Sharpness", Range(-1,1)) = 0
38 |
39 | _VertexOffsetX ("Vertex OffsetX", float) = 0
40 | _VertexOffsetY ("Vertex OffsetY", float) = 0
41 |
42 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
43 | _MaskSoftnessX ("Mask SoftnessX", float) = 0
44 | _MaskSoftnessY ("Mask SoftnessY", float) = 0
45 | _MaskTex ("Mask Texture", 2D) = "white" {}
46 | _MaskInverse ("Inverse", float) = 0
47 | _MaskEdgeColor ("Edge Color", Color) = (1,1,1,1)
48 | _MaskEdgeSoftness ("Edge Softness", Range(0, 1)) = 0.01
49 | _MaskWipeControl ("Wipe Position", Range(0, 1)) = 0.5
50 |
51 | _StencilComp ("Stencil Comparison", Float) = 8
52 | _Stencil ("Stencil ID", Float) = 0
53 | _StencilOp ("Stencil Operation", Float) = 0
54 | _StencilWriteMask ("Stencil Write Mask", Float) = 255
55 | _StencilReadMask ("Stencil Read Mask", Float) = 255
56 |
57 | _CullMode ("Cull Mode", Float) = 0
58 | _ColorMask ("Color Mask", Float) = 15
59 | }
60 |
61 | SubShader {
62 | Tags {
63 | "Queue"="Transparent"
64 | "IgnoreProjector"="True"
65 | "RenderType"="Transparent"
66 | }
67 |
68 | Stencil
69 | {
70 | Ref [_Stencil]
71 | Comp [_StencilComp]
72 | Pass [_StencilOp]
73 | ReadMask [_StencilReadMask]
74 | WriteMask [_StencilWriteMask]
75 | }
76 |
77 | Cull [_CullMode]
78 | ZWrite Off
79 | Lighting Off
80 | Fog { Mode Off }
81 | ZTest [unity_GUIZTestMode]
82 | Blend One OneMinusSrcAlpha
83 | ColorMask [_ColorMask]
84 |
85 | Pass {
86 | CGPROGRAM
87 | #pragma vertex VertShader
88 | #pragma fragment PixShader
89 | #pragma shader_feature __ OUTLINE_ON
90 | #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
91 |
92 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
93 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
94 |
95 | #include "UnityCG.cginc"
96 | #include "UnityUI.cginc"
97 | #include "TMPro_Properties.cginc"
98 |
99 | #include "TMPro_Mobile.cginc"
100 |
101 | ENDCG
102 | }
103 | }
104 |
105 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
106 | }
107 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c8d12adcee749c344b8117cf7c7eb912
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fe393ace9b354375a9cb14cdbbc28be4
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader:
--------------------------------------------------------------------------------
1 | // Simplified version of the SDF Surface shader :
2 | // - No support for Bevel, Bump or envmap
3 | // - Diffuse only lighting
4 | // - Fully supports only 1 directional light. Other lights can affect it, but it will be per-vertex/SH.
5 |
6 | Shader "TextMeshPro/Mobile/Distance Field (Surface)" {
7 |
8 | Properties {
9 | _FaceTex ("Fill Texture", 2D) = "white" {}
10 | [HDR]_FaceColor ("Fill Color", Color) = (1,1,1,1)
11 | _FaceDilate ("Face Dilate", Range(-1,1)) = 0
12 |
13 | [HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
14 | _OutlineTex ("Outline Texture", 2D) = "white" {}
15 | _OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
16 | _OutlineSoftness ("Outline Softness", Range(0,1)) = 0
17 |
18 | [HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
19 | _GlowOffset ("Offset", Range(-1,1)) = 0
20 | _GlowInner ("Inner", Range(0,1)) = 0.05
21 | _GlowOuter ("Outer", Range(0,1)) = 0.05
22 | _GlowPower ("Falloff", Range(1, 0)) = 0.75
23 |
24 | _WeightNormal ("Weight Normal", float) = 0
25 | _WeightBold ("Weight Bold", float) = 0.5
26 |
27 | // Should not be directly exposed to the user
28 | _ShaderFlags ("Flags", float) = 0
29 | _ScaleRatioA ("Scale RatioA", float) = 1
30 | _ScaleRatioB ("Scale RatioB", float) = 1
31 | _ScaleRatioC ("Scale RatioC", float) = 1
32 |
33 | _MainTex ("Font Atlas", 2D) = "white" {}
34 | _TextureWidth ("Texture Width", float) = 512
35 | _TextureHeight ("Texture Height", float) = 512
36 | _GradientScale ("Gradient Scale", float) = 5.0
37 | _ScaleX ("Scale X", float) = 1.0
38 | _ScaleY ("Scale Y", float) = 1.0
39 | _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
40 | _Sharpness ("Sharpness", Range(-1,1)) = 0
41 |
42 | _VertexOffsetX ("Vertex OffsetX", float) = 0
43 | _VertexOffsetY ("Vertex OffsetY", float) = 0
44 |
45 | _CullMode ("Cull Mode", Float) = 0
46 | //_MaskCoord ("Mask Coords", vector) = (0,0,0,0)
47 | //_MaskSoftness ("Mask Softness", float) = 0
48 | }
49 |
50 | SubShader {
51 |
52 | Tags {
53 | "Queue"="Transparent"
54 | "IgnoreProjector"="True"
55 | "RenderType"="Transparent"
56 | }
57 |
58 | LOD 300
59 | Cull [_CullMode]
60 |
61 | CGPROGRAM
62 | #pragma surface PixShader Lambert alpha:blend vertex:VertShader noforwardadd nolightmap nodirlightmap
63 | #pragma target 3.0
64 | #pragma shader_feature __ GLOW_ON
65 |
66 | #include "TMPro_Properties.cginc"
67 | #include "TMPro.cginc"
68 |
69 | half _FaceShininess;
70 | half _OutlineShininess;
71 |
72 | struct Input
73 | {
74 | fixed4 color : COLOR;
75 | float2 uv_MainTex;
76 | float2 uv2_FaceTex;
77 | float2 uv2_OutlineTex;
78 | float2 param; // Weight, Scale
79 | float3 viewDirEnv;
80 | };
81 |
82 | #include "TMPro_Surface.cginc"
83 |
84 | ENDCG
85 |
86 | // Pass to render object as a shadow caster
87 | Pass
88 | {
89 | Name "Caster"
90 | Tags { "LightMode" = "ShadowCaster" }
91 | Offset 1, 1
92 |
93 | Fog {Mode Off}
94 | ZWrite On ZTest LEqual Cull Off
95 |
96 | CGPROGRAM
97 | #pragma vertex vert
98 | #pragma fragment frag
99 | #pragma multi_compile_shadowcaster
100 | #include "UnityCG.cginc"
101 |
102 | struct v2f {
103 | V2F_SHADOW_CASTER;
104 | float2 uv : TEXCOORD1;
105 | float2 uv2 : TEXCOORD3;
106 | float alphaClip : TEXCOORD2;
107 | };
108 |
109 | uniform float4 _MainTex_ST;
110 | uniform float4 _OutlineTex_ST;
111 | float _OutlineWidth;
112 | float _FaceDilate;
113 | float _ScaleRatioA;
114 |
115 | v2f vert( appdata_base v )
116 | {
117 | v2f o;
118 | TRANSFER_SHADOW_CASTER(o)
119 | o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
120 | o.uv2 = TRANSFORM_TEX(v.texcoord, _OutlineTex);
121 | o.alphaClip = o.alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _FaceDilate * _ScaleRatioA) / 2;
122 | return o;
123 | }
124 |
125 | uniform sampler2D _MainTex;
126 |
127 | float4 frag(v2f i) : COLOR
128 | {
129 | fixed4 texcol = tex2D(_MainTex, i.uv).a;
130 | clip(texcol.a - i.alphaClip);
131 | SHADOW_CASTER_FRAGMENT(i)
132 | }
133 | ENDCG
134 | }
135 | }
136 |
137 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
138 | }
139 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 85187c2149c549c5b33f0cdb02836b17
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface.shader:
--------------------------------------------------------------------------------
1 | Shader "TextMeshPro/Distance Field (Surface)" {
2 |
3 | Properties {
4 | _FaceTex ("Fill Texture", 2D) = "white" {}
5 | _FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
6 | _FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
7 | [HDR]_FaceColor ("Fill Color", Color) = (1,1,1,1)
8 | _FaceDilate ("Face Dilate", Range(-1,1)) = 0
9 |
10 | [HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
11 | _OutlineTex ("Outline Texture", 2D) = "white" {}
12 | _OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
13 | _OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
14 | _OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
15 | _OutlineSoftness ("Outline Softness", Range(0,1)) = 0
16 |
17 | _Bevel ("Bevel", Range(0,1)) = 0.5
18 | _BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0
19 | _BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0
20 | _BevelClamp ("Bevel Clamp", Range(0,1)) = 0
21 | _BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
22 |
23 | _BumpMap ("Normalmap", 2D) = "bump" {}
24 | _BumpOutline ("Bump Outline", Range(0,1)) = 0.5
25 | _BumpFace ("Bump Face", Range(0,1)) = 0.5
26 |
27 | _ReflectFaceColor ("Face Color", Color) = (0,0,0,1)
28 | _ReflectOutlineColor ("Outline Color", Color) = (0,0,0,1)
29 | _Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
30 | _EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
31 | [HDR]_SpecColor ("Specular Color", Color) = (0,0,0,1)
32 |
33 | _FaceShininess ("Face Shininess", Range(0,1)) = 0
34 | _OutlineShininess ("Outline Shininess", Range(0,1)) = 0
35 |
36 | [HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
37 | _GlowOffset ("Offset", Range(-1,1)) = 0
38 | _GlowInner ("Inner", Range(0,1)) = 0.05
39 | _GlowOuter ("Outer", Range(0,1)) = 0.05
40 | _GlowPower ("Falloff", Range(1, 0)) = 0.75
41 |
42 | _WeightNormal ("Weight Normal", float) = 0
43 | _WeightBold ("Weight Bold", float) = 0.5
44 |
45 | // Should not be directly exposed to the user
46 | _ShaderFlags ("Flags", float) = 0
47 | _ScaleRatioA ("Scale RatioA", float) = 1
48 | _ScaleRatioB ("Scale RatioB", float) = 1
49 | _ScaleRatioC ("Scale RatioC", float) = 1
50 |
51 | _MainTex ("Font Atlas", 2D) = "white" {}
52 | _TextureWidth ("Texture Width", float) = 512
53 | _TextureHeight ("Texture Height", float) = 512
54 | _GradientScale ("Gradient Scale", float) = 5.0
55 | _ScaleX ("Scale X", float) = 1.0
56 | _ScaleY ("Scale Y", float) = 1.0
57 | _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
58 | _Sharpness ("Sharpness", Range(-1,1)) = 0
59 |
60 | _VertexOffsetX ("Vertex OffsetX", float) = 0
61 | _VertexOffsetY ("Vertex OffsetY", float) = 0
62 |
63 | _CullMode ("Cull Mode", Float) = 0
64 | //_MaskCoord ("Mask Coords", vector) = (0,0,0,0)
65 | //_MaskSoftness ("Mask Softness", float) = 0
66 | }
67 |
68 | SubShader {
69 |
70 | Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
71 |
72 | LOD 300
73 | Cull [_CullMode]
74 |
75 | CGPROGRAM
76 | #pragma surface PixShader BlinnPhong alpha:blend vertex:VertShader nolightmap nodirlightmap
77 | #pragma target 3.0
78 | #pragma shader_feature __ GLOW_ON
79 | #pragma glsl
80 |
81 | #include "TMPro_Properties.cginc"
82 | #include "TMPro.cginc"
83 |
84 | half _FaceShininess;
85 | half _OutlineShininess;
86 |
87 | struct Input
88 | {
89 | fixed4 color : COLOR;
90 | float2 uv_MainTex;
91 | float2 uv2_FaceTex;
92 | float2 uv2_OutlineTex;
93 | float2 param; // Weight, Scale
94 | float3 viewDirEnv;
95 | };
96 |
97 |
98 | #define BEVEL_ON 1
99 | #include "TMPro_Surface.cginc"
100 |
101 | ENDCG
102 |
103 | // Pass to render object as a shadow caster
104 | Pass
105 | {
106 | Name "Caster"
107 | Tags { "LightMode" = "ShadowCaster" }
108 | Offset 1, 1
109 |
110 | Fog {Mode Off}
111 | ZWrite On
112 | ZTest LEqual
113 | Cull Off
114 |
115 | CGPROGRAM
116 | #pragma vertex vert
117 | #pragma fragment frag
118 | #pragma multi_compile_shadowcaster
119 | #include "UnityCG.cginc"
120 |
121 | struct v2f {
122 | V2F_SHADOW_CASTER;
123 | float2 uv : TEXCOORD1;
124 | float2 uv2 : TEXCOORD3;
125 | float alphaClip : TEXCOORD2;
126 | };
127 |
128 | uniform float4 _MainTex_ST;
129 | uniform float4 _OutlineTex_ST;
130 | float _OutlineWidth;
131 | float _FaceDilate;
132 | float _ScaleRatioA;
133 |
134 | v2f vert( appdata_base v )
135 | {
136 | v2f o;
137 | TRANSFER_SHADOW_CASTER(o)
138 | o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
139 | o.uv2 = TRANSFORM_TEX(v.texcoord, _OutlineTex);
140 | o.alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _FaceDilate * _ScaleRatioA) / 2;
141 | return o;
142 | }
143 |
144 | uniform sampler2D _MainTex;
145 |
146 | float4 frag(v2f i) : COLOR
147 | {
148 | fixed4 texcol = tex2D(_MainTex, i.uv).a;
149 | clip(texcol.a - i.alphaClip);
150 | SHADOW_CASTER_FRAGMENT(i)
151 | }
152 | ENDCG
153 | }
154 | }
155 |
156 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
157 | }
158 |
159 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f7ada0af4f174f0694ca6a487b8f543d
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 68e6db2ebdc24f95958faec2be5558d6
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_Sprite.shader:
--------------------------------------------------------------------------------
1 | Shader "TextMeshPro/Sprite"
2 | {
3 | Properties
4 | {
5 | [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
6 | _Color ("Tint", Color) = (1,1,1,1)
7 |
8 | _StencilComp ("Stencil Comparison", Float) = 8
9 | _Stencil ("Stencil ID", Float) = 0
10 | _StencilOp ("Stencil Operation", Float) = 0
11 | _StencilWriteMask ("Stencil Write Mask", Float) = 255
12 | _StencilReadMask ("Stencil Read Mask", Float) = 255
13 |
14 | _CullMode ("Cull Mode", Float) = 0
15 | _ColorMask ("Color Mask", Float) = 15
16 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
17 |
18 | [Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
19 | }
20 |
21 | SubShader
22 | {
23 | Tags
24 | {
25 | "Queue"="Transparent"
26 | "IgnoreProjector"="True"
27 | "RenderType"="Transparent"
28 | "PreviewType"="Plane"
29 | "CanUseSpriteAtlas"="True"
30 | }
31 |
32 | Stencil
33 | {
34 | Ref [_Stencil]
35 | Comp [_StencilComp]
36 | Pass [_StencilOp]
37 | ReadMask [_StencilReadMask]
38 | WriteMask [_StencilWriteMask]
39 | }
40 |
41 | Cull [_CullMode]
42 | Lighting Off
43 | ZWrite Off
44 | ZTest [unity_GUIZTestMode]
45 | Blend SrcAlpha OneMinusSrcAlpha
46 | ColorMask [_ColorMask]
47 |
48 | Pass
49 | {
50 | Name "Default"
51 | CGPROGRAM
52 | #pragma vertex vert
53 | #pragma fragment frag
54 | #pragma target 2.0
55 |
56 | #include "UnityCG.cginc"
57 | #include "UnityUI.cginc"
58 |
59 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
60 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
61 |
62 | struct appdata_t
63 | {
64 | float4 vertex : POSITION;
65 | float4 color : COLOR;
66 | float2 texcoord : TEXCOORD0;
67 | UNITY_VERTEX_INPUT_INSTANCE_ID
68 | };
69 |
70 | struct v2f
71 | {
72 | float4 vertex : SV_POSITION;
73 | fixed4 color : COLOR;
74 | float2 texcoord : TEXCOORD0;
75 | float4 worldPosition : TEXCOORD1;
76 | UNITY_VERTEX_OUTPUT_STEREO
77 | };
78 |
79 | sampler2D _MainTex;
80 | fixed4 _Color;
81 | fixed4 _TextureSampleAdd;
82 | float4 _ClipRect;
83 | float4 _MainTex_ST;
84 |
85 | v2f vert(appdata_t v)
86 | {
87 | v2f OUT;
88 | UNITY_SETUP_INSTANCE_ID(v);
89 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
90 | OUT.worldPosition = v.vertex;
91 | OUT.vertex = UnityObjectToClipPos(OUT.worldPosition);
92 |
93 | OUT.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
94 |
95 | OUT.color = v.color * _Color;
96 | return OUT;
97 | }
98 |
99 | fixed4 frag(v2f IN) : SV_Target
100 | {
101 | half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
102 |
103 | #ifdef UNITY_UI_CLIP_RECT
104 | color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
105 | #endif
106 |
107 | #ifdef UNITY_UI_ALPHACLIP
108 | clip (color.a - 0.001);
109 | #endif
110 |
111 | return color;
112 | }
113 | ENDCG
114 | }
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_Sprite.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cf81c85f95fe47e1a27f6ae460cf182c
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMPro.cginc:
--------------------------------------------------------------------------------
1 | float2 UnpackUV(float uv)
2 | {
3 | float2 output;
4 | output.x = floor(uv / 4096);
5 | output.y = uv - 4096 * output.x;
6 |
7 | return output * 0.001953125;
8 | }
9 |
10 | fixed4 GetColor(half d, fixed4 faceColor, fixed4 outlineColor, half outline, half softness)
11 | {
12 | half faceAlpha = 1-saturate((d - outline * 0.5 + softness * 0.5) / (1.0 + softness));
13 | half outlineAlpha = saturate((d + outline * 0.5)) * sqrt(min(1.0, outline));
14 |
15 | faceColor.rgb *= faceColor.a;
16 | outlineColor.rgb *= outlineColor.a;
17 |
18 | faceColor = lerp(faceColor, outlineColor, outlineAlpha);
19 |
20 | faceColor *= faceAlpha;
21 |
22 | return faceColor;
23 | }
24 |
25 | float3 GetSurfaceNormal(float4 h, float bias)
26 | {
27 | bool raisedBevel = step(1, fmod(_ShaderFlags, 2));
28 |
29 | h += bias+_BevelOffset;
30 |
31 | float bevelWidth = max(.01, _OutlineWidth+_BevelWidth);
32 |
33 | // Track outline
34 | h -= .5;
35 | h /= bevelWidth;
36 | h = saturate(h+.5);
37 |
38 | if(raisedBevel) h = 1 - abs(h*2.0 - 1.0);
39 | h = lerp(h, sin(h*3.141592/2.0), _BevelRoundness);
40 | h = min(h, 1.0-_BevelClamp);
41 | h *= _Bevel * bevelWidth * _GradientScale * -2.0;
42 |
43 | float3 va = normalize(float3(1.0, 0.0, h.y - h.x));
44 | float3 vb = normalize(float3(0.0, -1.0, h.w - h.z));
45 |
46 | return cross(va, vb);
47 | }
48 |
49 | float3 GetSurfaceNormal(float2 uv, float bias, float3 delta)
50 | {
51 | // Read "height field"
52 | float4 h = {tex2D(_MainTex, uv - delta.xz).a,
53 | tex2D(_MainTex, uv + delta.xz).a,
54 | tex2D(_MainTex, uv - delta.zy).a,
55 | tex2D(_MainTex, uv + delta.zy).a};
56 |
57 | return GetSurfaceNormal(h, bias);
58 | }
59 |
60 | float3 GetSpecular(float3 n, float3 l)
61 | {
62 | float spec = pow(max(0.0, dot(n, l)), _Reflectivity);
63 | return _SpecularColor.rgb * spec * _SpecularPower;
64 | }
65 |
66 | float4 GetGlowColor(float d, float scale)
67 | {
68 | float glow = d - (_GlowOffset*_ScaleRatioB) * 0.5 * scale;
69 | float t = lerp(_GlowInner, (_GlowOuter * _ScaleRatioB), step(0.0, glow)) * 0.5 * scale;
70 | glow = saturate(abs(glow/(1.0 + t)));
71 | glow = 1.0-pow(glow, _GlowPower);
72 | glow *= sqrt(min(1.0, t)); // Fade off glow thinner than 1 screen pixel
73 | return float4(_GlowColor.rgb, saturate(_GlowColor.a * glow * 2));
74 | }
75 |
76 | float4 BlendARGB(float4 overlying, float4 underlying)
77 | {
78 | overlying.rgb *= overlying.a;
79 | underlying.rgb *= underlying.a;
80 | float3 blended = overlying.rgb + ((1-overlying.a)*underlying.rgb);
81 | float alpha = underlying.a + (1-underlying.a)*overlying.a;
82 | return float4(blended, alpha);
83 | }
84 |
85 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMPro.cginc.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 407bc68d299748449bbf7f48ee690f8d
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMPro_Mobile.cginc:
--------------------------------------------------------------------------------
1 | struct vertex_t {
2 | UNITY_VERTEX_INPUT_INSTANCE_ID
3 | float4 position : POSITION;
4 | float3 normal : NORMAL;
5 | float4 color : COLOR;
6 | float2 texcoord0 : TEXCOORD0;
7 | float2 texcoord1 : TEXCOORD1;
8 | };
9 |
10 | struct pixel_t {
11 | UNITY_VERTEX_INPUT_INSTANCE_ID
12 | UNITY_VERTEX_OUTPUT_STEREO
13 | float4 position : SV_POSITION;
14 | float4 faceColor : COLOR;
15 | float4 outlineColor : COLOR1;
16 | float4 texcoord0 : TEXCOORD0;
17 | float4 param : TEXCOORD1; // weight, scaleRatio
18 | float2 mask : TEXCOORD2;
19 | #if (UNDERLAY_ON || UNDERLAY_INNER)
20 | float4 texcoord2 : TEXCOORD3;
21 | float4 underlayColor : COLOR2;
22 | #endif
23 | };
24 |
25 | float4 SRGBToLinear(float4 rgba) {
26 | return float4(lerp(rgba.rgb / 12.92f, pow((rgba.rgb + 0.055f) / 1.055f, 2.4f), step(0.04045f, rgba.rgb)), rgba.a);
27 | }
28 |
29 | pixel_t VertShader(vertex_t input)
30 | {
31 | pixel_t output;
32 |
33 | UNITY_INITIALIZE_OUTPUT(pixel_t, output);
34 | UNITY_SETUP_INSTANCE_ID(input);
35 | UNITY_TRANSFER_INSTANCE_ID(input, output);
36 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
37 |
38 | float bold = step(input.texcoord1.y, 0);
39 |
40 | float4 vert = input.position;
41 | vert.x += _VertexOffsetX;
42 | vert.y += _VertexOffsetY;
43 |
44 | float4 vPosition = UnityObjectToClipPos(vert);
45 |
46 | float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
47 | weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
48 |
49 | // Generate UV for the Masking Texture
50 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
51 | float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
52 |
53 | float4 color = input.color;
54 | #if (FORCE_LINEAR && !UNITY_COLORSPACE_GAMMA)
55 | color = SRGBToLinear(input.color);
56 | #endif
57 |
58 | float opacity = color.a;
59 | #if (UNDERLAY_ON | UNDERLAY_INNER)
60 | opacity = 1.0;
61 | #endif
62 |
63 | float4 faceColor = float4(color.rgb, opacity) * _FaceColor;
64 | faceColor.rgb *= faceColor.a;
65 |
66 | float4 outlineColor = _OutlineColor;
67 | outlineColor.a *= opacity;
68 | outlineColor.rgb *= outlineColor.a;
69 |
70 | output.position = vPosition;
71 | output.faceColor = faceColor;
72 | output.outlineColor = outlineColor;
73 | output.texcoord0 = float4(input.texcoord0.xy, maskUV.xy);
74 | output.param = float4(0.5 - weight, 1.3333 * _GradientScale * (_Sharpness + 1) / _TextureWidth, _OutlineWidth * _ScaleRatioA * 0.5, 0);
75 |
76 | float2 mask = float2(0, 0);
77 | #if UNITY_UI_CLIP_RECT
78 | mask = vert.xy * 2 - clampedRect.xy - clampedRect.zw;
79 | #endif
80 | output.mask = mask;
81 |
82 | #if (UNDERLAY_ON || UNDERLAY_INNER)
83 | float4 underlayColor = _UnderlayColor;
84 | underlayColor.rgb *= underlayColor.a;
85 |
86 | float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
87 | float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
88 |
89 | output.texcoord2 = float4(input.texcoord0 + float2(x, y), input.color.a, 0);
90 | output.underlayColor = underlayColor;
91 | #endif
92 |
93 | return output;
94 | }
95 |
96 | float4 PixShader(pixel_t input) : SV_Target
97 | {
98 | UNITY_SETUP_INSTANCE_ID(input);
99 |
100 | float d = tex2D(_MainTex, input.texcoord0.xy).a;
101 |
102 | float2 UV = input.texcoord0.xy;
103 | float scale = rsqrt(abs(ddx(UV.x) * ddy(UV.y) - ddy(UV.x) * ddx(UV.y))) * input.param.y;
104 |
105 | #if (UNDERLAY_ON | UNDERLAY_INNER)
106 | float layerScale = scale;
107 | layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
108 | float layerBias = input.param.x * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
109 | #endif
110 |
111 | scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
112 |
113 | float4 faceColor = input.faceColor * saturate((d - input.param.x) * scale + 0.5);
114 |
115 | #ifdef OUTLINE_ON
116 | float4 outlineColor = lerp(input.faceColor, input.outlineColor, sqrt(min(1.0, input.param.z * scale * 2)));
117 | faceColor = lerp(outlineColor, input.faceColor, saturate((d - input.param.x - input.param.z) * scale + 0.5));
118 | faceColor *= saturate((d - input.param.x + input.param.z) * scale + 0.5);
119 | #endif
120 |
121 | #if UNDERLAY_ON
122 | d = tex2D(_MainTex, input.texcoord2.xy).a * layerScale;
123 | faceColor += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - layerBias) * (1 - faceColor.a);
124 | #endif
125 |
126 | #if UNDERLAY_INNER
127 | float bias = input.param.x * scale - 0.5;
128 | float sd = saturate(d * scale - bias - input.param.z);
129 | d = tex2D(_MainTex, input.texcoord2.xy).a * layerScale;
130 | faceColor += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - layerBias)) * sd * (1 - faceColor.a);
131 | #endif
132 |
133 | #ifdef MASKING
134 | float a = abs(_MaskInverse - tex2D(_MaskTex, input.texcoord0.zw).a);
135 | float t = a + (1 - _MaskWipeControl) * _MaskEdgeSoftness - _MaskWipeControl;
136 | a = saturate(t / _MaskEdgeSoftness);
137 | faceColor.rgb = lerp(_MaskEdgeColor.rgb * faceColor.a, faceColor.rgb, a);
138 | faceColor *= a;
139 | #endif
140 |
141 | // Alternative implementation to UnityGet2DClipping with support for softness
142 | #if UNITY_UI_CLIP_RECT
143 | float2 maskZW = 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + (1 / scale));
144 | float2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * maskZW);
145 | faceColor *= m.x * m.y;
146 | #endif
147 |
148 | #if (UNDERLAY_ON | UNDERLAY_INNER)
149 | faceColor *= input.texcoord2.z;
150 | #endif
151 |
152 | #if UNITY_UI_ALPHACLIP
153 | clip(faceColor.a - 0.001);
154 | #endif
155 |
156 | return faceColor;
157 | }
158 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMPro_Mobile.cginc.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c334973cef89a9840b0b0c507e0377ab
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc:
--------------------------------------------------------------------------------
1 | // UI Editable properties
2 | uniform sampler2D _FaceTex; // Alpha : Signed Distance
3 | uniform float _FaceUVSpeedX;
4 | uniform float _FaceUVSpeedY;
5 | uniform fixed4 _FaceColor; // RGBA : Color + Opacity
6 | uniform float _FaceDilate; // v[ 0, 1]
7 | uniform float _OutlineSoftness; // v[ 0, 1]
8 |
9 | uniform sampler2D _OutlineTex; // RGBA : Color + Opacity
10 | uniform float _OutlineUVSpeedX;
11 | uniform float _OutlineUVSpeedY;
12 | uniform fixed4 _OutlineColor; // RGBA : Color + Opacity
13 | uniform float _OutlineWidth; // v[ 0, 1]
14 |
15 | uniform float _Bevel; // v[ 0, 1]
16 | uniform float _BevelOffset; // v[-1, 1]
17 | uniform float _BevelWidth; // v[-1, 1]
18 | uniform float _BevelClamp; // v[ 0, 1]
19 | uniform float _BevelRoundness; // v[ 0, 1]
20 |
21 | uniform sampler2D _BumpMap; // Normal map
22 | uniform float _BumpOutline; // v[ 0, 1]
23 | uniform float _BumpFace; // v[ 0, 1]
24 |
25 | uniform samplerCUBE _Cube; // Cube / sphere map
26 | uniform fixed4 _ReflectFaceColor; // RGB intensity
27 | uniform fixed4 _ReflectOutlineColor;
28 | //uniform float _EnvTiltX; // v[-1, 1]
29 | //uniform float _EnvTiltY; // v[-1, 1]
30 | uniform float3 _EnvMatrixRotation;
31 | uniform float4x4 _EnvMatrix;
32 |
33 | uniform fixed4 _SpecularColor; // RGB intensity
34 | uniform float _LightAngle; // v[ 0,Tau]
35 | uniform float _SpecularPower; // v[ 0, 1]
36 | uniform float _Reflectivity; // v[ 5, 15]
37 | uniform float _Diffuse; // v[ 0, 1]
38 | uniform float _Ambient; // v[ 0, 1]
39 |
40 | uniform fixed4 _UnderlayColor; // RGBA : Color + Opacity
41 | uniform float _UnderlayOffsetX; // v[-1, 1]
42 | uniform float _UnderlayOffsetY; // v[-1, 1]
43 | uniform float _UnderlayDilate; // v[-1, 1]
44 | uniform float _UnderlaySoftness; // v[ 0, 1]
45 |
46 | uniform fixed4 _GlowColor; // RGBA : Color + Intesity
47 | uniform float _GlowOffset; // v[-1, 1]
48 | uniform float _GlowOuter; // v[ 0, 1]
49 | uniform float _GlowInner; // v[ 0, 1]
50 | uniform float _GlowPower; // v[ 1, 1/(1+4*4)]
51 |
52 | // API Editable properties
53 | uniform float _ShaderFlags;
54 | uniform float _WeightNormal;
55 | uniform float _WeightBold;
56 |
57 | uniform float _ScaleRatioA;
58 | uniform float _ScaleRatioB;
59 | uniform float _ScaleRatioC;
60 |
61 | uniform float _VertexOffsetX;
62 | uniform float _VertexOffsetY;
63 |
64 | //uniform float _UseClipRect;
65 | uniform float _MaskID;
66 | uniform sampler2D _MaskTex;
67 | uniform float4 _MaskCoord;
68 | uniform float4 _ClipRect; // bottom left(x,y) : top right(z,w)
69 | //uniform float _MaskWipeControl;
70 | //uniform float _MaskEdgeSoftness;
71 | //uniform fixed4 _MaskEdgeColor;
72 | //uniform bool _MaskInverse;
73 |
74 | uniform float _MaskSoftnessX;
75 | uniform float _MaskSoftnessY;
76 |
77 | // Font Atlas properties
78 | uniform sampler2D _MainTex;
79 | uniform float _TextureWidth;
80 | uniform float _TextureHeight;
81 | uniform float _GradientScale;
82 | uniform float _ScaleX;
83 | uniform float _ScaleY;
84 | uniform float _PerspectiveFilter;
85 | uniform float _Sharpness;
86 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3997e2241185407d80309a82f9148466
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMPro_Surface.cginc:
--------------------------------------------------------------------------------
1 | void VertShader(inout appdata_full v, out Input data)
2 | {
3 | v.vertex.x += _VertexOffsetX;
4 | v.vertex.y += _VertexOffsetY;
5 |
6 | UNITY_INITIALIZE_OUTPUT(Input, data);
7 |
8 | float bold = step(v.texcoord1.y, 0);
9 |
10 | // Generate normal for backface
11 | float3 view = ObjSpaceViewDir(v.vertex);
12 | v.normal *= sign(dot(v.normal, view));
13 |
14 | #if USE_DERIVATIVE
15 | data.param.y = 1;
16 | #else
17 | float4 vert = v.vertex;
18 | float4 vPosition = UnityObjectToClipPos(vert);
19 | float2 pixelSize = vPosition.w;
20 |
21 | pixelSize /= float2(_ScaleX, _ScaleY) * mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy);
22 | float scale = rsqrt(dot(pixelSize, pixelSize));
23 | scale *= abs(v.texcoord1.y) * _GradientScale * (_Sharpness + 1);
24 | scale = lerp(scale * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(v.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
25 | data.param.y = scale;
26 | #endif
27 |
28 | data.param.x = (lerp(_WeightNormal, _WeightBold, bold) / 4.0 + _FaceDilate) * _ScaleRatioA * 0.5; //
29 |
30 | v.texcoord1.xy = UnpackUV(v.texcoord1.x);
31 | data.viewDirEnv = mul((float3x3)_EnvMatrix, WorldSpaceViewDir(v.vertex));
32 | }
33 |
34 | void PixShader(Input input, inout SurfaceOutput o)
35 | {
36 |
37 | #if USE_DERIVATIVE
38 | float2 pixelSize = float2(ddx(input.uv_MainTex.y), ddy(input.uv_MainTex.y));
39 | pixelSize *= _TextureWidth * .75;
40 | float scale = rsqrt(dot(pixelSize, pixelSize)) * _GradientScale * (_Sharpness + 1);
41 | #else
42 | float scale = input.param.y;
43 | #endif
44 |
45 | // Signed distance
46 | float c = tex2D(_MainTex, input.uv_MainTex).a;
47 | float sd = (.5 - c - input.param.x) * scale + .5;
48 | float outline = _OutlineWidth*_ScaleRatioA * scale;
49 | float softness = _OutlineSoftness*_ScaleRatioA * scale;
50 |
51 | // Color & Alpha
52 | float4 faceColor = _FaceColor;
53 | float4 outlineColor = _OutlineColor;
54 | faceColor *= input.color;
55 | outlineColor.a *= input.color.a;
56 | faceColor *= tex2D(_FaceTex, float2(input.uv2_FaceTex.x + _FaceUVSpeedX * _Time.y, input.uv2_FaceTex.y + _FaceUVSpeedY * _Time.y));
57 | outlineColor *= tex2D(_OutlineTex, float2(input.uv2_OutlineTex.x + _OutlineUVSpeedX * _Time.y, input.uv2_OutlineTex.y + _OutlineUVSpeedY * _Time.y));
58 | faceColor = GetColor(sd, faceColor, outlineColor, outline, softness);
59 | faceColor.rgb /= max(faceColor.a, 0.0001);
60 |
61 | #if BEVEL_ON
62 | float3 delta = float3(1.0 / _TextureWidth, 1.0 / _TextureHeight, 0.0);
63 |
64 | float4 smp4x = {tex2D(_MainTex, input.uv_MainTex - delta.xz).a,
65 | tex2D(_MainTex, input.uv_MainTex + delta.xz).a,
66 | tex2D(_MainTex, input.uv_MainTex - delta.zy).a,
67 | tex2D(_MainTex, input.uv_MainTex + delta.zy).a };
68 |
69 | // Face Normal
70 | float3 n = GetSurfaceNormal(smp4x, input.param.x);
71 |
72 | // Bumpmap
73 | float3 bump = UnpackNormal(tex2D(_BumpMap, input.uv2_FaceTex.xy)).xyz;
74 | bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5));
75 | bump = lerp(float3(0, 0, 1), bump, faceColor.a);
76 | n = normalize(n - bump);
77 |
78 | // Cubemap reflection
79 | fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDirEnv, mul((float3x3)unity_ObjectToWorld, n)));
80 | float3 emission = reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a;
81 | #else
82 | float3 n = float3(0, 0, -1);
83 | float3 emission = float3(0, 0, 0);
84 | #endif
85 |
86 | #if GLOW_ON
87 | float4 glowColor = GetGlowColor(sd, scale);
88 | glowColor.a *= input.color.a;
89 | emission += glowColor.rgb*glowColor.a;
90 | faceColor = BlendARGB(glowColor, faceColor);
91 | faceColor.rgb /= max(faceColor.a, 0.0001);
92 | #endif
93 |
94 | // Set Standard output structure
95 | o.Albedo = faceColor.rgb;
96 | o.Normal = -n;
97 | o.Emission = emission;
98 | o.Specular = lerp(_FaceShininess, _OutlineShininess, saturate(sd + outline * 0.5));
99 | o.Gloss = 1;
100 | o.Alpha = faceColor.a;
101 | }
102 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMPro_Surface.cginc.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d930090c0cd643c7b55f19a38538c162
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/UnityDefaultRuntimeTheme.tss:
--------------------------------------------------------------------------------
1 | @import url("unity-theme://default");
2 | VisualElement {}
--------------------------------------------------------------------------------
/Assets/UnityDefaultRuntimeTheme.tss.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 82bbbed180365914bb2994a48e4e376f
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 12388, guid: 0000000000000000e000000000000000, type: 0}
11 | disableValidation: 0
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ae4253576f077394ca3780ad7abe3f93
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 42b2867615325cd4881b2350ee9de3c1
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2de1c9c7b91f8fb4bb7a7589b0dd0eed
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/ButtonActionCommands.cs:
--------------------------------------------------------------------------------
1 | namespace Tutorial.PatternCombo
2 | {
3 | ///
4 | /// Contains concrete implementations of IGameplayActionCommand for button actions.
5 | /// Each command encapsulates a specific action triggered by player input, which can be executed in-game.
6 | ///
7 | /// These commands form the building blocks for the game's input system and are used to map player
8 | /// inputs to their corresponding actions. This modular approach facilitates flexible input rebinding
9 | /// and ease of extending the game with additional actions or behaviours.
10 | ///
11 | /// By injecting dependencies (like e.g., playerCharacter below), we allow for greater flexibility and
12 | /// testability of our command objects. This follows the Command pattern, which helps in
13 | /// queuing, logging actions, and undo operations.
14 | ///
15 | public class DPadUpActionCommand : IGameplayActionCommand
16 | {
17 | // Example: Injecting a PlayerCharacter dependency
18 | // private PlayerCharacter _playerCharacter;
19 |
20 | // Example: Constructor with PlayerCharacter parameter
21 | // public DPadUpActionCommand(PlayerCharacter playerCharacter)
22 | // {
23 | // _playerCharacter = playerCharacter;
24 | // }
25 |
26 | public void ExecuteAction()
27 | {
28 | // Example: Actual game logic for the character jump
29 | // _playerCharacter.Jump();
30 | }
31 | }
32 |
33 | public class DPadDownActionCommand : IGameplayActionCommand
34 | {
35 | public void ExecuteAction()
36 | {
37 | //...
38 | }
39 | }
40 |
41 | public class DPadLeftActionCommand : IGameplayActionCommand
42 | {
43 | public void ExecuteAction()
44 | {
45 | //...
46 | }
47 | }
48 |
49 | public class DPadRightActionCommand : IGameplayActionCommand
50 | {
51 | public void ExecuteAction()
52 | {
53 | //...
54 | }
55 | }
56 |
57 | public class XButtonActionCommand : IGameplayActionCommand
58 | {
59 | public void ExecuteAction()
60 | {
61 | //...
62 | }
63 | }
64 |
65 | public class YButtonActionCommand : IGameplayActionCommand
66 | {
67 | public void ExecuteAction()
68 | {
69 | //...
70 | }
71 | }
72 |
73 | public class AButtonActionCommand : IGameplayActionCommand
74 | {
75 | public void ExecuteAction()
76 | {
77 | //...
78 | }
79 | }
80 |
81 | public class BButtonActionCommand : IGameplayActionCommand
82 | {
83 | public void ExecuteAction()
84 | {
85 | //...
86 | }
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/ButtonActionCommands.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5d42c4c591c62cf47b6efce9d12a27a4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/ButtonActionController.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using Tutorial.PatternCombo;
4 | using UnityEngine;
5 |
6 | namespace Tutorial.PatternCombo
7 | {
8 | ///
9 | /// Maps player's game input to specific gameplay action commands.
10 | ///
11 | /// This class listens for button press events and translates them into corresponding action commands.
12 | /// These commands are then queued for potential combination with other actions to form complex commands, like combos.
13 | ///
14 | /// By using the Command pattern, this controller decouples the button press events from the action execution,
15 | /// allowing for flexible command management and potential extension of the input system.
16 | ///
17 | public class ButtonActionController : MonoBehaviour
18 | {
19 | private SideFighterControls _gameplayControls;
20 | private GameplayActionCommandInvoker _actionInvoker;
21 | private ComboActionQueueManager _queueManager;
22 |
23 | ///
24 | /// Initializes the controller with the necessary dependencies for action command processing.
25 | ///
26 | /// The controls setup for the game.
27 | /// The invoker responsible for command execution.
28 | /// The manager handling the command queue for combos.
29 |
30 | public void Initialize(SideFighterControls gameplayControls, GameplayActionCommandInvoker invoker,
31 | ComboActionQueueManager queueManager)
32 | {
33 | _gameplayControls = gameplayControls;
34 | _actionInvoker = invoker;
35 | _queueManager = queueManager;
36 | SetupActions();
37 | }
38 |
39 | // Registers button press event handlers that create and process action commands.
40 | private void SetupActions()
41 | {
42 | _gameplayControls.gameplay.x.performed += ctx => HandleXButtonActionCommand();
43 | _gameplayControls.gameplay.y.performed += ctx => HandleYButtonActionCommand();
44 | _gameplayControls.gameplay.a.performed += ctx => HandleAButtonActionCommand();
45 | _gameplayControls.gameplay.b.performed += ctx => HandleBButtonActionCommand();
46 | }
47 |
48 | // Below are handlers for each button press. They create a new command instance specific to the button,
49 | // add it to the combo sequence, and then execute the command.
50 | private void HandleXButtonActionCommand()
51 | {
52 | var xButtonCommand = new XButtonActionCommand();
53 | AddToComboSequence(xButtonCommand);
54 | ExecuteActionCommand(xButtonCommand);
55 | }
56 |
57 | private void HandleYButtonActionCommand()
58 | {
59 | var yButtonCommand = new YButtonActionCommand();
60 | AddToComboSequence(yButtonCommand);
61 | ExecuteActionCommand(yButtonCommand);
62 | }
63 |
64 | private void HandleAButtonActionCommand()
65 | {
66 | var aButtonCommand = new AButtonActionCommand();
67 | AddToComboSequence(aButtonCommand);
68 | ExecuteActionCommand(aButtonCommand);
69 | }
70 |
71 | private void HandleBButtonActionCommand()
72 | {
73 | var bButtonCommand = new BButtonActionCommand();
74 | AddToComboSequence(bButtonCommand);
75 | ExecuteActionCommand(bButtonCommand);
76 | }
77 |
78 |
79 | // Adds the given command to the sequence being tracked for combo possibilities.
80 | private void AddToComboSequence(IGameplayActionCommand command)
81 | {
82 | _queueManager.AddCommandToComboSequence(command);
83 | }
84 |
85 | private void ExecuteActionCommand(IGameplayActionCommand command)
86 | {
87 | _actionInvoker.ExecuteCommand(command);
88 | }
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/ButtonActionController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 261d2c255a516fd42abbf33a33e14ccb
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/ComboActionCommandFactory.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | namespace Tutorial.PatternCombo
3 | {
4 | ///
5 | /// ***Factory class*** for creating combo-related gameplay action command objects.
6 | ///
7 | /// This encapsulates the object creation process, allowing for easy addition
8 | /// and management of new gameplay action commands. By using a factory, we keep our
9 | /// system flexible and scalable, following the Open/Closed principle where the system
10 | /// is open for extension but closed for modification.
11 | ///
12 | public class ComboActionCommandFactory : MonoBehaviour
13 | {
14 | public IGameplayActionCommand CreateDashAttackCommand()
15 | {
16 | return new DashAttackActionCommand();
17 | }
18 |
19 | public IGameplayActionCommand CreateJumpKickCommand()
20 | {
21 | return new JumpKickActionCommand();
22 | }
23 |
24 | // Example of how to extend the factory with a new command:
25 | // public IGameplayActionCommand CreateSlideAttackCommand()
26 | // {
27 | // return new SlideAttackActionCommand();
28 | // }
29 | }
30 | }
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/ComboActionCommandFactory.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e8574ddd19ba1d24cbda4f009c1886f5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/ComboActionCommands.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System;
3 |
4 | namespace Tutorial.PatternCombo
5 | {
6 | ///
7 | /// The action command for executing a dash attack combo.
8 | /// Utilizes the ***Observer Pattern*** to notify observers (e.g. ComboDisplayCommandHandler) when a combo is executed.
9 | ///
10 | public class DashAttackActionCommand : IGameplayActionCommand
11 | {
12 | public void ExecuteAction()
13 | {
14 | Debug.Log("Dash Attack Combo Executed");
15 | DashAttackComboEvent.Raise();
16 | }
17 | }
18 |
19 | ///
20 | /// Event class for dash attack combo. Used to notify when the dash attack combo is executed.
21 | ///
22 | public static class DashAttackComboEvent
23 | {
24 | public static event Action OnDashAttackCombo;
25 |
26 | public static void Raise()
27 | {
28 | OnDashAttackCombo?.Invoke();
29 | }
30 | }
31 |
32 | public class JumpKickActionCommand : IGameplayActionCommand
33 | {
34 | public void ExecuteAction()
35 | {
36 | Debug.Log("Jump-Kick Combo Executed");
37 | JumpKickComboEvent.Raise();
38 | }
39 | }
40 |
41 | public static class JumpKickComboEvent
42 | {
43 | public static Action OnJumpKickCombo;
44 | public static void Raise()
45 | {
46 | OnJumpKickCombo?.Invoke();
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/ComboActionCommands.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e812f757b8e924f4baeb94b6e7cb7a29
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/ComboActionQueueManager.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using UnityEngine;
3 |
4 | namespace Tutorial.PatternCombo
5 | {
6 | ///
7 | /// Manages a command queue for executing combos, interfacing closely with ComboMatchEngine.
8 | /// Mimics a traditional fighting game's input buffer, handling command sequences within a dynamic time window for combos.
9 | ///
10 | public class ComboActionQueueManager: MonoBehaviour
11 | {
12 | [SerializeField]
13 | private ComboActionCommandFactory _comboActionCommandFactory;
14 | [SerializeField]
15 | private float _maxTimeForComboExecution = 0.5f;
16 | [SerializeField]
17 | private float _minimumTimeBetweenComboInputs = 0.5f;
18 | [SerializeField]
19 | private float _comboTimeAddedWithNewCommand = 0.5f;
20 | [SerializeField]
21 | private int _maxComboLengthBeforeTrim = 6;
22 |
23 | private float _timeSinceLastComboInput;
24 | private float _timeSinceFirstComboInput;
25 | private Queue _comboSequence;
26 | private ComboMatchEngine _comboMatchEngine;
27 | private int _minimumComboLength = 2;
28 | private int _thresholdToExtendComboTime;
29 |
30 | private void Awake()
31 | {
32 | _comboSequence = new Queue();
33 | _comboMatchEngine = new ComboMatchEngine(this, _comboActionCommandFactory, _minimumComboLength);
34 | }
35 |
36 | private void Update()
37 | {
38 | ProcessComboUpdate(Time.deltaTime);
39 | }
40 |
41 | // Continuously updates the combo timer, ensuring that combos are time-sensitive.
42 | private void ProcessComboUpdate(float deltaTime)
43 | {
44 | if (_comboSequence.Count == 0) return;
45 |
46 | _timeSinceFirstComboInput += deltaTime;
47 | _timeSinceLastComboInput += deltaTime;
48 |
49 | if (_timeSinceFirstComboInput > _maxTimeForComboExecution)
50 | {
51 | ClearComboSequence();
52 | }
53 | }
54 |
55 | // Queues a new command, evaluating its potential to form a combo based on timing and sequence.
56 | public void AddCommandToComboSequence(IGameplayActionCommand command)
57 | {
58 | ClearSequenceIfCannotStartCombo();
59 | DequeueOldestCommandIfNecessary();
60 |
61 | if (IsTooLateForCombo())
62 | {
63 | ClearComboSequence();
64 | return;
65 | }
66 |
67 | if (ShouldExtendComboTime())
68 | {
69 | _timeSinceFirstComboInput -= _comboTimeAddedWithNewCommand;
70 | }
71 |
72 | EnqueueCommandAndResetTimers(command);
73 | _comboMatchEngine.CheckAndExecuteCombo();
74 | }
75 |
76 | // Clears the command sequence if the current state does not permit a combo to start.
77 | // This preemptive check eases the processing load on the ComboMatchEngine by ensuring it only considers viable sequences,
78 | // which streamlines the combo detection process.
79 | private void ClearSequenceIfCannotStartCombo()
80 | {
81 | if (_comboSequence.Count > 0 && !_comboMatchEngine.CanStartCombo(_comboSequence))
82 | {
83 | ClearComboSequence();
84 | return;
85 | }
86 | }
87 |
88 | // Manages the queue size to prevent overflow and maintain a focus on recent player inputs
89 | // again, reducing the load on the match engine
90 | private void DequeueOldestCommandIfNecessary()
91 | {
92 | if (_comboSequence.Count >= _maxComboLengthBeforeTrim)
93 | {
94 | _comboSequence.Dequeue();
95 | }
96 | }
97 |
98 | // Determines if the timing between the latest command and the previous one is too delayed to count towards a combo.
99 | // This enforces a strict timing window for input commands. The check prevents the accidental execution of combos due to delayed
100 | // inputs and maintains the right rhythm and feel of combo execution.
101 | private bool IsTooLateForCombo()
102 | {
103 | if (_timeSinceLastComboInput < _minimumTimeBetweenComboInputs)
104 | {
105 | return false;
106 | }
107 | return true;
108 | }
109 |
110 | // Enqueues a command and restarts the timers, anchoring the combo sequence to the most recent action.
111 | private void EnqueueCommandAndResetTimers(IGameplayActionCommand command)
112 | {
113 | _comboSequence.Enqueue(command);
114 |
115 | if (IsFirstCommandInSequence())
116 | {
117 | _timeSinceFirstComboInput = 0;
118 | }
119 |
120 | _timeSinceLastComboInput = 0;
121 | }
122 |
123 | // Determines if we are at the beginning of a potential combo, setting the stage for a new sequence of actions,
124 | // this decision point is critical for combo initiation and continuity.
125 | private bool IsFirstCommandInSequence()
126 | {
127 | return _comboSequence.Count == 1;
128 | }
129 |
130 | ///
131 | /// Currently, we always extend the combo time with each new combo-valid input command.
132 | ///
133 | /// This method can be adjusted to add more nuanced control over how and when
134 | /// the combo time window is extended, such as based on the type of command.
135 | /// This allows for fine-tuning the responsiveness of the combo system to achieve the desired gameplay feel.
136 | ///
137 | /// For example, you could pass in the command like ShouldExtendComboTime(IGameplayActionCommand command)
138 | /// giving certain commands a stronger window extension by using the strategy pattern with the command.
139 | ///
140 | private bool ShouldExtendComboTime()
141 | {
142 | return _comboSequence.Count >= _thresholdToExtendComboTime;
143 | }
144 |
145 | public Queue GetComboSequence()
146 | {
147 | return _comboSequence;
148 | }
149 |
150 | // Invoked at times when player didn't complete or start a combo--reset and wait for the next sequence of button presses
151 | public void ClearComboSequence()
152 | {
153 | _comboSequence.Clear();
154 | _timeSinceFirstComboInput = 0;
155 | _timeSinceLastComboInput = 0;
156 | }
157 | }
158 | }
159 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/ComboActionQueueManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f17082e8a125ae445a77d8198d4e7878
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/ComboMatchEngine.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using UnityEngine;
4 |
5 | namespace Tutorial.PatternCombo
6 | {
7 | ///
8 | /// Implements the ***Strategy Pattern*** to check and execute combo moves within an action/fighting game.
9 | /// This engine is the central hub for managing the detection of combo sequences and triggering the appropriate combo actions.
10 | ///
11 | /// Responsibilities include:
12 | /// - Checking if a sequence of actions constitutes a valid combo.
13 | /// - Executing the resulting combo action if a valid combo is detected.
14 | ///
15 | /// It serves as an orchestrator, interacting with the ComboActionQueueManager and the ComboActionCommandFactory
16 | /// to determine if the player's input sequence matches predefined combo patterns, thus allowing for dynamic
17 | /// and flexible combo detection.
18 | ///
19 | public class ComboMatchEngine
20 | {
21 | private ComboActionQueueManager _actionQueueManager;
22 | private ComboActionCommandFactory _comboActionCommandFactory;
23 | private List _comboRules;
24 | private int _minimumComboLength;
25 |
26 | ///
27 | /// Initializes a new instance of the ComboMatchEngine class, setting up the infrastructure needed
28 | /// for combo detection and execution.
29 | ///
30 | /// The action queue manager that handles the sequences of commands.
31 | /// The factory responsible for creating specific combo commands.
32 | /// The minimum length of a command sequence to be considered a combo.
33 | public ComboMatchEngine(ComboActionQueueManager manager, ComboActionCommandFactory actionCommandFactory, int minimumComboLength)
34 | {
35 | _actionQueueManager = manager;
36 | _comboActionCommandFactory = actionCommandFactory;
37 | _minimumComboLength = minimumComboLength;
38 | InitializeComboRules();
39 | }
40 |
41 | private void InitializeComboRules()
42 | {
43 | // Define the specific combo rules that this engine will recognize.
44 | // This setup allows for easy extension of the game's combo system by adding new rules.
45 | _comboRules = new List()
46 | {
47 | new ComboXXY(_comboActionCommandFactory),
48 | new ComboUpB(_comboActionCommandFactory)
49 | };
50 | }
51 |
52 | // Determines if the current state of the combo sequence allows for a new combo to start.
53 | // This function serves as a gatekeeper, ensuring that the engine only processes sequences
54 | // that have the potential to form a valid combo, thus optimizing performance.
55 | // The "internal" access modifier restricts access to the current assembly, i.e. Tutorial.PatternCombo
56 | internal bool CanStartCombo(Queue comboSequence)
57 | {
58 | return DoesFirstActionStartCombo(comboSequence);
59 | }
60 |
61 | // Checks the current sequence for combos and executes the command if a valid combo is found.
62 | // This method is the core of the combo detection logic, tying together the sequence checking
63 | // and the command execution in one operation, centralizing the combo execution logic.
64 | public void CheckAndExecuteCombo()
65 | {
66 | var comboSequence = _actionQueueManager.GetComboSequence();
67 |
68 | // Optimize by only checking for a combo if the sequence meets the minimum length requirement.
69 | if (comboSequence.Count < _minimumComboLength) { return; }
70 |
71 | IGameplayActionCommand comboCommand = CheckSequenceForCombo(comboSequence);
72 |
73 | if (comboCommand != null)
74 | {
75 | ExecuteComboAction(comboCommand);
76 | ComboEventSystem.OnNewCombo.Invoke();
77 | _actionQueueManager.ClearComboSequence();
78 | }
79 | }
80 |
81 | // This method evaluates whether the first command in the sequence is the start of any defined combo.
82 | // It is crucial for early detection of potential combos, reducing unnecessary processing for sequences
83 | // that cannot form a valid combo, thereby optimizing the match-engine's performance.
84 | private bool DoesFirstActionStartCombo(Queue comboSequence)
85 | {
86 | foreach (var rule in _comboRules)
87 | {
88 | if (rule.IsFirstConditionMet(comboSequence.Peek()))
89 | {
90 | return true;
91 | }
92 | }
93 | return false;
94 | }
95 |
96 | // This is where the engine checks the action command sequence against each defined combo rule.
97 | // By examining subsequences, it ensures that combos can be detected at any point in the input stream,
98 | // providing flexibility and robustness to the combo detection mechanism.
99 | private IGameplayActionCommand CheckSequenceForCombo(Queue comboSequence)
100 | {
101 | // Iterates over the entire combo sequence to check for potential combos starting at each point.
102 | for (int startIndex = 0; startIndex <= comboSequence.Count; startIndex++)
103 | {
104 | var subsequence = GetSubsequence(comboSequence, startIndex);
105 |
106 | foreach (IComboRule rule in _comboRules)
107 | {
108 | if (rule.IsMatch(subsequence))
109 | {
110 | return rule.GetResultingComboCommand();
111 | }
112 | }
113 | }
114 | return null;
115 | }
116 |
117 | // Retrieves a subsequence from the given start index to the end of the command sequence.
118 | // The use of deferred execution via LINQ minimizes memory usage and increases efficiency,
119 | // as the subsequence is not immediately materialized into a new collection.
120 | private IEnumerable GetSubsequence(Queue comboSequence, int startIndex)
121 | {
122 | return comboSequence.Skip(startIndex);
123 | }
124 |
125 | // Once a combo is detected, this method is responsible for executing the associated action.
126 | // This might include animations, sound effects, or interactions with other game systems (e.g., scoring, hit detection).
127 | private void ExecuteComboAction(IGameplayActionCommand comboCommand)
128 | {
129 | comboCommand.ExecuteAction();
130 | }
131 | }
132 | }
133 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/ComboMatchEngine.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d92306f9492d28d438a21e903fa49b7f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/ComboUpB.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | namespace Tutorial.PatternCombo
4 | {
5 | ///
6 | /// Implements a combo rule that matches a specific sequence of commands for a "Up+B" combo.
7 | ///
8 | /// This class is part of the Strategy Pattern implementation for combo detection.
9 | /// By conforming to the IComboRule interface, it can be easily swapped with other rules,
10 | /// allowing for a flexible and expandable combo system.
11 | ///
12 | public class ComboUpB : IComboRule
13 | {
14 | private ComboActionCommandFactory _comboActionCommandFactory;
15 |
16 | public int ComboLength { get; private set; }
17 |
18 | public ComboUpB(ComboActionCommandFactory actionCommandFactory)
19 | {
20 | _comboActionCommandFactory = actionCommandFactory;
21 | ComboLength = 2;
22 | }
23 |
24 | public bool IsFirstConditionMet(IGameplayActionCommand firstCommand)
25 | {
26 | return firstCommand is DPadUpActionCommand;
27 | }
28 |
29 | public bool IsMatch(IEnumerable sequence)
30 | {
31 | // Convert the sequence to an array to facilitate direct indexing.
32 | // Materialize only the part of the sequence needed for this rule.
33 | var sequenceArray = sequence.Take(ComboLength).ToArray();
34 |
35 | // Early exit if the sequence is shorter than the number of commands in the combo.
36 | if (sequenceArray.Length < ComboLength)
37 | {
38 | return false;
39 | }
40 |
41 | // Assigning to local variables for clarity and to improve readability.
42 | var first = sequenceArray[0];
43 | var second = sequenceArray[1];
44 |
45 | // The combo is valid if the first command is Up and the second is B.
46 | return first is DPadUpActionCommand && second is BButtonActionCommand;
47 | }
48 |
49 | ///
50 | /// Produces the combo action command associated with the "Up+B" pattern.
51 | ///
52 | /// A new instance of a JumpKickActionCommand.
53 | public IGameplayActionCommand GetResultingComboCommand()
54 | {
55 | return _comboActionCommandFactory.CreateJumpKickCommand();
56 | }
57 | }
58 | }
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/ComboUpB.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5a84dfae5751bcd4d93e0579ec5f0546
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/ComboXXY.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | namespace Tutorial.PatternCombo
4 | {
5 | public class ComboXXY : IComboRule
6 | {
7 | private ComboActionCommandFactory _comboActionCommandFactory;
8 |
9 | public int ComboLength { get; private set; }
10 |
11 | public ComboXXY(ComboActionCommandFactory actionCommandFactory)
12 | {
13 | _comboActionCommandFactory = actionCommandFactory;
14 | ComboLength = 3;
15 | }
16 |
17 | public bool IsFirstConditionMet(IGameplayActionCommand firstCommand)
18 | {
19 | return firstCommand is XButtonActionCommand;
20 | }
21 |
22 | public bool IsMatch(IEnumerable sequence)
23 | {
24 | var sequenceArray = sequence.Take(ComboLength).ToArray();
25 |
26 | if (sequenceArray.Length < ComboLength)
27 | {
28 | return false;
29 | }
30 |
31 | var first = sequenceArray[0];
32 | var second = sequenceArray[1];
33 | var third = sequenceArray[2];
34 |
35 | return first is XButtonActionCommand && second is XButtonActionCommand && third is YButtonActionCommand;
36 | }
37 |
38 | public IGameplayActionCommand GetResultingComboCommand()
39 | {
40 | return _comboActionCommandFactory.CreateDashAttackCommand();
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/ComboXXY.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8338d5ddea0370c4b82043c35a762e7e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/DPadActionController.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using Tutorial.PatternCombo;
4 | using UnityEngine;
5 | namespace Tutorial.PatternCombo
6 | {
7 | public enum DPadDirection
8 | {
9 | None,
10 | Up,
11 | Down,
12 | Left,
13 | Right
14 | }
15 | ///
16 | /// Handles directional pad (D-Pad) inputs and converts them into gameplay actions.
17 | ///
18 | /// This class is responsible for translating D-Pad directions into corresponding
19 | /// commands. It is separated from button action handling to keep classes small
20 | /// and focused, allowing for a clearer and more maintainable codebase.
21 | ///
22 | /// The D-Pad often involves distinct logic compared to other buttons, such as continuous
23 | /// input or directional combinations, which are not necessary for the simpler
24 | /// button actions. Additionally, this separation provides flexibility in supporting
25 | /// controller configurations that may not include a D-Pad or use different input
26 | /// mechanisms for directional input.
27 | ///
28 | public class DPadActionController : MonoBehaviour
29 | {
30 | private SideFighterControls _gameplayControls;
31 | private GameplayActionCommandInvoker _invoker;
32 | private ComboActionQueueManager _queueManager;
33 |
34 | private Vector2 _move;
35 |
36 |
37 | private DPadDirection _currentDPadDirection = DPadDirection.None;
38 | public DPadDirection CurrentDPadDirection
39 | {
40 | get => _currentDPadDirection;
41 | }
42 |
43 | public void Initialize(SideFighterControls gameplayControls,
44 | GameplayActionCommandInvoker invoker,
45 | ComboActionQueueManager queueManager)
46 | {
47 | _gameplayControls = gameplayControls;
48 | _invoker = invoker;
49 | _queueManager = queueManager;
50 | }
51 |
52 | public void Update()
53 | {
54 | _move = _gameplayControls.gameplay.move.ReadValue();
55 | HandleDPad();
56 | }
57 |
58 | // Checks for changes in DPad direction and processes them
59 |
60 | private void HandleDPad()
61 | {
62 | DPadDirection newDirection = DetermineDirectionFromInput(_move);
63 | ProcessDirectionChange(newDirection);
64 | }
65 |
66 | private DPadDirection DetermineDirectionFromInput(Vector2 moveInput)
67 | {
68 | if (_move.y > 0.5f) return DPadDirection.Up;
69 | if (_move.y < -0.5f) return DPadDirection.Down;
70 | if (_move.x > 0.5f) return DPadDirection.Right;
71 | if (_move.x < -0.5f) return DPadDirection.Left;
72 |
73 | return DPadDirection.None;
74 | }
75 |
76 | // Handles the change in direction by disabling the previous direction and enabling the new one.
77 | private void ProcessDirectionChange(DPadDirection newDirection)
78 | {
79 | if (_currentDPadDirection != newDirection)
80 | {
81 | _currentDPadDirection = newDirection;
82 | EnableCurrentDPadDirection();
83 | }
84 | }
85 |
86 | // Enables the visuals and command of new DPad direction
87 | private void EnableCurrentDPadDirection()
88 | {
89 | IGameplayActionCommand command = CreateDPadCommand();
90 | if (command != null)
91 | {
92 | _queueManager.AddCommandToComboSequence(command);
93 | _invoker.ExecuteCommand(command);
94 | }
95 | }
96 |
97 | // Create a command based on the current DPad direction
98 | private IGameplayActionCommand CreateDPadCommand()
99 | {
100 | // Switch expression from C# 8.0, 2019
101 | return _currentDPadDirection switch
102 | {
103 | DPadDirection.Up => new DPadUpActionCommand(),
104 | DPadDirection.Down => new DPadDownActionCommand(),
105 | DPadDirection.Left => new DPadLeftActionCommand(),
106 | DPadDirection.Right => new DPadRightActionCommand(),
107 | _ => null
108 | };
109 | }
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/DPadActionController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: be2dc7e833adb164ea03db6b19d04241
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/GameplayActionCommandInvoker.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 |
4 | namespace Tutorial.PatternCombo
5 | {
6 | ///
7 | /// Invokes action commands implementing the IGameplayActionCommand interface.
8 | ///
9 | /// This class acts as a central hub for executing gameplay action commands, providing a
10 | /// consistent execution point for various gameplay actions initiated by the player. It is
11 | /// primarily utilized within the ButtonActionController to process and enact player input into
12 | /// actionable commands in the game environment.
13 | ///
14 | public class GameplayActionCommandInvoker
15 | {
16 | public void ExecuteCommand(IGameplayActionCommand command)
17 | {
18 | command.ExecuteAction();
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/GameplayActionCommandInvoker.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 29421891b9a56a24d9e03201a238af34
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/GameplayActionInitializer.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using UnityEngine;
3 | namespace Tutorial.PatternCombo
4 | {
5 | ///
6 | /// Sets up the entire gameplay action command system, translating player inputs into discrete game actions.
7 | /// It orchestrates the initialization of controllers and managers necessary for detecting and executing combos,
8 | /// following the ***Command pattern*** to encapsulate the actions such as moves, attacks, or special abilities.
9 | ///
10 | /// 'Action' in this context encompasses all gameplay-related commands that result from player inputs.
11 | ///
12 | public class GameplayActionInitializer : MonoBehaviour
13 | {
14 | [SerializeField]
15 | private ButtonActionController _buttonActionController;
16 |
17 | // Using 'field:' to explicitly serialize the backing field of the property
18 | [field: SerializeField]
19 | public DPadActionController DPadActionController { get; private set; }
20 |
21 | [SerializeField]
22 | private ComboActionQueueManager _comboActionQueueManager;
23 |
24 | // Encapsulating the controls for a typical "side fighter game," providing a single point of reference
25 | public SideFighterControls GameplayControls { get; private set; }
26 |
27 | // Responsible for invoking the gameplay actions based on commands issued
28 | private GameplayActionCommandInvoker _actionCommandInvoker;
29 |
30 | public void Awake()
31 | {
32 | GameplayControls = new SideFighterControls();
33 | InitializeCommandInvoker();
34 | InitializeGameplayActionControllers();
35 | }
36 |
37 | private void InitializeCommandInvoker()
38 | {
39 | _actionCommandInvoker = new GameplayActionCommandInvoker();
40 | }
41 |
42 | // Initializes the action controllers that manage input-to-action translation and command handling
43 | private void InitializeGameplayActionControllers()
44 | {
45 | _buttonActionController.Initialize(GameplayControls, _actionCommandInvoker, _comboActionQueueManager);
46 | DPadActionController.Initialize(GameplayControls, _actionCommandInvoker, _comboActionQueueManager);
47 | }
48 |
49 | private void OnEnable()
50 | {
51 | GameplayControls.Enable();
52 | }
53 |
54 | private void OnDisable()
55 | {
56 | GameplayControls.Disable();
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/GameplayActionInitializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3ae8ed0b010d73a4d86b10937b937674
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/IComboRule.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | namespace Tutorial.PatternCombo
4 | {
5 | ///
6 | /// Defines the contract for combo rules within the game. Implementations of this interface
7 | /// will specify the conditions for starting a combo, matching a complete combo sequence,
8 | /// and retrieving the command to execute when a combo is matched.
9 | ///
10 | /// This interface facilitates the ***Strategy Pattern*** by allowing the definition of various
11 | /// combo detection strategies that can be dynamically applied during gameplay.
12 | ///
13 | public interface IComboRule
14 | {
15 | ///
16 | /// Gets the length of the combo sequence required to match this rule.
17 | ///
18 | /// This property is used to quickly determine if the current sequence
19 | /// of commands has the potential to form a valid combo, thus optimizing
20 | /// the combo checking process. It is set internally within each combo
21 | /// rule implementation and is immutable, ensuring the integrity of the
22 | /// combo length throughout the game logic.
23 | ///
24 | public int ComboLength { get; }
25 |
26 | ///
27 | /// Determines if the first command in a sequence can potentially start a valid combo.
28 | /// This method is crucial for optimizing the combo detection process by quickly
29 | /// filtering out sequences that do not start with a valid initial command, thus
30 | /// reducing unnecessary processing.
31 | ///
32 | /// The first command in the sequence to check.
33 | /// True if the first command meets the starting condition for a combo; otherwise, false.
34 | public bool IsFirstConditionMet(IGameplayActionCommand firstCommand);
35 |
36 | ///
37 | /// Checks if a given sequence of commands matches the conditions defined by this rule to form a valid combo.
38 | /// This method encapsulates the logic for identifying complete combos, allowing for extensible and
39 | /// maintainable code when adding new combo patterns to the game.
40 | ///
41 | /// The sequence of gameplay action commands to check.
42 | /// True if the sequence matches the combo pattern; otherwise, false.
43 | public bool IsMatch(IEnumerable sequence);
44 |
45 | ///
46 | /// Retrieves the command that should be executed when the combo rule is successfully matched.
47 | /// This method provides a means of associating a specific gameplay effect with a combo,
48 | /// enabling a clear separation between the detection of combos and the execution of their
49 | /// corresponding actions.
50 | ///
51 | /// The gameplay action command associated with the matched combo.
52 | public IGameplayActionCommand GetResultingComboCommand();
53 | }
54 | }
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/IComboRule.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ff92c62f9f17ed940b7a298dfd9b5dc0
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/IGameplayActionCommand.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace Tutorial.PatternCombo
3 | {
4 | ///
5 | /// Defines a contract for gameplay action commands, adhering to the ***Command Pattern.***
6 | ///
7 | /// Implementing this interface allows the creation of concrete command classes that encapsulate all information
8 | /// needed to perform an action or trigger an event.
9 | ///
10 | /// The interface ensures that any gameplay action, whether it's part of a combo or a standalone action,
11 | /// can be executed in a consistent manner, further allowing for easy extension and management of in-game actions.
12 | public interface IGameplayActionCommand
13 | {
14 | void ExecuteAction(); // Implement this method to execute the action.
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Action/IGameplayActionCommand.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9dc2b757ca7db0547b43c6152860494e
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/ComboEventSystem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Tutorial.PatternCombo
4 | {
5 | ///
6 | /// A simple event system for broadcasting when a new combo is executed.
7 | ///
8 | /// Right now only the ComboDisplayTextClimber subscribes so that the text climbs no matter the
9 | /// combo executed.
10 | ///
11 | public static class ComboEventSystem
12 | {
13 | public static Action OnNewCombo;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/ComboEventSystem.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: eba8f5c8b7212c646ac6577f7e121b6f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c3add66e3c5b13a4fbc2eeaecbb95285
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ButtonDisplay.cs:
--------------------------------------------------------------------------------
1 | using TMPro;
2 | using UnityEngine;
3 | using UnityEngine.UI;
4 |
5 | namespace Tutorial.PatternCombo
6 | {
7 | ///
8 | /// Represents the visual component of a gameplay button in the UI.
9 | ///
10 | /// This class manages the display of button prompts as they move upwards on the screen,
11 | /// similar to the 'notes highway' seen in rhythm games. It handles the setup and
12 | /// recycling of the button display elements using the provided ButtonDisplayPool.
13 | ///
14 | public class ButtonDisplay : MonoBehaviour
15 | {
16 | [SerializeField]
17 | private float _speed = 300f;
18 | [SerializeField]
19 | private TextMeshProUGUI _buttonTMP;
20 | [SerializeField]
21 | private Image _gameplayButtonBackground;
22 |
23 | private string _gameplayButton;
24 | private Color _buttonColor;
25 | private RectTransform _rectTransform;
26 | private Vector3 _newPosition;
27 | private float _ceiling = 1080f;
28 | private ButtonDisplayPool _displayDisplayPool;
29 |
30 | public void Setup(string buttonText, Color buttonColor, ButtonDisplayPool displayDisplayPool)
31 | {
32 | _gameplayButton = buttonText;
33 | _buttonColor = buttonColor;
34 | _gameplayButtonBackground.color = _buttonColor;
35 | _buttonTMP.text = _gameplayButton;
36 | _displayDisplayPool = displayDisplayPool;
37 | }
38 |
39 | private void OnEnable()
40 | {
41 | _gameplayButtonBackground.color = _buttonColor;
42 | _buttonTMP.text = _gameplayButton;
43 | _rectTransform = gameObject.GetComponent();
44 | _rectTransform.localPosition = Vector3.zero;
45 | }
46 |
47 | private void Update()
48 | {
49 | _newPosition = Vector3.up * (Time.deltaTime * _speed) + _rectTransform.localPosition;
50 | _rectTransform.localPosition = _newPosition;
51 | if (_rectTransform.localPosition.y >= _ceiling)
52 | {
53 | _displayDisplayPool.Release(this);
54 | gameObject.SetActive(false);
55 | }
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ButtonDisplay.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3055dcced0ea407439ddaf27148a82a2
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ButtonDisplayCommands.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Tutorial.PatternCombo
4 | {
5 | ///
6 | /// This script defines a set of classes that represent display commands for various gameplay buttons.
7 | ///
8 | /// The classes manage the display lifecycle of their associated button visualizations, such as activation,
9 | /// deactivation, and resetting. This encapsulation allows for a modular and extensible system where new display
10 | /// behaviors can be added with minimal impact on the existing system, adhering to the Open/Closed principle.
11 | ///
12 | /// Buttons (but not D-Pad) utilize a pooling system for efficient resource management.
13 | ///
14 | public class DPadUpDisplayCommand : IGameplayDisplayCommand
15 | {
16 | // Reference to the DPad display that this command will act upon.
17 | private DPadDisplay _dPadDisplay;
18 |
19 | // Constructor to initialize the command with a specific DPad display.
20 | public DPadUpDisplayCommand(DPadDisplay dPadDisplay)
21 | {
22 | _dPadDisplay = dPadDisplay;
23 | }
24 |
25 | // Executes the display logic for the DPad up direction.
26 | // If the DPad display is not active, it activates it. Otherwise, it resets the display.
27 | public void ExecuteDisplay()
28 | {
29 | if (!_dPadDisplay.gameObject.activeInHierarchy)
30 | {
31 | _dPadDisplay.gameObject.SetActive(true);
32 | return;
33 | }
34 | _dPadDisplay.Reset();
35 | }
36 | }
37 |
38 | public class DPadDownDisplayCommand : IGameplayDisplayCommand
39 | {
40 | private DPadDisplay _dPadDisplay;
41 |
42 | public DPadDownDisplayCommand(DPadDisplay dPadDisplay)
43 | {
44 | _dPadDisplay = dPadDisplay;
45 | }
46 |
47 | public void ExecuteDisplay()
48 | {
49 | if (!_dPadDisplay.gameObject.activeInHierarchy)
50 | {
51 | _dPadDisplay.gameObject.SetActive(true);
52 | return;
53 | }
54 | _dPadDisplay.Reset();
55 | }
56 | }
57 |
58 | public class DPadLeftDisplayCommand : IGameplayDisplayCommand
59 | {
60 | private DPadDisplay _dPadDisplay;
61 |
62 | public DPadLeftDisplayCommand(DPadDisplay dPadDisplay)
63 | {
64 | _dPadDisplay = dPadDisplay;
65 | }
66 | public void ExecuteDisplay()
67 | {
68 | if (!_dPadDisplay.gameObject.activeInHierarchy)
69 | {
70 | _dPadDisplay.gameObject.SetActive(true);
71 | return;
72 | }
73 | _dPadDisplay.Reset();
74 | }
75 | }
76 |
77 | public class DPadRightDisplayCommand : IGameplayDisplayCommand
78 | {
79 | private DPadDisplay _dPadDisplay;
80 |
81 | public DPadRightDisplayCommand(DPadDisplay dPadDisplay)
82 | {
83 | _dPadDisplay = dPadDisplay;
84 | }
85 |
86 | public void ExecuteDisplay()
87 | {
88 | if (!_dPadDisplay.gameObject.activeInHierarchy)
89 | {
90 | _dPadDisplay.gameObject.SetActive(true);
91 | return;
92 | }
93 | _dPadDisplay.Reset();
94 | }
95 | }
96 |
97 | public class XButtonDisplayCommand : IGameplayDisplayCommand
98 | {
99 | // This pool manages the recycling of ButtonDisplay objects to optimize performance.
100 | private ButtonDisplayPool _gameplayButtonDisplayPool;
101 |
102 | // Constructor to initialize the command with a reference to the ButtonDisplayPool.
103 | public XButtonDisplayCommand(ButtonDisplayPool gameplayButtonDisplayPool)
104 | {
105 | _gameplayButtonDisplayPool = gameplayButtonDisplayPool;
106 | }
107 |
108 | // Executes the display logic for the X button, utilizing an object pool for efficient resource management.
109 | public void ExecuteDisplay()
110 | {
111 | // Retrieve a ButtonDisplay object from the pool to minimize instantiation overhead.
112 | var buttonDisplay = _gameplayButtonDisplayPool.GetPooledButtonDisplay();
113 |
114 | // Acquire the designated color for the X button from the settings object.
115 | var color = _gameplayButtonDisplayPool.ButtonDisplaySettings.XButtonColor;
116 |
117 | // Set up the button display with the appropriate label and color, and make it active in the scene.
118 | buttonDisplay.Setup("X", color, _gameplayButtonDisplayPool);
119 | buttonDisplay.gameObject.SetActive(true);
120 | }
121 | }
122 |
123 | public class YButtonDisplayCommand : IGameplayDisplayCommand
124 | {
125 | private ButtonDisplayPool _gameplayButtonDisplayPool;
126 |
127 | public YButtonDisplayCommand(ButtonDisplayPool gameplayButtonDisplayPool)
128 | {
129 | _gameplayButtonDisplayPool = gameplayButtonDisplayPool;
130 | }
131 |
132 | public void ExecuteDisplay()
133 | {
134 | var buttonDisplay = _gameplayButtonDisplayPool.GetPooledButtonDisplay();
135 | var color = _gameplayButtonDisplayPool.ButtonDisplaySettings.YButtonColor;
136 | buttonDisplay.Setup("Y", color, _gameplayButtonDisplayPool);
137 | buttonDisplay.gameObject.SetActive(true);
138 | }
139 | }
140 |
141 | public class AButtonDisplayCommand : IGameplayDisplayCommand
142 | {
143 | private ButtonDisplayPool _gameplayButtonDisplayPool;
144 |
145 | public AButtonDisplayCommand(ButtonDisplayPool gameplayButtonDisplayPool)
146 | {
147 | _gameplayButtonDisplayPool = gameplayButtonDisplayPool;
148 | }
149 |
150 | public void ExecuteDisplay()
151 | {
152 | var buttonDisplay = _gameplayButtonDisplayPool.GetPooledButtonDisplay();
153 | var color = _gameplayButtonDisplayPool.ButtonDisplaySettings.AButtonColor;
154 | buttonDisplay.Setup("A", color, _gameplayButtonDisplayPool);
155 | buttonDisplay.gameObject.SetActive(true);
156 | }
157 | }
158 |
159 | public class BButtonDisplayCommand : IGameplayDisplayCommand
160 | {
161 | private ButtonDisplayPool _gameplayButtonDisplayPool;
162 |
163 | public BButtonDisplayCommand(ButtonDisplayPool gameplayButtonDisplayPool)
164 | {
165 | _gameplayButtonDisplayPool = gameplayButtonDisplayPool;
166 | }
167 |
168 | public void ExecuteDisplay()
169 | {
170 | var buttonDisplay = _gameplayButtonDisplayPool.GetPooledButtonDisplay();
171 | var color = _gameplayButtonDisplayPool.ButtonDisplaySettings.BButtonColor;
172 | buttonDisplay.Setup("B", color, _gameplayButtonDisplayPool);
173 | buttonDisplay.gameObject.SetActive(true);
174 | }
175 | }
176 | }
177 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ButtonDisplayCommands.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a9218829f2b9eb348bcfd3454fa10b71
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ButtonDisplayController.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Tutorial.PatternCombo
4 | {
5 | ///
6 | /// The ButtonDisplayController manages the visual representation of gameplay button interactions.
7 | ///
8 | /// It observes player inputs and triggers display commands to provide visual feedback for each button press.
9 | ///
10 | /// This visual feedback aids in visualizing input sequences. By utilizing the
11 | /// Command pattern, this class encapsulates the display logic into commands, which are then executed by
12 | /// a display command invoker, thus separating the input handling from the visual representation logic.
13 | ///
14 | public class ButtonDisplayController : MonoBehaviour
15 | {
16 | [SerializeField]
17 | private ButtonDisplayPool _gameplayButtonDisplayPool;
18 |
19 | private SideFighterControls _gameplayControls;
20 | private GameplayDisplayCommandInvoker _displayInvoker;
21 |
22 | public void Initialize(SideFighterControls gameplayControls, GameplayDisplayCommandInvoker invoker)
23 | {
24 | _gameplayControls = gameplayControls;
25 | _displayInvoker = invoker;
26 | SetupActions();
27 | }
28 |
29 | private void SetupActions()
30 | {
31 | _gameplayControls.gameplay.x.performed += ctx =>
32 | {
33 | HandleXButtonDisplayCommand();
34 | };
35 |
36 | _gameplayControls.gameplay.y.performed += ctx =>
37 | {
38 | HandleYButtonDisplayCommand();
39 | };
40 |
41 | _gameplayControls.gameplay.a.performed += ctx =>
42 | {
43 | HandleAButtonDisplayCommand();
44 | };
45 |
46 | _gameplayControls.gameplay.b.performed += ctx =>
47 | {
48 | HandleBButtonDisplayCommand();
49 | };
50 | }
51 | private void HandleXButtonDisplayCommand()
52 | {
53 | var xButtonCommand = new XButtonDisplayCommand(_gameplayButtonDisplayPool);
54 | ExecuteDisplayCommand(xButtonCommand);
55 | }
56 |
57 | private void HandleYButtonDisplayCommand()
58 | {
59 | var yButtonCommand = new YButtonDisplayCommand(_gameplayButtonDisplayPool);
60 | ExecuteDisplayCommand(yButtonCommand);
61 | }
62 |
63 | private void HandleAButtonDisplayCommand()
64 | {
65 | var aButtonCommand = new AButtonDisplayCommand(_gameplayButtonDisplayPool);
66 | ExecuteDisplayCommand(aButtonCommand);
67 | }
68 |
69 | private void HandleBButtonDisplayCommand()
70 | {
71 | var bButtonCommand = new BButtonDisplayCommand(_gameplayButtonDisplayPool);
72 | ExecuteDisplayCommand(bButtonCommand);
73 | }
74 |
75 | private void ExecuteDisplayCommand(IGameplayDisplayCommand command)
76 | {
77 | _displayInvoker.ExecuteCommand(command);
78 | }
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ButtonDisplayController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 953597c6fd2feb245bb365f6d693c788
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ButtonDisplayInitializer.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | namespace Tutorial.PatternCombo
6 | {
7 | ///
8 | /// Initializes and coordinates the display command system, ensuring player inputs are visually represented in the game interface.
9 | /// The system handles the synchronization of visual cues with the action command system through a decoupled command pattern.
10 | ///
11 | /// 'Display' refers to the visual log or input visualizer of gameplay action commands.
12 | ///
13 | public class ButtonDisplayInitializer : MonoBehaviour
14 | {
15 | [SerializeField]
16 | private GameplayActionInitializer _gameplayActionInitializer;
17 | [SerializeField]
18 | private ButtonDisplayController _buttonDisplayController;
19 | [SerializeField]
20 | private DPadDisplayController _dPadDisplayController;
21 |
22 | private SideFighterControls _gameplayControls;
23 | private GameplayDisplayCommandInvoker _invoker;
24 |
25 | public void Awake()
26 | {
27 | InitializeInvoker();
28 | }
29 |
30 | private void InitializeInvoker()
31 | {
32 | _invoker = new GameplayDisplayCommandInvoker();
33 | }
34 |
35 | private void Start()
36 | {
37 | InitializeGameplayDisplayControllers();
38 | }
39 |
40 | private void InitializeGameplayDisplayControllers()
41 | {
42 | _gameplayControls = _gameplayActionInitializer.GameplayControls;
43 | _buttonDisplayController.Initialize(_gameplayControls, _invoker);
44 | _dPadDisplayController.Initialize(_gameplayActionInitializer.DPadActionController, _invoker);
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ButtonDisplayInitializer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f8c9df30d964b9240899c711931b1593
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ButtonDisplayPool.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.Pool;
3 |
4 | namespace Tutorial.PatternCombo
5 | {
6 | ///
7 | /// Manages the recycling and reuse of ButtonDisplay objects using the Object Pooling pattern.
8 | ///
9 | /// This class maintains a pool of ButtonDisplay objects.
10 | ///
11 | public class ButtonDisplayPool : MonoBehaviour
12 | {
13 | [SerializeField]
14 | private ButtonDisplay _buttonDisplayPrefab;
15 |
16 | [SerializeField]
17 | private ButtonDisplaySettingsSO _buttonDisplaySettings;
18 |
19 | public ButtonDisplaySettingsSO ButtonDisplaySettings => _buttonDisplaySettings;
20 |
21 | [SerializeField]
22 | private int _spawnAmount;
23 |
24 | [SerializeField]
25 | private int _defaultCapacity = 30;
26 | [SerializeField]
27 | private int _maxSize = 50;
28 |
29 | private ObjectPool _gameplayButtonPool;
30 |
31 | ///
32 | /// Retrieves a ButtonDisplay object from the pool. If the pool has an available object, it is returned.
33 | /// Otherwise, a new object is instantiated (as long as the pool hasn't reached its max size).
34 | ///
35 | /// A ButtonDisplay object ready for use.
36 | public ButtonDisplay GetPooledButtonDisplay()
37 | {
38 | return _gameplayButtonPool.Get();
39 | }
40 |
41 | private void Start()
42 | {
43 | //// Initialization of the pool with specified creation, activation, deactivation, and destruction actions.
44 | _gameplayButtonPool = new ObjectPool(
45 | () => Instantiate(_buttonDisplayPrefab, this.transform),
46 | button => button.gameObject.SetActive(true),
47 | button => button.gameObject.SetActive(false),
48 | button => Destroy(button.gameObject),
49 | false, _defaultCapacity, _maxSize);
50 | }
51 |
52 | public void Release(ButtonDisplay buttonDisplay)
53 | {
54 | _gameplayButtonPool.Release(buttonDisplay);
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ButtonDisplayPool.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a83355caa3de0524bb10d09951b176b3
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ButtonDisplaySettingsSO.cs:
--------------------------------------------------------------------------------
1 |
2 | using UnityEngine;
3 | namespace Tutorial.PatternCombo
4 | {
5 | ///
6 | /// Holds colors for the display of gameplay buttons.
7 | ///
8 | [CreateAssetMenu(fileName = "ButtonDisplaySettings", menuName = "PatternCombo/ButtonDisplaySettings", order = 0)]
9 | public class ButtonDisplaySettingsSO : ScriptableObject
10 | {
11 | [Header("Button Colors")]
12 | [SerializeField]
13 | private Color _xButtonColor;
14 | [SerializeField]
15 | private Color _yButtonColor;
16 | [SerializeField]
17 | private Color _aButtonColor;
18 | [SerializeField]
19 | private Color _bButtonColor;
20 |
21 | public Color XButtonColor => _xButtonColor;
22 | public Color YButtonColor => _yButtonColor;
23 | public Color AButtonColor => _aButtonColor;
24 | public Color BButtonColor => _bButtonColor;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ButtonDisplaySettingsSO.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fbd373be719a34f4ebb1a31f846ce8b9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ComboDisplayCommandFactory.cs:
--------------------------------------------------------------------------------
1 | using TMPro;
2 | using UnityEngine;
3 |
4 | namespace Tutorial.PatternCombo
5 | {
6 | ///
7 | /// Factory class for creating combo commands.
8 | ///
9 | /// Using a factory here decouples the client code from the concrete classes,
10 | /// making it easier to add new types of combo commands in the future.
11 | ///
12 | public class ComboDisplayCommandFactory : MonoBehaviour
13 | {
14 | [SerializeField]
15 | private TextMeshProUGUI _displayTMP;
16 |
17 | public IGameplayDisplayCommand CreateDashAttackDisplayCommand()
18 | {
19 | return new DashAttackDisplayCommand(_displayTMP);
20 | }
21 |
22 | public IGameplayDisplayCommand CreateJumpKickDisplayCommand()
23 | {
24 | return new JumpKickDisplayCommand(_displayTMP);
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ComboDisplayCommandFactory.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1a0ed1568aadc9244b0f7fa9b5603dad
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ComboDisplayCommandHandler.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Tutorial.PatternCombo
4 | {
5 | ///
6 | /// Listens for combo execution events and triggers the appropriate display commands.
7 | ///
8 | /// This class functions as part of the ***Observer Pattern***, where it observes combo execution events
9 | /// and updates the game's display accordingly. It utilizes a factory to create display commands
10 | /// which encapsulate the logic for how these combos should be presented to the player.
11 | ///
12 | /// While not a strict implementation of the Model-View-Presenter (MVP) pattern, this class
13 | /// exhibits traits of a Presenter by observing changes (Model) and coordinating with
14 | /// display logic (View), thus bridging the two with action-triggered updates.
15 | ///
16 | public class ComboDisplayCommandHandler : MonoBehaviour
17 | {
18 | [SerializeField]
19 | private ComboDisplayCommandFactory _comboDisplayCommandFactory;
20 |
21 | private void Awake()
22 | {
23 | // Subscribe to combo events to handle the display of combos when they are executed
24 | DashAttackComboEvent.OnDashAttackCombo += HandleDashAttackCombo;
25 | JumpKickComboEvent.OnJumpKickCombo += HandleJumpKickCombo;
26 | }
27 |
28 | private void OnDisable()
29 | {
30 | // Unsubscribe from combo events to prevent memory leaks or unintended behavior when the object is disabled
31 | DashAttackComboEvent.OnDashAttackCombo -= HandleDashAttackCombo;
32 | JumpKickComboEvent.OnJumpKickCombo -= HandleJumpKickCombo;
33 | }
34 |
35 | // Handle the display logic when a Dash Attack combo is executed
36 | private void HandleDashAttackCombo()
37 | {
38 | var comboDisplayCommand = _comboDisplayCommandFactory.CreateDashAttackDisplayCommand();
39 | ExecuteComboDisplayCommand(comboDisplayCommand);
40 | }
41 |
42 | private void HandleJumpKickCombo()
43 | {
44 | var comboDisplayCommand = _comboDisplayCommandFactory.CreateJumpKickDisplayCommand();
45 | ExecuteComboDisplayCommand(comboDisplayCommand);
46 | }
47 |
48 | // Execute the display command which updates the UI to show the combo has been performed
49 | private void ExecuteComboDisplayCommand(IGameplayDisplayCommand displayCommand)
50 | {
51 | displayCommand.ExecuteDisplay();
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ComboDisplayCommandHandler.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 608e3c02046960d43954e54194ce4ad9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ComboDisplayCommands.cs:
--------------------------------------------------------------------------------
1 | using TMPro;
2 |
3 | namespace Tutorial.PatternCombo
4 | {
5 | public class DashAttackDisplayCommand : IGameplayDisplayCommand
6 | {
7 | private TextMeshProUGUI _comboTMP;
8 | public DashAttackDisplayCommand(TextMeshProUGUI comboTMP)
9 | {
10 | _comboTMP = comboTMP;
11 | }
12 |
13 | public void ExecuteDisplay()
14 | {
15 | _comboTMP.SetText("DASH ATTACK!");
16 | }
17 | }
18 |
19 | public class JumpKickDisplayCommand : IGameplayDisplayCommand
20 | {
21 | private TextMeshProUGUI _comboTMP;
22 | public JumpKickDisplayCommand(TextMeshProUGUI comboTMP)
23 | {
24 | _comboTMP = comboTMP;
25 | }
26 | public void ExecuteDisplay()
27 | {
28 | _comboTMP.SetText("JUMP KICK!");
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ComboDisplayCommands.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d81534a7f259f034c9124a9e6b8c71ef
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ComboDisplayTextClimber.cs:
--------------------------------------------------------------------------------
1 | using TMPro;
2 | using UnityEngine;
3 |
4 | namespace Tutorial.PatternCombo
5 | {
6 | ///
7 | /// Controls the visual effect of combo text climbing up the screen when a combo is executed.
8 | ///
9 | /// This component listens for combo events and, upon receiving them, animates the combo text
10 | /// to move upward from a starting position, creating a visual indication of a successful combo.
11 | /// The text disappears after reaching a certain height, effectively "climbing" out of view.
12 | ///
13 | public class ComboDisplayTextClimber : MonoBehaviour
14 | {
15 | [SerializeField] private float _climbSpeed = 1.0f;
16 | [SerializeField] private TextMeshProUGUI _comboText;
17 | [SerializeField] private Vector3 _startingOffset;
18 | [SerializeField] private int _textPositionCeiling = 500;
19 | private Vector3 _offset;
20 | private bool _isShowingComboText;
21 | private Transform _textTransform;
22 |
23 | private void Start()
24 | {
25 | ComboEventSystem.OnNewCombo += StartComboText;
26 | _comboText.enabled = false;
27 | _textTransform = _comboText.transform;
28 | }
29 | private void OnDisable()
30 | {
31 | ComboEventSystem.OnNewCombo -= StartComboText;
32 | }
33 |
34 | private void StartComboText()
35 | {
36 | _comboText.enabled = true;
37 | _textTransform.localPosition = Vector3.zero;
38 | _offset = _textTransform.localPosition + _startingOffset;
39 | _isShowingComboText = true;
40 | }
41 |
42 | private void Update()
43 | {
44 | if (_isShowingComboText)
45 | {
46 | _textTransform.localPosition += Vector3.up * (Time.deltaTime * _climbSpeed) + _offset;
47 | }
48 | if (_textTransform.localPosition.y > _textPositionCeiling)
49 | {
50 | _isShowingComboText = false;
51 | _comboText.enabled = false;
52 | }
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/ComboDisplayTextClimber.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 231b82426a47f2d43a6341115a09536a
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/DPadDisplay.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 |
4 | namespace Tutorial.PatternCombo
5 | {
6 | ///
7 | /// Manages the visual representation of D-Pad input as an upward-moving display.
8 | ///
9 | /// The display resets to a starting position when enabled and moves upward at a set speed.
10 | /// When the D-Pad is released, the line renderer visually indicates the point of release.
11 | /// The display deactivates itself once it reaches a certain threshold on the screen,
12 | /// referred to as the 'ceiling'.
13 | ///
14 | public class DPadDisplay : MonoBehaviour
15 | {
16 | [SerializeField]
17 | private float _speed = 300f;
18 |
19 | [SerializeField]
20 | private LineRenderer _line;
21 |
22 | private bool _isReleased;
23 | private RectTransform _rectTransform;
24 | private Vector3 _newPosition;
25 | private float _ceiling = 1080f;
26 | private float _xOffset = -100f;
27 | private Vector3 _releasedPosition;
28 |
29 | private void OnEnable()
30 | {
31 | _rectTransform = gameObject.GetComponent();
32 | Reset();
33 | }
34 |
35 | public void Reset()
36 | {
37 | _isReleased = false;
38 | _rectTransform.localPosition = new Vector3(_xOffset, 0, 0);
39 |
40 | _releasedPosition = Vector3.zero;
41 | _line.gameObject.SetActive(true);
42 | _line.SetPosition(0, Vector3.zero);
43 | _line.SetPosition(1, Vector3.zero);
44 | }
45 |
46 | public void ReleaseDPad()
47 | {
48 | _isReleased = true;
49 | _releasedPosition = _line.GetPosition(0);
50 | }
51 |
52 | private void Update()
53 | {
54 | MoveDPadDisplay();
55 | HandleDPadRelease();
56 | CheckCeilingAndDeactivate();
57 | }
58 |
59 | private void MoveDPadDisplay()
60 | {
61 | _newPosition = Vector3.up * (Time.deltaTime * _speed) + _rectTransform.localPosition;
62 | _rectTransform.localPosition = _newPosition;
63 | _line.SetPosition(0, new Vector3(0, _rectTransform.localPosition.y, 0));
64 | }
65 |
66 | private void HandleDPadRelease()
67 | {
68 | if (_isReleased)
69 | {
70 | _line.SetPosition(1, _line.GetPosition(0) - _releasedPosition);
71 | }
72 | }
73 |
74 | private void CheckCeilingAndDeactivate()
75 | {
76 | if (_rectTransform.localPosition.y >= _ceiling)
77 | {
78 | gameObject.SetActive(false);
79 | }
80 | }
81 |
82 | private void OnDisable()
83 | {
84 | _line.SetPosition(0, Vector3.zero);
85 | _line.SetPosition(1, Vector3.zero);
86 | _line.gameObject.SetActive(false);
87 | }
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/DPadDisplay.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 57cd1ddc06afa444897a1c66b19a3a8d
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/DPadDisplayController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 |
4 | namespace Tutorial.PatternCombo
5 | {
6 | ///
7 | /// Manages the display and state transitions of the DPad directional indicators in the UI.
8 | ///
9 | /// It monitors the directional input from the DPadActionController and triggers visual updates
10 | /// via the GameplayDisplayCommandInvoker. This class effectively bridges the gap between
11 | /// user input and the visual feedback system, ensuring that changes in direction are
12 | /// reflected immediately and accurately on the screen.
13 | ///
14 | public class DPadDisplayController : MonoBehaviour
15 | {
16 | [SerializeField]
17 | private DPadDisplay _dPadUp, _dPadDown, _dPadLeft, _dPadRight;
18 |
19 | private GameplayDisplayCommandInvoker _invoker;
20 | private DPadActionController _dPadActionController;
21 |
22 | private DPadDirection _currentDPadDirection = DPadDirection.None;
23 |
24 | public void Initialize(DPadActionController dPadActionController,
25 | GameplayDisplayCommandInvoker invoker)
26 | {
27 | _invoker = invoker;
28 | _dPadActionController = dPadActionController;
29 | }
30 |
31 | public void Update()
32 | {
33 | HandleDPad();
34 | }
35 |
36 | // Checks for changes in DPad direction and processes them
37 |
38 | private void HandleDPad()
39 | {
40 | DPadDirection newDirection = _dPadActionController.CurrentDPadDirection;
41 | ProcessDirectionChange(newDirection);
42 | }
43 |
44 | // Handles the change in direction by disabling the previous direction and enabling the new one.
45 | private void ProcessDirectionChange(DPadDirection newDirection)
46 | {
47 | if (_currentDPadDirection != newDirection)
48 | {
49 | DisableCurrentDPadDirection();
50 | _currentDPadDirection = newDirection;
51 | ExecuteCurrentDPadDirectionDisplay();
52 | }
53 | }
54 |
55 | // Disables visuals of the current DPad direction
56 | private void DisableCurrentDPadDirection()
57 | {
58 | switch (_currentDPadDirection)
59 | {
60 | case DPadDirection.Up:
61 | _dPadUp.ReleaseDPad();
62 | break;
63 | case DPadDirection.Down:
64 | _dPadDown.ReleaseDPad();
65 | break;
66 | case DPadDirection.Left:
67 | _dPadLeft.ReleaseDPad();
68 | break;
69 | case DPadDirection.Right:
70 | _dPadRight.ReleaseDPad();
71 | break;
72 | case DPadDirection.None:
73 | _dPadUp.ReleaseDPad();
74 | _dPadDown.ReleaseDPad();
75 | _dPadLeft.ReleaseDPad();
76 | _dPadRight.ReleaseDPad();
77 | break;
78 | }
79 | }
80 |
81 | // Enables the visuals and command of new DPad direction
82 | private void ExecuteCurrentDPadDirectionDisplay()
83 | {
84 | IGameplayDisplayCommand command = CreateDPadCommand();
85 | if (command != null)
86 | {
87 | _invoker.ExecuteCommand(command);
88 | }
89 | }
90 |
91 | // Create a command based on the current DPad direction
92 | private IGameplayDisplayCommand CreateDPadCommand()
93 | {
94 | // Switch expression from C# 8.0, 2019
95 | return _currentDPadDirection switch
96 | {
97 | DPadDirection.Up => new DPadUpDisplayCommand(_dPadUp),
98 | DPadDirection.Down => new DPadDownDisplayCommand(_dPadDown),
99 | DPadDirection.Left => new DPadLeftDisplayCommand(_dPadLeft),
100 | DPadDirection.Right => new DPadRightDisplayCommand(_dPadRight),
101 | _ => null
102 | };
103 | }
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/DPadDisplayController.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 011d7cd6fbcf7c34c8d901b0a7e32cac
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/GameplayDisplayCommandInvoker.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | namespace Tutorial.PatternCombo
3 | {
4 | ///
5 | /// Invokes display commands implementing the IGameplayDisplayCommand interface.
6 | ///
7 | /// This class serves as a central point for executing display-related commands, ensuring that
8 | /// each display action is processed in a consistent manner. It is utilized by the
9 | /// ButtonDisplayController and DPadDisplayController to trigger the visual representation of button
10 | /// and DPad interactions in the game. The ExecuteCommand method is called whenever there is a need
11 | /// to update the display based on player input.
12 | ///
13 | public class GameplayDisplayCommandInvoker
14 | {
15 | public void ExecuteCommand(IGameplayDisplayCommand command)
16 | {
17 | command.ExecuteDisplay();
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/GameplayDisplayCommandInvoker.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d9185f9c2072cf647a993ab01b6b4138
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/IGameplayDisplayCommand.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | namespace Tutorial.PatternCombo
3 | {
4 | ///
5 | /// Represents an executable gameplay display action.
6 | ///
7 | /// This interface serves as a contract for all types of gameplay display commands,
8 | /// including displaying individual buttons and displays for complex combo sequences.
9 | ///
10 | public interface IGameplayDisplayCommand
11 | {
12 | void ExecuteDisplay();
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/Display/IGameplayDisplayCommand.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: af85dd23089418446bc32fa78b94f9b9
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/PlayerMovement.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 |
5 | namespace Tutorial.PatternCombo
6 | {
7 | ///
8 | /// Simple player character movement based on directional input.
9 | ///
10 | /// Not currently used in the combo system.
11 | ///
12 | public class PlayerMovement : MonoBehaviour
13 | {
14 | [SerializeField]
15 | private float _movementSpeed;
16 | private Vector2 _move;
17 |
18 | [SerializeField]
19 | private GameplayActionInitializer _actionInitializer;
20 |
21 | private SideFighterControls _gameplayControls;
22 |
23 | private void Start()
24 | {
25 | _gameplayControls = _actionInitializer.GameplayControls;
26 | }
27 |
28 | void Update()
29 | {
30 | _move = _gameplayControls.gameplay.move.ReadValue();
31 | Move(_move);
32 | }
33 |
34 | private void Move(Vector2 direction)
35 | {
36 | if (direction.sqrMagnitude < 0.01)
37 | return;
38 | var scaledMoveSpeed = _movementSpeed * Time.deltaTime;
39 | var move = new Vector3(direction.x, direction.y, 0);
40 | transform.position += move * scaledMoveSpeed;
41 | }
42 | }
43 | }
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/PlayerMovement.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f39587b0e64409b4a947b02b413fe32b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/SideFighterControls.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8a985919a0f8e45448929f3631f44dd7
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/ComboScripts/SideFighterControls.inputactions.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 883517fe31b30954486d78060c6f158d
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
11 | generateWrapperCode: 1
12 | wrapperCodePath:
13 | wrapperClassName:
14 | wrapperCodeNamespace:
15 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/PatternComboAssets.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7db0d6a223f5e554f85018fad7b7d72f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/PatternComboAssets/ButtonDisplaySettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: fbd373be719a34f4ebb1a31f846ce8b9, type: 3}
13 | m_Name: ButtonDisplaySettings
14 | m_EditorClassIdentifier:
15 | _xButtonColor: {r: 0.28235295, g: 0.36078432, b: 0.59607846, a: 1}
16 | _yButtonColor: {r: 1, g: 0.7176471, b: 0.21960784, a: 1}
17 | _aButtonColor: {r: 0.16078432, g: 0.7372549, b: 0.12941177, a: 1}
18 | _bButtonColor: {r: 0.85882354, g: 0.14117648, b: 0.14117648, a: 1}
19 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/PatternComboAssets/ButtonDisplaySettings.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 51a4badcda0f51942afe36f16b21ceec
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/PatternComboAssets/DPadDown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/homemech/unity-pattern-combo/2126a8c8799690f29a91c334acd0724e87d5518b/Assets/UnityPatternCombo/PatternComboAssets/DPadDown.png
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/PatternComboAssets/DPadDown.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f0b63cf21b01ef54cad74d02d71c07fe
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 12
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | flipGreenChannel: 0
24 | isReadable: 0
25 | streamingMipmaps: 0
26 | streamingMipmapsPriority: 0
27 | vTOnly: 0
28 | ignoreMipmapLimit: 0
29 | grayScaleToAlpha: 0
30 | generateCubemap: 6
31 | cubemapConvolution: 0
32 | seamlessCubemap: 0
33 | textureFormat: 1
34 | maxTextureSize: 2048
35 | textureSettings:
36 | serializedVersion: 2
37 | filterMode: 1
38 | aniso: 1
39 | mipBias: 0
40 | wrapU: 1
41 | wrapV: 1
42 | wrapW: 0
43 | nPOTScale: 0
44 | lightmap: 0
45 | compressionQuality: 50
46 | spriteMode: 1
47 | spriteExtrude: 1
48 | spriteMeshType: 1
49 | alignment: 0
50 | spritePivot: {x: 0.5, y: 0.5}
51 | spritePixelsToUnits: 100
52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
53 | spriteGenerateFallbackPhysicsShape: 1
54 | alphaUsage: 1
55 | alphaIsTransparency: 1
56 | spriteTessellationDetail: -1
57 | textureType: 8
58 | textureShape: 1
59 | singleChannelComponent: 0
60 | flipbookRows: 1
61 | flipbookColumns: 1
62 | maxTextureSizeSet: 0
63 | compressionQualitySet: 0
64 | textureFormatSet: 0
65 | ignorePngGamma: 0
66 | applyGammaDecoding: 0
67 | swizzle: 50462976
68 | cookieLightType: 0
69 | platformSettings:
70 | - serializedVersion: 3
71 | buildTarget: DefaultTexturePlatform
72 | maxTextureSize: 128
73 | resizeAlgorithm: 0
74 | textureFormat: -1
75 | textureCompression: 1
76 | compressionQuality: 50
77 | crunchedCompression: 0
78 | allowsAlphaSplitting: 0
79 | overridden: 0
80 | ignorePlatformSupport: 0
81 | androidETC2FallbackOverride: 0
82 | forceMaximumCompressionQuality_BC6H_BC7: 0
83 | - serializedVersion: 3
84 | buildTarget: Standalone
85 | maxTextureSize: 2048
86 | resizeAlgorithm: 0
87 | textureFormat: -1
88 | textureCompression: 1
89 | compressionQuality: 50
90 | crunchedCompression: 0
91 | allowsAlphaSplitting: 0
92 | overridden: 0
93 | ignorePlatformSupport: 0
94 | androidETC2FallbackOverride: 0
95 | forceMaximumCompressionQuality_BC6H_BC7: 0
96 | - serializedVersion: 3
97 | buildTarget: Server
98 | maxTextureSize: 2048
99 | resizeAlgorithm: 0
100 | textureFormat: -1
101 | textureCompression: 1
102 | compressionQuality: 50
103 | crunchedCompression: 0
104 | allowsAlphaSplitting: 0
105 | overridden: 0
106 | ignorePlatformSupport: 0
107 | androidETC2FallbackOverride: 0
108 | forceMaximumCompressionQuality_BC6H_BC7: 0
109 | spriteSheet:
110 | serializedVersion: 2
111 | sprites: []
112 | outline: []
113 | physicsShape: []
114 | bones: []
115 | spriteID: 5e97eb03825dee720800000000000000
116 | internalID: 0
117 | vertices: []
118 | indices:
119 | edges: []
120 | weights: []
121 | secondaryTextures: []
122 | nameFileIdTable: {}
123 | mipmapLimitGroupName:
124 | pSDRemoveMatte: 0
125 | userData:
126 | assetBundleName:
127 | assetBundleVariant:
128 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/PatternComboAssets/DPadLeft.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/homemech/unity-pattern-combo/2126a8c8799690f29a91c334acd0724e87d5518b/Assets/UnityPatternCombo/PatternComboAssets/DPadLeft.png
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/PatternComboAssets/DPadLeft.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 166daf268c4adbf4ca7fbb54e82c7fab
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 12
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | flipGreenChannel: 0
24 | isReadable: 0
25 | streamingMipmaps: 0
26 | streamingMipmapsPriority: 0
27 | vTOnly: 0
28 | ignoreMipmapLimit: 0
29 | grayScaleToAlpha: 0
30 | generateCubemap: 6
31 | cubemapConvolution: 0
32 | seamlessCubemap: 0
33 | textureFormat: 1
34 | maxTextureSize: 2048
35 | textureSettings:
36 | serializedVersion: 2
37 | filterMode: 1
38 | aniso: 1
39 | mipBias: 0
40 | wrapU: 1
41 | wrapV: 1
42 | wrapW: 0
43 | nPOTScale: 0
44 | lightmap: 0
45 | compressionQuality: 50
46 | spriteMode: 1
47 | spriteExtrude: 1
48 | spriteMeshType: 1
49 | alignment: 0
50 | spritePivot: {x: 0.5, y: 0.5}
51 | spritePixelsToUnits: 100
52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
53 | spriteGenerateFallbackPhysicsShape: 1
54 | alphaUsage: 1
55 | alphaIsTransparency: 1
56 | spriteTessellationDetail: -1
57 | textureType: 8
58 | textureShape: 1
59 | singleChannelComponent: 0
60 | flipbookRows: 1
61 | flipbookColumns: 1
62 | maxTextureSizeSet: 0
63 | compressionQualitySet: 0
64 | textureFormatSet: 0
65 | ignorePngGamma: 0
66 | applyGammaDecoding: 0
67 | swizzle: 50462976
68 | cookieLightType: 0
69 | platformSettings:
70 | - serializedVersion: 3
71 | buildTarget: DefaultTexturePlatform
72 | maxTextureSize: 128
73 | resizeAlgorithm: 0
74 | textureFormat: -1
75 | textureCompression: 1
76 | compressionQuality: 50
77 | crunchedCompression: 0
78 | allowsAlphaSplitting: 0
79 | overridden: 0
80 | ignorePlatformSupport: 0
81 | androidETC2FallbackOverride: 0
82 | forceMaximumCompressionQuality_BC6H_BC7: 0
83 | - serializedVersion: 3
84 | buildTarget: Standalone
85 | maxTextureSize: 2048
86 | resizeAlgorithm: 0
87 | textureFormat: -1
88 | textureCompression: 1
89 | compressionQuality: 50
90 | crunchedCompression: 0
91 | allowsAlphaSplitting: 0
92 | overridden: 0
93 | ignorePlatformSupport: 0
94 | androidETC2FallbackOverride: 0
95 | forceMaximumCompressionQuality_BC6H_BC7: 0
96 | - serializedVersion: 3
97 | buildTarget: Server
98 | maxTextureSize: 2048
99 | resizeAlgorithm: 0
100 | textureFormat: -1
101 | textureCompression: 1
102 | compressionQuality: 50
103 | crunchedCompression: 0
104 | allowsAlphaSplitting: 0
105 | overridden: 0
106 | ignorePlatformSupport: 0
107 | androidETC2FallbackOverride: 0
108 | forceMaximumCompressionQuality_BC6H_BC7: 0
109 | spriteSheet:
110 | serializedVersion: 2
111 | sprites: []
112 | outline: []
113 | physicsShape: []
114 | bones: []
115 | spriteID: 5e97eb03825dee720800000000000000
116 | internalID: 0
117 | vertices: []
118 | indices:
119 | edges: []
120 | weights: []
121 | secondaryTextures: []
122 | nameFileIdTable: {}
123 | mipmapLimitGroupName:
124 | pSDRemoveMatte: 0
125 | userData:
126 | assetBundleName:
127 | assetBundleVariant:
128 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/PatternComboAssets/DPadRight.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/homemech/unity-pattern-combo/2126a8c8799690f29a91c334acd0724e87d5518b/Assets/UnityPatternCombo/PatternComboAssets/DPadRight.png
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/PatternComboAssets/DPadRight.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8cd6540be373ab34d86d4f59475c13cc
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 12
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | flipGreenChannel: 0
24 | isReadable: 0
25 | streamingMipmaps: 0
26 | streamingMipmapsPriority: 0
27 | vTOnly: 0
28 | ignoreMipmapLimit: 0
29 | grayScaleToAlpha: 0
30 | generateCubemap: 6
31 | cubemapConvolution: 0
32 | seamlessCubemap: 0
33 | textureFormat: 1
34 | maxTextureSize: 2048
35 | textureSettings:
36 | serializedVersion: 2
37 | filterMode: 1
38 | aniso: 1
39 | mipBias: 0
40 | wrapU: 1
41 | wrapV: 1
42 | wrapW: 0
43 | nPOTScale: 0
44 | lightmap: 0
45 | compressionQuality: 50
46 | spriteMode: 1
47 | spriteExtrude: 1
48 | spriteMeshType: 1
49 | alignment: 0
50 | spritePivot: {x: 0.5, y: 0.5}
51 | spritePixelsToUnits: 100
52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
53 | spriteGenerateFallbackPhysicsShape: 1
54 | alphaUsage: 1
55 | alphaIsTransparency: 1
56 | spriteTessellationDetail: -1
57 | textureType: 8
58 | textureShape: 1
59 | singleChannelComponent: 0
60 | flipbookRows: 1
61 | flipbookColumns: 1
62 | maxTextureSizeSet: 0
63 | compressionQualitySet: 0
64 | textureFormatSet: 0
65 | ignorePngGamma: 0
66 | applyGammaDecoding: 0
67 | swizzle: 50462976
68 | cookieLightType: 0
69 | platformSettings:
70 | - serializedVersion: 3
71 | buildTarget: DefaultTexturePlatform
72 | maxTextureSize: 128
73 | resizeAlgorithm: 0
74 | textureFormat: -1
75 | textureCompression: 1
76 | compressionQuality: 50
77 | crunchedCompression: 0
78 | allowsAlphaSplitting: 0
79 | overridden: 0
80 | ignorePlatformSupport: 0
81 | androidETC2FallbackOverride: 0
82 | forceMaximumCompressionQuality_BC6H_BC7: 0
83 | - serializedVersion: 3
84 | buildTarget: Standalone
85 | maxTextureSize: 2048
86 | resizeAlgorithm: 0
87 | textureFormat: -1
88 | textureCompression: 1
89 | compressionQuality: 50
90 | crunchedCompression: 0
91 | allowsAlphaSplitting: 0
92 | overridden: 0
93 | ignorePlatformSupport: 0
94 | androidETC2FallbackOverride: 0
95 | forceMaximumCompressionQuality_BC6H_BC7: 0
96 | - serializedVersion: 3
97 | buildTarget: Server
98 | maxTextureSize: 2048
99 | resizeAlgorithm: 0
100 | textureFormat: -1
101 | textureCompression: 1
102 | compressionQuality: 50
103 | crunchedCompression: 0
104 | allowsAlphaSplitting: 0
105 | overridden: 0
106 | ignorePlatformSupport: 0
107 | androidETC2FallbackOverride: 0
108 | forceMaximumCompressionQuality_BC6H_BC7: 0
109 | spriteSheet:
110 | serializedVersion: 2
111 | sprites: []
112 | outline: []
113 | physicsShape: []
114 | bones: []
115 | spriteID: 5e97eb03825dee720800000000000000
116 | internalID: 0
117 | vertices: []
118 | indices:
119 | edges: []
120 | weights: []
121 | secondaryTextures: []
122 | nameFileIdTable: {}
123 | mipmapLimitGroupName:
124 | pSDRemoveMatte: 0
125 | userData:
126 | assetBundleName:
127 | assetBundleVariant:
128 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/PatternComboAssets/DPadUp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/homemech/unity-pattern-combo/2126a8c8799690f29a91c334acd0724e87d5518b/Assets/UnityPatternCombo/PatternComboAssets/DPadUp.png
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/PatternComboAssets/DPadUp.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0516614f41dc364429505c9adf6c7ae0
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 12
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | flipGreenChannel: 0
24 | isReadable: 0
25 | streamingMipmaps: 0
26 | streamingMipmapsPriority: 0
27 | vTOnly: 0
28 | ignoreMipmapLimit: 0
29 | grayScaleToAlpha: 0
30 | generateCubemap: 6
31 | cubemapConvolution: 0
32 | seamlessCubemap: 0
33 | textureFormat: 1
34 | maxTextureSize: 2048
35 | textureSettings:
36 | serializedVersion: 2
37 | filterMode: 1
38 | aniso: 1
39 | mipBias: 0
40 | wrapU: 1
41 | wrapV: 1
42 | wrapW: 0
43 | nPOTScale: 0
44 | lightmap: 0
45 | compressionQuality: 50
46 | spriteMode: 1
47 | spriteExtrude: 1
48 | spriteMeshType: 1
49 | alignment: 0
50 | spritePivot: {x: 0.5, y: 0.5}
51 | spritePixelsToUnits: 100
52 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
53 | spriteGenerateFallbackPhysicsShape: 1
54 | alphaUsage: 1
55 | alphaIsTransparency: 1
56 | spriteTessellationDetail: -1
57 | textureType: 8
58 | textureShape: 1
59 | singleChannelComponent: 0
60 | flipbookRows: 1
61 | flipbookColumns: 1
62 | maxTextureSizeSet: 0
63 | compressionQualitySet: 0
64 | textureFormatSet: 0
65 | ignorePngGamma: 0
66 | applyGammaDecoding: 0
67 | swizzle: 50462976
68 | cookieLightType: 0
69 | platformSettings:
70 | - serializedVersion: 3
71 | buildTarget: DefaultTexturePlatform
72 | maxTextureSize: 128
73 | resizeAlgorithm: 0
74 | textureFormat: -1
75 | textureCompression: 1
76 | compressionQuality: 50
77 | crunchedCompression: 0
78 | allowsAlphaSplitting: 0
79 | overridden: 0
80 | ignorePlatformSupport: 0
81 | androidETC2FallbackOverride: 0
82 | forceMaximumCompressionQuality_BC6H_BC7: 0
83 | - serializedVersion: 3
84 | buildTarget: Standalone
85 | maxTextureSize: 2048
86 | resizeAlgorithm: 0
87 | textureFormat: -1
88 | textureCompression: 1
89 | compressionQuality: 50
90 | crunchedCompression: 0
91 | allowsAlphaSplitting: 0
92 | overridden: 0
93 | ignorePlatformSupport: 0
94 | androidETC2FallbackOverride: 0
95 | forceMaximumCompressionQuality_BC6H_BC7: 0
96 | - serializedVersion: 3
97 | buildTarget: Server
98 | maxTextureSize: 2048
99 | resizeAlgorithm: 0
100 | textureFormat: -1
101 | textureCompression: 1
102 | compressionQuality: 50
103 | crunchedCompression: 0
104 | allowsAlphaSplitting: 0
105 | overridden: 0
106 | ignorePlatformSupport: 0
107 | androidETC2FallbackOverride: 0
108 | forceMaximumCompressionQuality_BC6H_BC7: 0
109 | spriteSheet:
110 | serializedVersion: 2
111 | sprites: []
112 | outline: []
113 | physicsShape: []
114 | bones: []
115 | spriteID: 5e97eb03825dee720800000000000000
116 | internalID: 0
117 | vertices: []
118 | indices:
119 | edges: []
120 | weights: []
121 | secondaryTextures: []
122 | nameFileIdTable: {}
123 | mipmapLimitGroupName:
124 | pSDRemoveMatte: 0
125 | userData:
126 | assetBundleName:
127 | assetBundleVariant:
128 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/PatternComboAssets/GameplayButton.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 84737184df9b5ba419eed24a2bdfc832
3 | PrefabImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/PatternComboAssets/TMPFonts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 299d33ca8452c6048aaadefa36d48ec7
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/PatternComboAssets/TMPFonts/FiraCode-Medium SDF.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ba687e0000b155a4eb1f01d1630ddfe3
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/PatternComboAssets/TMPFonts/INTER-BOLD SDF.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 98a4b05af4cfe584e9a4994bf4b828a1
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/PatternComboAssets/TMPFonts/ROBOTO-REGULAR SDF.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1e454c1676a87ba439253f2b60e8b56b
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/UnityPatternCombo/PatternComboDemo.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2fbeef6a82125524b88861a34d3c8910
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/UniversalRenderPipelineGlobalSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: 2ec995e51a6e251468d2a3fd8a686257, type: 3}
13 | m_Name: UniversalRenderPipelineGlobalSettings
14 | m_EditorClassIdentifier:
15 | k_AssetVersion: 3
16 | m_RenderingLayerNames:
17 | - Light Layer default
18 | - Light Layer 1
19 | - Light Layer 2
20 | - Light Layer 3
21 | - Light Layer 4
22 | - Light Layer 5
23 | - Light Layer 6
24 | - Light Layer 7
25 | m_ValidRenderingLayers: 255
26 | lightLayerName0: Light Layer default
27 | lightLayerName1: Light Layer 1
28 | lightLayerName2: Light Layer 2
29 | lightLayerName3: Light Layer 3
30 | lightLayerName4: Light Layer 4
31 | lightLayerName5: Light Layer 5
32 | lightLayerName6: Light Layer 6
33 | lightLayerName7: Light Layer 7
34 | m_StripDebugVariants: 1
35 | m_StripUnusedPostProcessingVariants: 1
36 | m_StripUnusedVariants: 1
37 | m_StripUnusedLODCrossFadeVariants: 1
38 | m_StripScreenCoordOverrideVariants: 1
39 | supportRuntimeDebugDisplay: 0
40 | m_ShaderVariantLogLevel: 0
41 | m_ExportShaderVariants: 1
42 |
--------------------------------------------------------------------------------
/Assets/UniversalRenderPipelineGlobalSettings.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 18dc0cd2c080841dea60987a38ce93fa
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 James Walsh aka homemech
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Packages/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.unity.ide.rider": "3.0.27",
4 | "com.unity.ide.visualstudio": "2.0.22",
5 | "com.unity.inputsystem": "1.7.0",
6 | "com.unity.render-pipelines.universal": "14.0.9",
7 | "com.unity.textmeshpro": "3.0.7",
8 | "com.unity.ugui": "1.0.0",
9 | "com.unity.modules.imgui": "1.0.0",
10 | "com.unity.modules.ui": "1.0.0",
11 | "com.unity.modules.uielements": "1.0.0"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Packages/packages-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.unity.burst": {
4 | "version": "1.8.11",
5 | "depth": 1,
6 | "source": "registry",
7 | "dependencies": {
8 | "com.unity.mathematics": "1.2.1"
9 | },
10 | "url": "https://packages.unity.com"
11 | },
12 | "com.unity.ext.nunit": {
13 | "version": "1.0.6",
14 | "depth": 1,
15 | "source": "registry",
16 | "dependencies": {},
17 | "url": "https://packages.unity.com"
18 | },
19 | "com.unity.ide.rider": {
20 | "version": "3.0.27",
21 | "depth": 0,
22 | "source": "registry",
23 | "dependencies": {
24 | "com.unity.ext.nunit": "1.0.6"
25 | },
26 | "url": "https://packages.unity.com"
27 | },
28 | "com.unity.ide.visualstudio": {
29 | "version": "2.0.22",
30 | "depth": 0,
31 | "source": "registry",
32 | "dependencies": {
33 | "com.unity.test-framework": "1.1.9"
34 | },
35 | "url": "https://packages.unity.com"
36 | },
37 | "com.unity.inputsystem": {
38 | "version": "1.7.0",
39 | "depth": 0,
40 | "source": "registry",
41 | "dependencies": {
42 | "com.unity.modules.uielements": "1.0.0"
43 | },
44 | "url": "https://packages.unity.com"
45 | },
46 | "com.unity.mathematics": {
47 | "version": "1.2.6",
48 | "depth": 1,
49 | "source": "registry",
50 | "dependencies": {},
51 | "url": "https://packages.unity.com"
52 | },
53 | "com.unity.render-pipelines.core": {
54 | "version": "14.0.9",
55 | "depth": 1,
56 | "source": "builtin",
57 | "dependencies": {
58 | "com.unity.ugui": "1.0.0",
59 | "com.unity.modules.physics": "1.0.0",
60 | "com.unity.modules.terrain": "1.0.0",
61 | "com.unity.modules.jsonserialize": "1.0.0"
62 | }
63 | },
64 | "com.unity.render-pipelines.universal": {
65 | "version": "14.0.9",
66 | "depth": 0,
67 | "source": "builtin",
68 | "dependencies": {
69 | "com.unity.mathematics": "1.2.1",
70 | "com.unity.burst": "1.8.9",
71 | "com.unity.render-pipelines.core": "14.0.9",
72 | "com.unity.shadergraph": "14.0.9",
73 | "com.unity.render-pipelines.universal-config": "14.0.9"
74 | }
75 | },
76 | "com.unity.render-pipelines.universal-config": {
77 | "version": "14.0.9",
78 | "depth": 1,
79 | "source": "builtin",
80 | "dependencies": {
81 | "com.unity.render-pipelines.core": "14.0.9"
82 | }
83 | },
84 | "com.unity.searcher": {
85 | "version": "4.9.2",
86 | "depth": 2,
87 | "source": "registry",
88 | "dependencies": {},
89 | "url": "https://packages.unity.com"
90 | },
91 | "com.unity.shadergraph": {
92 | "version": "14.0.9",
93 | "depth": 1,
94 | "source": "builtin",
95 | "dependencies": {
96 | "com.unity.render-pipelines.core": "14.0.9",
97 | "com.unity.searcher": "4.9.2"
98 | }
99 | },
100 | "com.unity.test-framework": {
101 | "version": "1.1.33",
102 | "depth": 1,
103 | "source": "registry",
104 | "dependencies": {
105 | "com.unity.ext.nunit": "1.0.6",
106 | "com.unity.modules.imgui": "1.0.0",
107 | "com.unity.modules.jsonserialize": "1.0.0"
108 | },
109 | "url": "https://packages.unity.com"
110 | },
111 | "com.unity.textmeshpro": {
112 | "version": "3.0.7",
113 | "depth": 0,
114 | "source": "registry",
115 | "dependencies": {
116 | "com.unity.ugui": "1.0.0"
117 | },
118 | "url": "https://packages.unity.com"
119 | },
120 | "com.unity.ugui": {
121 | "version": "1.0.0",
122 | "depth": 0,
123 | "source": "builtin",
124 | "dependencies": {
125 | "com.unity.modules.ui": "1.0.0",
126 | "com.unity.modules.imgui": "1.0.0"
127 | }
128 | },
129 | "com.unity.modules.imgui": {
130 | "version": "1.0.0",
131 | "depth": 0,
132 | "source": "builtin",
133 | "dependencies": {}
134 | },
135 | "com.unity.modules.jsonserialize": {
136 | "version": "1.0.0",
137 | "depth": 1,
138 | "source": "builtin",
139 | "dependencies": {}
140 | },
141 | "com.unity.modules.physics": {
142 | "version": "1.0.0",
143 | "depth": 2,
144 | "source": "builtin",
145 | "dependencies": {}
146 | },
147 | "com.unity.modules.terrain": {
148 | "version": "1.0.0",
149 | "depth": 2,
150 | "source": "builtin",
151 | "dependencies": {}
152 | },
153 | "com.unity.modules.ui": {
154 | "version": "1.0.0",
155 | "depth": 0,
156 | "source": "builtin",
157 | "dependencies": {}
158 | },
159 | "com.unity.modules.uielements": {
160 | "version": "1.0.0",
161 | "depth": 0,
162 | "source": "builtin",
163 | "dependencies": {
164 | "com.unity.modules.ui": "1.0.0",
165 | "com.unity.modules.imgui": "1.0.0",
166 | "com.unity.modules.jsonserialize": "1.0.0"
167 | }
168 | }
169 | }
170 | }
171 |
--------------------------------------------------------------------------------
/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!11 &1
4 | AudioManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Volume: 1
8 | Rolloff Scale: 1
9 | Doppler Factor: 1
10 | Default Speaker Mode: 2
11 | m_SampleRate: 0
12 | m_DSPBufferSize: 1024
13 | m_VirtualVoiceCount: 512
14 | m_RealVoiceCount: 32
15 | m_EnableOutputSuspension: 1
16 | m_SpatializerPlugin:
17 | m_AmbisonicDecoderPlugin:
18 | m_DisableAudio: 0
19 | m_VirtualizeEffects: 1
20 | m_RequestedDSPBufferSize: 0
21 |
--------------------------------------------------------------------------------
/ProjectSettings/BurstAotSettings_StandaloneWindows.json:
--------------------------------------------------------------------------------
1 | {
2 | "MonoBehaviour": {
3 | "Version": 4,
4 | "EnableBurstCompilation": true,
5 | "EnableOptimisations": true,
6 | "EnableSafetyChecks": false,
7 | "EnableDebugInAllBuilds": false,
8 | "DebugDataKind": 1,
9 | "EnableArmv9SecurityFeatures": false,
10 | "CpuMinTargetX32": 0,
11 | "CpuMaxTargetX32": 0,
12 | "CpuMinTargetX64": 0,
13 | "CpuMaxTargetX64": 0,
14 | "CpuTargetsX32": 6,
15 | "CpuTargetsX64": 72,
16 | "OptimizeFor": 0
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/ProjectSettings/ClusterInputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!236 &1
4 | ClusterInputManager:
5 | m_ObjectHideFlags: 0
6 | m_Inputs: []
7 |
--------------------------------------------------------------------------------
/ProjectSettings/CommonBurstAotSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "MonoBehaviour": {
3 | "Version": 4,
4 | "DisabledWarnings": ""
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!55 &1
4 | PhysicsManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 14
7 | m_Gravity: {x: 0, y: -9.81, z: 0}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_BounceThreshold: 2
10 | m_DefaultMaxDepenetrationVelocity: 10
11 | m_SleepThreshold: 0.005
12 | m_DefaultContactOffset: 0.01
13 | m_DefaultSolverIterations: 6
14 | m_DefaultSolverVelocityIterations: 1
15 | m_QueriesHitBackfaces: 0
16 | m_QueriesHitTriggers: 1
17 | m_EnableAdaptiveForce: 0
18 | m_ClothInterCollisionDistance: 0.1
19 | m_ClothInterCollisionStiffness: 0.2
20 | m_ContactsGeneration: 1
21 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
22 | m_SimulationMode: 0
23 | m_AutoSyncTransforms: 0
24 | m_ReuseCollisionCallbacks: 0
25 | m_InvokeCollisionCallbacks: 1
26 | m_ClothInterCollisionSettingsToggle: 0
27 | m_ClothGravity: {x: 0, y: -9.81, z: 0}
28 | m_ContactPairsMode: 0
29 | m_BroadphaseType: 0
30 | m_WorldBounds:
31 | m_Center: {x: 0, y: 0, z: 0}
32 | m_Extent: {x: 250, y: 250, z: 250}
33 | m_WorldSubdivisions: 8
34 | m_FrictionType: 0
35 | m_EnableEnhancedDeterminism: 0
36 | m_EnableUnifiedHeightmaps: 1
37 | m_ImprovedPatchFriction: 0
38 | m_SolverType: 0
39 | m_DefaultMaxAngularSpeed: 50
40 |
--------------------------------------------------------------------------------
/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes: []
8 | m_configObjects: {}
9 |
--------------------------------------------------------------------------------
/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!159 &1
4 | EditorSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 12
7 | m_SerializationMode: 2
8 | m_LineEndingsForNewScripts: 2
9 | m_DefaultBehaviorMode: 0
10 | m_PrefabRegularEnvironment: {fileID: 0}
11 | m_PrefabUIEnvironment: {fileID: 0}
12 | m_SpritePackerMode: 0
13 | m_SpritePackerCacheSize: 10
14 | m_SpritePackerPaddingPower: 1
15 | m_Bc7TextureCompressor: 0
16 | m_EtcTextureCompressorBehavior: 1
17 | m_EtcTextureFastCompressor: 1
18 | m_EtcTextureNormalCompressor: 2
19 | m_EtcTextureBestCompressor: 4
20 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp;java;cpp;c;mm;m;h
21 | m_ProjectGenerationRootNamespace:
22 | m_EnableTextureStreamingInEditMode: 1
23 | m_EnableTextureStreamingInPlayMode: 1
24 | m_EnableEditorAsyncCPUTextureLoading: 0
25 | m_AsyncShaderCompilation: 1
26 | m_PrefabModeAllowAutoSave: 1
27 | m_EnterPlayModeOptionsEnabled: 0
28 | m_EnterPlayModeOptions: 3
29 | m_GameObjectNamingDigits: 1
30 | m_GameObjectNamingScheme: 0
31 | m_AssetNamingUsesSpace: 1
32 | m_InspectorUseIMGUIDefaultInspector: 0
33 | m_UseLegacyProbeSampleCount: 0
34 | m_SerializeInlineMappingsOnOneLine: 1
35 | m_DisableCookiesInLightmapper: 0
36 | m_AssetPipelineMode: 1
37 | m_RefreshImportMode: 0
38 | m_CacheServerMode: 0
39 | m_CacheServerEndpoint:
40 | m_CacheServerNamespacePrefix: default
41 | m_CacheServerEnableDownload: 1
42 | m_CacheServerEnableUpload: 1
43 | m_CacheServerEnableAuth: 0
44 | m_CacheServerEnableTls: 0
45 | m_CacheServerValidationMode: 2
46 | m_CacheServerDownloadBatchSize: 128
47 | m_EnableEnlightenBakedGI: 0
48 |
--------------------------------------------------------------------------------
/ProjectSettings/GraphicsSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!30 &1
4 | GraphicsSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 15
7 | m_Deferred:
8 | m_Mode: 1
9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
10 | m_DeferredReflections:
11 | m_Mode: 1
12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
13 | m_ScreenSpaceShadows:
14 | m_Mode: 1
15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
16 | m_DepthNormals:
17 | m_Mode: 1
18 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
19 | m_MotionVectors:
20 | m_Mode: 1
21 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
22 | m_LightHalo:
23 | m_Mode: 1
24 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
25 | m_LensFlare:
26 | m_Mode: 1
27 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
28 | m_VideoShadersIncludeMode: 2
29 | m_AlwaysIncludedShaders:
30 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
31 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
32 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
33 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
34 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
35 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
36 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
37 | m_PreloadedShaders: []
38 | m_PreloadShadersBatchTimeLimit: -1
39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
40 | m_CustomRenderPipeline: {fileID: 0}
41 | m_TransparencySortMode: 0
42 | m_TransparencySortAxis: {x: 0, y: 0, z: 1}
43 | m_DefaultRenderingPath: 1
44 | m_DefaultMobileRenderingPath: 1
45 | m_TierSettings: []
46 | m_LightmapStripping: 0
47 | m_FogStripping: 0
48 | m_InstancingStripping: 0
49 | m_BrgStripping: 0
50 | m_LightmapKeepPlain: 1
51 | m_LightmapKeepDirCombined: 1
52 | m_LightmapKeepDynamicPlain: 1
53 | m_LightmapKeepDynamicDirCombined: 1
54 | m_LightmapKeepShadowMask: 1
55 | m_LightmapKeepSubtractive: 1
56 | m_FogKeepLinear: 1
57 | m_FogKeepExp: 1
58 | m_FogKeepExp2: 1
59 | m_AlbedoSwatchInfos: []
60 | m_LightsUseLinearIntensity: 0
61 | m_LightsUseColorTemperature: 1
62 | m_DefaultRenderingLayerMask: 1
63 | m_LogWhenShaderIsCompiled: 0
64 | m_SRPDefaultSettings:
65 | UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: 18dc0cd2c080841dea60987a38ce93fa, type: 2}
66 | m_LightProbeOutsideHullStrategy: 1
67 | m_CameraRelativeLightCulling: 0
68 | m_CameraRelativeShadowCulling: 0
69 |
--------------------------------------------------------------------------------
/ProjectSettings/InputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!13 &1
4 | InputManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Axes:
8 | - serializedVersion: 3
9 | m_Name: Horizontal
10 | descriptiveName:
11 | descriptiveNegativeName:
12 | negativeButton: left
13 | positiveButton: right
14 | altNegativeButton: a
15 | altPositiveButton: d
16 | gravity: 3
17 | dead: 0.001
18 | sensitivity: 3
19 | snap: 1
20 | invert: 0
21 | type: 0
22 | axis: 0
23 | joyNum: 0
24 | - serializedVersion: 3
25 | m_Name: Vertical
26 | descriptiveName:
27 | descriptiveNegativeName:
28 | negativeButton: down
29 | positiveButton: up
30 | altNegativeButton: s
31 | altPositiveButton: w
32 | gravity: 3
33 | dead: 0.001
34 | sensitivity: 3
35 | snap: 1
36 | invert: 0
37 | type: 0
38 | axis: 0
39 | joyNum: 0
40 | - serializedVersion: 3
41 | m_Name: Fire1
42 | descriptiveName:
43 | descriptiveNegativeName:
44 | negativeButton:
45 | positiveButton: left ctrl
46 | altNegativeButton:
47 | altPositiveButton: mouse 0
48 | gravity: 1000
49 | dead: 0.001
50 | sensitivity: 1000
51 | snap: 0
52 | invert: 0
53 | type: 0
54 | axis: 0
55 | joyNum: 0
56 | - serializedVersion: 3
57 | m_Name: Fire2
58 | descriptiveName:
59 | descriptiveNegativeName:
60 | negativeButton:
61 | positiveButton: left alt
62 | altNegativeButton:
63 | altPositiveButton: mouse 1
64 | gravity: 1000
65 | dead: 0.001
66 | sensitivity: 1000
67 | snap: 0
68 | invert: 0
69 | type: 0
70 | axis: 0
71 | joyNum: 0
72 | - serializedVersion: 3
73 | m_Name: Fire3
74 | descriptiveName:
75 | descriptiveNegativeName:
76 | negativeButton:
77 | positiveButton: left shift
78 | altNegativeButton:
79 | altPositiveButton: mouse 2
80 | gravity: 1000
81 | dead: 0.001
82 | sensitivity: 1000
83 | snap: 0
84 | invert: 0
85 | type: 0
86 | axis: 0
87 | joyNum: 0
88 | - serializedVersion: 3
89 | m_Name: Jump
90 | descriptiveName:
91 | descriptiveNegativeName:
92 | negativeButton:
93 | positiveButton: space
94 | altNegativeButton:
95 | altPositiveButton:
96 | gravity: 1000
97 | dead: 0.001
98 | sensitivity: 1000
99 | snap: 0
100 | invert: 0
101 | type: 0
102 | axis: 0
103 | joyNum: 0
104 | - serializedVersion: 3
105 | m_Name: Mouse X
106 | descriptiveName:
107 | descriptiveNegativeName:
108 | negativeButton:
109 | positiveButton:
110 | altNegativeButton:
111 | altPositiveButton:
112 | gravity: 0
113 | dead: 0
114 | sensitivity: 0.1
115 | snap: 0
116 | invert: 0
117 | type: 1
118 | axis: 0
119 | joyNum: 0
120 | - serializedVersion: 3
121 | m_Name: Mouse Y
122 | descriptiveName:
123 | descriptiveNegativeName:
124 | negativeButton:
125 | positiveButton:
126 | altNegativeButton:
127 | altPositiveButton:
128 | gravity: 0
129 | dead: 0
130 | sensitivity: 0.1
131 | snap: 0
132 | invert: 0
133 | type: 1
134 | axis: 1
135 | joyNum: 0
136 | - serializedVersion: 3
137 | m_Name: Mouse ScrollWheel
138 | descriptiveName:
139 | descriptiveNegativeName:
140 | negativeButton:
141 | positiveButton:
142 | altNegativeButton:
143 | altPositiveButton:
144 | gravity: 0
145 | dead: 0
146 | sensitivity: 0.1
147 | snap: 0
148 | invert: 0
149 | type: 1
150 | axis: 2
151 | joyNum: 0
152 | - serializedVersion: 3
153 | m_Name: Horizontal
154 | descriptiveName:
155 | descriptiveNegativeName:
156 | negativeButton:
157 | positiveButton:
158 | altNegativeButton:
159 | altPositiveButton:
160 | gravity: 0
161 | dead: 0.19
162 | sensitivity: 1
163 | snap: 0
164 | invert: 0
165 | type: 2
166 | axis: 0
167 | joyNum: 0
168 | - serializedVersion: 3
169 | m_Name: Vertical
170 | descriptiveName:
171 | descriptiveNegativeName:
172 | negativeButton:
173 | positiveButton:
174 | altNegativeButton:
175 | altPositiveButton:
176 | gravity: 0
177 | dead: 0.19
178 | sensitivity: 1
179 | snap: 0
180 | invert: 1
181 | type: 2
182 | axis: 1
183 | joyNum: 0
184 | - serializedVersion: 3
185 | m_Name: Fire1
186 | descriptiveName:
187 | descriptiveNegativeName:
188 | negativeButton:
189 | positiveButton: joystick button 0
190 | altNegativeButton:
191 | altPositiveButton:
192 | gravity: 1000
193 | dead: 0.001
194 | sensitivity: 1000
195 | snap: 0
196 | invert: 0
197 | type: 0
198 | axis: 0
199 | joyNum: 0
200 | - serializedVersion: 3
201 | m_Name: Fire2
202 | descriptiveName:
203 | descriptiveNegativeName:
204 | negativeButton:
205 | positiveButton: joystick button 1
206 | altNegativeButton:
207 | altPositiveButton:
208 | gravity: 1000
209 | dead: 0.001
210 | sensitivity: 1000
211 | snap: 0
212 | invert: 0
213 | type: 0
214 | axis: 0
215 | joyNum: 0
216 | - serializedVersion: 3
217 | m_Name: Fire3
218 | descriptiveName:
219 | descriptiveNegativeName:
220 | negativeButton:
221 | positiveButton: joystick button 2
222 | altNegativeButton:
223 | altPositiveButton:
224 | gravity: 1000
225 | dead: 0.001
226 | sensitivity: 1000
227 | snap: 0
228 | invert: 0
229 | type: 0
230 | axis: 0
231 | joyNum: 0
232 | - serializedVersion: 3
233 | m_Name: Jump
234 | descriptiveName:
235 | descriptiveNegativeName:
236 | negativeButton:
237 | positiveButton: joystick button 3
238 | altNegativeButton:
239 | altPositiveButton:
240 | gravity: 1000
241 | dead: 0.001
242 | sensitivity: 1000
243 | snap: 0
244 | invert: 0
245 | type: 0
246 | axis: 0
247 | joyNum: 0
248 | - serializedVersion: 3
249 | m_Name: Submit
250 | descriptiveName:
251 | descriptiveNegativeName:
252 | negativeButton:
253 | positiveButton: return
254 | altNegativeButton:
255 | altPositiveButton: joystick button 0
256 | gravity: 1000
257 | dead: 0.001
258 | sensitivity: 1000
259 | snap: 0
260 | invert: 0
261 | type: 0
262 | axis: 0
263 | joyNum: 0
264 | - serializedVersion: 3
265 | m_Name: Submit
266 | descriptiveName:
267 | descriptiveNegativeName:
268 | negativeButton:
269 | positiveButton: enter
270 | altNegativeButton:
271 | altPositiveButton: space
272 | gravity: 1000
273 | dead: 0.001
274 | sensitivity: 1000
275 | snap: 0
276 | invert: 0
277 | type: 0
278 | axis: 0
279 | joyNum: 0
280 | - serializedVersion: 3
281 | m_Name: Cancel
282 | descriptiveName:
283 | descriptiveNegativeName:
284 | negativeButton:
285 | positiveButton: escape
286 | altNegativeButton:
287 | altPositiveButton: joystick button 1
288 | gravity: 1000
289 | dead: 0.001
290 | sensitivity: 1000
291 | snap: 0
292 | invert: 0
293 | type: 0
294 | axis: 0
295 | joyNum: 0
296 | m_UsePhysicalKeys: 1
297 |
--------------------------------------------------------------------------------
/ProjectSettings/MemorySettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!387306366 &1
4 | MemorySettings:
5 | m_ObjectHideFlags: 0
6 | m_EditorMemorySettings:
7 | m_MainAllocatorBlockSize: -1
8 | m_ThreadAllocatorBlockSize: -1
9 | m_MainGfxBlockSize: -1
10 | m_ThreadGfxBlockSize: -1
11 | m_CacheBlockSize: -1
12 | m_TypetreeBlockSize: -1
13 | m_ProfilerBlockSize: -1
14 | m_ProfilerEditorBlockSize: -1
15 | m_BucketAllocatorGranularity: -1
16 | m_BucketAllocatorBucketsCount: -1
17 | m_BucketAllocatorBlockSize: -1
18 | m_BucketAllocatorBlockCount: -1
19 | m_ProfilerBucketAllocatorGranularity: -1
20 | m_ProfilerBucketAllocatorBucketsCount: -1
21 | m_ProfilerBucketAllocatorBlockSize: -1
22 | m_ProfilerBucketAllocatorBlockCount: -1
23 | m_TempAllocatorSizeMain: -1
24 | m_JobTempAllocatorBlockSize: -1
25 | m_BackgroundJobTempAllocatorBlockSize: -1
26 | m_JobTempAllocatorReducedBlockSize: -1
27 | m_TempAllocatorSizeGIBakingWorker: -1
28 | m_TempAllocatorSizeNavMeshWorker: -1
29 | m_TempAllocatorSizeAudioWorker: -1
30 | m_TempAllocatorSizeCloudWorker: -1
31 | m_TempAllocatorSizeGfx: -1
32 | m_TempAllocatorSizeJobWorker: -1
33 | m_TempAllocatorSizeBackgroundWorker: -1
34 | m_TempAllocatorSizePreloadManager: -1
35 | m_PlatformMemorySettings: {}
36 |
--------------------------------------------------------------------------------
/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!126 &1
4 | NavMeshProjectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | areas:
8 | - name: Walkable
9 | cost: 1
10 | - name: Not Walkable
11 | cost: 1
12 | - name: Jump
13 | cost: 2
14 | - name:
15 | cost: 1
16 | - name:
17 | cost: 1
18 | - name:
19 | cost: 1
20 | - name:
21 | cost: 1
22 | - name:
23 | cost: 1
24 | - name:
25 | cost: 1
26 | - name:
27 | cost: 1
28 | - name:
29 | cost: 1
30 | - name:
31 | cost: 1
32 | - name:
33 | cost: 1
34 | - name:
35 | cost: 1
36 | - name:
37 | cost: 1
38 | - name:
39 | cost: 1
40 | - name:
41 | cost: 1
42 | - name:
43 | cost: 1
44 | - name:
45 | cost: 1
46 | - name:
47 | cost: 1
48 | - name:
49 | cost: 1
50 | - name:
51 | cost: 1
52 | - name:
53 | cost: 1
54 | - name:
55 | cost: 1
56 | - name:
57 | cost: 1
58 | - name:
59 | cost: 1
60 | - name:
61 | cost: 1
62 | - name:
63 | cost: 1
64 | - name:
65 | cost: 1
66 | - name:
67 | cost: 1
68 | - name:
69 | cost: 1
70 | - name:
71 | cost: 1
72 | m_LastAgentTypeID: -887442657
73 | m_Settings:
74 | - serializedVersion: 3
75 | agentTypeID: 0
76 | agentRadius: 0.5
77 | agentHeight: 2
78 | agentSlope: 45
79 | agentClimb: 0.75
80 | ledgeDropHeight: 0
81 | maxJumpAcrossDistance: 0
82 | minRegionArea: 2
83 | manualCellSize: 0
84 | cellSize: 0.16666667
85 | manualTileSize: 0
86 | tileSize: 256
87 | buildHeightMesh: 0
88 | maxJobWorkers: 0
89 | preserveTilesOutsideBounds: 0
90 | debug:
91 | m_Flags: 0
92 | m_SettingNames:
93 | - Humanoid
94 |
--------------------------------------------------------------------------------
/ProjectSettings/PackageManagerSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &1
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 61
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0}
13 | m_Name:
14 | m_EditorClassIdentifier:
15 | m_EnablePreReleasePackages: 0
16 | m_AdvancedSettingsExpanded: 1
17 | m_ScopedRegistriesSettingsExpanded: 1
18 | m_SeeAllPackageVersions: 0
19 | m_DismissPreviewPackagesInUse: 0
20 | oneTimeWarningShown: 0
21 | m_Registries:
22 | - m_Id: main
23 | m_Name:
24 | m_Url: https://packages.unity.com
25 | m_Scopes: []
26 | m_IsDefault: 1
27 | m_Capabilities: 7
28 | m_ConfigSource: 0
29 | m_UserSelectedRegistryName:
30 | m_UserAddingNewScopedRegistry: 0
31 | m_RegistryInfoDraft:
32 | m_Modified: 0
33 | m_ErrorMessage:
34 | m_UserModificationsInstanceId: -836
35 | m_OriginalInstanceId: -838
36 | m_LoadAssets: 0
37 |
--------------------------------------------------------------------------------
/ProjectSettings/Packages/com.unity.services.core/Settings.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/homemech/unity-pattern-combo/2126a8c8799690f29a91c334acd0724e87d5518b/ProjectSettings/Packages/com.unity.services.core/Settings.json
--------------------------------------------------------------------------------
/ProjectSettings/Physics2DSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!19 &1
4 | Physics2DSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 6
7 | m_Gravity: {x: 0, y: -9.81}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_VelocityIterations: 8
10 | m_PositionIterations: 3
11 | m_VelocityThreshold: 1
12 | m_MaxLinearCorrection: 0.2
13 | m_MaxAngularCorrection: 8
14 | m_MaxTranslationSpeed: 100
15 | m_MaxRotationSpeed: 360
16 | m_BaumgarteScale: 0.2
17 | m_BaumgarteTimeOfImpactScale: 0.75
18 | m_TimeToSleep: 0.5
19 | m_LinearSleepTolerance: 0.01
20 | m_AngularSleepTolerance: 2
21 | m_DefaultContactOffset: 0.01
22 | m_JobOptions:
23 | serializedVersion: 2
24 | useMultithreading: 0
25 | useConsistencySorting: 0
26 | m_InterpolationPosesPerJob: 100
27 | m_NewContactsPerJob: 30
28 | m_CollideContactsPerJob: 100
29 | m_ClearFlagsPerJob: 200
30 | m_ClearBodyForcesPerJob: 200
31 | m_SyncDiscreteFixturesPerJob: 50
32 | m_SyncContinuousFixturesPerJob: 50
33 | m_FindNearestContactsPerJob: 100
34 | m_UpdateTriggerContactsPerJob: 100
35 | m_IslandSolverCostThreshold: 100
36 | m_IslandSolverBodyCostScale: 1
37 | m_IslandSolverContactCostScale: 10
38 | m_IslandSolverJointCostScale: 10
39 | m_IslandSolverBodiesPerJob: 50
40 | m_IslandSolverContactsPerJob: 50
41 | m_SimulationMode: 0
42 | m_QueriesHitTriggers: 1
43 | m_QueriesStartInColliders: 1
44 | m_CallbacksOnDisable: 1
45 | m_ReuseCollisionCallbacks: 1
46 | m_AutoSyncTransforms: 0
47 | m_GizmoOptions: 10
48 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
49 |
--------------------------------------------------------------------------------
/ProjectSettings/PresetManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1386491679 &1
4 | PresetManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_DefaultPresets: {}
8 |
--------------------------------------------------------------------------------
/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 2022.3.17f1
2 | m_EditorVersionWithRevision: 2022.3.17f1 (4fc78088f837)
3 |
--------------------------------------------------------------------------------
/ProjectSettings/QualitySettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!47 &1
4 | QualitySettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 5
7 | m_CurrentQuality: 0
8 | m_QualitySettings:
9 | - serializedVersion: 3
10 | name: Medium
11 | pixelLightCount: 1
12 | shadows: 1
13 | shadowResolution: 0
14 | shadowProjection: 1
15 | shadowCascades: 1
16 | shadowDistance: 20
17 | shadowNearPlaneOffset: 3
18 | shadowCascade2Split: 0.33333334
19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
20 | shadowmaskMode: 0
21 | skinWeights: 2
22 | globalTextureMipmapLimit: 0
23 | textureMipmapLimitSettings: []
24 | anisotropicTextures: 1
25 | antiAliasing: 0
26 | softParticles: 0
27 | softVegetation: 0
28 | realtimeReflectionProbes: 0
29 | billboardsFaceCameraPosition: 0
30 | useLegacyDetailDistribution: 0
31 | vSyncCount: 1
32 | lodBias: 0.7
33 | maximumLODLevel: 0
34 | enableLODCrossFade: 1
35 | streamingMipmapsActive: 0
36 | streamingMipmapsAddAllCameras: 1
37 | streamingMipmapsMemoryBudget: 512
38 | streamingMipmapsRenderersPerFrame: 512
39 | streamingMipmapsMaxLevelReduction: 2
40 | streamingMipmapsMaxFileIORequests: 1024
41 | particleRaycastBudget: 64
42 | asyncUploadTimeSlice: 2
43 | asyncUploadBufferSize: 16
44 | asyncUploadPersistentBuffer: 1
45 | resolutionScalingFixedDPIFactor: 1
46 | customRenderPipeline: {fileID: 11400000, guid: e1260c1148f6143b28bae5ace5e9c5d1, type: 2}
47 | terrainQualityOverrides: 0
48 | terrainPixelError: 1
49 | terrainDetailDensityScale: 1
50 | terrainBasemapDistance: 1000
51 | terrainDetailDistance: 80
52 | terrainTreeDistance: 5000
53 | terrainBillboardStart: 50
54 | terrainFadeLength: 5
55 | terrainMaxTrees: 50
56 | excludedTargetPlatforms: []
57 | m_TextureMipmapLimitGroupNames: []
58 | m_PerPlatformDefaultQuality:
59 | Android: 0
60 | Bratwurst: 0
61 | EmbeddedLinux: 0
62 | GameCoreScarlett: 0
63 | GameCoreXboxOne: 0
64 | LinuxHeadlessSimulation: 0
65 | Nintendo Switch: 0
66 | PS4: 0
67 | PS5: 0
68 | QNX: 0
69 | Server: 0
70 | Stadia: 0
71 | Standalone: 0
72 | WebGL: 0
73 | Windows Store Apps: 0
74 | XboxOne: 0
75 | iPhone: 0
76 | tvOS: 0
77 |
--------------------------------------------------------------------------------
/ProjectSettings/SceneTemplateSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "templatePinStates": [],
3 | "dependencyTypeInfos": [
4 | {
5 | "userAdded": false,
6 | "type": "UnityEngine.AnimationClip",
7 | "defaultInstantiationMode": 0
8 | },
9 | {
10 | "userAdded": false,
11 | "type": "UnityEditor.Animations.AnimatorController",
12 | "defaultInstantiationMode": 0
13 | },
14 | {
15 | "userAdded": false,
16 | "type": "UnityEngine.AnimatorOverrideController",
17 | "defaultInstantiationMode": 0
18 | },
19 | {
20 | "userAdded": false,
21 | "type": "UnityEditor.Audio.AudioMixerController",
22 | "defaultInstantiationMode": 0
23 | },
24 | {
25 | "userAdded": false,
26 | "type": "UnityEngine.ComputeShader",
27 | "defaultInstantiationMode": 1
28 | },
29 | {
30 | "userAdded": false,
31 | "type": "UnityEngine.Cubemap",
32 | "defaultInstantiationMode": 0
33 | },
34 | {
35 | "userAdded": false,
36 | "type": "UnityEngine.GameObject",
37 | "defaultInstantiationMode": 0
38 | },
39 | {
40 | "userAdded": false,
41 | "type": "UnityEditor.LightingDataAsset",
42 | "defaultInstantiationMode": 0
43 | },
44 | {
45 | "userAdded": false,
46 | "type": "UnityEngine.LightingSettings",
47 | "defaultInstantiationMode": 0
48 | },
49 | {
50 | "userAdded": false,
51 | "type": "UnityEngine.Material",
52 | "defaultInstantiationMode": 0
53 | },
54 | {
55 | "userAdded": false,
56 | "type": "UnityEditor.MonoScript",
57 | "defaultInstantiationMode": 1
58 | },
59 | {
60 | "userAdded": false,
61 | "type": "UnityEngine.PhysicMaterial",
62 | "defaultInstantiationMode": 0
63 | },
64 | {
65 | "userAdded": false,
66 | "type": "UnityEngine.PhysicsMaterial2D",
67 | "defaultInstantiationMode": 0
68 | },
69 | {
70 | "userAdded": false,
71 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile",
72 | "defaultInstantiationMode": 0
73 | },
74 | {
75 | "userAdded": false,
76 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources",
77 | "defaultInstantiationMode": 0
78 | },
79 | {
80 | "userAdded": false,
81 | "type": "UnityEngine.Rendering.VolumeProfile",
82 | "defaultInstantiationMode": 0
83 | },
84 | {
85 | "userAdded": false,
86 | "type": "UnityEditor.SceneAsset",
87 | "defaultInstantiationMode": 1
88 | },
89 | {
90 | "userAdded": false,
91 | "type": "UnityEngine.Shader",
92 | "defaultInstantiationMode": 1
93 | },
94 | {
95 | "userAdded": false,
96 | "type": "UnityEngine.ShaderVariantCollection",
97 | "defaultInstantiationMode": 1
98 | },
99 | {
100 | "userAdded": false,
101 | "type": "UnityEngine.Texture",
102 | "defaultInstantiationMode": 0
103 | },
104 | {
105 | "userAdded": false,
106 | "type": "UnityEngine.Texture2D",
107 | "defaultInstantiationMode": 0
108 | },
109 | {
110 | "userAdded": false,
111 | "type": "UnityEngine.Timeline.TimelineAsset",
112 | "defaultInstantiationMode": 0
113 | }
114 | ],
115 | "defaultDependencyTypeInfo": {
116 | "userAdded": false,
117 | "type": "",
118 | "defaultInstantiationMode": 1
119 | },
120 | "newSceneOverride": 0
121 | }
--------------------------------------------------------------------------------
/ProjectSettings/ShaderGraphSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &1
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 61
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: de02f9e1d18f588468e474319d09a723, type: 3}
13 | m_Name:
14 | m_EditorClassIdentifier:
15 | shaderVariantLimit: 128
16 | customInterpolatorErrorThreshold: 32
17 | customInterpolatorWarningThreshold: 16
18 |
--------------------------------------------------------------------------------
/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!78 &1
4 | TagManager:
5 | serializedVersion: 2
6 | tags: []
7 | layers:
8 | - Default
9 | - TransparentFX
10 | - Ignore Raycast
11 | -
12 | - Water
13 | - UI
14 | -
15 | -
16 | -
17 | -
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | m_SortingLayers:
41 | - name: Default
42 | uniqueID: 0
43 | locked: 0
44 |
--------------------------------------------------------------------------------
/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!5 &1
4 | TimeManager:
5 | m_ObjectHideFlags: 0
6 | Fixed Timestep: 0.02
7 | Maximum Allowed Timestep: 0.33333334
8 | m_TimeScale: 1
9 | Maximum Particle Timestep: 0.03
10 |
--------------------------------------------------------------------------------
/ProjectSettings/URPProjectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &1
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 61
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: 247994e1f5a72c2419c26a37e9334c01, type: 3}
13 | m_Name:
14 | m_EditorClassIdentifier:
15 | m_LastMaterialVersion: 7
16 |
--------------------------------------------------------------------------------
/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!310 &1
4 | UnityConnectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 1
7 | m_Enabled: 0
8 | m_TestMode: 0
9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com
12 | m_DashboardUrl: https://dashboard.unity3d.com
13 | m_TestInitMode: 0
14 | CrashReportingSettings:
15 | m_EventUrl: https://perf-events.cloud.unity3d.com
16 | m_Enabled: 0
17 | m_LogBufferSize: 10
18 | m_CaptureEditorExceptions: 1
19 | UnityPurchasingSettings:
20 | m_Enabled: 0
21 | m_TestMode: 0
22 | UnityAnalyticsSettings:
23 | m_Enabled: 0
24 | m_TestMode: 0
25 | m_InitializeOnStartup: 1
26 | m_PackageRequiringCoreStatsPresent: 0
27 | UnityAdsSettings:
28 | m_Enabled: 0
29 | m_InitializeOnStartup: 1
30 | m_TestMode: 0
31 | m_IosGameId:
32 | m_AndroidGameId:
33 | m_GameIds: {}
34 | m_GameId:
35 | PerformanceReportingSettings:
36 | m_Enabled: 0
37 |
--------------------------------------------------------------------------------
/ProjectSettings/VFXManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!937362698 &1
4 | VFXManager:
5 | m_ObjectHideFlags: 0
6 | m_IndirectShader: {fileID: 0}
7 | m_CopyBufferShader: {fileID: 0}
8 | m_SortShader: {fileID: 0}
9 | m_StripUpdateShader: {fileID: 0}
10 | m_RenderPipeSettingsPath:
11 | m_FixedTimeStep: 0.016666668
12 | m_MaxDeltaTime: 0.05
13 | m_MaxScrubTime: 30
14 | m_CompiledVersion: 0
15 | m_RuntimeVersion: 0
16 | m_RuntimeResources: {fileID: 0}
17 | m_BatchEmptyLifetime: 300
18 |
--------------------------------------------------------------------------------
/ProjectSettings/VersionControlSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!890905787 &1
4 | VersionControlSettings:
5 | m_ObjectHideFlags: 0
6 | m_Mode: Visible Meta Files
7 | m_CollabEditorSettings:
8 | inProgressEnabled: 1
9 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # unity-pattern-combo
2 |
3 | An action/fighting game combo system centered on the command pattern. Created in December 2023 as a supplement for Unity e-book "Level up your code with game programming patterns"
4 |
5 | This demo involves most of the programming patterns in Unity's e-book:
6 |
7 | https://unity.com/resources/level-up-your-code-with-game-programming-patterns
8 |
9 | ## Getting Started:
10 |
11 | Open **PatternComboDemo** in the UnityPatternCombo folder.
12 |
13 | **Note:** This project requires a **game controller** given the arcade/action game style of the combo system. Buttons are named to the Xbox controller layout. You can edit the SideFighterControls input actions in the **ComboScripts** folder if you would like to add keyboard buttons.
14 |
--------------------------------------------------------------------------------