├── .github
├── ISSUE_TEMPLATE
│ └── bug-report---bug反馈.md
└── workflows
│ └── auto_gen_toc.yml
├── .gitignore
├── .obsidian
├── app.json
├── appearance.json
├── community-plugins.json
├── core-plugins.json
├── plugins
│ ├── copy-url-in-preview
│ │ ├── main.js
│ │ └── manifest.json
│ └── obsidian-git
│ │ ├── data.json
│ │ ├── main.js
│ │ ├── manifest.json
│ │ └── styles.css
└── workspace.json
├── Editor.meta
├── Editor
├── AssetProcessor.meta
├── AssetProcessor
│ ├── ExcludeFromBuild.cs
│ ├── ExcludeFromBuild.cs.meta
│ ├── ShaderModifyListener.cs
│ └── ShaderModifyListener.cs.meta
├── CustomGUISample.meta
├── CustomGUISample
│ ├── CustomFooter.cs
│ ├── CustomFooter.cs.meta
│ ├── CustomHeader.cs
│ ├── CustomHeader.cs.meta
│ ├── CustomMaterialAssetFinder.cs
│ └── CustomMaterialAssetFinder.cs.meta
├── Helper.meta
├── Helper
│ ├── Helper.cs
│ ├── Helper.cs.meta
│ ├── MetaDataHelper.cs
│ ├── MetaDataHelper.cs.meta
│ ├── PresetHelper.cs
│ ├── PresetHelper.cs.meta
│ ├── RampHelper.cs
│ ├── RampHelper.cs.meta
│ ├── RevertableHelper.cs
│ ├── RevertableHelper.cs.meta
│ ├── VersionControlHelper.cs
│ └── VersionControlHelper.cs.meta
├── Icon.meta
├── Icon
│ ├── Checkout.png
│ ├── Checkout.png.meta
│ ├── Collapse.png
│ ├── Collapse.png.meta
│ ├── Copy.png
│ ├── Copy.png.meta
│ ├── Expand.png
│ ├── Expand.png.meta
│ ├── Logo.png
│ ├── Logo.png.meta
│ ├── Logo2.png
│ ├── Logo2.png.meta
│ ├── Paste.png
│ ├── Paste.png.meta
│ ├── RevertIcon.png
│ ├── RevertIcon.png.meta
│ ├── SelectMaterialAsset.png
│ ├── SelectMaterialAsset.png.meta
│ ├── Visibility.png
│ └── Visibility.png.meta
├── LWGUI.asmdef
├── LWGUI.asmdef.meta
├── LWGUI.cs
├── LWGUI.cs.meta
├── MetaData.meta
├── MetaData
│ ├── PerInspectorData.cs
│ ├── PerInspectorData.cs.meta
│ ├── PerMaterialData.cs
│ ├── PerMaterialData.cs.meta
│ ├── PerShaderData.cs
│ └── PerShaderData.cs.meta
├── ScriptableObject.meta
├── ScriptableObject
│ ├── GradientObject.cs
│ ├── GradientObject.cs.meta
│ ├── LwguiRampAtlas.cs
│ ├── LwguiRampAtlas.cs.meta
│ ├── LwguiShaderPropertyPreset.cs
│ └── LwguiShaderPropertyPreset.cs.meta
├── ShaderDrawer.cs
├── ShaderDrawer.cs.meta
├── Timeline.meta
└── Timeline
│ ├── Editor.meta
│ ├── Editor
│ ├── LWGUI.Timeline.Editor.asmdef
│ ├── LWGUI.Timeline.Editor.asmdef.meta
│ ├── MaterialKeywordToggleTrackEditor.cs
│ └── MaterialKeywordToggleTrackEditor.cs.meta
│ ├── LWGUI.Timeline.asmdef
│ ├── LWGUI.Timeline.asmdef.meta
│ ├── TimelineHelper.cs
│ └── TimelineHelper.cs.meta
├── LICENSE
├── LICENSE.meta
├── README.md
├── README.md.meta
├── README_CN.md
├── README_CN.md.meta
├── Runtime.meta
├── Runtime
├── LWGUI.Runtime.asmdef
├── LWGUI.Runtime.asmdef.meta
├── LwguiGradient.meta
├── LwguiGradient
│ ├── LwguiGradient.cs
│ ├── LwguiGradient.cs.meta
│ ├── LwguiGradientHelper.cs
│ └── LwguiGradientHelper.cs.meta
├── RuntimeHelper.cs
├── RuntimeHelper.cs.meta
├── Timeline.meta
└── Timeline
│ ├── LWGUI.Runtime.Timeline.asmdef
│ ├── LWGUI.Runtime.Timeline.asmdef.meta
│ ├── MaterialKeywordToggle.meta
│ └── MaterialKeywordToggle
│ ├── MaterialKeywordTogglePlayableAsset.cs
│ ├── MaterialKeywordTogglePlayableAsset.cs.meta
│ ├── MaterialKeywordTogglePlayableBehaviour.cs
│ ├── MaterialKeywordTogglePlayableBehaviour.cs.meta
│ ├── MaterialKeywordToggleTrack.cs
│ ├── MaterialKeywordToggleTrack.cs.meta
│ ├── MaterialKeywordToggleTrackBehaviour.cs
│ └── MaterialKeywordToggleTrackBehaviour.cs.meta
├── Test.meta
├── Test
├── .ShowEditorIcons.cs
├── .ShowEditorStyles.cs
├── LWGUI_KeywordTest 1.mat
├── LWGUI_KeywordTest 1.mat.meta
├── LWGUI_KeywordTest Variant.mat
├── LWGUI_KeywordTest Variant.mat.meta
├── LWGUI_KeywordTest.mat
├── LWGUI_KeywordTest.mat.meta
├── LWGUI_Preset_BlendMode.asset
├── LWGUI_Preset_BlendMode.asset.meta
├── LWGUI_Preset_Toggle.asset
├── LWGUI_Preset_Toggle.asset.meta
├── LWGUI_RampAtlas.asset
├── LWGUI_RampAtlas.asset.meta
├── LWGUI_RampAtlas.tga
├── LWGUI_RampAtlas.tga.meta
├── LWGUI_SampleAmplifyShader.mat
├── LWGUI_SampleAmplifyShader.mat.meta
├── LWGUI_SampleDrawerA.mat
├── LWGUI_SampleDrawerA.mat.meta
├── LWGUI_SampleDrawerA1.mat
├── LWGUI_SampleDrawerA1.mat.meta
├── LWGUI_SampleDrawerB.mat
├── LWGUI_SampleDrawerB.mat.meta
├── LWGUI_SampleDrawerB1.mat
├── LWGUI_SampleDrawerB1.mat.meta
├── LWGUI_ShaderPropertyPreset.asset
├── LWGUI_ShaderPropertyPreset.asset.meta
├── LWGUI_ShaderPropertyPreset1.asset
├── LWGUI_ShaderPropertyPreset1.asset.meta
├── LWGUI_ShaderPropertyPreset2.asset
├── LWGUI_ShaderPropertyPreset2.asset.meta
├── RampMap_Linear.png
├── RampMap_Linear.png.meta
├── RampMap_Test.png
├── RampMap_Test.png.meta
├── RampMap_sRGB.png
├── RampMap_sRGB.png.meta
├── SampleAmplifyShader.shader
├── SampleAmplifyShader.shader.meta
├── SampleDrawerA.shader
├── SampleDrawerA.shader.meta
├── SampleDrawerB.shader
├── SampleDrawerB.shader.meta
├── SampleKeyword.shader
└── SampleKeyword.shader.meta
├── UnityEditorExtension.meta
├── UnityEditorExtension
├── LwguiGradientEditor.meta
├── LwguiGradientEditor
│ ├── LwguiGradientDrawer.cs
│ ├── LwguiGradientDrawer.cs.meta
│ ├── LwguiGradientEditor.cs
│ ├── LwguiGradientEditor.cs.meta
│ ├── LwguiGradientEditorHelper.cs
│ ├── LwguiGradientEditorHelper.cs.meta
│ ├── LwguiGradientPresetLibrary.cs
│ ├── LwguiGradientPresetLibrary.cs.meta
│ ├── LwguiGradientPresetLibraryInspector.cs
│ ├── LwguiGradientPresetLibraryInspector.cs.meta
│ ├── LwguiGradientWindow.cs
│ └── LwguiGradientWindow.cs.meta
├── README.md
├── README.md.meta
├── ReflectionHelper.cs
├── ReflectionHelper.cs.meta
├── Unity.InternalAPIEditorBridge.020.asmdef
├── Unity.InternalAPIEditorBridge.020.asmdef.meta
├── UnityEditorExtension.cs
└── UnityEditorExtension.cs.meta
├── assets~
├── 723ddce6-fb86-48ff-9683-a12cf6cff7a0.jpg
├── 809c4a1c-ce80-48b1-b415-7e8d4bea716e-16616214059841.png
├── LWGUI.png
├── Pasted image 20250321174432.png
├── Pasted image 20250522183200.png
├── Pasted image 20250523120309.png
├── image-20220822010511978.png
├── image-20220828003026556.png
├── image-20220828003129588.png
├── image-20220828003507825.png
├── image-20220828003810353.png
├── image-20220926025611208.png
├── image-20221122231655378.png
├── image-20221122231816714.png
├── image-20221122232307362.png
├── image-20221122232354623.png
├── image-20221122232415972.png
├── image-20221122232425194.png
├── image-20221231221240686.png
├── image-20221231221254101.png
├── image-20230625185730363.png
├── image-20230821211652918.png
├── image-20231007163044176.png
├── image-20231023010137495.png
├── image-20231023010153213.png
├── image-20231023010204399.png
├── image-20240416142736663.png
├── image-20240716183800118.png
├── image-20240717104144821.png
├── image-20240717104206365.png
├── image-20241126105823397.png
├── image-20241126110012922.png
├── image-20241126112320151.png
├── image-20241127180711449.png
└── image-20250314160119094.png
├── package.json
└── package.json.meta
/.github/ISSUE_TEMPLATE/bug-report---bug反馈.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report / Bug反馈
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: bug
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug / 描述你遇到的Bug**
11 | A clear and concise description of what the bug is. / 清晰描述你遇到的问题。
12 |
13 | **To Reproduce / 复现步骤**
14 | 1. Go to '...'
15 | 2. Click on '....'
16 | 3. Scroll down to '....'
17 | 4. See error
18 |
19 | **Screenshots / 截图**
20 |
21 |
22 | **Unity Version / Unity版本**
23 | - 2021.3.29
24 |
--------------------------------------------------------------------------------
/.github/workflows/auto_gen_toc.yml:
--------------------------------------------------------------------------------
1 | on:
2 | push:
3 | paths: ['README.md', 'README_CN.md']
4 | pull_request:
5 | paths: ['README.md', 'README_CN.md']
6 |
7 | jobs:
8 | build:
9 | runs-on: ubuntu-latest
10 | timeout-minutes: 5
11 | steps:
12 | - uses: actions/checkout@v2
13 | - run: |
14 | curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc -o gh-md-toc
15 | chmod a+x gh-md-toc
16 | ./gh-md-toc --insert --no-backup --hide-footer README.md
17 | rm -f ./gh-md-toc
18 | - run: |
19 | curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc -o gh-md-toc
20 | chmod a+x gh-md-toc
21 | ./gh-md-toc --insert --no-backup --hide-footer README_CN.md
22 | rm -f ./gh-md-toc
23 | - uses: stefanzweifel/git-auto-commit-action@v4
24 | with:
25 | commit_message: Auto update markdown TOC
26 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | **HYG**
2 |
--------------------------------------------------------------------------------
/.obsidian/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "useMarkdownLinks": true,
3 | "newLinkFormat": "relative",
4 | "showUnsupportedFiles": false,
5 | "attachmentFolderPath": "./assets~",
6 | "promptDelete": false
7 | }
--------------------------------------------------------------------------------
/.obsidian/appearance.json:
--------------------------------------------------------------------------------
1 | {
2 | "monospaceFontFamily": "JetBrains Mono"
3 | }
--------------------------------------------------------------------------------
/.obsidian/community-plugins.json:
--------------------------------------------------------------------------------
1 | [
2 | "obsidian-git",
3 | "copy-url-in-preview"
4 | ]
--------------------------------------------------------------------------------
/.obsidian/core-plugins.json:
--------------------------------------------------------------------------------
1 | {
2 | "file-explorer": true,
3 | "global-search": true,
4 | "switcher": true,
5 | "graph": true,
6 | "backlink": true,
7 | "canvas": true,
8 | "outgoing-link": true,
9 | "tag-pane": true,
10 | "properties": false,
11 | "page-preview": true,
12 | "daily-notes": true,
13 | "templates": true,
14 | "note-composer": true,
15 | "command-palette": true,
16 | "slash-command": false,
17 | "editor-status": true,
18 | "bookmarks": true,
19 | "markdown-importer": false,
20 | "zk-prefixer": false,
21 | "random-note": false,
22 | "outline": true,
23 | "word-count": true,
24 | "slides": false,
25 | "audio-recorder": false,
26 | "workspaces": false,
27 | "file-recovery": true,
28 | "publish": false,
29 | "sync": false,
30 | "webviewer": false
31 | }
--------------------------------------------------------------------------------
/.obsidian/plugins/copy-url-in-preview/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "copy-url-in-preview",
3 | "name": "Image Context Menus",
4 | "version": "1.10.0",
5 | "minAppVersion": "1.6.6",
6 | "description": "Copy to clipboard, Open in default app, Show in system explorer, Reveal file in navigation, Open in new tab context menus for images.",
7 | "author": "NomarCub",
8 | "authorUrl": "https://github.com/NomarCub",
9 | "fundingUrl": "https://ko-fi.com/nomarcub",
10 | "isDesktopOnly": false
11 | }
--------------------------------------------------------------------------------
/.obsidian/plugins/obsidian-git/data.json:
--------------------------------------------------------------------------------
1 | {
2 | "commitMessage": "vault backup: {{date}}",
3 | "autoCommitMessage": "vault backup: {{date}}",
4 | "commitDateFormat": "YYYY-MM-DD HH:mm:ss",
5 | "autoSaveInterval": 0,
6 | "autoPushInterval": 0,
7 | "autoPullInterval": 0,
8 | "autoPullOnBoot": false,
9 | "disablePush": false,
10 | "pullBeforePush": true,
11 | "disablePopups": false,
12 | "showErrorNotices": true,
13 | "disablePopupsForNoChanges": false,
14 | "listChangedFilesInMessageBody": false,
15 | "showStatusBar": true,
16 | "updateSubmodules": false,
17 | "syncMethod": "merge",
18 | "customMessageOnAutoBackup": false,
19 | "autoBackupAfterFileChange": false,
20 | "treeStructure": true,
21 | "refreshSourceControl": true,
22 | "basePath": "",
23 | "differentIntervalCommitAndPush": false,
24 | "changedFilesInStatusBar": true,
25 | "showedMobileNotice": true,
26 | "refreshSourceControlTimer": 7000,
27 | "showBranchStatusBar": true,
28 | "setLastSaveToLastCommit": false,
29 | "submoduleRecurseCheckout": false,
30 | "gitDir": "",
31 | "showFileMenu": true,
32 | "authorInHistoryView": "hide",
33 | "dateInHistoryView": false,
34 | "diffStyle": "git_unified",
35 | "lineAuthor": {
36 | "show": false,
37 | "followMovement": "inactive",
38 | "authorDisplay": "initials",
39 | "showCommitHash": false,
40 | "dateTimeFormatOptions": "date",
41 | "dateTimeFormatCustomString": "YYYY-MM-DD HH:mm",
42 | "dateTimeTimezone": "viewer-local",
43 | "coloringMaxAge": "1y",
44 | "colorNew": {
45 | "r": 255,
46 | "g": 150,
47 | "b": 150
48 | },
49 | "colorOld": {
50 | "r": 120,
51 | "g": 160,
52 | "b": 255
53 | },
54 | "textColorCss": "var(--text-muted)",
55 | "ignoreWhitespace": false,
56 | "gutterSpacingFallbackLength": 5,
57 | "lastShownAuthorDisplay": "initials",
58 | "lastShownDateTimeFormatOptions": "date"
59 | }
60 | }
--------------------------------------------------------------------------------
/.obsidian/plugins/obsidian-git/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": "Vinzent",
3 | "authorUrl": "https://github.com/Vinzent03",
4 | "id": "obsidian-git",
5 | "name": "Git",
6 | "description": "Integrate Git version control with automatic backup and other advanced features.",
7 | "isDesktopOnly": false,
8 | "fundingUrl": "https://ko-fi.com/vinzent",
9 | "version": "2.33.0"
10 | }
11 |
--------------------------------------------------------------------------------
/.obsidian/workspace.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": {
3 | "id": "1f7e23f0732f3025",
4 | "type": "split",
5 | "children": [
6 | {
7 | "id": "39735eaedba9e390",
8 | "type": "tabs",
9 | "children": [
10 | {
11 | "id": "1ab61776fdab9c7c",
12 | "type": "leaf",
13 | "state": {
14 | "type": "markdown",
15 | "state": {
16 | "file": "README_CN.md",
17 | "mode": "source",
18 | "source": false
19 | },
20 | "icon": "lucide-file",
21 | "title": "README_CN"
22 | }
23 | },
24 | {
25 | "id": "9cf7a17009ed6e2f",
26 | "type": "leaf",
27 | "state": {
28 | "type": "diff-view",
29 | "state": {
30 | "aFile": "README_CN.md",
31 | "bFile": "README_CN.md",
32 | "aRef": ""
33 | },
34 | "icon": "git-pull-request",
35 | "title": "Diff: README_CN"
36 | }
37 | }
38 | ]
39 | },
40 | {
41 | "id": "b0664b3e516452e0",
42 | "type": "tabs",
43 | "children": [
44 | {
45 | "id": "d93ffc2d4e7b14bd",
46 | "type": "leaf",
47 | "state": {
48 | "type": "markdown",
49 | "state": {
50 | "file": "README.md",
51 | "mode": "source",
52 | "source": false
53 | },
54 | "icon": "lucide-file",
55 | "title": "README"
56 | }
57 | }
58 | ]
59 | }
60 | ],
61 | "direction": "vertical"
62 | },
63 | "left": {
64 | "id": "80afda9f74e5cfce",
65 | "type": "split",
66 | "children": [
67 | {
68 | "id": "bc6b7c9f86bd7a96",
69 | "type": "tabs",
70 | "dimension": 27.346570397111915,
71 | "children": [
72 | {
73 | "id": "cf0e306c4c9c7d11",
74 | "type": "leaf",
75 | "state": {
76 | "type": "file-explorer",
77 | "state": {
78 | "sortOrder": "alphabetical",
79 | "autoReveal": false
80 | },
81 | "icon": "lucide-folder-closed",
82 | "title": "Files"
83 | }
84 | },
85 | {
86 | "id": "b63c4e6eaee600b7",
87 | "type": "leaf",
88 | "state": {
89 | "type": "search",
90 | "state": {
91 | "query": "",
92 | "matchingCase": false,
93 | "explainSearch": false,
94 | "collapseAll": false,
95 | "extraContext": false,
96 | "sortOrder": "alphabetical"
97 | },
98 | "icon": "lucide-search",
99 | "title": "Search"
100 | }
101 | },
102 | {
103 | "id": "7ea8256052c62620",
104 | "type": "leaf",
105 | "state": {
106 | "type": "bookmarks",
107 | "state": {},
108 | "icon": "lucide-bookmark",
109 | "title": "Bookmarks"
110 | }
111 | }
112 | ]
113 | },
114 | {
115 | "id": "fb46703dff46ddd6",
116 | "type": "tabs",
117 | "dimension": 72.65342960288808,
118 | "children": [
119 | {
120 | "id": "b1edbf85e4d83fa5",
121 | "type": "leaf",
122 | "state": {
123 | "type": "outline",
124 | "state": {
125 | "file": "README.md",
126 | "followCursor": false,
127 | "showSearch": false,
128 | "searchQuery": ""
129 | },
130 | "icon": "lucide-list",
131 | "title": "Outline of README"
132 | }
133 | }
134 | ]
135 | }
136 | ],
137 | "direction": "horizontal",
138 | "width": 300
139 | },
140 | "right": {
141 | "id": "8ffc43f3ce8e7b24",
142 | "type": "split",
143 | "children": [
144 | {
145 | "id": "91a92eba6a0c647d",
146 | "type": "tabs",
147 | "children": [
148 | {
149 | "id": "326b6b6cde9baee7",
150 | "type": "leaf",
151 | "state": {
152 | "type": "backlink",
153 | "state": {
154 | "file": "README.md",
155 | "collapseAll": false,
156 | "extraContext": false,
157 | "sortOrder": "alphabetical",
158 | "showSearch": false,
159 | "searchQuery": "",
160 | "backlinkCollapsed": false,
161 | "unlinkedCollapsed": true
162 | },
163 | "icon": "links-coming-in",
164 | "title": "Backlinks for README"
165 | }
166 | },
167 | {
168 | "id": "dc8ac7f56faafcf6",
169 | "type": "leaf",
170 | "state": {
171 | "type": "outgoing-link",
172 | "state": {
173 | "file": "README.md",
174 | "linksCollapsed": false,
175 | "unlinkedCollapsed": true
176 | },
177 | "icon": "links-going-out",
178 | "title": "Outgoing links from README"
179 | }
180 | },
181 | {
182 | "id": "ad0da9f1cf293001",
183 | "type": "leaf",
184 | "state": {
185 | "type": "tag",
186 | "state": {
187 | "sortOrder": "frequency",
188 | "useHierarchy": true,
189 | "showSearch": false,
190 | "searchQuery": ""
191 | },
192 | "icon": "lucide-tags",
193 | "title": "Tags"
194 | }
195 | },
196 | {
197 | "id": "154198fbc61739d7",
198 | "type": "leaf",
199 | "state": {
200 | "type": "git-view",
201 | "state": {},
202 | "icon": "git-pull-request",
203 | "title": "Source Control"
204 | }
205 | }
206 | ],
207 | "currentTab": 3
208 | }
209 | ],
210 | "direction": "horizontal",
211 | "width": 300,
212 | "collapsed": true
213 | },
214 | "left-ribbon": {
215 | "hiddenItems": {
216 | "switcher:Open quick switcher": false,
217 | "graph:Open graph view": false,
218 | "canvas:Create new canvas": false,
219 | "daily-notes:Open today's daily note": false,
220 | "templates:Insert template": false,
221 | "command-palette:Open command palette": false,
222 | "obsidian-git:Open Git source control": false
223 | }
224 | },
225 | "active": "d93ffc2d4e7b14bd",
226 | "lastOpenFiles": [
227 | "README_CN.md",
228 | "README.md",
229 | "assets~/Pasted image 20250523120309.png",
230 | "assets~/Pasted image 20250522183200.png",
231 | "Test/LWGUI_RampAtlas.tga.meta",
232 | "Test/LWGUI_RampAtlas.tga",
233 | "Test/LWGUI_RampAtlas.asset.meta",
234 | "Test/LWGUI_RampAtlas.asset",
235 | "package.json~",
236 | "assets~/Pasted image 20250321174432.png",
237 | "assets",
238 | "assets~/LWGUI.png",
239 | "assets~/image-20250314160119094.png",
240 | "assets~/image-20241127180711449.png",
241 | "assets~/image-20241126112320151.png",
242 | "assets~/image-20241126110012922.png",
243 | "assets~/image-20241126105823397.png",
244 | "assets~/image-20240717104206365.png",
245 | "assets~",
246 | "assets - 副本/LWGUI.png.meta",
247 | "assets - 副本/image-20250314160119094.png.meta",
248 | "assets - 副本/image-20241127180711449.png.meta"
249 | ]
250 | }
--------------------------------------------------------------------------------
/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f46b385c9f6060f4287705dd68cc21a6
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/AssetProcessor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3d953e9761254d2e8711e7036220e08a
3 | timeCreated: 1716534490
--------------------------------------------------------------------------------
/Editor/AssetProcessor/ExcludeFromBuild.cs:
--------------------------------------------------------------------------------
1 | // using System.Collections.Generic;
2 | // using System.IO;
3 | // using UnityEditor;
4 | // using UnityEditor.Build;
5 | // using UnityEditor.Build.Reporting;
6 | // using UnityEngine;
7 |
8 | namespace LWGUI
9 | {
10 | /*
11 | ///
12 | /// Used to exclude textures referenced by ImageDrawer in Build
13 | ///
14 | public class ExcludeFromBuild : IPreprocessBuildWithReport, IPostprocessBuildWithReport
15 | {
16 | public static List excludeAssetPaths = new List();
17 | public static List logs = new List();
18 |
19 | public int callbackOrder => default;
20 |
21 | // You can find the build log at: %LOCALAPPDATA%\Unity\Editor\Editor.log
22 | private static void OutputLogs()
23 | {
24 | string str = string.Empty;
25 | foreach (var log in logs)
26 | str += "LWGUI: " + log + "\n";
27 | Debug.Log(str);
28 | }
29 |
30 | private static void GetExcludePaths()
31 | {
32 | logs.Add("Start searching for assets to exclude...");
33 | foreach (var shaderInfo in ShaderUtil.GetAllShaderInfo())
34 | {
35 | var shader = Shader.Find(shaderInfo.name);
36 | if (shader == null) continue;
37 |
38 | var mat = new Material(shader);
39 | var props = MaterialEditor.GetMaterialProperties(new UnityEngine.Object[] { mat });
40 |
41 | foreach (var prop in props)
42 | {
43 | var drawer = ReflectionHelper.GetPropertyDrawer(shader, prop);
44 | // The ImageDrawer references the texture via the Property default value, so it must be excluded when building
45 | if (drawer != null && drawer is ImageDrawer && prop.textureValue != null)
46 | {
47 | var docImagePath = AssetDatabase.GetAssetPath(prop.textureValue);
48 | logs.Add($"Find an editor-only image in Shader '{shader.name}': {docImagePath}");
49 | if (!excludeAssetPaths.Contains(docImagePath))
50 | excludeAssetPaths.Add(docImagePath);
51 | }
52 | }
53 | }
54 | }
55 |
56 | public void OnPreprocessBuild(BuildReport report)
57 | {
58 | excludeAssetPaths.Clear();
59 | logs.Clear();
60 |
61 | GetExcludePaths();
62 |
63 | logs.Add("Start excluding assets...");
64 | foreach (var path in excludeAssetPaths)
65 | {
66 | string srcAssetPath = path, dstAssetPath = path + "~";
67 | string srcMetaPath = path + ".meta", dstMetaPath = path + ".meta~";
68 |
69 | logs.Add($"Renaming '{srcAssetPath}' -> '{dstAssetPath}'");
70 | if (File.Exists(srcAssetPath) && !File.Exists(dstAssetPath))
71 | File.Move(srcAssetPath, dstAssetPath);
72 | else
73 | logs.Add("ERROR: The source path does not exist or the destination path already exists!!!");
74 |
75 | logs.Add($"Renaming '{srcMetaPath}' -> '{dstMetaPath}'");
76 | if (File.Exists(srcMetaPath) && !File.Exists(dstMetaPath))
77 | File.Move(srcMetaPath, dstMetaPath);
78 | else
79 | logs.Add("ERROR: The source path does not exist or the destination path already exists!!!");
80 | }
81 |
82 | // AssetDatabase.Refresh();
83 | OutputLogs();
84 | }
85 |
86 | public void OnPostprocessBuild(BuildReport report)
87 | {
88 | logs.Clear();
89 |
90 | logs.Add("Start restoring assets...");
91 | foreach (var path in excludeAssetPaths)
92 | {
93 | string srcAssetPath = path + "~", dstAssetPath = path;
94 | string srcMetaPath = path + ".meta~", dstMetaPath = path + ".meta";
95 |
96 | logs.Add($"Renaming '{srcAssetPath}' -> '{dstAssetPath}'");
97 | if (File.Exists(srcAssetPath) && !File.Exists(dstAssetPath))
98 | File.Move(srcAssetPath, dstAssetPath);
99 | else
100 | logs.Add("ERROR: The source path does not exist or the destination path already exists!!!");
101 |
102 | logs.Add($"Renaming '{srcMetaPath}' -> '{dstMetaPath}'");
103 | if (File.Exists(srcMetaPath) && !File.Exists(dstMetaPath))
104 | File.Move(srcMetaPath, dstMetaPath);
105 | else
106 | logs.Add("ERROR: The source path does not exist or the destination path already exists!!!");
107 | }
108 |
109 | // AssetDatabase.Refresh();
110 | OutputLogs();
111 | }
112 | }
113 | */
114 | }
--------------------------------------------------------------------------------
/Editor/AssetProcessor/ExcludeFromBuild.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 55a1c1f804b9493f8c29748fe8cb9bef
3 | timeCreated: 1716534652
--------------------------------------------------------------------------------
/Editor/AssetProcessor/ShaderModifyListener.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 | using System;
3 | using System.IO;
4 | using UnityEditor;
5 | using UnityEngine;
6 |
7 | namespace LWGUI
8 | {
9 | ///
10 | /// Used to listen for Shader updates and flush the LWGUI caches
11 | ///
12 | public class ShaderModifyListener : AssetPostprocessor
13 | {
14 | private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
15 | {
16 | foreach (var assetPath in importedAssets)
17 | {
18 | if (Path.GetExtension(assetPath).Equals(".shader", StringComparison.OrdinalIgnoreCase))
19 | {
20 | var shader = AssetDatabase.LoadAssetAtPath(assetPath);
21 | MetaDataHelper.ReleaseShaderMetadataCache(shader);
22 | ReflectionHelper.InvalidatePropertyCache(shader);
23 | }
24 | }
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/Editor/AssetProcessor/ShaderModifyListener.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6143a217ed5c4b709eb585de3e8026d0
3 | timeCreated: 1693983094
--------------------------------------------------------------------------------
/Editor/CustomGUISample.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1126f19081e143caa82b7f5ab01b9b6a
3 | timeCreated: 1688612154
--------------------------------------------------------------------------------
/Editor/CustomGUISample/CustomFooter.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEditor;
3 |
4 | namespace LWGUI.CustomGUISample
5 | {
6 | public static class CustomFooter
7 | {
8 | public static void DoCustomFooter(LWGUI lwgui)
9 | {
10 | // Draw your custom gui...
11 |
12 | // Debug.Log(lwgui.shader);
13 | }
14 |
15 | [InitializeOnLoadMethod]
16 | private static void RegisterEvent()
17 | {
18 | // Register Event
19 | // LWGUI.onDrawCustomFooter += DoCustomFooter;
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/Editor/CustomGUISample/CustomFooter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 421a56cca25d486298053d5eeca0c669
3 | timeCreated: 1688612200
--------------------------------------------------------------------------------
/Editor/CustomGUISample/CustomHeader.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEditor;
3 |
4 | namespace LWGUI.CustomGUISample
5 | {
6 | public static class CustomHeader
7 | {
8 | public static void DoCustomHeader(LWGUI lwgui)
9 | {
10 | // Draw your custom gui...
11 |
12 | // Debug.Log(lwgui.shader);
13 | }
14 |
15 | [InitializeOnLoadMethod]
16 | private static void RegisterEvent()
17 | {
18 | // Register Event
19 | // LWGUI.onDrawCustomHeader += DoCustomHeader;
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/Editor/CustomGUISample/CustomHeader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 12f48d96821d4f33aa8d9a7618a9ae0b
3 | timeCreated: 1688613396
--------------------------------------------------------------------------------
/Editor/CustomGUISample/CustomMaterialAssetFinder.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using UnityEngine;
3 | using UnityEditor;
4 |
5 | namespace LWGUI
6 | {
7 | public static class CustomMaterialAssetFinder
8 | {
9 | public static Material FindMaterialAssetInRendererByMaterialInstance(Renderer renderer, Material materialInstance)
10 | {
11 | Material materialAsset = null;
12 |
13 | // Find the material asset by name
14 | // if (materialAsset == null)
15 | // {
16 | // var name = materialInstance.name.Replace(" (Instance)", "");
17 | // var guids = AssetDatabase.FindAssets("t:Material " + name, new[] { "Assets" }).Select(guid =>
18 | // {
19 | // var assetPath = AssetDatabase.GUIDToAssetPath(guid);
20 | // if (string.IsNullOrEmpty(assetPath) || !assetPath.EndsWith(".mat"))
21 | // return null;
22 | // else
23 | // return guid;
24 | // }).ToArray();
25 | //
26 | // if (guids != null && guids.Length > 0)
27 | // {
28 | // var matPath = AssetDatabase.GUIDToAssetPath(guids[0]);
29 | // Selection.activeObject = AssetDatabase.LoadAssetAtPath(matPath);
30 | //
31 | // if (guids.Length > 1)
32 | // {
33 | // Debug.LogWarning($"LWGUI: Multiple materials with the same name were found, and the first one was selected: { matPath }");
34 | // }
35 | // }
36 | // }
37 |
38 | return materialAsset;
39 | }
40 |
41 | [InitializeOnLoadMethod]
42 | private static void RegisterEvent()
43 | {
44 | // Register Event
45 | // Helper.onFindMaterialAssetInRendererByMaterialInstance = FindMaterialAssetInRendererByMaterialInstance;
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/Editor/CustomGUISample/CustomMaterialAssetFinder.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d476ea1a49c64eb4a29bca60d1e97c01
3 | timeCreated: 1732872239
--------------------------------------------------------------------------------
/Editor/Helper.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4785143bf9124180a864e3e68ecefff6
3 | timeCreated: 1708067731
--------------------------------------------------------------------------------
/Editor/Helper/Helper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bc93109edd264b6aa0265609cb38cc58
3 | timeCreated: 1687336811
--------------------------------------------------------------------------------
/Editor/Helper/MetaDataHelper.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 |
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using UnityEditor;
7 | using UnityEngine;
8 |
9 | namespace LWGUI
10 | {
11 | public class LWGUIMetaDatas
12 | {
13 | public PerShaderData perShaderData;
14 | public PerMaterialData perMaterialData;
15 | public PerInspectorData perInspectorData;
16 |
17 |
18 | #region Get Prop Data
19 |
20 | public PropertyStaticData GetPropStaticData(string propName) => perShaderData?.GetPropStaticData(propName);
21 |
22 | public PropertyStaticData GetPropStaticData(MaterialProperty prop) => GetPropStaticData(prop.name);
23 |
24 | public PropertyDynamicData GetPropDynamicData(string propName) => perMaterialData?.GetPropDynamicData(propName);
25 |
26 | public PropertyDynamicData GetPropDynamicData(MaterialProperty prop) => GetPropDynamicData(prop.name);
27 |
28 | public MaterialProperty GetProperty(string propName) => GetPropDynamicData(propName)?.property;
29 |
30 | public MaterialProperty GetDefaultProperty(string propName) => GetPropDynamicData(propName)?.defualtProperty;
31 |
32 | #endregion
33 |
34 | #region Get Data Tuple
35 |
36 | // var (perShaderData, perMaterialData, perInspectorData) =
37 | public (PerShaderData, PerMaterialData, PerInspectorData) GetDatas() => (perShaderData, perMaterialData, perInspectorData);
38 |
39 | // var (propStaticData, propDynamicData) =
40 | public (PropertyStaticData, PropertyDynamicData) GetPropDatas(MaterialProperty prop) =>
41 | (GetPropStaticData(prop), GetPropDynamicData(prop));
42 |
43 | #endregion
44 |
45 | public MaterialProperty[] GetProps() => perMaterialData.props;
46 |
47 | public Material GetMaterial() => perMaterialData.material;
48 |
49 | public Shader GetShader() => perShaderData.shader;
50 |
51 | public MaterialEditor GetMaterialEditor() => perInspectorData.materialEditor;
52 | }
53 |
54 | public class MetaDataHelper
55 | {
56 | /*
57 | * The metadata cache is a structure with three nested dictionaries of Shader / Material / Inspector,
58 | * which stores all the data required to render LWGUI by category:
59 | *
60 | * -- PerShaderData
61 | * --
62 | * ---- PerMaterialData
63 | * ----
64 | * ------ PerInspectorData
65 | */
66 | private class PerMaterialCache
67 | {
68 | public PerMaterialData perMaterialData = null;
69 | public Dictionary perInspectorDataCachesDic = new Dictionary();
70 | }
71 |
72 | private class PerShaderCache
73 | {
74 | public PerShaderData perShaderData = null;
75 | public Dictionary perMaterialDataCachesDic = new Dictionary();
76 | }
77 |
78 | private static Dictionary _perShaderCachesDic = new Dictionary();
79 |
80 | public static LWGUIMetaDatas BuildMetaDatas(Shader shader, Material material, MaterialEditor editor, LWGUI lwgui, MaterialProperty[] props)
81 | {
82 | var outDatas = new LWGUIMetaDatas();
83 |
84 | // perShaderData
85 | if (!_perShaderCachesDic.ContainsKey(shader))
86 | _perShaderCachesDic.Add(shader, new PerShaderCache() { perShaderData = new PerShaderData(shader, props) });
87 |
88 | var perShaderCache = _perShaderCachesDic[shader];
89 | outDatas.perShaderData = perShaderCache.perShaderData;
90 |
91 | // perMaterialData
92 | if (!perShaderCache.perMaterialDataCachesDic.ContainsKey(material))
93 | perShaderCache.perMaterialDataCachesDic.Add(material, new PerMaterialCache() { perMaterialData = new PerMaterialData(shader, material, editor, props, outDatas.perShaderData) });
94 |
95 | var perMaterialCache = perShaderCache.perMaterialDataCachesDic[material];
96 | outDatas.perMaterialData = perMaterialCache.perMaterialData;
97 | outDatas.perMaterialData.Update(shader, material, editor, props, outDatas.perShaderData);
98 |
99 | // perInspectorData
100 | if (!perMaterialCache.perInspectorDataCachesDic.ContainsKey(lwgui))
101 | perMaterialCache.perInspectorDataCachesDic.Add(lwgui, new PerInspectorData());
102 |
103 | outDatas.perInspectorData = perMaterialCache.perInspectorDataCachesDic[lwgui];
104 | outDatas.perInspectorData.Update(editor);
105 |
106 | return outDatas;
107 | }
108 |
109 | public static void ReleaseAllShadersMetadataCache()
110 | {
111 | _perShaderCachesDic.Clear();
112 | }
113 |
114 | public static void ReleaseShaderMetadataCache(Shader shader)
115 | {
116 | if (shader && _perShaderCachesDic.ContainsKey(shader))
117 | _perShaderCachesDic.Remove(shader);
118 | }
119 |
120 | public static void ReleaseAllMaterialsMetadataCache(Shader shader)
121 | {
122 | if (shader && _perShaderCachesDic.ContainsKey(shader))
123 | _perShaderCachesDic[shader].perMaterialDataCachesDic.Clear();
124 |
125 | }
126 |
127 | public static void ReleaseMaterialMetadataCache(Material material)
128 | {
129 | if (material
130 | && material.shader
131 | && _perShaderCachesDic.ContainsKey(material.shader)
132 | && _perShaderCachesDic[material.shader].perMaterialDataCachesDic.ContainsKey(material))
133 | _perShaderCachesDic[material.shader].perMaterialDataCachesDic.Remove(material);
134 | }
135 |
136 | public static void ForceUpdateAllMaterialsMetadataCache(Shader shader)
137 | {
138 | if (shader && _perShaderCachesDic.ContainsKey(shader))
139 | {
140 | foreach (var perMaterialCachKWPair in _perShaderCachesDic[shader].perMaterialDataCachesDic)
141 | perMaterialCachKWPair.Value.perMaterialData.forceInit = true;
142 | }
143 | }
144 |
145 | public static void ForceUpdateMaterialMetadataCache(Material material)
146 | {
147 | if (material
148 | && material.shader
149 | && _perShaderCachesDic.ContainsKey(material.shader)
150 | && _perShaderCachesDic[material.shader].perMaterialDataCachesDic.ContainsKey(material))
151 | _perShaderCachesDic[material.shader].perMaterialDataCachesDic[material].perMaterialData.forceInit = true;
152 | }
153 |
154 | public static void ForceUpdateMaterialsMetadataCache(UnityEngine.Object[] materials)
155 | {
156 | foreach (Material material in materials)
157 | ForceUpdateMaterialMetadataCache(material);
158 | }
159 |
160 | public static string GetPropertyTooltip(PropertyStaticData propertyStaticData, PropertyDynamicData propertyDynamicData)
161 | {
162 | var str = propertyStaticData.tooltipMessages;
163 | var lineEnd = string.IsNullOrEmpty(str) ? string.Empty : "\n\n";
164 | str += $"{lineEnd}Property Name: {propertyDynamicData.property.name}\nDefault Value: {propertyDynamicData.defaultValueDescription}";
165 | return str;
166 | }
167 |
168 | public static bool GetPropertyVisibility(MaterialProperty prop, Material material, LWGUIMetaDatas metaDatas)
169 | {
170 | bool result = true;
171 |
172 | var (propStaticData, propDynamicData) = metaDatas.GetPropDatas(prop);
173 | var displayModeData = metaDatas.perShaderData.displayModeData;
174 | var cachedModifiedProperties = metaDatas.perMaterialData.cachedModifiedProperties;
175 |
176 | if ( // if HideInInspector
177 | Helper.IsPropertyHideInInspector(prop)
178 | // if Search Filtered
179 | || !propStaticData.isSearchMatched
180 | // if the Conditional Display Keyword is not active
181 | || (!string.IsNullOrEmpty(propStaticData.conditionalDisplayKeyword)
182 | && !material.shaderKeywords.Any((str => str == propStaticData.conditionalDisplayKeyword)))
183 | || (!displayModeData.showAllHiddenProperties && propStaticData.isHidden)
184 | // if show modified only
185 | || (cachedModifiedProperties != null && !(
186 | (displayModeData.showOnlyModifiedProperties && cachedModifiedProperties.ContainsKey(prop.name))
187 | // if show modified group only
188 | || (displayModeData.showOnlyModifiedGroups && cachedModifiedProperties.ContainsKey(propStaticData.parent != null ? propStaticData.parent.name : prop.name))))
189 | // ShowIf() == false
190 | || !propDynamicData.isShowing
191 | )
192 | {
193 | result = false;
194 | }
195 |
196 | return result;
197 | }
198 |
199 | public static bool GetParentPropertyVisibility(PropertyStaticData parentPropStaticData, Material material, LWGUIMetaDatas metaDatas)
200 | {
201 | if (parentPropStaticData != null
202 | && (!metaDatas.GetPropStaticData(parentPropStaticData.name).isExpanding
203 | || !GetPropertyVisibility(metaDatas.GetProperty(parentPropStaticData.name), material, metaDatas)))
204 | {
205 | return false;
206 | }
207 |
208 | return true;
209 | }
210 | }
211 | }
--------------------------------------------------------------------------------
/Editor/Helper/MetaDataHelper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 481e689c921a4e138739b26b793b41f6
3 | timeCreated: 1687336811
--------------------------------------------------------------------------------
/Editor/Helper/PresetHelper.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 | using System.Collections.Generic;
3 | using UnityEditor;
4 | using UnityEngine;
5 |
6 | namespace LWGUI
7 | {
8 | public class PresetHelper
9 | {
10 | private static Dictionary _loadedPresets = new Dictionary();
11 |
12 | private static bool _isInitComplete;
13 |
14 | public static bool IsInitComplete { get { return _isInitComplete; } }
15 |
16 | public static void Init()
17 | {
18 | if (!_isInitComplete)
19 | {
20 | ForceInit();
21 | }
22 | }
23 |
24 | public static void ForceInit()
25 | {
26 | _loadedPresets.Clear();
27 | _isInitComplete = false;
28 | var GUIDs = AssetDatabase.FindAssets("t:" + typeof(LwguiShaderPropertyPreset));
29 | foreach (var GUID in GUIDs)
30 | {
31 | var preset = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(GUID));
32 | AddPreset(preset);
33 | }
34 | _isInitComplete = true;
35 | }
36 |
37 | public static void AddPreset(LwguiShaderPropertyPreset preset)
38 | {
39 | if (!preset) return;
40 | if (!_loadedPresets.ContainsKey(preset.name))
41 | {
42 | _loadedPresets.Add(preset.name, preset);
43 | }
44 | }
45 |
46 | public static LwguiShaderPropertyPreset GetPresetAsset(string presetFileName)
47 | {
48 | if (string.IsNullOrEmpty(presetFileName))
49 | return null;
50 |
51 | if (!_loadedPresets.ContainsKey(presetFileName) || !_loadedPresets[presetFileName])
52 | ForceInit();
53 |
54 | if (!_loadedPresets.ContainsKey(presetFileName) || !_loadedPresets[presetFileName])
55 | {
56 | Debug.LogError("LWGUI: Invalid ShaderPropertyPreset path: ‘" + presetFileName + "’ !");
57 | return null;
58 | }
59 |
60 | return _loadedPresets[presetFileName];
61 | }
62 |
63 | // For Developers: Call this after a material has modified in code
64 | public static void ApplyPresetsInMaterial(Material material)
65 | {
66 | var props = MaterialEditor.GetMaterialProperties(new UnityEngine.Object[] { material });
67 | foreach (var prop in props)
68 | {
69 | var drawer = ReflectionHelper.GetPropertyDrawer(material.shader, prop, out _);
70 |
71 | // Apply active preset
72 | if (drawer != null && drawer is IPresetDrawer)
73 | {
74 | var activePreset = (drawer as IPresetDrawer).GetActivePreset(prop, PresetHelper.GetPresetAsset((drawer as PresetDrawer).presetFileName));
75 | if (activePreset != null)
76 | activePreset.ApplyToDefaultMaterial(material);
77 | }
78 | }
79 | UnityEditorExtension.ApplyMaterialPropertyAndDecoratorDrawers(material);
80 | }
81 | }
82 | }
--------------------------------------------------------------------------------
/Editor/Helper/PresetHelper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 48e58de7087c42f88a2a18c52b6ce131
3 | timeCreated: 1687336811
--------------------------------------------------------------------------------
/Editor/Helper/RampHelper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4581bed83f9b41e18444cb08b59ce839
3 | timeCreated: 1687336811
--------------------------------------------------------------------------------
/Editor/Helper/RevertableHelper.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 |
3 | using System;
4 | using System.Linq;
5 | using UnityEditor;
6 | using UnityEngine;
7 |
8 | namespace LWGUI
9 | {
10 | ///
11 | /// Helpers for drawing Unreal Style Revertable Shader GUI
12 | ///
13 | public class RevertableHelper
14 | {
15 | public static readonly float revertButtonWidth = 15f;
16 | public static float fieldWidth;
17 | public static float labelWidth;
18 |
19 |
20 | #region GUI Setting
21 |
22 | public static Rect IndentRect(Rect rect)
23 | {
24 | rect.xMax -= RevertableHelper.revertButtonWidth;
25 | return rect;
26 | }
27 |
28 | public static Rect SplitRevertButtonRect(ref Rect rect, bool isCallInDrawer = false)
29 | {
30 | float defaultHeightWithoutDrawers = EditorGUIUtility.singleLineHeight;
31 | var revertButtonRect = GetRevertButtonRect(defaultHeightWithoutDrawers, rect, isCallInDrawer);
32 | rect = IndentRect(rect);
33 | return revertButtonRect;
34 | }
35 |
36 | public static Rect GetRevertButtonRect(float propHeight, Rect rect, bool isCallInDrawer = false)
37 | {
38 | if (isCallInDrawer) rect.xMax += revertButtonWidth;
39 | var revertButtonRect = new Rect(rect.xMax - revertButtonWidth + 2f,
40 | rect.yMax - propHeight * 0.5f - revertButtonWidth * 0.5f,
41 | revertButtonWidth - 2f,
42 | revertButtonWidth - 3f);
43 | return revertButtonRect;
44 | }
45 |
46 | public static void InitRevertableGUIWidths()
47 | {
48 | EditorGUIUtility.fieldWidth += RevertableHelper.revertButtonWidth;
49 | EditorGUIUtility.labelWidth -= RevertableHelper.revertButtonWidth;
50 | RevertableHelper.fieldWidth = EditorGUIUtility.fieldWidth;
51 | RevertableHelper.labelWidth = EditorGUIUtility.labelWidth;
52 | }
53 |
54 | public static void SetRevertableGUIWidths()
55 | {
56 | EditorGUIUtility.fieldWidth = RevertableHelper.fieldWidth;
57 | EditorGUIUtility.labelWidth = RevertableHelper.labelWidth;
58 | }
59 |
60 | public static void FixGUIWidthMismatch(MaterialProperty.PropType propType, MaterialEditor materialEditor)
61 | {
62 | switch (propType)
63 | {
64 | case MaterialProperty.PropType.Texture:
65 | case MaterialProperty.PropType.Range:
66 | materialEditor.SetDefaultGUIWidths();
67 | break;
68 | default:
69 | RevertableHelper.SetRevertableGUIWidths();
70 | break;
71 | }
72 | }
73 |
74 | #endregion
75 |
76 |
77 | #region Property Handle
78 |
79 | public static void SetPropertyToDefault(MaterialProperty defaultProp, MaterialProperty prop)
80 | {
81 | prop.vectorValue = defaultProp.vectorValue;
82 | prop.colorValue = defaultProp.colorValue;
83 | prop.floatValue = defaultProp.floatValue;
84 | prop.textureValue = defaultProp.textureValue;
85 | prop.intValue = defaultProp.intValue;
86 | }
87 |
88 | public static string GetPropertyDefaultValueText(MaterialProperty defaultProp)
89 | {
90 | string defaultText = String.Empty;
91 | switch (defaultProp.type)
92 | {
93 | case MaterialProperty.PropType.Color:
94 | defaultText = defaultProp.colorValue.ToString();
95 | break;
96 | case MaterialProperty.PropType.Float:
97 | case MaterialProperty.PropType.Range:
98 | defaultText = defaultProp.floatValue.ToString();
99 | break;
100 | case MaterialProperty.PropType.Int:
101 | defaultText = defaultProp.intValue.ToString();
102 | break;
103 | case MaterialProperty.PropType.Texture:
104 | defaultText = defaultProp.textureValue != null ? defaultProp.textureValue.name : "None";
105 | break;
106 | case MaterialProperty.PropType.Vector:
107 | defaultText = defaultProp.vectorValue.ToString();
108 | break;
109 | }
110 | return defaultText;
111 | }
112 |
113 | #endregion
114 |
115 |
116 | #region Draw revert button
117 |
118 | public static bool DrawRevertableProperty(Rect position, MaterialProperty prop, LWGUIMetaDatas metaDatas, bool isHeader = false)
119 | {
120 | var (propStaticData, propDynamicData) = metaDatas.GetPropDatas(prop);
121 |
122 | bool hasModified = prop.hasMixedValue
123 | || propDynamicData.hasModified
124 | || (isHeader && propDynamicData.hasChildrenModified);
125 |
126 | if (!hasModified)
127 | return false;
128 |
129 | Rect rect = position;
130 | if (DrawRevertButton(rect))
131 | {
132 | GUI.changed = true;
133 | EditorGUI.FocusTextInControl(string.Empty);
134 | DoRevertProperty(prop, metaDatas);
135 |
136 | if (isHeader)
137 | {
138 | foreach (var childStaticData in propStaticData.children)
139 | {
140 | DoRevertProperty(metaDatas.GetProperty(childStaticData.name), metaDatas);
141 | foreach (var childChildStaticData in childStaticData.children)
142 | DoRevertProperty(metaDatas.GetProperty(childChildStaticData.name), metaDatas);
143 | }
144 | }
145 |
146 | return true;
147 | }
148 | return false;
149 | }
150 |
151 | private static void DoRevertProperty(MaterialProperty prop, LWGUIMetaDatas metaDatas)
152 | {
153 | var propDynamicData = metaDatas.GetPropDynamicData(prop.name);
154 | propDynamicData.hasRevertChanged = true;
155 | SetPropertyToDefault(propDynamicData.defualtProperty, prop);
156 | foreach (var extraPropName in metaDatas.GetPropStaticData(prop.name).extraPropNames)
157 | {
158 | var extraPropDynamicData = metaDatas.GetPropDynamicData(extraPropName);
159 | extraPropDynamicData.hasRevertChanged = true;
160 | SetPropertyToDefault(extraPropDynamicData.defualtProperty, extraPropDynamicData.property);
161 | }
162 | }
163 |
164 | private static Texture _iconCache;
165 | private static Texture _icon => _iconCache = _iconCache ?? AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath("e7bc1130858d984488bca32b8512ca96"));
166 |
167 | public static bool DrawRevertButton(Rect rect)
168 | {
169 | GUI.DrawTexture(rect, _icon);
170 | var e = Event.current;
171 | if (e.type == UnityEngine.EventType.MouseDown && rect.Contains(e.mousePosition))
172 | {
173 | e.Use();
174 | return true;
175 | }
176 | return false;
177 | }
178 |
179 | #endregion
180 | }
181 | }
--------------------------------------------------------------------------------
/Editor/Helper/RevertableHelper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 259535769835488e9edaf21cbe36465d
3 | timeCreated: 1687336811
--------------------------------------------------------------------------------
/Editor/Helper/VersionControlHelper.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 |
3 | using System.Collections.Generic;
4 | using System.Text;
5 | using UnityEditor;
6 | using UnityEditor.VersionControl;
7 | using UnityEngine;
8 |
9 | namespace LWGUI
10 | {
11 | public static class VersionControlHelper
12 | {
13 | public static bool isVCEnabled => Provider.enabled && Provider.isActive;
14 |
15 | public static bool Checkout(UnityEngine.Object obj)
16 | {
17 | return Checkout(new[] { obj });
18 | }
19 |
20 | public static bool Checkout(UnityEngine.Object[] objs)
21 | {
22 | List pathes = new List();
23 | foreach (var obj in objs)
24 | {
25 | if (AssetDatabase.Contains(obj))
26 | pathes.Add(AssetDatabase.GetAssetPath(obj));
27 | }
28 | return Checkout(pathes);
29 | }
30 |
31 | public static bool Checkout(string path)
32 | {
33 | return Checkout(new List() { path });
34 | }
35 |
36 | public static bool Checkout(List pathes)
37 | {
38 | if (!isVCEnabled) return true;
39 |
40 | AssetList assetList = new AssetList();
41 | foreach (string path in pathes)
42 | {
43 | Asset asset = Provider.GetAssetByPath(path);
44 | if (asset != null && !Provider.IsOpenForEdit(asset))
45 | {
46 | assetList.Add(asset);
47 | }
48 | }
49 |
50 | if (assetList.Count == 0) return true;
51 |
52 | StringBuilder sb = new StringBuilder();
53 | assetList.ForEach((asset => sb.AppendLine(asset.path)));
54 | Debug.Log($"LWGUI: {assetList.Count} assets to be checked out:\n{sb}");
55 | sb.Clear();
56 |
57 | var checkOutTask = Provider.Checkout(assetList, CheckoutMode.Both);
58 | checkOutTask.Wait();
59 | if (checkOutTask.success)
60 | {
61 | return true;
62 | }
63 | else
64 | {
65 | assetList.ForEach((asset =>
66 | {
67 | if (!Provider.IsOpenForEdit(asset))
68 | sb.AppendLine(asset.path);
69 | }));
70 | Debug.LogError($"LWGUI: {assetList.Count} asssets failed to be checked out!\n{sb}");
71 | return false;
72 | }
73 | }
74 |
75 | public static bool Add(string projectRelativedPath)
76 | {
77 | if (isVCEnabled)
78 | {
79 | var vcAsset = Provider.GetAssetByPath(projectRelativedPath);
80 | if (vcAsset != null)
81 | {
82 | var statusTask = Provider.Status(vcAsset);
83 | statusTask.Wait();
84 | if (Provider.AddIsValid(statusTask.assetList))
85 | {
86 | var addTask = Provider.Add(vcAsset, false);
87 | addTask.Wait();
88 | if (addTask.success)
89 | {
90 | return true;
91 | }
92 | }
93 | }
94 |
95 | Debug.LogError($"LWGUI: Failed to add {projectRelativedPath}!");
96 | return false;
97 | }
98 |
99 | return true;
100 | }
101 |
102 | public static bool IsWriteable(UnityEngine.Object obj) => IsWriteable(new[] { obj });
103 |
104 | public static bool IsWriteable(UnityEngine.Object[] objs)
105 | {
106 | if (objs == null)
107 | return false;
108 |
109 | bool isWriteable = true;
110 |
111 | foreach (var obj in objs)
112 | {
113 | if (!obj)
114 | continue;
115 |
116 | if (!AssetDatabase.Contains(obj))
117 | continue;
118 |
119 | isWriteable &= AssetDatabase.IsOpenForEdit(obj);
120 |
121 | if (!isWriteable)
122 | break;
123 | }
124 |
125 | return isWriteable;
126 | }
127 | }
128 | }
--------------------------------------------------------------------------------
/Editor/Helper/VersionControlHelper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f8e9e3181ad14421a67f641ab4aadc5c
3 | timeCreated: 1687333459
--------------------------------------------------------------------------------
/Editor/Icon.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 74f53796d7b2a9f46852bd0702cb12f4
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Icon/Checkout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/Editor/Icon/Checkout.png
--------------------------------------------------------------------------------
/Editor/Icon/Checkout.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 72488141525eaa8499e65e52755cb6d0
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | externalObjects: {}
6 | serializedVersion: 4
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 0
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 | isReadable: 0
24 | grayScaleToAlpha: 0
25 | generateCubemap: 6
26 | cubemapConvolution: 0
27 | seamlessCubemap: 0
28 | textureFormat: 1
29 | maxTextureSize: 2048
30 | textureSettings:
31 | serializedVersion: 2
32 | filterMode: 1
33 | aniso: 1
34 | mipBias: 0
35 | wrapU: 1
36 | wrapV: 1
37 | wrapW: 0
38 | nPOTScale: 0
39 | lightmap: 0
40 | compressionQuality: 50
41 | spriteMode: 1
42 | spriteExtrude: 1
43 | spriteMeshType: 1
44 | alignment: 0
45 | spritePivot: {x: 0.5, y: 0.5}
46 | spritePixelsToUnits: 100
47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
48 | spriteGenerateFallbackPhysicsShape: 1
49 | alphaUsage: 1
50 | alphaIsTransparency: 1
51 | spriteTessellationDetail: -1
52 | textureType: 2
53 | textureShape: 1
54 | maxTextureSizeSet: 0
55 | compressionQualitySet: 0
56 | textureFormatSet: 0
57 | platformSettings:
58 | - buildTarget: DefaultTexturePlatform
59 | maxTextureSize: 2048
60 | resizeAlgorithm: 0
61 | textureFormat: -1
62 | textureCompression: 1
63 | compressionQuality: 50
64 | crunchedCompression: 0
65 | allowsAlphaSplitting: 0
66 | overridden: 0
67 | androidETC2FallbackOverride: 0
68 | - buildTarget: Standalone
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 1
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | spriteSheet:
79 | serializedVersion: 2
80 | sprites: []
81 | outline: []
82 | physicsShape: []
83 | spritePackingTag:
84 | userData:
85 | assetBundleName:
86 | assetBundleVariant:
87 |
--------------------------------------------------------------------------------
/Editor/Icon/Collapse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/Editor/Icon/Collapse.png
--------------------------------------------------------------------------------
/Editor/Icon/Collapse.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 929b6e5dfacc42b429d715a3e1ca2b57
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | externalObjects: {}
6 | serializedVersion: 4
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 0
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 | isReadable: 0
24 | grayScaleToAlpha: 0
25 | generateCubemap: 6
26 | cubemapConvolution: 0
27 | seamlessCubemap: 0
28 | textureFormat: 1
29 | maxTextureSize: 2048
30 | textureSettings:
31 | serializedVersion: 2
32 | filterMode: 1
33 | aniso: 1
34 | mipBias: 0
35 | wrapU: 1
36 | wrapV: 1
37 | wrapW: 0
38 | nPOTScale: 0
39 | lightmap: 0
40 | compressionQuality: 50
41 | spriteMode: 1
42 | spriteExtrude: 1
43 | spriteMeshType: 1
44 | alignment: 0
45 | spritePivot: {x: 0.5, y: 0.5}
46 | spritePixelsToUnits: 100
47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
48 | spriteGenerateFallbackPhysicsShape: 1
49 | alphaUsage: 1
50 | alphaIsTransparency: 1
51 | spriteTessellationDetail: -1
52 | textureType: 2
53 | textureShape: 1
54 | maxTextureSizeSet: 0
55 | compressionQualitySet: 0
56 | textureFormatSet: 0
57 | platformSettings:
58 | - buildTarget: DefaultTexturePlatform
59 | maxTextureSize: 2048
60 | resizeAlgorithm: 0
61 | textureFormat: -1
62 | textureCompression: 1
63 | compressionQuality: 50
64 | crunchedCompression: 0
65 | allowsAlphaSplitting: 0
66 | overridden: 0
67 | androidETC2FallbackOverride: 0
68 | - buildTarget: Standalone
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 1
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | spriteSheet:
79 | serializedVersion: 2
80 | sprites: []
81 | outline: []
82 | physicsShape: []
83 | spritePackingTag:
84 | userData:
85 | assetBundleName:
86 | assetBundleVariant:
87 |
--------------------------------------------------------------------------------
/Editor/Icon/Copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/Editor/Icon/Copy.png
--------------------------------------------------------------------------------
/Editor/Icon/Copy.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9cdef444d18d2ce4abb6bbc4fed4d109
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | externalObjects: {}
6 | serializedVersion: 4
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 0
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 | isReadable: 0
24 | grayScaleToAlpha: 0
25 | generateCubemap: 6
26 | cubemapConvolution: 0
27 | seamlessCubemap: 0
28 | textureFormat: 1
29 | maxTextureSize: 2048
30 | textureSettings:
31 | serializedVersion: 2
32 | filterMode: 1
33 | aniso: 1
34 | mipBias: 0
35 | wrapU: 1
36 | wrapV: 1
37 | wrapW: 0
38 | nPOTScale: 0
39 | lightmap: 0
40 | compressionQuality: 50
41 | spriteMode: 1
42 | spriteExtrude: 1
43 | spriteMeshType: 1
44 | alignment: 0
45 | spritePivot: {x: 0.5, y: 0.5}
46 | spritePixelsToUnits: 100
47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
48 | spriteGenerateFallbackPhysicsShape: 1
49 | alphaUsage: 1
50 | alphaIsTransparency: 1
51 | spriteTessellationDetail: -1
52 | textureType: 2
53 | textureShape: 1
54 | maxTextureSizeSet: 0
55 | compressionQualitySet: 0
56 | textureFormatSet: 0
57 | platformSettings:
58 | - buildTarget: DefaultTexturePlatform
59 | maxTextureSize: 2048
60 | resizeAlgorithm: 0
61 | textureFormat: -1
62 | textureCompression: 1
63 | compressionQuality: 50
64 | crunchedCompression: 0
65 | allowsAlphaSplitting: 0
66 | overridden: 0
67 | androidETC2FallbackOverride: 0
68 | - buildTarget: Standalone
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 1
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | spriteSheet:
79 | serializedVersion: 2
80 | sprites: []
81 | outline: []
82 | physicsShape: []
83 | spritePackingTag:
84 | userData:
85 | assetBundleName:
86 | assetBundleVariant:
87 |
--------------------------------------------------------------------------------
/Editor/Icon/Expand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/Editor/Icon/Expand.png
--------------------------------------------------------------------------------
/Editor/Icon/Expand.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2382450e7f4ddb94c9180d6634c41378
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | externalObjects: {}
6 | serializedVersion: 4
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 0
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 | isReadable: 0
24 | grayScaleToAlpha: 0
25 | generateCubemap: 6
26 | cubemapConvolution: 0
27 | seamlessCubemap: 0
28 | textureFormat: 1
29 | maxTextureSize: 2048
30 | textureSettings:
31 | serializedVersion: 2
32 | filterMode: 1
33 | aniso: 1
34 | mipBias: 0
35 | wrapU: 1
36 | wrapV: 1
37 | wrapW: 0
38 | nPOTScale: 0
39 | lightmap: 0
40 | compressionQuality: 50
41 | spriteMode: 1
42 | spriteExtrude: 1
43 | spriteMeshType: 1
44 | alignment: 0
45 | spritePivot: {x: 0.5, y: 0.5}
46 | spritePixelsToUnits: 100
47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
48 | spriteGenerateFallbackPhysicsShape: 1
49 | alphaUsage: 1
50 | alphaIsTransparency: 1
51 | spriteTessellationDetail: -1
52 | textureType: 2
53 | textureShape: 1
54 | maxTextureSizeSet: 0
55 | compressionQualitySet: 0
56 | textureFormatSet: 0
57 | platformSettings:
58 | - buildTarget: DefaultTexturePlatform
59 | maxTextureSize: 2048
60 | resizeAlgorithm: 0
61 | textureFormat: -1
62 | textureCompression: 1
63 | compressionQuality: 50
64 | crunchedCompression: 0
65 | allowsAlphaSplitting: 0
66 | overridden: 0
67 | androidETC2FallbackOverride: 0
68 | - buildTarget: Standalone
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 1
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | spriteSheet:
79 | serializedVersion: 2
80 | sprites: []
81 | outline: []
82 | physicsShape: []
83 | spritePackingTag:
84 | userData:
85 | assetBundleName:
86 | assetBundleVariant:
87 |
--------------------------------------------------------------------------------
/Editor/Icon/Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/Editor/Icon/Logo.png
--------------------------------------------------------------------------------
/Editor/Icon/Logo.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2a220687c380819438534e206c94960d
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
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 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | vTOnly: 0
27 | ignoreMasterTextureLimit: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: 1
37 | aniso: 1
38 | mipBias: 0
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 0
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 0
46 | spriteExtrude: 1
47 | spriteMeshType: 1
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 100
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 2
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | flipbookRows: 1
60 | flipbookColumns: 1
61 | maxTextureSizeSet: 0
62 | compressionQualitySet: 0
63 | textureFormatSet: 0
64 | ignorePngGamma: 0
65 | applyGammaDecoding: 0
66 | platformSettings:
67 | - serializedVersion: 3
68 | buildTarget: DefaultTexturePlatform
69 | maxTextureSize: 8192
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 1
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | forceMaximumCompressionQuality_BC6H_BC7: 0
79 | - serializedVersion: 3
80 | buildTarget: Standalone
81 | maxTextureSize: 8192
82 | resizeAlgorithm: 0
83 | textureFormat: -1
84 | textureCompression: 1
85 | compressionQuality: 50
86 | crunchedCompression: 0
87 | allowsAlphaSplitting: 0
88 | overridden: 0
89 | androidETC2FallbackOverride: 0
90 | forceMaximumCompressionQuality_BC6H_BC7: 0
91 | - serializedVersion: 3
92 | buildTarget: iPhone
93 | maxTextureSize: 8192
94 | resizeAlgorithm: 0
95 | textureFormat: -1
96 | textureCompression: 1
97 | compressionQuality: 50
98 | crunchedCompression: 0
99 | allowsAlphaSplitting: 0
100 | overridden: 0
101 | androidETC2FallbackOverride: 0
102 | forceMaximumCompressionQuality_BC6H_BC7: 0
103 | - serializedVersion: 3
104 | buildTarget: Android
105 | maxTextureSize: 8192
106 | resizeAlgorithm: 0
107 | textureFormat: -1
108 | textureCompression: 1
109 | compressionQuality: 50
110 | crunchedCompression: 0
111 | allowsAlphaSplitting: 0
112 | overridden: 0
113 | androidETC2FallbackOverride: 0
114 | forceMaximumCompressionQuality_BC6H_BC7: 0
115 | - serializedVersion: 3
116 | buildTarget: Windows Store Apps
117 | maxTextureSize: 8192
118 | resizeAlgorithm: 0
119 | textureFormat: -1
120 | textureCompression: 1
121 | compressionQuality: 50
122 | crunchedCompression: 0
123 | allowsAlphaSplitting: 0
124 | overridden: 0
125 | androidETC2FallbackOverride: 0
126 | forceMaximumCompressionQuality_BC6H_BC7: 0
127 | - serializedVersion: 3
128 | buildTarget: Server
129 | maxTextureSize: 8192
130 | resizeAlgorithm: 0
131 | textureFormat: -1
132 | textureCompression: 1
133 | compressionQuality: 50
134 | crunchedCompression: 0
135 | allowsAlphaSplitting: 0
136 | overridden: 0
137 | androidETC2FallbackOverride: 0
138 | forceMaximumCompressionQuality_BC6H_BC7: 0
139 | spriteSheet:
140 | serializedVersion: 2
141 | sprites: []
142 | outline: []
143 | physicsShape: []
144 | bones: []
145 | spriteID:
146 | internalID: 0
147 | vertices: []
148 | indices:
149 | edges: []
150 | weights: []
151 | secondaryTextures: []
152 | nameFileIdTable: {}
153 | spritePackingTag:
154 | pSDRemoveMatte: 0
155 | pSDShowRemoveMatteOption: 0
156 | userData:
157 | assetBundleName:
158 | assetBundleVariant:
159 |
--------------------------------------------------------------------------------
/Editor/Icon/Logo2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/Editor/Icon/Logo2.png
--------------------------------------------------------------------------------
/Editor/Icon/Logo2.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 26b9d845eb7b1a747bf04dc84e5bcc2c
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | externalObjects: {}
6 | serializedVersion: 4
7 | mipmaps:
8 | mipMapMode: 0
9 | mipMapLayout: 0
10 | enableMipMap: 0
11 | sRGBTexture: 0
12 | linearTexture: 0
13 | fadeOut: 0
14 | borderMipMap: 0
15 | mipMapsPreserveCoverage: 0
16 | alphaTestReferenceValue: 0.5
17 | mipMapFadeDistanceStart: 1
18 | mipMapFadeDistanceEnd: 3
19 | bumpmap:
20 | convertToNormalMap: 0
21 | externalNormalMap: 0
22 | heightScale: 0.25
23 | normalMapFilter: 0
24 | isReadable: 0
25 | streamingMipmaps: 1
26 | grayScaleToAlpha: 0
27 | generateCubemap: 6
28 | cubemapConvolution: 0
29 | seamlessCubemap: 0
30 | textureFormat: 1
31 | maxTextureSize: 2048
32 | textureSettings:
33 | serializedVersion: 2
34 | filterMode: -1
35 | aniso: 1
36 | mipBias: -1
37 | wrapU: 1
38 | wrapV: 1
39 | wrapW: -1
40 | nPOTScale: 0
41 | lightmap: 0
42 | compressionQuality: 50
43 | spriteMode: 0
44 | spriteExtrude: 1
45 | spriteMeshType: 1
46 | alignment: 0
47 | spritePivot: {x: 0.5, y: 0.5}
48 | spritePixelsToUnits: 100
49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
50 | spriteGenerateFallbackPhysicsShape: 1
51 | alphaUsage: 1
52 | alphaIsTransparency: 1
53 | spriteTessellationDetail: -1
54 | textureType: 2
55 | textureShape: 1
56 | maxTextureSizeSet: 0
57 | compressionQualitySet: 0
58 | textureFormatSet: 0
59 | platformSettings:
60 | - buildTarget: DefaultTexturePlatform
61 | maxTextureSize: 2048
62 | resizeAlgorithm: 0
63 | textureFormat: -1
64 | textureCompression: 1
65 | compressionQuality: 50
66 | crunchedCompression: 0
67 | allowsAlphaSplitting: 0
68 | overridden: 0
69 | androidETC2FallbackOverride: 0
70 | platformFilterMode: 1
71 | - buildTarget: Standalone
72 | maxTextureSize: 2048
73 | resizeAlgorithm: 0
74 | textureFormat: -1
75 | textureCompression: 1
76 | compressionQuality: 50
77 | crunchedCompression: 0
78 | allowsAlphaSplitting: 0
79 | overridden: 0
80 | androidETC2FallbackOverride: 0
81 | platformFilterMode: 1
82 | - buildTarget: iPhone
83 | maxTextureSize: 2048
84 | resizeAlgorithm: 0
85 | textureFormat: -1
86 | textureCompression: 1
87 | compressionQuality: 50
88 | crunchedCompression: 0
89 | allowsAlphaSplitting: 0
90 | overridden: 0
91 | androidETC2FallbackOverride: 0
92 | platformFilterMode: 1
93 | - buildTarget: tvOS
94 | maxTextureSize: 2048
95 | resizeAlgorithm: 0
96 | textureFormat: -1
97 | textureCompression: 1
98 | compressionQuality: 50
99 | crunchedCompression: 0
100 | allowsAlphaSplitting: 0
101 | overridden: 0
102 | androidETC2FallbackOverride: 0
103 | platformFilterMode: 1
104 | - buildTarget: Android
105 | maxTextureSize: 2048
106 | resizeAlgorithm: 0
107 | textureFormat: -1
108 | textureCompression: 1
109 | compressionQuality: 50
110 | crunchedCompression: 0
111 | allowsAlphaSplitting: 0
112 | overridden: 0
113 | androidETC2FallbackOverride: 0
114 | platformFilterMode: 1
115 | - buildTarget: WebGL
116 | maxTextureSize: 2048
117 | resizeAlgorithm: 0
118 | textureFormat: -1
119 | textureCompression: 1
120 | compressionQuality: 50
121 | crunchedCompression: 0
122 | allowsAlphaSplitting: 0
123 | overridden: 0
124 | androidETC2FallbackOverride: 0
125 | platformFilterMode: 1
126 | - buildTarget: PS4
127 | maxTextureSize: 2048
128 | resizeAlgorithm: 0
129 | textureFormat: -1
130 | textureCompression: 1
131 | compressionQuality: 50
132 | crunchedCompression: 0
133 | allowsAlphaSplitting: 0
134 | overridden: 0
135 | androidETC2FallbackOverride: 0
136 | platformFilterMode: 1
137 | spriteSheet:
138 | serializedVersion: 2
139 | sprites: []
140 | outline: []
141 | physicsShape: []
142 | spritePackingTag:
143 | useMipMapOverrideTexture: 0
144 | mipMapOverrideTextureNames: []
145 | userData:
146 | assetBundleName:
147 | assetBundleVariant:
148 |
--------------------------------------------------------------------------------
/Editor/Icon/Paste.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/Editor/Icon/Paste.png
--------------------------------------------------------------------------------
/Editor/Icon/Paste.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8e7a78d02e4c3574998524a0842a8ccb
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | externalObjects: {}
6 | serializedVersion: 4
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 0
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 | isReadable: 0
24 | grayScaleToAlpha: 0
25 | generateCubemap: 6
26 | cubemapConvolution: 0
27 | seamlessCubemap: 0
28 | textureFormat: 1
29 | maxTextureSize: 2048
30 | textureSettings:
31 | serializedVersion: 2
32 | filterMode: 1
33 | aniso: 1
34 | mipBias: 0
35 | wrapU: 1
36 | wrapV: 1
37 | wrapW: 0
38 | nPOTScale: 0
39 | lightmap: 0
40 | compressionQuality: 50
41 | spriteMode: 1
42 | spriteExtrude: 1
43 | spriteMeshType: 1
44 | alignment: 0
45 | spritePivot: {x: 0.5, y: 0.5}
46 | spritePixelsToUnits: 100
47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
48 | spriteGenerateFallbackPhysicsShape: 1
49 | alphaUsage: 1
50 | alphaIsTransparency: 1
51 | spriteTessellationDetail: -1
52 | textureType: 2
53 | textureShape: 1
54 | maxTextureSizeSet: 0
55 | compressionQualitySet: 0
56 | textureFormatSet: 0
57 | platformSettings:
58 | - buildTarget: DefaultTexturePlatform
59 | maxTextureSize: 2048
60 | resizeAlgorithm: 0
61 | textureFormat: -1
62 | textureCompression: 1
63 | compressionQuality: 50
64 | crunchedCompression: 0
65 | allowsAlphaSplitting: 0
66 | overridden: 0
67 | androidETC2FallbackOverride: 0
68 | - buildTarget: Standalone
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 1
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | spriteSheet:
79 | serializedVersion: 2
80 | sprites: []
81 | outline: []
82 | physicsShape: []
83 | spritePackingTag:
84 | userData:
85 | assetBundleName:
86 | assetBundleVariant:
87 |
--------------------------------------------------------------------------------
/Editor/Icon/RevertIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/Editor/Icon/RevertIcon.png
--------------------------------------------------------------------------------
/Editor/Icon/RevertIcon.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e7bc1130858d984488bca32b8512ca96
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
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 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | vTOnly: 0
27 | ignoreMasterTextureLimit: 0
28 | grayScaleToAlpha: 0
29 | generateCubemap: 6
30 | cubemapConvolution: 0
31 | seamlessCubemap: 0
32 | textureFormat: 1
33 | maxTextureSize: 2048
34 | textureSettings:
35 | serializedVersion: 2
36 | filterMode: 1
37 | aniso: 1
38 | mipBias: 0
39 | wrapU: 1
40 | wrapV: 1
41 | wrapW: 0
42 | nPOTScale: 0
43 | lightmap: 0
44 | compressionQuality: 50
45 | spriteMode: 0
46 | spriteExtrude: 1
47 | spriteMeshType: 1
48 | alignment: 0
49 | spritePivot: {x: 0.5, y: 0.5}
50 | spritePixelsToUnits: 100
51 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
52 | spriteGenerateFallbackPhysicsShape: 1
53 | alphaUsage: 1
54 | alphaIsTransparency: 1
55 | spriteTessellationDetail: -1
56 | textureType: 2
57 | textureShape: 1
58 | singleChannelComponent: 0
59 | flipbookRows: 1
60 | flipbookColumns: 1
61 | maxTextureSizeSet: 0
62 | compressionQualitySet: 0
63 | textureFormatSet: 0
64 | ignorePngGamma: 0
65 | applyGammaDecoding: 0
66 | platformSettings:
67 | - serializedVersion: 3
68 | buildTarget: DefaultTexturePlatform
69 | maxTextureSize: 8192
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 1
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | forceMaximumCompressionQuality_BC6H_BC7: 0
79 | - serializedVersion: 3
80 | buildTarget: Standalone
81 | maxTextureSize: 8192
82 | resizeAlgorithm: 0
83 | textureFormat: -1
84 | textureCompression: 1
85 | compressionQuality: 50
86 | crunchedCompression: 0
87 | allowsAlphaSplitting: 0
88 | overridden: 0
89 | androidETC2FallbackOverride: 0
90 | forceMaximumCompressionQuality_BC6H_BC7: 0
91 | - serializedVersion: 3
92 | buildTarget: iPhone
93 | maxTextureSize: 8192
94 | resizeAlgorithm: 0
95 | textureFormat: -1
96 | textureCompression: 1
97 | compressionQuality: 50
98 | crunchedCompression: 0
99 | allowsAlphaSplitting: 0
100 | overridden: 0
101 | androidETC2FallbackOverride: 0
102 | forceMaximumCompressionQuality_BC6H_BC7: 0
103 | - serializedVersion: 3
104 | buildTarget: Android
105 | maxTextureSize: 8192
106 | resizeAlgorithm: 0
107 | textureFormat: -1
108 | textureCompression: 1
109 | compressionQuality: 50
110 | crunchedCompression: 0
111 | allowsAlphaSplitting: 0
112 | overridden: 0
113 | androidETC2FallbackOverride: 0
114 | forceMaximumCompressionQuality_BC6H_BC7: 0
115 | - serializedVersion: 3
116 | buildTarget: Windows Store Apps
117 | maxTextureSize: 8192
118 | resizeAlgorithm: 0
119 | textureFormat: -1
120 | textureCompression: 1
121 | compressionQuality: 50
122 | crunchedCompression: 0
123 | allowsAlphaSplitting: 0
124 | overridden: 0
125 | androidETC2FallbackOverride: 0
126 | forceMaximumCompressionQuality_BC6H_BC7: 0
127 | - serializedVersion: 3
128 | buildTarget: Server
129 | maxTextureSize: 8192
130 | resizeAlgorithm: 0
131 | textureFormat: -1
132 | textureCompression: 1
133 | compressionQuality: 50
134 | crunchedCompression: 0
135 | allowsAlphaSplitting: 0
136 | overridden: 0
137 | androidETC2FallbackOverride: 0
138 | forceMaximumCompressionQuality_BC6H_BC7: 0
139 | spriteSheet:
140 | serializedVersion: 2
141 | sprites: []
142 | outline: []
143 | physicsShape: []
144 | bones: []
145 | spriteID:
146 | internalID: 0
147 | vertices: []
148 | indices:
149 | edges: []
150 | weights: []
151 | secondaryTextures: []
152 | nameFileIdTable: {}
153 | spritePackingTag:
154 | pSDRemoveMatte: 0
155 | pSDShowRemoveMatteOption: 0
156 | userData:
157 | assetBundleName:
158 | assetBundleVariant:
159 |
--------------------------------------------------------------------------------
/Editor/Icon/SelectMaterialAsset.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/Editor/Icon/SelectMaterialAsset.png
--------------------------------------------------------------------------------
/Editor/Icon/SelectMaterialAsset.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6f44e40b24300974eb607293e4224ecc
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | externalObjects: {}
6 | serializedVersion: 4
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 0
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 | isReadable: 0
24 | grayScaleToAlpha: 0
25 | generateCubemap: 6
26 | cubemapConvolution: 0
27 | seamlessCubemap: 0
28 | textureFormat: 1
29 | maxTextureSize: 2048
30 | textureSettings:
31 | serializedVersion: 2
32 | filterMode: 1
33 | aniso: 1
34 | mipBias: 0
35 | wrapU: 1
36 | wrapV: 1
37 | wrapW: 0
38 | nPOTScale: 0
39 | lightmap: 0
40 | compressionQuality: 50
41 | spriteMode: 1
42 | spriteExtrude: 1
43 | spriteMeshType: 1
44 | alignment: 0
45 | spritePivot: {x: 0.5, y: 0.5}
46 | spritePixelsToUnits: 100
47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
48 | spriteGenerateFallbackPhysicsShape: 1
49 | alphaUsage: 1
50 | alphaIsTransparency: 1
51 | spriteTessellationDetail: -1
52 | textureType: 2
53 | textureShape: 1
54 | maxTextureSizeSet: 0
55 | compressionQualitySet: 0
56 | textureFormatSet: 0
57 | platformSettings:
58 | - buildTarget: DefaultTexturePlatform
59 | maxTextureSize: 2048
60 | resizeAlgorithm: 0
61 | textureFormat: -1
62 | textureCompression: 1
63 | compressionQuality: 50
64 | crunchedCompression: 0
65 | allowsAlphaSplitting: 0
66 | overridden: 0
67 | androidETC2FallbackOverride: 0
68 | - buildTarget: Standalone
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 1
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | spriteSheet:
79 | serializedVersion: 2
80 | sprites: []
81 | outline: []
82 | physicsShape: []
83 | spritePackingTag:
84 | userData:
85 | assetBundleName:
86 | assetBundleVariant:
87 |
--------------------------------------------------------------------------------
/Editor/Icon/Visibility.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/Editor/Icon/Visibility.png
--------------------------------------------------------------------------------
/Editor/Icon/Visibility.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9576e23a695b35d49a9fc55c9a948b4f
3 | TextureImporter:
4 | fileIDToRecycleName: {}
5 | externalObjects: {}
6 | serializedVersion: 4
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 0
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 | isReadable: 0
24 | grayScaleToAlpha: 0
25 | generateCubemap: 6
26 | cubemapConvolution: 0
27 | seamlessCubemap: 0
28 | textureFormat: 1
29 | maxTextureSize: 2048
30 | textureSettings:
31 | serializedVersion: 2
32 | filterMode: -1
33 | aniso: 1
34 | mipBias: -1
35 | wrapU: 1
36 | wrapV: 1
37 | wrapW: -1
38 | nPOTScale: 0
39 | lightmap: 0
40 | compressionQuality: 50
41 | spriteMode: 0
42 | spriteExtrude: 1
43 | spriteMeshType: 1
44 | alignment: 0
45 | spritePivot: {x: 0.5, y: 0.5}
46 | spritePixelsToUnits: 100
47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
48 | spriteGenerateFallbackPhysicsShape: 1
49 | alphaUsage: 1
50 | alphaIsTransparency: 1
51 | spriteTessellationDetail: -1
52 | textureType: 2
53 | textureShape: 1
54 | maxTextureSizeSet: 0
55 | compressionQualitySet: 0
56 | textureFormatSet: 0
57 | platformSettings:
58 | - buildTarget: DefaultTexturePlatform
59 | maxTextureSize: 2048
60 | resizeAlgorithm: 0
61 | textureFormat: -1
62 | textureCompression: 1
63 | compressionQuality: 50
64 | crunchedCompression: 0
65 | allowsAlphaSplitting: 0
66 | overridden: 0
67 | androidETC2FallbackOverride: 0
68 | - buildTarget: Standalone
69 | maxTextureSize: 2048
70 | resizeAlgorithm: 0
71 | textureFormat: -1
72 | textureCompression: 1
73 | compressionQuality: 50
74 | crunchedCompression: 0
75 | allowsAlphaSplitting: 0
76 | overridden: 0
77 | androidETC2FallbackOverride: 0
78 | spriteSheet:
79 | serializedVersion: 2
80 | sprites: []
81 | outline: []
82 | physicsShape: []
83 | spritePackingTag:
84 | userData:
85 | assetBundleName:
86 | assetBundleVariant:
87 |
--------------------------------------------------------------------------------
/Editor/LWGUI.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "LWGUI",
3 | "rootNamespace": "",
4 | "references": [
5 | "LWGUI.Runtime",
6 | "LWGUI.Timeline",
7 | "Unity.InternalAPIEditorBridge.020"
8 | ],
9 | "includePlatforms": [
10 | "Editor"
11 | ],
12 | "excludePlatforms": [],
13 | "allowUnsafeCode": false,
14 | "overrideReferences": false,
15 | "precompiledReferences": [],
16 | "autoReferenced": true,
17 | "defineConstraints": [],
18 | "versionDefines": [],
19 | "noEngineReferences": false
20 | }
--------------------------------------------------------------------------------
/Editor/LWGUI.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5f81b150f373e8840ab13769ce55ea16
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Editor/LWGUI.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 |
3 | using UnityEditor;
4 | using UnityEngine;
5 | using UnityEngine.Rendering;
6 |
7 | namespace LWGUI
8 | {
9 | public delegate void LWGUICustomGUIEvent(LWGUI lwgui);
10 |
11 | public class LWGUI : ShaderGUI
12 | {
13 | public LWGUIMetaDatas metaDatas;
14 | public bool hasChange;
15 |
16 | public static LWGUICustomGUIEvent onDrawCustomHeader;
17 | public static LWGUICustomGUIEvent onDrawCustomFooter;
18 |
19 | ///
20 | /// Called when switch to a new Material Window, each window has a LWGUI instance
21 | ///
22 | public LWGUI() { }
23 |
24 | ///
25 | /// Called every frame when the content is updated, such as the mouse moving in the material editor
26 | ///
27 | public override void OnGUI(MaterialEditor editor, MaterialProperty[] props)
28 | {
29 | //-----------------------------------------------------------------------------
30 | // Init Datas
31 | var material = editor.target as Material;
32 | var shader = material.shader;
33 | if (hasChange)
34 | {
35 | OnValidate(editor.targets);
36 | hasChange = false;
37 | }
38 | this.metaDatas = MetaDataHelper.BuildMetaDatas(shader, material, editor, this, props);
39 |
40 |
41 | //-----------------------------------------------------------------------------
42 | // Header
43 | if (onDrawCustomHeader != null)
44 | onDrawCustomHeader(this);
45 |
46 | // Toolbar
47 | bool enabled = GUI.enabled;
48 | GUI.enabled = true;
49 | var toolBarRect = EditorGUILayout.GetControlRect();
50 | toolBarRect.xMin = 2;
51 |
52 | Helper.DrawToolbarButtons(ref toolBarRect, metaDatas);
53 |
54 | Helper.DrawSearchField(toolBarRect, metaDatas);
55 |
56 | GUILayoutUtility.GetRect(0, 0); // Space(0)
57 | GUI.enabled = enabled;
58 | Helper.DrawSplitLine();
59 |
60 |
61 | //-----------------------------------------------------------------------------
62 | // Draw Properties
63 | {
64 | // move fields left to make rect for Revert Button
65 | editor.SetDefaultGUIWidths();
66 | RevertableHelper.InitRevertableGUIWidths();
67 |
68 | // start drawing properties
69 | foreach (var prop in props)
70 | {
71 | var (propStaticData, propDynamicData) = metaDatas.GetPropDatas(prop);
72 |
73 | // Visibility
74 | {
75 | if (!MetaDataHelper.GetPropertyVisibility(prop, material, metaDatas))
76 | continue;
77 |
78 | if (propStaticData.parent != null
79 | && (!MetaDataHelper.GetParentPropertyVisibility(propStaticData.parent, material, metaDatas)
80 | || !MetaDataHelper.GetParentPropertyVisibility(propStaticData.parent.parent, material, metaDatas)))
81 | continue;
82 | }
83 |
84 | // Indent
85 | var indentLevel = EditorGUI.indentLevel;
86 | if (propStaticData.isAdvancedHeader)
87 | EditorGUI.indentLevel++;
88 | if (propStaticData.parent != null)
89 | {
90 | EditorGUI.indentLevel++;
91 | if (propStaticData.parent.parent != null)
92 | EditorGUI.indentLevel++;
93 | }
94 |
95 | // Advanced Header
96 | if (propStaticData.isAdvancedHeader && !propStaticData.isAdvancedHeaderProperty)
97 | {
98 | DrawAdvancedHeader(propStaticData, prop);
99 |
100 | if (!propStaticData.isExpanding)
101 | {
102 | RevertableHelper.SetRevertableGUIWidths();
103 | EditorGUI.indentLevel = indentLevel;
104 | continue;
105 | }
106 | }
107 |
108 | DrawProperty(prop);
109 |
110 | RevertableHelper.SetRevertableGUIWidths();
111 | EditorGUI.indentLevel = indentLevel;
112 | }
113 |
114 | editor.SetDefaultGUIWidths();
115 | }
116 |
117 |
118 | //-----------------------------------------------------------------------------
119 | // Footer
120 | EditorGUILayout.Space();
121 | Helper.DrawSplitLine();
122 | EditorGUILayout.Space();
123 |
124 | // Render settings
125 | if (SupportedRenderingFeatures.active.editableMaterialRenderQueue)
126 | editor.RenderQueueField();
127 | editor.EnableInstancingField();
128 | editor.LightmapEmissionProperty();
129 | editor.DoubleSidedGIField();
130 |
131 | // Custom Footer
132 | if (onDrawCustomFooter != null)
133 | onDrawCustomFooter(this);
134 |
135 | // LOGO
136 | EditorGUILayout.Space();
137 | Helper.DrawLogo();
138 | }
139 |
140 | private void DrawAdvancedHeader(PropertyStaticData propStaticData, MaterialProperty prop)
141 | {
142 | EditorGUILayout.Space(3);
143 | var rect = EditorGUILayout.GetControlRect();
144 | var revertButtonRect = RevertableHelper.SplitRevertButtonRect(ref rect);
145 | var label = string.IsNullOrEmpty(propStaticData.advancedHeaderString) ? "Advanced" : propStaticData.advancedHeaderString;
146 | propStaticData.isExpanding = EditorGUI.Foldout(rect, propStaticData.isExpanding, label, EditorStyles.foldoutHeader);
147 | if (Event.current.type == EventType.MouseDown && Event.current.button == 0 && rect.Contains(Event.current.mousePosition))
148 | propStaticData.isExpanding = !propStaticData.isExpanding;
149 | RevertableHelper.DrawRevertableProperty(revertButtonRect, prop, metaDatas, true);
150 | Helper.DoPropertyContextMenus(rect, prop, metaDatas);
151 | }
152 |
153 | private void DrawProperty(MaterialProperty prop)
154 | {
155 | var (propStaticData, propDynamicData) = metaDatas.GetPropDatas(prop);
156 | var materialEditor = metaDatas.GetMaterialEditor();
157 |
158 | if (propStaticData.isAdvancedHeaderProperty)
159 | EditorGUILayout.Space(3);
160 |
161 | Helper.DrawHelpbox(propStaticData, propDynamicData);
162 |
163 | var label = new GUIContent(propStaticData.displayName, MetaDataHelper.GetPropertyTooltip(propStaticData, propDynamicData));
164 | var height = metaDatas.perInspectorData.materialEditor.GetPropertyHeight(prop, label.text);
165 | var rect = EditorGUILayout.GetControlRect(true, height);
166 |
167 | var revertButtonRect = RevertableHelper.SplitRevertButtonRect(ref rect);
168 |
169 | var enabled = GUI.enabled;
170 | if (propStaticData.isReadOnly) GUI.enabled = false;
171 | Helper.BeginProperty(rect, prop, metaDatas);
172 | Helper.DoPropertyContextMenus(rect, prop, metaDatas);
173 |
174 | RevertableHelper.FixGUIWidthMismatch(prop.type, materialEditor);
175 | if (propStaticData.isAdvancedHeaderProperty)
176 | propStaticData.isExpanding = EditorGUI.Foldout(rect, propStaticData.isExpanding, string.Empty);
177 |
178 | RevertableHelper.DrawRevertableProperty(revertButtonRect, prop, metaDatas, propStaticData.isMain || propStaticData.isAdvancedHeaderProperty);
179 | materialEditor.ShaderProperty(rect, prop, label);
180 |
181 | Helper.EndProperty(metaDatas, prop);
182 | GUI.enabled = enabled;
183 | }
184 |
185 | public override void OnClosed(Material material)
186 | {
187 | base.OnClosed(material);
188 | MetaDataHelper.ReleaseMaterialMetadataCache(material);
189 | }
190 |
191 | public override void AssignNewShaderToMaterial(Material material, Shader oldShader, Shader newShader)
192 | {
193 | base.AssignNewShaderToMaterial(material, oldShader, newShader);
194 | if (newShader != oldShader)
195 | MetaDataHelper.ReleaseMaterialMetadataCache(material);
196 | }
197 |
198 | public static void OnValidate(Object[] materials)
199 | {
200 | VersionControlHelper.Checkout(materials);
201 | UnityEditorExtension.ApplyMaterialPropertyAndDecoratorDrawers(materials);
202 | MetaDataHelper.ForceUpdateMaterialsMetadataCache(materials);
203 | }
204 |
205 | // Called after edit in code
206 | public static void OnValidate(LWGUIMetaDatas metaDatas)
207 | {
208 | OnValidate(metaDatas?.GetMaterialEditor()?.targets);
209 | }
210 |
211 | public override void ValidateMaterial(Material material)
212 | {
213 | // Debug.Log($"ValidateMaterial {material.name}, {metaDatas}, {Event.current?.type}");
214 |
215 | // Validate a Faked Material when select/edit a Material
216 | if (metaDatas == null && (Event.current == null || Event.current.type == EventType.Layout))
217 | {
218 | // Skip to avoid lag when editing large amounts of materials
219 | }
220 | // Undo/Edit in Timeline (EventType.Repaint)
221 | // Note: When modifying the material in Timeline in Unity 2022, this function cannot correctly obtain the modified value.
222 | else if (metaDatas == null)
223 | {
224 | MetaDataHelper.ForceUpdateMaterialMetadataCache(material);
225 | }
226 | // Edit
227 | else
228 | {
229 | if (!hasChange) hasChange = true;
230 | }
231 | }
232 | }
233 | }
--------------------------------------------------------------------------------
/Editor/LWGUI.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b44ae323525d0c64c92721bfbd1ad8c5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/MetaData.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a5f8961824834df0852f10a2fea19f0f
3 | timeCreated: 1708067874
--------------------------------------------------------------------------------
/Editor/MetaData/PerInspectorData.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 | // Per Shader > Per Material > Per Inspector
3 |
4 | using UnityEditor;
5 | using UnityEngine;
6 |
7 | namespace LWGUI
8 | {
9 | ///
10 | /// Contains metadata that may be different for each Inspector
11 | ///
12 | public class PerInspectorData
13 | {
14 | public MaterialEditor materialEditor = null;
15 |
16 | public PerInspectorData() { }
17 |
18 | public void Update(MaterialEditor materialEditor)
19 | {
20 | this.materialEditor = materialEditor;
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/Editor/MetaData/PerInspectorData.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 820ab4831680478b916d54cd420f91a9
3 | timeCreated: 1708070515
--------------------------------------------------------------------------------
/Editor/MetaData/PerMaterialData.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 | // Per Shader > Per Material > Per Inspector
3 |
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using UnityEditor;
7 | using UnityEngine;
8 |
9 | namespace LWGUI
10 | {
11 | public class PersetDynamicData
12 | {
13 | public LwguiShaderPropertyPreset.Preset preset;
14 | public MaterialProperty property;
15 |
16 | public PersetDynamicData(LwguiShaderPropertyPreset.Preset preset, MaterialProperty property)
17 | {
18 | this.preset = preset;
19 | this.property = property;
20 | }
21 | }
22 |
23 | public class PropertyDynamicData
24 | {
25 | public MaterialProperty property;
26 | public MaterialProperty defualtProperty; // Default values may be overridden by Preset
27 |
28 | public string defaultValueDescription = string.Empty; // Description of the default values used in Tooltip
29 | public bool hasModified = false; // Are properties modified in the material?
30 | public bool hasChildrenModified = false; // Are Children properties modified in the material?
31 | public bool hasRevertChanged = false; // Used to call property EndChangeCheck()
32 | public bool isShowing = true; // ShowIf() result
33 | public bool isAnimated = false; // Material Parameter Animation preview in Timeline is activated
34 | }
35 |
36 | ///
37 | /// Contains Metadata that may be different for each Material.
38 | ///
39 | public class PerMaterialData
40 | {
41 | public Dictionary propDynamicDatas = new Dictionary();
42 | public MaterialProperty[] props = null;
43 | public Material material = null;
44 | public Material defaultMaterialWithPresetOverride = null;
45 | public MaterialProperty[] defaultPropertiesWithPresetOverride = null;
46 | public List activePresetDatas = new List();
47 | public int modifiedCount = 0;
48 | public Dictionary cachedModifiedProperties = null;
49 | public bool forceInit = true;
50 |
51 | public PerMaterialData(Shader shader, Material material, MaterialEditor editor, MaterialProperty[] props, PerShaderData perShaderData)
52 | {
53 | Init(shader, material, editor, props, perShaderData);
54 | }
55 |
56 | public void Init(Shader shader, Material material, MaterialEditor editor, MaterialProperty[] props, PerShaderData perShaderData)
57 | {
58 | forceInit = false;
59 |
60 | // Reset Datas
61 | this.props = props;
62 | this.material = material;
63 | activePresetDatas.Clear();
64 | propDynamicDatas.Clear();
65 | modifiedCount = 0;
66 |
67 | // Get active presets
68 | foreach (var prop in props)
69 | {
70 | var propStaticData = perShaderData.propStaticDatas[prop.name];
71 | var activePreset = propStaticData.presetDrawer?.GetActivePreset(prop, propStaticData.propertyPresetAsset);
72 | if (activePreset != null
73 | // Filter invisible preset properties
74 | && (propStaticData.showIfDatas.Count == 0
75 | || ShowIfDecorator.GetShowIfResultFromMaterial(propStaticData.showIfDatas, this.material)))
76 | {
77 | activePresetDatas.Add(new PersetDynamicData(activePreset, prop));
78 | }
79 | }
80 |
81 | {
82 | // Apply presets to default material
83 | defaultMaterialWithPresetOverride = UnityEngine.Object.Instantiate(
84 | #if UNITY_2022_1_OR_NEWER
85 | material.parent
86 | ? material.parent
87 | :
88 | #endif
89 | perShaderData.defaultMaterial
90 | );
91 |
92 | foreach (var activePresetData in activePresetDatas)
93 | activePresetData.preset.ApplyToDefaultMaterial(defaultMaterialWithPresetOverride);
94 |
95 | defaultPropertiesWithPresetOverride = MaterialEditor.GetMaterialProperties(new[] { defaultMaterialWithPresetOverride });
96 | Debug.Assert(defaultPropertiesWithPresetOverride.Length == props.Length);
97 |
98 | // Init propDynamicDatas
99 | for (int i = 0; i < props.Length; i++)
100 | {
101 | var hasModified = !Helper.PropertyValueEquals(props[i], defaultPropertiesWithPresetOverride[i]);
102 | if (hasModified) modifiedCount++;
103 | propDynamicDatas.Add(props[i].name, new PropertyDynamicData()
104 | {
105 | property = props[i],
106 | defualtProperty = defaultPropertiesWithPresetOverride[i],
107 | hasModified = hasModified
108 | });
109 | }
110 |
111 | // Collect modification
112 | foreach (var prop in props)
113 | {
114 | var propStaticData = perShaderData.propStaticDatas[prop.name];
115 | var propDynamicData = propDynamicDatas[prop.name];
116 |
117 | // Extra Prop hasModified
118 | foreach (var extraPropName in propStaticData.extraPropNames)
119 | propDynamicData.hasModified |= propDynamicDatas[extraPropName].hasModified;
120 |
121 | // Override parent hasChildrenModified
122 | if (propDynamicData.hasModified)
123 | {
124 | var parentPropData = propStaticData.parent;
125 | if (parentPropData != null)
126 | {
127 | propDynamicDatas[parentPropData.name].hasChildrenModified = true;
128 | if (parentPropData.parent != null)
129 | propDynamicDatas[parentPropData.parent.name].hasChildrenModified = true;
130 | }
131 | }
132 | }
133 | }
134 |
135 | // Store "Show Modified Props Only" Caches
136 | {
137 | if (perShaderData.displayModeData.showOnlyModifiedGroups || perShaderData.displayModeData.showOnlyModifiedProperties)
138 | {
139 | if (cachedModifiedProperties == null)
140 | {
141 | cachedModifiedProperties = new Dictionary();
142 | foreach (var propDynamicDataKWPair in propDynamicDatas)
143 | {
144 | if (propDynamicDataKWPair.Value.hasModified || propDynamicDataKWPair.Value.hasChildrenModified)
145 | cachedModifiedProperties.Add(propDynamicDataKWPair.Key, true);
146 | }
147 | }
148 | }
149 | else
150 | cachedModifiedProperties = null;
151 | }
152 |
153 | foreach (var prop in props)
154 | {
155 | var propStaticData = perShaderData.propStaticDatas[prop.name];
156 | var propDynamicData = propDynamicDatas[prop.name];
157 |
158 | // Get default value descriptions
159 | propStaticData.baseDrawers?.ForEach(propertyDrawer => propertyDrawer.GetDefaultValueDescription(shader, prop, propDynamicData.defualtProperty, perShaderData, this));
160 | if (string.IsNullOrEmpty(propDynamicData.defaultValueDescription))
161 | propDynamicData.defaultValueDescription = RevertableHelper.GetPropertyDefaultValueText(propDynamicData.defualtProperty);
162 |
163 | // Get ShowIf() results
164 | ShowIfDecorator.GetShowIfResult(propStaticData, propDynamicData, this);
165 | }
166 | }
167 |
168 | public void Update(Shader shader, Material material, MaterialEditor editor, MaterialProperty[] props, PerShaderData perShaderData)
169 | {
170 | if (forceInit)
171 | {
172 | Init(shader, material, editor, props, perShaderData);
173 | }
174 | else
175 | {
176 | foreach (var prop in props)
177 | {
178 | propDynamicDatas[prop.name].property = prop;
179 | }
180 | }
181 |
182 | // Check animated
183 | var renderer = editor.GetRendererForAnimationMode();
184 | if (renderer != null)
185 | {
186 | forceInit = true;
187 | foreach (var prop in props)
188 | {
189 | ReflectionHelper.MaterialAnimationUtility_OverridePropertyColor(prop, renderer, out var color);
190 | if (color != Color.white)
191 | propDynamicDatas[prop.name].isAnimated = true;
192 | }
193 | }
194 | }
195 |
196 | public bool EndChangeCheck(string propName = null)
197 | {
198 | if (!string.IsNullOrEmpty(propName))
199 | {
200 | GUI.changed |= propDynamicDatas[propName].hasRevertChanged;
201 | propDynamicDatas[propName].hasRevertChanged = false;
202 | }
203 | return EditorGUI.EndChangeCheck();
204 | }
205 |
206 | public PropertyDynamicData GetPropDynamicData(string propName)
207 | {
208 | propDynamicDatas.TryGetValue(propName, out var propDynamicData);
209 | return propDynamicData;
210 | }
211 | }
212 | }
--------------------------------------------------------------------------------
/Editor/MetaData/PerMaterialData.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d76759ec5f1a4d74ac8a13d6530c78a1
3 | timeCreated: 1708068833
--------------------------------------------------------------------------------
/Editor/MetaData/PerShaderData.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 894cf7673aa84e61a48b204c6acff149
3 | timeCreated: 1708068418
--------------------------------------------------------------------------------
/Editor/ScriptableObject.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 66b821ea747b4f2d9c899ea80349fb68
3 | timeCreated: 1708067817
--------------------------------------------------------------------------------
/Editor/ScriptableObject/GradientObject.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 | using System;
3 | using UnityEngine;
4 |
5 | namespace LWGUI
6 | {
7 | [Serializable]
8 | public class GradientObject : ScriptableObject
9 | {
10 | [SerializeField] public Gradient gradient = new Gradient();
11 | }
12 | }
--------------------------------------------------------------------------------
/Editor/ScriptableObject/GradientObject.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: aff2e4cf84cc411195a546e04d7c2ee5
3 | timeCreated: 1702463134
--------------------------------------------------------------------------------
/Editor/ScriptableObject/LwguiRampAtlas.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2b294e53fae84d85a53542a47c4a1481
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/ScriptableObject/LwguiShaderPropertyPreset.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 28fbcbca3fb14507af6ed5c104c40b84
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/ShaderDrawer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b7661dfeec673f340b66ac769fa42d18
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/Timeline.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4dbe822af8af4057a776320d7ae07018
3 | timeCreated: 1741593487
--------------------------------------------------------------------------------
/Editor/Timeline/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6ed1eb9a44434bc4bf43ca612b5a0218
3 | timeCreated: 1741922369
--------------------------------------------------------------------------------
/Editor/Timeline/Editor/LWGUI.Timeline.Editor.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "LWGUI.Timeline.Editor",
3 | "rootNamespace": "",
4 | "references": [
5 | "LWGUI",
6 | "LWGUI.Timeline",
7 | "LWGUI.Runtime.Timeline",
8 | "Unity.Timeline",
9 | "Unity.Timeline.Editor"
10 | ],
11 | "includePlatforms": [
12 | "Editor"
13 | ],
14 | "excludePlatforms": [],
15 | "allowUnsafeCode": false,
16 | "overrideReferences": false,
17 | "precompiledReferences": [],
18 | "autoReferenced": true,
19 | "defineConstraints": [],
20 | "versionDefines": [
21 | {
22 | "name": "com.unity.timeline",
23 | "expression": "1.0.0",
24 | "define": "MATERIAL_KEYWORDS_TRACK_REQUIRES_TIMELINE"
25 | }
26 | ],
27 | "noEngineReferences": false
28 | }
--------------------------------------------------------------------------------
/Editor/Timeline/Editor/LWGUI.Timeline.Editor.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8f8c453ec76f458e82f3ada63010427a
3 | timeCreated: 1741922383
--------------------------------------------------------------------------------
/Editor/Timeline/Editor/MaterialKeywordToggleTrackEditor.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 |
3 | #if MATERIAL_KEYWORDS_TRACK_REQUIRES_TIMELINE
4 |
5 | using UnityEditor.Timeline;
6 | using UnityEngine;
7 | using UnityEngine.Timeline;
8 | using LWGUI.Timeline;
9 | using LWGUI.Runtime.Timeline;
10 | using UnityEngine.Playables;
11 |
12 | namespace LWGUI.Timeline
13 | {
14 | // Editor used by the TimelineEditor to customize the view of a MaterialKeywordToggleTrack
15 | [CustomTimelineEditor(typeof(MaterialKeywordToggleTrack))]
16 | public class MaterialKeywordToggleTrackEditor : TrackEditor
17 | {
18 | public override void OnTrackChanged(TrackAsset track)
19 | {
20 | base.OnTrackChanged(track);
21 |
22 | if (!VersionControlHelper.IsWriteable(track))
23 | return;
24 |
25 | var targetToggleTrack = track as MaterialKeywordToggleTrack;
26 | if (targetToggleTrack == null
27 | || targetToggleTrack.srcAnimationTrack == null
28 | || targetToggleTrack.srcAnimationClip == null
29 | || string.IsNullOrEmpty(targetToggleTrack.propName)
30 | )
31 | return;
32 |
33 | var directors = Object.FindObjectsByType(FindObjectsInactive.Exclude, FindObjectsSortMode.None);
34 | foreach (var director in directors)
35 | {
36 | var targetRenderer = director.GetGenericBinding(targetToggleTrack) as Renderer;
37 | var rootAnimator = director.GetGenericBinding(targetToggleTrack.srcAnimationTrack) as Animator;
38 | if (targetRenderer == null || rootAnimator == null)
39 | continue;
40 |
41 | if (TimelineHelper.GetMaterialPropertyEditorCurveFromAnimationClip(targetRenderer, targetToggleTrack.propName, rootAnimator, targetToggleTrack.srcAnimationClip,
42 | out var srcAnimationCurve))
43 | {
44 | TimelineHelper.CopyAnimationCurveToMaterialKeywordToggleTrack(targetToggleTrack.srcAnimationTrack, srcAnimationCurve, targetToggleTrack);
45 | break;
46 | }
47 | }
48 | }
49 | }
50 | }
51 |
52 | #endif
53 |
--------------------------------------------------------------------------------
/Editor/Timeline/Editor/MaterialKeywordToggleTrackEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3289a7f5d9294768a330ba684d33097d
3 | timeCreated: 1741863250
--------------------------------------------------------------------------------
/Editor/Timeline/LWGUI.Timeline.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "LWGUI.Timeline",
3 | "rootNamespace": "",
4 | "references": [
5 | "LWGUI.Runtime",
6 | "LWGUI.Runtime.Timeline",
7 | "Unity.InternalAPIEditorBridge.020",
8 | "Unity.Timeline",
9 | "Unity.Timeline.Editor"
10 | ],
11 | "includePlatforms": [
12 | "Editor"
13 | ],
14 | "excludePlatforms": [],
15 | "allowUnsafeCode": false,
16 | "overrideReferences": false,
17 | "precompiledReferences": [],
18 | "autoReferenced": true,
19 | "defineConstraints": [],
20 | "versionDefines": [
21 | {
22 | "name": "com.unity.timeline",
23 | "expression": "1.0.0",
24 | "define": "MATERIAL_KEYWORDS_TRACK_REQUIRES_TIMELINE"
25 | }
26 | ],
27 | "noEngineReferences": false
28 | }
--------------------------------------------------------------------------------
/Editor/Timeline/LWGUI.Timeline.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e09eeece654a40cf8607f14dca2cc342
3 | timeCreated: 1741593491
--------------------------------------------------------------------------------
/Editor/Timeline/TimelineHelper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9d1ff48409644223af93bcf82b379a3b
3 | timeCreated: 1741747578
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Jason Ma
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 |
--------------------------------------------------------------------------------
/LICENSE.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9bebfa5a82a481d4aa59f0cc272f4b09
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/README.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0262874869684c54692bf90002dd797f
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/README_CN.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d7a1075f39cba0f4ab16e6420009e7fd
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Runtime.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9c80aad1bb2dd5348bc922988445a5fb
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/LWGUI.Runtime.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "LWGUI.Runtime"
3 | }
4 |
--------------------------------------------------------------------------------
/Runtime/LWGUI.Runtime.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 959b4969da7632b4e9d4dc209cce9cd6
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Runtime/LwguiGradient.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 756c9f5a40564b56bc263009a656acba
3 | timeCreated: 1720764695
--------------------------------------------------------------------------------
/Runtime/LwguiGradient/LwguiGradient.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a1c1406f2f784af489fb3758fb334d07
3 | timeCreated: 1716793021
--------------------------------------------------------------------------------
/Runtime/LwguiGradient/LwguiGradientHelper.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 |
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using UnityEngine;
6 |
7 | // Disable Keyframe.tangentMode obsolete warning
8 | #pragma warning disable 0618
9 |
10 |
11 | namespace LWGUI.Runtime.LwguiGradient
12 | {
13 | public static class LwguiGradientHelper
14 | {
15 | #region Extended Methods
16 |
17 | public static Keyframe SetLinearTangentMode(this Keyframe key)
18 | {
19 | key.tangentMode = 69;
20 | return key;
21 | }
22 |
23 | public static void SetLinearTangents(this AnimationCurve curve)
24 | {
25 | for (int i = 1; i < curve.keys.Length; i++)
26 | {
27 | var keyStart = curve.keys[i - 1];
28 | var keyEnd = curve.keys[i];
29 | float tangent = (keyEnd.value - keyStart.value) / (keyEnd.time - keyStart.time);
30 | keyStart.outTangent = tangent;
31 | keyEnd.inTangent = tangent;
32 | curve.MoveKey(i - 1, keyStart);
33 | curve.MoveKey(i, keyEnd);
34 | }
35 | }
36 |
37 | public static void DestroyInEditorOrRuntime(this UnityEngine.Object obj)
38 | {
39 | #if UNITY_EDITOR
40 | Object.DestroyImmediate(obj);
41 | #else
42 | Object.Destroy(obj);
43 | #endif
44 | }
45 |
46 | #endregion
47 |
48 | #region Ramp Preview Caches
49 |
50 | private static Dictionary> _gradientToPreviewDic;
52 |
53 | public static bool TryGetRampPreview(LwguiGradient gradient, int width, int height, ColorSpace colorSpace, LwguiGradient.ChannelMask channelMask,
54 | out Texture2D cachedPreview)
55 | {
56 | cachedPreview = _gradientToPreviewDic?.GetValueOrDefault(gradient.GetValueBasedHashCode())?.GetValueOrDefault((width, height, colorSpace, channelMask));
57 | return cachedPreview;
58 | }
59 |
60 | public static void SetRampPreview(LwguiGradient gradient, int width, int height, ColorSpace colorSpace, LwguiGradient.ChannelMask channelMask, Texture2D newPreviewTex)
61 | {
62 | _gradientToPreviewDic ??= new Dictionary>();
63 | var hash = gradient.GetValueBasedHashCode();
64 |
65 | if (!_gradientToPreviewDic.ContainsKey(hash))
66 | {
67 | _gradientToPreviewDic[hash] = new Dictionary<(int, int, ColorSpace, LwguiGradient.ChannelMask), Texture2D>();
68 | }
69 |
70 | if (_gradientToPreviewDic[hash].ContainsKey((width, height, colorSpace, channelMask)))
71 | {
72 | _gradientToPreviewDic[hash][(width, height, colorSpace, channelMask)].DestroyInEditorOrRuntime();
73 | }
74 |
75 | _gradientToPreviewDic[hash][(width, height, colorSpace, channelMask)] = newPreviewTex;
76 | }
77 |
78 | public static void ClearRampPreviewCaches()
79 | {
80 | if (_gradientToPreviewDic == null) return;
81 |
82 | foreach (var paramsToPreviewTexDic in _gradientToPreviewDic.Values)
83 | {
84 | paramsToPreviewTexDic.Values.ToList().ForEach(previewTex => previewTex.DestroyInEditorOrRuntime());
85 | }
86 | _gradientToPreviewDic.Clear();
87 | }
88 |
89 | #endregion
90 | }
91 | }
--------------------------------------------------------------------------------
/Runtime/LwguiGradient/LwguiGradientHelper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dacb09adca6c4f07b8f5fa5acdc7cbfd
3 | timeCreated: 1720172986
--------------------------------------------------------------------------------
/Runtime/RuntimeHelper.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 |
3 | namespace LWGUI.Runtime
4 | {
5 | public static class RuntimeHelper
6 | {
7 | public static bool IsBitEnabled(int intValue, int bitIndex) => (intValue & 1U << bitIndex) > 0;
8 |
9 | public static int SetBitEnabled(int intValue, int bitIndex, bool enabled)
10 | => enabled ? intValue | (int)(1U << bitIndex) : intValue ^ (int)(1U << bitIndex);
11 | }
12 | }
--------------------------------------------------------------------------------
/Runtime/RuntimeHelper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a19e5812ea8041189f11f71becdacc65
3 | timeCreated: 1747294166
--------------------------------------------------------------------------------
/Runtime/Timeline.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 481e97f295ef467ca1418f794f3df2a4
3 | timeCreated: 1741335390
--------------------------------------------------------------------------------
/Runtime/Timeline/LWGUI.Runtime.Timeline.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "LWGUI.Runtime.Timeline",
3 | "rootNamespace": "",
4 | "references": [
5 | "Unity.Timeline"
6 | ],
7 | "includePlatforms": [],
8 | "excludePlatforms": [],
9 | "allowUnsafeCode": false,
10 | "overrideReferences": false,
11 | "precompiledReferences": [],
12 | "autoReferenced": true,
13 | "defineConstraints": [],
14 | "versionDefines": [
15 | {
16 | "name": "com.unity.timeline",
17 | "expression": "1.0.0",
18 | "define": "MATERIAL_KEYWORDS_TRACK_REQUIRES_TIMELINE"
19 | }
20 | ],
21 | "noEngineReferences": false
22 | }
--------------------------------------------------------------------------------
/Runtime/Timeline/LWGUI.Runtime.Timeline.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f10f42f427ca48b45af8e3d035229d3a
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Runtime/Timeline/MaterialKeywordToggle.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8685e0ce73a24fc5ac00a916682ec7f8
3 | timeCreated: 1741858576
--------------------------------------------------------------------------------
/Runtime/Timeline/MaterialKeywordToggle/MaterialKeywordTogglePlayableAsset.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 |
3 | #if MATERIAL_KEYWORDS_TRACK_REQUIRES_TIMELINE
4 |
5 | using System;
6 | using UnityEngine;
7 | using UnityEngine.Playables;
8 | using UnityEngine.Timeline;
9 |
10 | namespace LWGUI.Runtime.Timeline
11 | {
12 | // Represents the serialized data for a clip on the MaterialKeywordToggleTrack
13 | [Serializable]
14 | public class MaterialKeywordTogglePlayableAsset : PlayableAsset, ITimelineClipAsset
15 | {
16 | public MaterialKeywordTogglePlayableBehaviour template = new ();
17 |
18 | // Implementation of ITimelineClipAsset. This specifies the capabilities of this timeline clip inside the editor.
19 | public ClipCaps clipCaps => ClipCaps.None;
20 |
21 | // Creates the playable that represents the instance of this clip.
22 | public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
23 | {
24 | // Using a template will clone the serialized values
25 | return ScriptPlayable.Create(graph, template);
26 | }
27 | }
28 | }
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/Runtime/Timeline/MaterialKeywordToggle/MaterialKeywordTogglePlayableAsset.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5a38fd00a4ee4dbd9c0e7ab158f2013d
3 | timeCreated: 1741593842
--------------------------------------------------------------------------------
/Runtime/Timeline/MaterialKeywordToggle/MaterialKeywordTogglePlayableBehaviour.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 |
3 | #if MATERIAL_KEYWORDS_TRACK_REQUIRES_TIMELINE
4 |
5 | using System;
6 | using UnityEngine.Playables;
7 |
8 | namespace LWGUI.Runtime.Timeline
9 | {
10 | // Runtime representation of a MaterialKeywordToggleClip.
11 | // The Serializable attribute is required to be animated by timeline, and used as a template.
12 | [Serializable]
13 | public class MaterialKeywordTogglePlayableBehaviour : PlayableBehaviour
14 | {
15 | public float value;
16 | }
17 | }
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/Runtime/Timeline/MaterialKeywordToggle/MaterialKeywordTogglePlayableBehaviour.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7ce1592356ba46b28ca0f037104c1b5e
3 | timeCreated: 1741593842
--------------------------------------------------------------------------------
/Runtime/Timeline/MaterialKeywordToggle/MaterialKeywordToggleTrack.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 |
3 | #if MATERIAL_KEYWORDS_TRACK_REQUIRES_TIMELINE
4 |
5 | using UnityEngine;
6 | using UnityEngine.Playables;
7 | using UnityEngine.Timeline;
8 |
9 | namespace LWGUI.Runtime.Timeline
10 | {
11 | ///
12 | /// When recording material parameter animation, Keyword changes are automatically captured and the track is added to the Timeline Asset.
13 | /// The Keyword state is set according to the float value during runtime.
14 | ///
15 | /// Supports Toggle-type Drawer with Keyword.
16 | ///
17 | [TrackColor(127.0f * 0.7f / 255.0f, 214.0f * 0.7f / 255.0f, 252.0f * 0.7f / 255.0f)]
18 | [TrackClipType(typeof(MaterialKeywordTogglePlayableAsset))]
19 | [TrackBindingType(typeof(Renderer))]
20 | public class MaterialKeywordToggleTrack : TrackAsset
21 | {
22 | public string keywordName;
23 | public string propName;
24 | public AnimationTrack srcAnimationTrack = null;
25 | public AnimationClip srcAnimationClip = null;
26 |
27 | // Creates a runtime instance of the track, represented by a PlayableBehaviour.
28 | // The runtime instance performs mixing on the timeline clips.
29 | public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount)
30 | {
31 | #if UNITY_EDITOR
32 | foreach (var clip in GetClips())
33 | {
34 | clip.displayName = keywordName + " (Enabled Material Keyword)";
35 | }
36 | #endif
37 |
38 | var template = new MaterialKeywordToggleTrackBehaviour
39 | {
40 | keywordName = keywordName
41 | };
42 |
43 | return ScriptPlayable.Create(graph, template, inputCount);
44 | }
45 | }
46 | }
47 |
48 | #endif
49 |
--------------------------------------------------------------------------------
/Runtime/Timeline/MaterialKeywordToggle/MaterialKeywordToggleTrack.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 526a1c6b17ba42aa9d8af998102a01d5
3 | timeCreated: 1741593842
--------------------------------------------------------------------------------
/Runtime/Timeline/MaterialKeywordToggle/MaterialKeywordToggleTrackBehaviour.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 |
3 | #if MATERIAL_KEYWORDS_TRACK_REQUIRES_TIMELINE
4 |
5 | using UnityEngine;
6 | using UnityEngine.Playables;
7 |
8 | namespace LWGUI.Runtime.Timeline
9 | {
10 | // The runtime instance of a the MaterialKeywordToggleTrack. It is responsible for blending and setting the final data
11 | public class MaterialKeywordToggleTrackBehaviour : PlayableBehaviour
12 | {
13 | public string keywordName;
14 |
15 | private bool _defaultEnabled;
16 | private Renderer _targetRenderer;
17 |
18 | // Called every frame that the timeline is evaluated. ProcessFrame is invoked after its' inputs.
19 | public override void ProcessFrame(Playable playable, FrameData info, object playerData)
20 | {
21 | SetDefaults(playerData as Renderer);
22 | if (_targetRenderer == null || string.IsNullOrEmpty(keywordName))
23 | return;
24 |
25 | bool enabled = false;
26 | for (int i = 0; i < playable.GetInputCount(); i++)
27 | {
28 | float inputWeight = playable.GetInputWeight(i);
29 | ScriptPlayable inputPlayable = (ScriptPlayable)playable.GetInput(i);
30 | MaterialKeywordTogglePlayableBehaviour input = inputPlayable.GetBehaviour();
31 |
32 | enabled = inputWeight > 0 && input.value > 0;
33 |
34 | if (enabled)
35 | break;
36 | }
37 |
38 | foreach (var mat in Application.isPlaying ? _targetRenderer.materials : _targetRenderer.sharedMaterials)
39 | {
40 | if (enabled)
41 | mat.EnableKeyword(keywordName);
42 | else
43 | mat.DisableKeyword(keywordName);
44 | }
45 | }
46 |
47 | // Invoked when the playable graph is destroyed, typically when PlayableDirector.Stop is called or the timeline
48 | // is complete.
49 | public override void OnPlayableDestroy(Playable playable)
50 | {
51 | RestoreDefaults();
52 | _targetRenderer = null;
53 | }
54 |
55 | private void SetDefaults(Renderer renderer)
56 | {
57 | if (renderer == _targetRenderer)
58 | return;
59 |
60 | _targetRenderer = renderer;
61 | if (_targetRenderer != null && !string.IsNullOrEmpty(keywordName))
62 | {
63 | var mat = Application.isPlaying ? _targetRenderer.material : _targetRenderer.sharedMaterial;
64 | if (mat != null)
65 | {
66 | _defaultEnabled = mat.IsKeywordEnabled(keywordName);
67 | }
68 | }
69 | }
70 |
71 | private void RestoreDefaults()
72 | {
73 | if (_targetRenderer == null || string.IsNullOrEmpty(keywordName))
74 | return;
75 |
76 | foreach (var mat in Application.isPlaying ? _targetRenderer.materials : _targetRenderer.sharedMaterials)
77 | {
78 | if (_defaultEnabled)
79 | mat.EnableKeyword(keywordName);
80 | else
81 | mat.DisableKeyword(keywordName);
82 | }
83 | }
84 | }
85 | }
86 |
87 | #endif
88 |
--------------------------------------------------------------------------------
/Runtime/Timeline/MaterialKeywordToggle/MaterialKeywordToggleTrackBehaviour.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 91e9cf71c8a5458d93d522b59d7badfe
3 | timeCreated: 1741593842
--------------------------------------------------------------------------------
/Test.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 44ef83ac815dc18428b88a22c1fb167f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Test/.ShowEditorStyles.cs:
--------------------------------------------------------------------------------
1 | #if UNITY_EDITOR
2 |
3 | using UnityEngine;
4 | using System.Collections;
5 | using UnityEditor;
6 | using System.Reflection;
7 | using System.Collections.Generic;
8 |
9 | public class ShowEditorStyles : EditorWindow
10 | {
11 | static List styles = null;
12 | [MenuItem("LWGUI/styles")]
13 | public static void Test() {
14 | EditorWindow.GetWindow("styles");
15 |
16 | styles = new List ();
17 | foreach(PropertyInfo fi in typeof(EditorStyles).GetProperties(BindingFlags.Static|BindingFlags.Public|BindingFlags.NonPublic))
18 | {
19 | object o = fi.GetValue (null, null);
20 | if (o.GetType () == typeof(GUIStyle)) {
21 | styles.Add (o as GUIStyle);
22 | }
23 | }
24 | }
25 |
26 | public Vector2 scrollPosition = Vector2.zero;
27 | void OnGUI()
28 | {
29 | scrollPosition = GUILayout.BeginScrollView (scrollPosition);
30 | for (int i = 0; i < styles.Count; i++) {
31 | GUILayout.Label ("EditorStyles." +styles[i].name , styles[i]);
32 | }
33 | GUILayout.EndScrollView ();
34 | }
35 | }
36 | #endif
--------------------------------------------------------------------------------
/Test/LWGUI_KeywordTest 1.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 8
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: LWGUI_KeywordTest 1
11 | m_Shader: {fileID: 4800000, guid: 98ad70357ecd6134dbac80aef9c63f6f, type: 3}
12 | m_Parent: {fileID: 0}
13 | m_ModifiedSerializedProperties: 0
14 | m_ValidKeywords:
15 | - _GROUP_TOGGLE_KEYWORD
16 | - _KEYWORDENUM_KEY1
17 | - _KWENUM_KEY1
18 | - _SUBKEYWORDENUM_KEY1
19 | m_InvalidKeywords: []
20 | m_LightmapFlags: 4
21 | m_EnableInstancingVariants: 0
22 | m_DoubleSidedGI: 0
23 | m_CustomRenderQueue: 2450
24 | stringTagMap: {}
25 | disabledShaderPasses: []
26 | m_LockedProperties:
27 | m_SavedProperties:
28 | serializedVersion: 3
29 | m_TexEnvs: []
30 | m_Ints: []
31 | m_Floats:
32 | - _ZWrite: 1
33 | - _enum: 1
34 | - _group: 1
35 | - _group_toggle1: 1
36 | - _keywordEnum: 0
37 | - _kwenum: 0
38 | - _preset2: 1
39 | - _subEnum: 1
40 | - _subKeywordEnum: 0
41 | - _toggle: 0
42 | - _toggle1: 0
43 | m_Colors: []
44 | m_BuildTextureStacks: []
45 |
--------------------------------------------------------------------------------
/Test/LWGUI_KeywordTest 1.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bb8663d0faf43214abeee1d0c3fdd118
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Test/LWGUI_KeywordTest Variant.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 8
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: LWGUI_KeywordTest Variant
11 | m_Shader: {fileID: 4800000, guid: 98ad70357ecd6134dbac80aef9c63f6f, type: 3}
12 | m_Parent: {fileID: 0}
13 | m_ModifiedSerializedProperties: 0
14 | m_ValidKeywords:
15 | - _GROUP_TOGGLE_KEYWORD
16 | - _KEYWORDENUM_KEY1
17 | - _KWENUM_KEY1
18 | - _SUBKEYWORDENUM_KEY1
19 | m_InvalidKeywords: []
20 | m_LightmapFlags: 4
21 | m_EnableInstancingVariants: 0
22 | m_DoubleSidedGI: 0
23 | m_CustomRenderQueue: -1
24 | stringTagMap: {}
25 | disabledShaderPasses: []
26 | m_LockedProperties:
27 | m_SavedProperties:
28 | serializedVersion: 3
29 | m_TexEnvs: []
30 | m_Ints: []
31 | m_Floats:
32 | - _ZWrite: 1
33 | - _enum: 1
34 | - _group: 1
35 | - _group_toggle1: 1
36 | - _keywordEnum: 0
37 | - _kwenum: 0
38 | - _preset2: 1
39 | - _subEnum: 0.5
40 | - _subKeywordEnum: 0
41 | - _toggle: 0
42 | - _toggle1: 0
43 | m_Colors: []
44 | m_BuildTextureStacks: []
45 |
--------------------------------------------------------------------------------
/Test/LWGUI_KeywordTest Variant.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d93bf4384661b7f4694836c1ff95817b
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Test/LWGUI_KeywordTest.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 8
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: LWGUI_KeywordTest
11 | m_Shader: {fileID: 4800000, guid: 98ad70357ecd6134dbac80aef9c63f6f, type: 3}
12 | m_Parent: {fileID: 0}
13 | m_ModifiedSerializedProperties: 0
14 | m_ValidKeywords:
15 | - _KEYWORDENUM_KEY2
16 | - _KWENUM_KEY2
17 | - _SUBKEYWORDENUM_KEY1
18 | m_InvalidKeywords: []
19 | m_LightmapFlags: 4
20 | m_EnableInstancingVariants: 0
21 | m_DoubleSidedGI: 0
22 | m_CustomRenderQueue: -1
23 | stringTagMap: {}
24 | disabledShaderPasses: []
25 | m_LockedProperties:
26 | m_SavedProperties:
27 | serializedVersion: 3
28 | m_TexEnvs: []
29 | m_Ints: []
30 | m_Floats:
31 | - _ZWrite: 1
32 | - _enum: 1
33 | - _group: 1
34 | - _group_toggle1: 0
35 | - _keywordEnum: 1
36 | - _kwenum: 1
37 | - _preset2: 0
38 | - _subEnum: 1
39 | - _subKeywordEnum: 0
40 | - _toggle: 0
41 | - _toggle1: 0
42 | m_Colors: []
43 | m_BuildTextureStacks: []
44 |
--------------------------------------------------------------------------------
/Test/LWGUI_KeywordTest.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 64f63a798b03f4a448ef2a853da686c9
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Test/LWGUI_Preset_BlendMode.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: 28fbcbca3fb14507af6ed5c104c40b84, type: 3}
13 | m_Name: LWGUI_Preset_BlendMode
14 | m_EditorClassIdentifier:
15 | presets:
16 | - presetName: Opaque
17 | propertyValues:
18 | - propertyName: _SrcBlend
19 | propertyType: 2
20 | floatValue: 1
21 | colorValue: {r: 0, g: 0, b: 0, a: 0}
22 | vectorValue: {x: 0, y: 0, z: 0, w: 0}
23 | textureValue: {fileID: 0}
24 | - propertyName: _DstBlend
25 | propertyType: 2
26 | floatValue: 0
27 | colorValue: {r: 0, g: 0, b: 0, a: 0}
28 | vectorValue: {x: 0, y: 0, z: 0, w: 0}
29 | textureValue: {fileID: 0}
30 | - propertyName: _ZWrite
31 | propertyType: 2
32 | floatValue: 1
33 | colorValue: {r: 0, g: 0, b: 0, a: 0}
34 | vectorValue: {x: 0, y: 0, z: 0, w: 0}
35 | textureValue: {fileID: 0}
36 | enabledKeywords: []
37 | disabledKeywords: []
38 | renderQueue: 2000
39 | - presetName: Translucency
40 | propertyValues:
41 | - propertyName: _SrcBlend
42 | propertyType: 2
43 | floatValue: 5
44 | colorValue: {r: 0, g: 0, b: 0, a: 0}
45 | vectorValue: {x: 0, y: 0, z: 0, w: 0}
46 | textureValue: {fileID: 0}
47 | - propertyName: _DstBlend
48 | propertyType: 2
49 | floatValue: 10
50 | colorValue: {r: 0, g: 0, b: 0, a: 0}
51 | vectorValue: {x: 0, y: 0, z: 0, w: 0}
52 | textureValue: {fileID: 0}
53 | - propertyName: _ZWrite
54 | propertyType: 2
55 | floatValue: 0
56 | colorValue: {r: 0, g: 0, b: 0, a: 0}
57 | vectorValue: {x: 0, y: 0, z: 0, w: 0}
58 | textureValue: {fileID: 0}
59 | enabledKeywords: []
60 | disabledKeywords: []
61 | renderQueue: 3000
62 |
--------------------------------------------------------------------------------
/Test/LWGUI_Preset_BlendMode.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 53fe229f137bdee4db612b5564aea37c
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Test/LWGUI_Preset_Toggle.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: 28fbcbca3fb14507af6ed5c104c40b84, type: 3}
13 | m_Name: LWGUI_Preset_Toggle
14 | m_EditorClassIdentifier:
15 | presets:
16 | - presetName: Disable
17 | propertyValues: []
18 | enabledKeywords: []
19 | disabledKeywords: []
20 | enabledPasses: []
21 | disabledPasses: []
22 | renderQueue: 2000
23 | - presetName: Enable
24 | propertyValues: []
25 | enabledKeywords: []
26 | disabledKeywords: []
27 | enabledPasses: []
28 | disabledPasses: []
29 | renderQueue: 2001
30 |
--------------------------------------------------------------------------------
/Test/LWGUI_Preset_Toggle.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c3b3b9433213824419f41452830ee4ea
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Test/LWGUI_RampAtlas.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: 2b294e53fae84d85a53542a47c4a1481, type: 3}
13 | m_Name: LWGUI_RampAtlas
14 | m_EditorClassIdentifier:
15 | rampAtlasWidth: 256
16 | rampAtlasHeight: 4
17 | rampAtlasSRGB: 1
18 | _ramps: []
19 | _saveTextureToggle: 0
20 |
--------------------------------------------------------------------------------
/Test/LWGUI_RampAtlas.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cad9250226f9d224ea9ef2054ffa834c
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Test/LWGUI_RampAtlas.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/Test/LWGUI_RampAtlas.tga
--------------------------------------------------------------------------------
/Test/LWGUI_SampleAmplifyShader.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 8
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: LWGUI_SampleAmplifyShader
11 | m_Shader: {fileID: 4800000, guid: 5ce5f51521204d14bbb88913f98c148a, type: 3}
12 | m_Parent: {fileID: 0}
13 | m_ModifiedSerializedProperties: 0
14 | m_ValidKeywords: []
15 | m_InvalidKeywords: []
16 | m_LightmapFlags: 4
17 | m_EnableInstancingVariants: 0
18 | m_DoubleSidedGI: 0
19 | m_CustomRenderQueue: -1
20 | stringTagMap: {}
21 | disabledShaderPasses: []
22 | m_LockedProperties:
23 | m_SavedProperties:
24 | serializedVersion: 3
25 | m_TexEnvs: []
26 | m_Ints: []
27 | m_Floats:
28 | - __dirty: 0
29 | m_Colors:
30 | - _Color: {r: 0, g: 0, b: 0, a: 0}
31 | m_BuildTextureStacks: []
32 |
--------------------------------------------------------------------------------
/Test/LWGUI_SampleAmplifyShader.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b01eda5726d25a441b9c80f353a54949
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Test/LWGUI_SampleDrawerA.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 8
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: LWGUI_SampleDrawerA
11 | m_Shader: {fileID: 4800000, guid: ded91f399f8343d4f9b0cf33eda0088d, type: 3}
12 | m_Parent: {fileID: 0}
13 | m_ModifiedSerializedProperties: 0
14 | m_ValidKeywords: []
15 | m_InvalidKeywords:
16 | - KEY2
17 | - _KEYWORD
18 | - _ZWRITE_ON
19 | m_LightmapFlags: 4
20 | m_EnableInstancingVariants: 0
21 | m_DoubleSidedGI: 0
22 | m_CustomRenderQueue: 3000
23 | stringTagMap: {}
24 | disabledShaderPasses: []
25 | m_LockedProperties:
26 | m_SavedProperties:
27 | serializedVersion: 3
28 | m_TexEnvs:
29 | - _MainTex:
30 | m_Texture: {fileID: 0}
31 | m_Scale: {x: 1, y: 1}
32 | m_Offset: {x: 0, y: 0}
33 | - _Ramp:
34 | m_Texture: {fileID: 0}
35 | m_Scale: {x: 1, y: 1}
36 | m_Offset: {x: 0, y: 0}
37 | - _Ramp2:
38 | m_Texture: {fileID: 2800000, guid: fad186cbfd0faf2488e2edb774c6d08f, type: 3}
39 | m_Scale: {x: 1, y: 1}
40 | m_Offset: {x: 0, y: 0}
41 | - _RampAtlas:
42 | m_Texture: {fileID: 2800000, guid: a515311e7e4a4694191895bf48c01468, type: 3}
43 | m_Scale: {x: 1, y: 1}
44 | m_Offset: {x: 0, y: 0}
45 | - _normal:
46 | m_Texture: {fileID: 0}
47 | m_Scale: {x: 1, y: 1}
48 | m_Offset: {x: 0, y: 0}
49 | - _tex:
50 | m_Texture: {fileID: 0}
51 | m_Scale: {x: 1, y: 1}
52 | m_Offset: {x: 0, y: 0}
53 | m_Ints:
54 | - _Stencil: 172
55 | - _StencilWithDescription: 0
56 | m_Floats:
57 | - _BlendMode: 1
58 | - _ColorMask: 15
59 | - _Cull: 2
60 | - _DstBlend: 10
61 | - _PresetGroup: 0
62 | - _Queue: 2000
63 | - _RampAtlasIndex0: 0
64 | - _RampAtlasIndex1: 2
65 | - _RampAtlasIndex2: 3
66 | - _RampAtlasIndexer: 0
67 | - _SrcBlend: 5
68 | - _ZTest: 4
69 | - _ZWrite: 0
70 | - _blendMode: 1
71 | - _enum: 1
72 | - _enum1: 0
73 | - _enum2: 0
74 | - _enum3: 0
75 | - _enum3_range: 0
76 | - _enumFloat1: 0
77 | - _enumFloat2: 0
78 | - _enumFloat3: 0
79 | - _enumFloat4_range: 0
80 | - _float: 1
81 | - _float2: 1.17
82 | - _float3: 2
83 | - _float30: 2
84 | - _float31: 2
85 | - _float32: 2
86 | - _float33: 2
87 | - _float34: 2
88 | - _float35: 2
89 | - _float36: 2
90 | - _float4: 2
91 | - _float_keyword: 0
92 | - _float_tooltip_helpbox: 0
93 | - _group: 0
94 | - _group2: 1
95 | - _group3: 1
96 | - _group4: 1
97 | - _group5: 1
98 | - _group6: 1
99 | - _group7: 1
100 | - _group8: 1
101 | - _powerSlider: 39.1
102 | - _toggle: 0
103 | - _toggle_keyword: 0
104 | m_Colors:
105 | - _Color: {r: 1, g: 1, b: 1, a: 0.5529412}
106 | - _Color00: {r: 1, g: 1, b: 1, a: 1}
107 | - _Color001: {r: 1, g: 1, b: 1, a: 1}
108 | - _Color0012: {r: 1, g: 1, b: 1, a: 1}
109 | - _Color11: {r: 1, g: 1, b: 1, a: 1}
110 | - _Color1122: {r: 1, g: 1, b: 1, a: 1}
111 | - _Color11222: {r: 1, g: 1, b: 1, a: 1}
112 | - _Color112223: {r: 1, g: 1, b: 1, a: 1}
113 | - _hdr: {r: 1, g: 1, b: 1, a: 1}
114 | - _mColor: {r: 1, g: 1, b: 1, a: 1}
115 | - _mColor1: {r: 1, g: 0, b: 0, a: 1}
116 | - _mColor2: {r: 0.68301886, g: 1, b: 0.68301886, a: 1}
117 | - _mColor3: {r: 0, g: 0, b: 1, a: 1}
118 | m_BuildTextureStacks: []
119 |
--------------------------------------------------------------------------------
/Test/LWGUI_SampleDrawerA.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d469645b1c4c8a844852c3efc3ccf64c
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Test/LWGUI_SampleDrawerA1.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 8
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: LWGUI_SampleDrawerA1
11 | m_Shader: {fileID: 4800000, guid: ded91f399f8343d4f9b0cf33eda0088d, type: 3}
12 | m_Parent: {fileID: 0}
13 | m_ModifiedSerializedProperties: 0
14 | m_ValidKeywords: []
15 | m_InvalidKeywords:
16 | - KEY2
17 | - _KEYWORD
18 | - _ZWRITE_ON
19 | m_LightmapFlags: 4
20 | m_EnableInstancingVariants: 0
21 | m_DoubleSidedGI: 0
22 | m_CustomRenderQueue: 3000
23 | stringTagMap: {}
24 | disabledShaderPasses: []
25 | m_LockedProperties:
26 | m_SavedProperties:
27 | serializedVersion: 3
28 | m_TexEnvs:
29 | - _MainTex:
30 | m_Texture: {fileID: 0}
31 | m_Scale: {x: 1, y: 1}
32 | m_Offset: {x: 0, y: 0}
33 | - _Ramp:
34 | m_Texture: {fileID: 0}
35 | m_Scale: {x: 1, y: 1}
36 | m_Offset: {x: 0, y: 0}
37 | - _Ramp2:
38 | m_Texture: {fileID: 2800000, guid: 7e050a45dc871a549a2530bd4acf96ba, type: 3}
39 | m_Scale: {x: 1, y: 1}
40 | m_Offset: {x: 0, y: 0}
41 | - _RampAtlas:
42 | m_Texture: {fileID: 2800000, guid: 5d501ab9fed726e4baa7d838819327e9, type: 3}
43 | m_Scale: {x: 1, y: 1}
44 | m_Offset: {x: 0, y: 0}
45 | - _normal:
46 | m_Texture: {fileID: 0}
47 | m_Scale: {x: 1, y: 1}
48 | m_Offset: {x: 0, y: 0}
49 | - _tex:
50 | m_Texture: {fileID: 0}
51 | m_Scale: {x: 1, y: 1}
52 | m_Offset: {x: 0, y: 0}
53 | m_Ints:
54 | - _Stencil: 0
55 | - _StencilWithDescription: 0
56 | m_Floats:
57 | - _BlendMode: 1
58 | - _ColorMask: 15
59 | - _Cull: 2
60 | - _DstBlend: 10
61 | - _PresetGroup: 0
62 | - _Queue: 2000
63 | - _RampAtlasIndex0: 0
64 | - _RampAtlasIndex1: 2
65 | - _RampAtlasIndexer: 0
66 | - _SrcBlend: 5
67 | - _ZTest: 4
68 | - _ZWrite: 0
69 | - _blendMode: 1
70 | - _enum: 1
71 | - _enum1: 0
72 | - _enum2: 0
73 | - _enum3: 0
74 | - _enum3_range: 0
75 | - _enumFloat1: 0
76 | - _enumFloat2: 0
77 | - _enumFloat3: 0
78 | - _enumFloat4_range: 0
79 | - _float: 1
80 | - _float2: 1.17
81 | - _float3: 2
82 | - _float30: 2
83 | - _float31: 2
84 | - _float32: 2
85 | - _float33: 2
86 | - _float34: 2
87 | - _float35: 2
88 | - _float36: 2
89 | - _float4: 2
90 | - _float_keyword: 0
91 | - _float_tooltip_helpbox: 0
92 | - _group: 0
93 | - _group2: 1
94 | - _group3: 1
95 | - _group4: 1
96 | - _group5: 1
97 | - _group6: 1
98 | - _group7: 1
99 | - _group8: 1
100 | - _powerSlider: 39.1
101 | - _toggle: 0
102 | - _toggle_keyword: 0
103 | m_Colors:
104 | - _Color: {r: 1, g: 1, b: 1, a: 0.5529412}
105 | - _Color00: {r: 1, g: 1, b: 1, a: 1}
106 | - _Color001: {r: 1, g: 1, b: 1, a: 1}
107 | - _Color0012: {r: 1, g: 1, b: 1, a: 1}
108 | - _Color11: {r: 1, g: 1, b: 1, a: 1}
109 | - _Color1122: {r: 1, g: 1, b: 1, a: 1}
110 | - _Color11222: {r: 1, g: 1, b: 1, a: 1}
111 | - _Color112223: {r: 1, g: 1, b: 1, a: 1}
112 | - _hdr: {r: 1, g: 1, b: 1, a: 1}
113 | - _mColor: {r: 1, g: 1, b: 1, a: 1}
114 | - _mColor1: {r: 1, g: 0, b: 0, a: 1}
115 | - _mColor2: {r: 0.68301886, g: 1, b: 0.68301886, a: 1}
116 | - _mColor3: {r: 0, g: 0, b: 1, a: 1}
117 | m_BuildTextureStacks: []
118 |
--------------------------------------------------------------------------------
/Test/LWGUI_SampleDrawerA1.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5c1027b710f71c44582d6fd0db0b9ca0
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Test/LWGUI_SampleDrawerB.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 8
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: LWGUI_SampleDrawerB
11 | m_Shader: {fileID: 4800000, guid: 7ee048c9536c0344bb8b4860595a4d9b, type: 3}
12 | m_Parent: {fileID: 0}
13 | m_ModifiedSerializedProperties: 0
14 | m_ValidKeywords: []
15 | m_InvalidKeywords:
16 | - _GROUP_ON
17 | - _KEY2
18 | - _KEY3
19 | m_LightmapFlags: 4
20 | m_EnableInstancingVariants: 0
21 | m_DoubleSidedGI: 0
22 | m_CustomRenderQueue: 3000
23 | stringTagMap: {}
24 | disabledShaderPasses: []
25 | m_LockedProperties:
26 | m_SavedProperties:
27 | serializedVersion: 3
28 | m_TexEnvs:
29 | - _AdvancedImage:
30 | m_Texture: {fileID: 0}
31 | m_Scale: {x: 1, y: 1}
32 | m_Offset: {x: 0, y: 0}
33 | - _AdvancedTex0:
34 | m_Texture: {fileID: 0}
35 | m_Scale: {x: 1, y: 1}
36 | m_Offset: {x: 0, y: 0}
37 | - _AdvancedTex1:
38 | m_Texture: {fileID: 0}
39 | m_Scale: {x: 1, y: 1}
40 | m_Offset: {x: 0, y: 0}
41 | - _LinearRamp:
42 | m_Texture: {fileID: 2800000, guid: 6293a417776889843b0c6d20f25677be, type: 3}
43 | m_Scale: {x: 1, y: 1}
44 | m_Offset: {x: 0, y: 0}
45 | - _Ramp:
46 | m_Texture: {fileID: 2800000, guid: 87addb69bcbcc9b4ea7336eff8d6a52b, type: 3}
47 | m_Scale: {x: 1, y: 1}
48 | m_Offset: {x: 0, y: 0}
49 | - _Tex:
50 | m_Texture: {fileID: 2800000, guid: 5366ba78a5c67fb498c8b4db71177ac2, type: 3}
51 | m_Scale: {x: 1, y: 1}
52 | m_Offset: {x: 0, y: 0}
53 | - _normal:
54 | m_Texture: {fileID: 0}
55 | m_Scale: {x: 1, y: 1}
56 | m_Offset: {x: 0, y: 0}
57 | - _sRGBRamp:
58 | m_Texture: {fileID: 2800000, guid: fad186cbfd0faf2488e2edb774c6d08f, type: 3}
59 | m_Scale: {x: 1, y: 1}
60 | m_Offset: {x: 0, y: 0}
61 | - _tex:
62 | m_Texture: {fileID: 0}
63 | m_Scale: {x: 1, y: 1}
64 | m_Offset: {x: 0, y: 0}
65 | - _tex_channel:
66 | m_Texture: {fileID: 0}
67 | m_Scale: {x: 1, y: 1}
68 | m_Offset: {x: 0, y: 0}
69 | - _tex_color:
70 | m_Texture: {fileID: 0}
71 | m_Scale: {x: 1, y: 1}
72 | m_Offset: {x: 0, y: 0}
73 | - _tex_float:
74 | m_Texture: {fileID: 0}
75 | m_Scale: {x: 1, y: 1}
76 | m_Offset: {x: 0, y: 0}
77 | - _tex_range:
78 | m_Texture: {fileID: 0}
79 | m_Scale: {x: 1, y: 1}
80 | m_Offset: {x: 0, y: 0}
81 | - _tex_single_line:
82 | m_Texture: {fileID: 0}
83 | m_Scale: {x: 1, y: 1}
84 | m_Offset: {x: 0, y: 0}
85 | - _tex_toggle:
86 | m_Texture: {fileID: 0}
87 | m_Scale: {x: 1, y: 1}
88 | m_Offset: {x: 0, y: 0}
89 | m_Ints: []
90 | m_Floats:
91 | - _AdvancedFloat: 0
92 | - _AdvancedImage: 0
93 | - _AdvancedRange0: 0.252
94 | - _Advancedfloat0: 0.12
95 | - _Advancedfloat1: 0.13
96 | - _Advancedfloat3: 0.21
97 | - _Advancedfloat4: 0
98 | - _Advancedfloat7: 0.24
99 | - _button0: 0
100 | - _enum: 1
101 | - _float: -0.46
102 | - _float1: -0.05
103 | - _float2: -0.08
104 | - _float3: 0
105 | - _float4: 2
106 | - _floatN: 0
107 | - _float_helpbox: 1
108 | - _float_tooltip: 1
109 | - _group: 1
110 | - _group1: 0
111 | - _group2: 0
112 | - _group3: 0
113 | - _key13_PowerSlider: 0.199
114 | - _key1_Float1: 0
115 | - _key2_Float2: 0
116 | - _key3_Float3: -0.34
117 | - _key3_Float3_Range: 0.329
118 | - _key3_Float4_PowerSlider: 0
119 | - _key3_Int_Range: 1
120 | - _minMaxSlider: 1
121 | - _preset: 0
122 | - _preset1: 0
123 | - _preset_toggle: 0
124 | - _range: 0.42
125 | - _rangeEnd: 0.70471865
126 | - _rangeStart: 0.20471871
127 | - _textureFloat1: 1
128 | - _toggle: 0
129 | - _toggle1: 1
130 | m_Colors:
131 | - _AdvancedColor0: {r: 1, g: 1, b: 1, a: 1}
132 | - _AdvancedColor7: {r: 1, g: 1, b: 1, a: 1}
133 | - _color: {r: 1, g: 0.5886792, b: 0.5886792, a: 1}
134 | - _color1: {r: 0, g: 1, b: 0.296113, a: 0}
135 | - _mColor: {r: 0.6132076, g: 0.4014774, b: 0.4014774, a: 1}
136 | - _mColor1: {r: 1, g: 0, b: 0, a: 1}
137 | - _mColor2: {r: 0, g: 1, b: 0, a: 1}
138 | - _mColor3: {r: 0, g: 0, b: 1, a: 1}
139 | - _textureChannelMask: {r: 0, g: 1, b: 0, a: 0}
140 | - _textureChannelMask1: {r: 0, g: 0, b: 0, a: 1}
141 | - _vector1: {r: 1.32, g: 1, b: 1, a: 1}
142 | m_BuildTextureStacks: []
143 |
--------------------------------------------------------------------------------
/Test/LWGUI_SampleDrawerB.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3ac8efd3d4e6a214394f6e0e57d425a1
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Test/LWGUI_SampleDrawerB1.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 8
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: LWGUI_SampleDrawerB1
11 | m_Shader: {fileID: 4800000, guid: 7ee048c9536c0344bb8b4860595a4d9b, type: 3}
12 | m_ValidKeywords: []
13 | m_InvalidKeywords:
14 | - _KEY1
15 | - _KEY2
16 | - _KEY3
17 | - _KEYWORD
18 | m_LightmapFlags: 4
19 | m_EnableInstancingVariants: 0
20 | m_DoubleSidedGI: 0
21 | m_CustomRenderQueue: -1
22 | stringTagMap: {}
23 | disabledShaderPasses: []
24 | m_SavedProperties:
25 | serializedVersion: 3
26 | m_TexEnvs:
27 | - _AdvancedImage:
28 | m_Texture: {fileID: 2800000, guid: 63de4a0dcb29d454c89e31d4e6d0d8db, type: 3}
29 | m_Scale: {x: 1, y: 1}
30 | m_Offset: {x: 0, y: 0}
31 | - _AdvancedTex0:
32 | m_Texture: {fileID: 0}
33 | m_Scale: {x: 1, y: 1}
34 | m_Offset: {x: 0, y: 0}
35 | - _AdvancedTex1:
36 | m_Texture: {fileID: 0}
37 | m_Scale: {x: 1, y: 1}
38 | m_Offset: {x: 0, y: 0}
39 | - _LinearRamp:
40 | m_Texture: {fileID: 2800000, guid: 6293a417776889843b0c6d20f25677be, type: 3}
41 | m_Scale: {x: 1, y: 1}
42 | m_Offset: {x: 0, y: 0}
43 | - _Ramp:
44 | m_Texture: {fileID: 2800000, guid: fad186cbfd0faf2488e2edb774c6d08f, type: 3}
45 | m_Scale: {x: 1, y: 1}
46 | m_Offset: {x: 0, y: 0}
47 | - _Tex:
48 | m_Texture: {fileID: 0}
49 | m_Scale: {x: 1, y: 1}
50 | m_Offset: {x: 0, y: 0}
51 | - _normal:
52 | m_Texture: {fileID: 0}
53 | m_Scale: {x: 1, y: 1}
54 | m_Offset: {x: 0, y: 0}
55 | - _sRGBRamp:
56 | m_Texture: {fileID: 2800000, guid: fad186cbfd0faf2488e2edb774c6d08f, type: 3}
57 | m_Scale: {x: 1, y: 1}
58 | m_Offset: {x: 0, y: 0}
59 | - _tex:
60 | m_Texture: {fileID: 0}
61 | m_Scale: {x: 1, y: 1}
62 | m_Offset: {x: 0, y: 0}
63 | - _tex_channel:
64 | m_Texture: {fileID: 0}
65 | m_Scale: {x: 1, y: 1}
66 | m_Offset: {x: 0, y: 0}
67 | - _tex_color:
68 | m_Texture: {fileID: 0}
69 | m_Scale: {x: 1, y: 1}
70 | m_Offset: {x: 0, y: 0}
71 | - _tex_float:
72 | m_Texture: {fileID: 0}
73 | m_Scale: {x: 1, y: 1}
74 | m_Offset: {x: 0, y: 0}
75 | - _tex_range:
76 | m_Texture: {fileID: 0}
77 | m_Scale: {x: 1, y: 1}
78 | m_Offset: {x: 0, y: 0}
79 | - _tex_single_line:
80 | m_Texture: {fileID: 0}
81 | m_Scale: {x: 1, y: 1}
82 | m_Offset: {x: 0, y: 0}
83 | - _tex_toggle:
84 | m_Texture: {fileID: 0}
85 | m_Scale: {x: 1, y: 1}
86 | m_Offset: {x: 0, y: 0}
87 | m_Ints: []
88 | m_Floats:
89 | - _AdvancedFloat: 0
90 | - _AdvancedRange0: 0.62
91 | - _Advancedfloat0: 0.54
92 | - _Advancedfloat1: 0.45
93 | - _Advancedfloat3: 1.56
94 | - _Advancedfloat4: 0
95 | - _Advancedfloat7: 3.21
96 | - _enum: 1
97 | - _float: 0.53
98 | - _float1: 1
99 | - _float2: -0.57
100 | - _float3: 0
101 | - _float4: 0
102 | - _floatN: 0
103 | - _float_helpbox: 1
104 | - _float_tooltip: 1.91
105 | - _group: 0
106 | - _group1: 1
107 | - _group2: 0
108 | - _group3: 0
109 | - _key13_PowerSlider: 0
110 | - _key1_Float1: 0
111 | - _key2_Float2: 0
112 | - _key3_Float3: 0
113 | - _key3_Float3_Range: 0.137
114 | - _key3_Float4_PowerSlider: 0.0033800516
115 | - _key3_Int_Range: 0
116 | - _minMaxSlider: 1
117 | - _preset: 1
118 | - _preset1: 0
119 | - _range: 0
120 | - _rangeEnd: 0.87684953
121 | - _rangeStart: 0.1898573
122 | - _rangeStart1: 0
123 | - _rangeStart2: 0
124 | - _textureFloat1: 1
125 | - _toggle: 0
126 | - _toggle1: 0
127 | m_Colors:
128 | - _AdvancedColor0: {r: 1, g: 1, b: 1, a: 1}
129 | - _AdvancedColor7: {r: 1, g: 1, b: 1, a: 1}
130 | - _color: {r: 1, g: 0, b: 0, a: 1}
131 | - _color1: {r: 0.7, g: 0.7, b: 1, a: 1}
132 | - _mColor: {r: 1, g: 1, b: 1, a: 1}
133 | - _mColor1: {r: 1, g: 0, b: 0, a: 1}
134 | - _mColor2: {r: 0, g: 1, b: 0, a: 1}
135 | - _mColor3: {r: 0, g: 0, b: 1, a: 1}
136 | - _textureChannelMask: {r: 0, g: 1, b: 0, a: 0}
137 | - _textureChannelMask1: {r: 0, g: 0, b: 0, a: 1}
138 | - _vector1: {r: 0.34, g: 1, b: 1, a: 1}
139 | m_BuildTextureStacks: []
140 |
--------------------------------------------------------------------------------
/Test/LWGUI_SampleDrawerB1.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b54c56e49931b4243b33bff36fb63675
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Test/LWGUI_ShaderPropertyPreset.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_PrefabParentObject: {fileID: 0}
7 | m_PrefabInternal: {fileID: 0}
8 | m_GameObject: {fileID: 0}
9 | m_Enabled: 1
10 | m_EditorHideFlags: 0
11 | m_Script: {fileID: 11500000, guid: 28fbcbca3fb14507af6ed5c104c40b84, type: 3}
12 | m_Name: LWGUI_ShaderPropertyPreset
13 | m_EditorClassIdentifier:
14 | presets:
15 | - presetName: Preset 12345
16 | propertyValues:
17 | - propertyName: _float1
18 | propertyType: 2
19 | floatValue: -0.05
20 | colorValue: {r: 0, g: 0, b: 0, a: 0}
21 | vectorValue: {x: 0, y: 0, z: 0, w: 0}
22 | textureValue: {fileID: 0}
23 | enabledKeywords: []
24 | disabledKeywords: []
25 | renderQueue: -1
26 | - presetName: Preset ABCDE
27 | propertyValues:
28 | - propertyName: _float1
29 | propertyType: 2
30 | floatValue: 1
31 | colorValue: {r: 0, g: 0, b: 0, a: 0}
32 | vectorValue: {x: 0, y: 0, z: 0, w: 0}
33 | textureValue: {fileID: 0}
34 | enabledKeywords: []
35 | disabledKeywords: []
36 | renderQueue: -1
37 |
--------------------------------------------------------------------------------
/Test/LWGUI_ShaderPropertyPreset.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6fd04ece71bf858498c2e9f677da6539
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Test/LWGUI_ShaderPropertyPreset1.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: 28fbcbca3fb14507af6ed5c104c40b84, type: 3}
13 | m_Name: LWGUI_ShaderPropertyPreset1
14 | m_EditorClassIdentifier:
15 | presets:
16 | - presetName: Preset X
17 | propertyValues: []
18 | - presetName: Preset Y
19 | propertyValues:
20 | - propertyName: _vector1
21 | propertyType: 1
22 | floatValue: 0
23 | colorValue: {r: 0, g: 0, b: 0, a: 0}
24 | vectorValue: {x: 1.32, y: 1, z: 1, w: 1}
25 | textureValue: {fileID: 0}
26 |
--------------------------------------------------------------------------------
/Test/LWGUI_ShaderPropertyPreset1.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 949691f59c5c0b847852c838fb77a3b9
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Test/LWGUI_ShaderPropertyPreset2.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: 28fbcbca3fb14507af6ed5c104c40b84, type: 3}
13 | m_Name: LWGUI_ShaderPropertyPreset2
14 | m_EditorClassIdentifier:
15 | presets:
16 | - presetName: Preset 1
17 | propertyValues:
18 | - propertyName: _group_toggle1
19 | propertyType: 2
20 | floatValue: 0
21 | colorValue: {r: 0, g: 0, b: 0, a: 0}
22 | vectorValue: {x: 0, y: 0, z: 0, w: 0}
23 | textureValue: {fileID: 0}
24 | - propertyName: _group
25 | propertyType: 2
26 | floatValue: 1
27 | colorValue: {r: 0, g: 0, b: 0, a: 0}
28 | vectorValue: {x: 0, y: 0, z: 0, w: 0}
29 | textureValue: {fileID: 0}
30 | - presetName: Preset 2
31 | propertyValues:
32 | - propertyName: _group_toggle1
33 | propertyType: 2
34 | floatValue: 1
35 | colorValue: {r: 0, g: 0, b: 0, a: 0}
36 | vectorValue: {x: 0, y: 0, z: 0, w: 0}
37 | textureValue: {fileID: 0}
38 |
--------------------------------------------------------------------------------
/Test/LWGUI_ShaderPropertyPreset2.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e542cd9d244240b8a50cc9e63e4e06b3
3 | timeCreated: 1697965108
--------------------------------------------------------------------------------
/Test/RampMap_Linear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/Test/RampMap_Linear.png
--------------------------------------------------------------------------------
/Test/RampMap_Linear.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6293a417776889843b0c6d20f25677be
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 12
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 0
10 | sRGBTexture: 0
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: 1
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: 1
43 | nPOTScale: 1
44 | lightmap: 0
45 | compressionQuality: 50
46 | spriteMode: 0
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: 0
56 | spriteTessellationDetail: -1
57 | textureType: 0
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: 2048
73 | resizeAlgorithm: 0
74 | textureFormat: 4
75 | textureCompression: 0
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:
116 | internalID: 0
117 | vertices: []
118 | indices:
119 | edges: []
120 | weights: []
121 | secondaryTextures: []
122 | nameFileIdTable: {}
123 | mipmapLimitGroupName:
124 | pSDRemoveMatte: 0
125 | userData: '{"_curves":[{"serializedVersion":"2","m_Curve":[{"serializedVersion":"3","time":0.0,"value":0.0,"inSlope":0.0,"outSlope":1.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0},{"serializedVersion":"3","time":1.0,"value":1.0,"inSlope":1.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0}],"m_PreInfinity":2,"m_PostInfinity":2,"m_RotationOrder":4},{"serializedVersion":"2","m_Curve":[{"serializedVersion":"3","time":0.0,"value":0.0,"inSlope":0.0,"outSlope":1.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0},{"serializedVersion":"3","time":1.0,"value":1.0,"inSlope":1.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0}],"m_PreInfinity":2,"m_PostInfinity":2,"m_RotationOrder":4},{"serializedVersion":"2","m_Curve":[{"serializedVersion":"3","time":0.0,"value":0.0,"inSlope":0.0,"outSlope":1.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0},{"serializedVersion":"3","time":1.0,"value":1.0,"inSlope":1.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0}],"m_PreInfinity":2,"m_PostInfinity":2,"m_RotationOrder":4},{"serializedVersion":"2","m_Curve":[{"serializedVersion":"3","time":0.0,"value":1.0,"inSlope":0.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0},{"serializedVersion":"3","time":1.0,"value":1.0,"inSlope":0.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0}],"m_PreInfinity":2,"m_PostInfinity":2,"m_RotationOrder":4}]}#{"_curves":[{"serializedVersion":"2","m_Curve":[{"serializedVersion":"3","time":0.0,"value":0.0,"inSlope":0.0,"outSlope":1.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0},{"serializedVersion":"3","time":1.0,"value":1.0,"inSlope":1.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0}],"m_PreInfinity":2,"m_PostInfinity":2,"m_RotationOrder":4},{"serializedVersion":"2","m_Curve":[{"serializedVersion":"3","time":0.0,"value":0.0,"inSlope":0.0,"outSlope":1.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0},{"serializedVersion":"3","time":1.0,"value":1.0,"inSlope":1.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0}],"m_PreInfinity":2,"m_PostInfinity":2,"m_RotationOrder":4},{"serializedVersion":"2","m_Curve":[{"serializedVersion":"3","time":0.0,"value":0.0,"inSlope":0.0,"outSlope":1.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0},{"serializedVersion":"3","time":1.0,"value":1.0,"inSlope":1.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0}],"m_PreInfinity":2,"m_PostInfinity":2,"m_RotationOrder":4},{"serializedVersion":"2","m_Curve":[{"serializedVersion":"3","time":0.0,"value":1.0,"inSlope":0.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0},{"serializedVersion":"3","time":1.0,"value":1.0,"inSlope":0.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0}],"m_PreInfinity":2,"m_PostInfinity":2,"m_RotationOrder":4}]}'
126 | assetBundleName:
127 | assetBundleVariant:
128 |
--------------------------------------------------------------------------------
/Test/RampMap_Test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/Test/RampMap_Test.png
--------------------------------------------------------------------------------
/Test/RampMap_Test.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1522a7c4f7317044ab912724c1594427
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: 1
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: 1
43 | nPOTScale: 1
44 | lightmap: 0
45 | compressionQuality: 50
46 | spriteMode: 0
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: 0
56 | spriteTessellationDetail: -1
57 | textureType: 0
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: 2048
73 | resizeAlgorithm: 0
74 | textureFormat: 4
75 | textureCompression: 0
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:
116 | internalID: 0
117 | vertices: []
118 | indices:
119 | edges: []
120 | weights: []
121 | secondaryTextures: []
122 | nameFileIdTable: {}
123 | mipmapLimitGroupName:
124 | pSDRemoveMatte: 0
125 | userData: '{"_curves":[{"serializedVersion":"2","m_Curve":[{"serializedVersion":"3","time":0.0,"value":0.0,"inSlope":0.0,"outSlope":1.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0},{"serializedVersion":"3","time":1.0,"value":1.0,"inSlope":1.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0}],"m_PreInfinity":2,"m_PostInfinity":2,"m_RotationOrder":4},{"serializedVersion":"2","m_Curve":[{"serializedVersion":"3","time":0.0,"value":0.0,"inSlope":0.0,"outSlope":1.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0},{"serializedVersion":"3","time":1.0,"value":1.0,"inSlope":1.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0}],"m_PreInfinity":2,"m_PostInfinity":2,"m_RotationOrder":4},{"serializedVersion":"2","m_Curve":[{"serializedVersion":"3","time":0.0,"value":0.0,"inSlope":0.0,"outSlope":1.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0},{"serializedVersion":"3","time":1.0,"value":1.0,"inSlope":1.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0}],"m_PreInfinity":2,"m_PostInfinity":2,"m_RotationOrder":4},{"serializedVersion":"2","m_Curve":[{"serializedVersion":"3","time":0.0,"value":1.0,"inSlope":0.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0},{"serializedVersion":"3","time":1.0,"value":1.0,"inSlope":0.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0}],"m_PreInfinity":2,"m_PostInfinity":2,"m_RotationOrder":4}]}#{"_curves":[{"serializedVersion":"2","m_Curve":[{"serializedVersion":"3","time":0.0,"value":0.0,"inSlope":0.0,"outSlope":1.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0},{"serializedVersion":"3","time":1.0,"value":1.0,"inSlope":1.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0}],"m_PreInfinity":2,"m_PostInfinity":2,"m_RotationOrder":4},{"serializedVersion":"2","m_Curve":[{"serializedVersion":"3","time":0.0,"value":0.0,"inSlope":0.0,"outSlope":1.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0},{"serializedVersion":"3","time":1.0,"value":1.0,"inSlope":1.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0}],"m_PreInfinity":2,"m_PostInfinity":2,"m_RotationOrder":4},{"serializedVersion":"2","m_Curve":[{"serializedVersion":"3","time":0.0,"value":0.0,"inSlope":0.0,"outSlope":1.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0},{"serializedVersion":"3","time":1.0,"value":1.0,"inSlope":1.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0}],"m_PreInfinity":2,"m_PostInfinity":2,"m_RotationOrder":4},{"serializedVersion":"2","m_Curve":[{"serializedVersion":"3","time":0.0,"value":1.0,"inSlope":0.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0},{"serializedVersion":"3","time":1.0,"value":1.0,"inSlope":0.0,"outSlope":0.0,"tangentMode":69,"weightedMode":0,"inWeight":0.0,"outWeight":0.0}],"m_PreInfinity":2,"m_PostInfinity":2,"m_RotationOrder":4}]}'
126 | assetBundleName:
127 | assetBundleVariant:
128 |
--------------------------------------------------------------------------------
/Test/RampMap_sRGB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/Test/RampMap_sRGB.png
--------------------------------------------------------------------------------
/Test/SampleAmplifyShader.shader:
--------------------------------------------------------------------------------
1 | // Made with Amplify Shader Editor v1.9.2.2
2 | // Available at the Unity Asset Store - http://u3d.as/y3X
3 | Shader "Hidden"
4 | {
5 | Properties
6 | {
7 | [HDR][Header()][Header(Test Header)][Space(50)]_Color("Color", Vector) = (0,0,0,0)
8 |
9 | }
10 |
11 | SubShader
12 | {
13 |
14 |
15 | Tags { "RenderType"="Opaque" }
16 | LOD 100
17 |
18 | CGINCLUDE
19 | #pragma target 3.0
20 | ENDCG
21 | Blend Off
22 | AlphaToMask Off
23 | Cull Back
24 | ColorMask RGBA
25 | ZWrite On
26 | ZTest LEqual
27 | Offset 0 , 0
28 |
29 |
30 |
31 | Pass
32 | {
33 | Name "Unlit"
34 |
35 | CGPROGRAM
36 |
37 |
38 |
39 | #ifndef UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX
40 | //only defining to not throw compilation error over Unity 5.5
41 | #define UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input)
42 | #endif
43 | #pragma vertex vert
44 | #pragma fragment frag
45 | #pragma multi_compile_instancing
46 | #include "UnityCG.cginc"
47 |
48 |
49 | struct appdata
50 | {
51 | float4 vertex : POSITION;
52 | float4 color : COLOR;
53 |
54 | UNITY_VERTEX_INPUT_INSTANCE_ID
55 | };
56 |
57 | struct v2f
58 | {
59 | float4 vertex : SV_POSITION;
60 | #ifdef ASE_NEEDS_FRAG_WORLD_POSITION
61 | float3 worldPos : TEXCOORD0;
62 | #endif
63 |
64 | UNITY_VERTEX_INPUT_INSTANCE_ID
65 | UNITY_VERTEX_OUTPUT_STEREO
66 | };
67 |
68 | uniform float3 _Color;
69 |
70 |
71 | v2f vert ( appdata v )
72 | {
73 | v2f o;
74 | UNITY_SETUP_INSTANCE_ID(v);
75 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
76 | UNITY_TRANSFER_INSTANCE_ID(v, o);
77 |
78 |
79 | float3 vertexValue = float3(0, 0, 0);
80 | #if ASE_ABSOLUTE_VERTEX_POS
81 | vertexValue = v.vertex.xyz;
82 | #endif
83 | vertexValue = vertexValue;
84 | #if ASE_ABSOLUTE_VERTEX_POS
85 | v.vertex.xyz = vertexValue;
86 | #else
87 | v.vertex.xyz += vertexValue;
88 | #endif
89 | o.vertex = UnityObjectToClipPos(v.vertex);
90 |
91 | #ifdef ASE_NEEDS_FRAG_WORLD_POSITION
92 | o.worldPos = mul(unity_ObjectToWorld, v.vertex).xyz;
93 | #endif
94 | return o;
95 | }
96 |
97 | fixed4 frag (v2f i ) : SV_Target
98 | {
99 | UNITY_SETUP_INSTANCE_ID(i);
100 | UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
101 | fixed4 finalColor;
102 | #ifdef ASE_NEEDS_FRAG_WORLD_POSITION
103 | float3 WorldPosition = i.worldPos;
104 | #endif
105 |
106 |
107 | finalColor = float4( _Color , 0.0 );
108 | return finalColor;
109 | }
110 | ENDCG
111 | }
112 | }
113 | CustomEditor "ASEMaterialInspector"
114 |
115 | Fallback Off
116 | }
117 | /*ASEBEGIN
118 | Version=19202
119 | Node;AmplifyShaderEditor.Vector3Node;1;-274.682,-13.31076;Inherit;False;Property;_Color;Color;0;2;[HDR];[Header];Create;True;1;;0;0;False;2;Header(Test Header);Space(50);False;0,0,0;0,0,0;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
120 | Node;AmplifyShaderEditor.RangedFloatNode;2;-482.682,146.6892;Inherit;False;Property;_Float0;Float 0;1;1;[Enum];Create;True;0;1;Option1;0;0;False;1;;False;0;0;0;0;0;1;FLOAT;0
121 | Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;3;-8,-15;Float;False;True;-1;2;ASEMaterialInspector;100;5;Hidden;0770190933193b94aaa3065e307002fa;True;Unlit;0;0;Unlit;2;False;True;0;1;False;;0;False;;0;1;False;;0;False;;True;0;False;;0;False;;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;RenderType=Opaque=RenderType;True;2;False;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;0;;0;0;Standard;1;Vertex Position,InvertActionOnDeselection;1;0;0;1;True;False;;False;0
122 | WireConnection;3;0;1;0
123 | ASEEND*/
124 | //CHKSM=6D95375F618D8B4B492B732E7F0009AB2F1206EE
--------------------------------------------------------------------------------
/Test/SampleAmplifyShader.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5ce5f51521204d14bbb88913f98c148a
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Test/SampleDrawerA.shader:
--------------------------------------------------------------------------------
1 | Shader "Hidden"
2 | {
3 | Properties
4 | {
5 | // use Header on builtin attribute
6 | [Header(Header)][NoScaleOffset]
7 | _MainTex ("Color Map", 2D) = "white" { }
8 | [HDR] _Color ("Color", Color) = (1, 1, 1, 1)
9 | [Ramp] _Ramp ("Ramp", 2D) = "white" { }
10 |
11 | // use Title on LWGUI attribute
12 | [Title(Title)]
13 | [Tex(_, _mColor2)] _tex ("tex color", 2D) = "white" { }
14 |
15 |
16 | [Title(Title on Group)]
17 | // Create a folding group with name "g1"
18 | [Main(g1)] _group ("Group", float) = 0
19 | [Sub(g1)] _float ("float", float) = 2
20 |
21 | [SubEnum(g1, name1, 2, name2, 1, name3, 0)]
22 | _enum ("enum", float) = 0
23 | [Tex(g1)][Normal] _normal ("normal", 2D) = "bump" { }
24 | [Sub(g1)][HDR] _hdr ("hdr", Color) = (1, 1, 1, 1)
25 | [SubTitle(g1, Sample SubTitle)]
26 | [SubToggle(g1, _)] _toggle ("toggle", float) = 0
27 | [SubToggle(g1, _KEYWORD)] _toggle_keyword ("toggle_keyword", float) = 0
28 | [Sub(g1_KEYWORD)] _float_keyword ("float_keyword", float) = 0
29 | [SubPowerSlider(g1, 2)] _powerSlider ("powerSlider", Range(0, 100)) = 0
30 |
31 | // Display up to 4 colors in a single line
32 | [Color(g1, _mColor1, _mColor2, _mColor3)]
33 | _mColor ("multicolor", Color) = (1, 1, 1, 1)
34 | [HideInInspector] _mColor1 (" ", Color) = (1, 0, 0, 1)
35 | [HideInInspector] _mColor2 (" ", Color) = (0, 1, 0, 1)
36 | [HideInInspector] [HDR] _mColor3 (" ", Color) = (0, 0, 1, 1)
37 |
38 |
39 | // Create a drop-down menu that opens by default, without toggle
40 | [Main(g2, _KEYWORD, on, off)] _group2 ("group2 without toggle", float) = 1
41 | [Tooltip(Test Tooltip)]
42 | [Helpbox(Test Helpbox)]
43 | [Sub(g2)] _float_tooltip_helpbox ("float tooltip helpbox#这是中文Tooltip%これは日本語Helpboxです", float) = 0
44 | [Sub(g2)] _float2 ("float2", float) = 2
45 | [Title(Ramp Sample)]
46 | [Ramp(g2)] _Ramp2 ("Ramp2", 2D) = "white" { }
47 | [Title(Ramp Atlas Sample)]
48 | [RampAtlas(g2)] _RampAtlas ("Ramp Atlas", 2D) = "white" { }
49 | [Space]
50 | [RampAtlasIndexer(g2, _RampAtlas, Default Ramp)] _RampAtlasIndex0 ("Indexer", float) = 0
51 | [RampAtlasIndexer(g2, _RampAtlas, Default Ramp)] _RampAtlasIndex1 ("Indexer", float) = 1
52 | [RampAtlasIndexer(g2, _RampAtlas, Green, Linear, GA, 24)] _RampAtlasIndex2 ("Indexer Linear/Green/24", float) = 3
53 |
54 |
55 | [Main(Preset, _, on, off)] _PresetGroup ("Preset Samples", float) = 0
56 | [Preset(Preset, LWGUI_Preset_BlendMode)] _BlendMode ("Blend Mode Preset", float) = 0
57 | [SubEnum(Preset, UnityEngine.Rendering.CullMode)] _Cull ("Cull", Float) = 2
58 | [SubEnum(Preset, UnityEngine.Rendering.BlendMode)] _SrcBlend ("SrcBlend", Float) = 1
59 | [SubEnum(Preset, UnityEngine.Rendering.BlendMode)] _DstBlend ("DstBlend", Float) = 0
60 | [SubToggle(Preset)] _ZWrite ("ZWrite ", Float) = 1
61 | [SubEnum(Preset, UnityEngine.Rendering.CompareFunction)] _ZTest ("ZTest", Float) = 4 // 4 is LEqual
62 | [SubEnum(Preset, RGBA, 15, RGB, 14)] _ColorMask ("ColorMask", Float) = 15 // 15 is RGBA (binary 1111)
63 | [BitMask(Preset)] _Stencil ("Stencil", Integer) = 0
64 | [BitMask(Preset, Left, Bit6, Bit5, Bit4, Description, Bit2, Bit1, Right)] _StencilWithDescription ("Stencil With Description", Integer) = 0
65 |
66 | }
67 |
68 | HLSLINCLUDE
69 |
70 |
71 |
72 | ENDHLSL
73 |
74 | SubShader
75 | {
76 | Tags { "RenderType" = "Opaque" }
77 | LOD 100
78 | Cull [_Cull]
79 | ZWrite [_ZWrite]
80 | Blend [_SrcBlend] [_DstBlend]
81 | ColorMask [_ColorMask]
82 |
83 | Pass
84 | {
85 | CGPROGRAM
86 | #pragma vertex vert
87 | #pragma fragment frag
88 |
89 | #include "UnityCG.cginc"
90 |
91 | sampler2D _RampAtlas;
92 | float4 _RampAtlas_TexelSize;
93 | int _RampAtlasIndex0;
94 |
95 | struct appdata
96 | {
97 | float4 vertex : POSITION;
98 | float2 uv : TEXCOORD0;
99 | };
100 |
101 | struct v2f
102 | {
103 | float2 uv : TEXCOORD0;
104 | UNITY_FOG_COORDS(1)
105 | float4 vertex : SV_POSITION;
106 | };
107 | float4 _Color;
108 |
109 | v2f vert(appdata v)
110 | {
111 | v2f o;
112 | o.vertex = UnityObjectToClipPos(v.vertex);
113 | o.uv = v.uv;
114 | return o;
115 | }
116 |
117 | fixed4 frag(v2f i) : SV_Target
118 | {
119 | float2 rampUV = float2(i.uv.x, _RampAtlas_TexelSize.y * (_RampAtlasIndex0 + 0.5f));
120 | fixed4 col = tex2D(_RampAtlas, saturate(rampUV));
121 | return col;
122 | }
123 | ENDCG
124 | }
125 | }
126 | CustomEditor "LWGUI.LWGUI"
127 | }
128 |
--------------------------------------------------------------------------------
/Test/SampleDrawerA.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ded91f399f8343d4f9b0cf33eda0088d
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | preprocessorOverride: 0
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Test/SampleDrawerB.shader:
--------------------------------------------------------------------------------
1 | Shader "Hidden"
2 | {
3 | Properties
4 | {
5 | [ShowIf(_enum, Equal, 1)]
6 | [Title(ShowIf Main Samples)]
7 | [Main(GroupName)] _group ("Group", float) = 0
8 | [Sub(GroupName)] _float ("Float", float) = 0
9 | [Sub(GroupName)] _Tex ("Tex", 2D) = "white" { }
10 |
11 |
12 | [Main(Group1, _KEYWORD, on)] _group1 ("Group - Default Open", float) = 1
13 | [Preset(Group1, LWGUI_ShaderPropertyPreset)] _preset ("Preset Sample", float) = 0
14 | [Preset(Group1, LWGUI_ShaderPropertyPreset1)] _preset1 ("Preset Sample 1", float) = 0
15 | [SubToggle(Group1, _, LWGUI_Preset_Toggle)] _preset_toggle ("Preset Toggle Sample", float) = 0
16 | [Sub(Group1)] _float1 ("Sub Float", float) = 0
17 | [Sub(Group1)] _vector1 ("Sub Vector", vector) = (1, 1, 1, 1)
18 | [Sub(Group1)] [HDR] _color1 ("Sub HDR Color", color) = (0.7, 0.7, 1, 1)
19 |
20 | [SubTitle(Group1, Conditional Display Samples Enum)]
21 | [KWEnum(Group1, Name 1, _KEY1, Name 2, _KEY2, Name 3, _KEY3)] _enum ("KWEnum", float) = 0
22 | [Sub(Group1)][ShowIf(_enum, Equal, 0)] _key1_Float1 ("Key1 Float", float) = 0
23 | [Sub(Group1)][ShowIf(_enum, Equal, 1)] _key2_Float2 ("Key2 Float", float) = 0
24 | [SubIntRange(Group1)][ShowIf(_enum, Equal, 2)] _key3_Int_Range ("Key3 Int Range", Range(0, 10)) = 0
25 | [ShowIf(_enum, Equal, 0)][ShowIf(Or, _enum, Equal, 2)]
26 | [SubPowerSlider(Group1, 3)] _key13_PowerSlider ("Key1 or Key3 Power Slider", Range(0, 1)) = 0
27 |
28 |
29 | [Main(Group2, _, off, off)] _group2 ("Group - Without Toggle", float) = 0
30 | [Sub(Group2)] _float3 ("Float 2", float) = 0
31 | [Advanced][Sub(Group2)] _Advancedfloat0 ("Advanced Float 0", float) = 0
32 | [Advanced][Sub(Group2)] _Advancedfloat1 ("Advanced Float 1", float) = 0
33 | [Advanced(Advanced Header Test)][Sub(Group2)] _Advancedfloat3 ("Advanced Float 3", float) = 0
34 | [Advanced][Sub(Group2)] _Advancedfloat4 ("Advanced Float 4", float) = 0
35 | [AdvancedHeaderProperty][Tex(Group2, _AdvancedColor7)] _AdvancedTex0 ("Advanced Header Property Test", 2D) = "white" { }
36 | [Advanced][HideInInspector] _AdvancedColor7 ("Advanced Color 7", Color) = (1, 1, 1, 1)
37 | [Advanced][Tex(Group2, _AdvancedColor0)] _AdvancedTex1 ("Advanced Tex 1", 2D) = "white" { }
38 | [Advanced][HideInInspector] _AdvancedColor0 ("Advanced Color 0", Color) = (1, 1, 1, 1)
39 | [AdvancedHeaderProperty][Sub(Group2)] _AdvancedFloat ("Advanced Image", float) = 0
40 | [Advanced][Image(Group2)] _AdvancedImage ("../image-20220828003810353.png", float) = 0
41 |
42 | [Title(Channel Samples)]
43 | [Channel] _textureChannelMask ("Texture Channel Mask (Default G)", Vector) = (0, 1, 0, 0)
44 |
45 |
46 | [Title(Metadata Samples)]
47 | [Tooltip(Test multiline Tooltip, a single line supports up to 4 commas)]
48 | [Tooltip()]
49 | [Tooltip(Line 3)]
50 | [Tooltip(Line 4)]
51 | _float_tooltip ("Float with Tooltips##这是中文Tooltip#これは日本語Tooltipです", float) = 1
52 | [Helpbox(Test multiline Helpbox)]
53 | [Helpbox(Line2)]
54 | [Helpbox(Line3)]
55 | _float_helpbox ("Float with Helpbox%这是中文Helpbox%これは日本語Helpboxです", float) = 1
56 |
57 |
58 | [Main(Group3, _, on)] _group3 ("Group - Tex and Color Samples", float) = 0
59 | [Tex(Group3)] _tex_single_line ("Tex Single Line", 2D) = "white" { }
60 | [Tex(Group3, _color)] _tex_color ("Tex with Color", 2D) = "white" { }
61 | [HideInInspector] _color (" ", Color) = (1, 0, 0, 1)
62 | [Tex(Group3, _textureFloat1)] _tex_float ("Tex with Float", 2D) = "white" { }
63 | [HideInInspector] _textureFloat1 (" ", Float) = 1
64 |
65 | [Color(Group3, _mColor1, _mColor2, _mColor3)] _mColor ("Multi Color", Color) = (1, 1, 1, 1)
66 | [HideInInspector] _mColor1 (" ", Color) = (1, 0, 0, 1)
67 | [HideInInspector] _mColor2 (" ", Color) = (0, 1, 0, 1)
68 | [HideInInspector] [HDR] _mColor3 (" ", Color) = (0, 0, 1, 1)
69 |
70 |
71 | [Title(Ramp Samples)]
72 | [Ramp(_, RampMap_sRGB, Assets, sRGB, 256)] _sRGBRamp ("sRGB Ramp Map", 2D) = "white" { }
73 | [Ramp(_, RampMap_Linear, Assets, Linear, 256)] _LinearRamp ("Linear Ramp Map", 2D) = "white" { }
74 |
75 |
76 | [Title(MinMaxSlider Samples)]
77 | [MinMaxSlider(_rangeStart, _rangeEnd)] _minMaxSlider ("Min Max Slider (0 - 1)", Range(0.0, 1.0)) = 1.0
78 | _rangeStart ("Range Start", Range(0.0, 0.5)) = 0.0
79 | [PowerSlider(10)] _rangeEnd ("Range End PowerSlider", Range(0.5, 1.0)) = 1.0
80 |
81 | [Title(Button Samples)]
82 | [Button(_)] _button0 ("URL Button@URL:https://github.com/JasonMa0012/LWGUI@C# Button@C#:LWGUI.ButtonDrawer.TestMethod(1234, abcd)", Float) = 0
83 | }
84 |
85 | HLSLINCLUDE
86 |
87 |
88 |
89 | ENDHLSL
90 |
91 | SubShader
92 | {
93 |
94 | Pass { }
95 | }
96 | CustomEditor "LWGUI.LWGUI"
97 | }
98 |
--------------------------------------------------------------------------------
/Test/SampleDrawerB.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7ee048c9536c0344bb8b4860595a4d9b
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures:
6 | - _Tex: {instanceID: 0}
7 | - _AdvancedTex0: {instanceID: 0}
8 | - _AdvancedTex1: {instanceID: 0}
9 | - _AdvancedImage: {fileID: 2800000, guid: 63de4a0dcb29d454c89e31d4e6d0d8db, type: 3}
10 | - _tex_single_line: {instanceID: 0}
11 | - _tex_color: {instanceID: 0}
12 | - _tex_channel: {instanceID: 0}
13 | - _sRGBRamp: {instanceID: 0}
14 | - _LinearRamp: {instanceID: 0}
15 | nonModifiableTextures: []
16 | userData:
17 | assetBundleName:
18 | assetBundleVariant:
19 |
--------------------------------------------------------------------------------
/Test/SampleKeyword.shader:
--------------------------------------------------------------------------------
1 | Shader "Hidden"
2 | {
3 | Properties
4 | {
5 | [Preset(_, LWGUI_ShaderPropertyPreset2)] _preset2 ("Preset", float) = 0
6 |
7 | [KeywordEnum(key1, key2)]
8 | _keywordEnum ("KeywordEnum", float) = 0
9 |
10 | [KWEnum(_, Name 1, _KWENUM_KEY1, Name 2, _KWENUM_KEY2)]
11 | _kwenum ("KWEnum", float) = 0
12 |
13 | [Toggle(_TOGGLE_KEYWORD)] _toggle1 ("Toggle", float) = 0
14 |
15 | [Main(g0, _GROUP_TOGGLE_KEYWORD)] _group_toggle1 ("Group Toggle", float) = 0
16 |
17 | [Main(g1, _, on, on)]
18 | [PassSwitch(Always)]
19 | _group ("Pass Switch Group", float) = 1
20 | [SubEnum(g1, Off, 0, On, 1)] _ZWrite ("ZWrite Mode", Float) = 1
21 | [SubToggle(g1, _SUBTOGGLE_KEYWORD)] _toggle ("Sub Toggle", float) = 0
22 | [SubKeywordEnum(g1, key1, key2)]
23 | _subKeywordEnum ("SubKeywordEnum", float) = 0
24 | }
25 | SubShader
26 | {
27 |
28 | Pass
29 | {
30 | Tags { "RenderType" = "Opaque" "LightMode" = "Always" }
31 | LOD 100
32 | CGPROGRAM
33 | #pragma vertex vert
34 | #pragma fragment frag
35 | // make fog work
36 | #pragma multi_compile_fog
37 | #pragma multi_compile _KWENUM_KEY1 _KWENUM_KEY2
38 | #pragma multi_compile _KEYWORDENUM_KEY1 _KEYWORDENUM_KEY2
39 | #pragma multi_compile _SUBKEYWORDENUM_KEY1 _SUBKEYWORDENUM_KEY2
40 | #pragma multi_compile _ _SUBTOGGLE_KEYWORD
41 | #pragma multi_compile _ _TOGGLE_KEYWORD
42 | #pragma multi_compile _ _GROUP_TOGGLE_KEYWORD
43 |
44 | #include "UnityCG.cginc"
45 |
46 | struct appdata
47 | {
48 | float4 vertex : POSITION;
49 | float2 uv : TEXCOORD0;
50 | };
51 |
52 | struct v2f
53 | {
54 | float2 uv : TEXCOORD0;
55 | UNITY_FOG_COORDS(1)
56 | float4 vertex : SV_POSITION;
57 | };
58 |
59 | sampler2D _MainTex;
60 | float4 _MainTex_ST;
61 |
62 |
63 | v2f vert(appdata v)
64 | {
65 | v2f o;
66 | o.vertex = UnityObjectToClipPos(v.vertex);
67 | o.uv = TRANSFORM_TEX(v.uv, _MainTex);
68 | UNITY_TRANSFER_FOG(o, o.vertex);
69 | return o;
70 | }
71 |
72 | fixed4 frag(v2f i) : SV_Target
73 | {
74 | fixed4 col = 0;
75 |
76 | #if _KWENUM_KEY1
77 | col.x += 0;
78 | #elif _KWENUM_KEY2
79 | col.x += 0.25;
80 | #endif
81 |
82 | #if _KEYWORDENUM_KEY1
83 | col.y += 0;
84 | #elif _KEYWORDENUM_KEY2
85 | col.y += 0.25;
86 | #endif
87 |
88 | #if _SUBKEYWORDENUM_KEY1
89 | col.y += 0.0;
90 | #elif _SUBKEYWORDENUM_KEY2
91 | col.y += 0.25;
92 | #endif
93 |
94 | #if _SUBTOGGLE_KEYWORD
95 | col.z += 0.25;
96 | #endif
97 |
98 | #if _TOGGLE_KEYWORD
99 | col.z += 0.25;
100 | #endif
101 |
102 | #if _GROUP_TOGGLE_KEYWORD
103 | col.z += 0.25;
104 | #endif
105 |
106 |
107 | return frac(col);
108 | }
109 | ENDCG
110 | }
111 | }
112 | CustomEditor "LWGUI.LWGUI"
113 | }
114 |
--------------------------------------------------------------------------------
/Test/SampleKeyword.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 98ad70357ecd6134dbac80aef9c63f6f
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/UnityEditorExtension.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 56e3a65fe6e61904a94a3cd1ea19a8ee
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/UnityEditorExtension/LwguiGradientEditor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 76783890193e4d1aaab781515ec60548
3 | timeCreated: 1720764555
--------------------------------------------------------------------------------
/UnityEditorExtension/LwguiGradientEditor/LwguiGradientDrawer.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 |
3 | using System;
4 | using UnityEngine;
5 | using UnityEditor;
6 | using LWGUI.Runtime.LwguiGradient;
7 |
8 | namespace LWGUI.LwguiGradientEditor
9 | {
10 | [System.AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
11 | public sealed class LwguiGradientUsageAttribute : PropertyAttribute
12 | {
13 | public ColorSpace colorSpace;
14 | public LwguiGradient.ChannelMask viewChannelMask;
15 | public LwguiGradient.GradientTimeRange timeRange;
16 |
17 | public LwguiGradientUsageAttribute(ColorSpace colorSpace = ColorSpace.Gamma, LwguiGradient.ChannelMask viewChannelMask = LwguiGradient.ChannelMask.All, LwguiGradient.GradientTimeRange timeRange = LwguiGradient.GradientTimeRange.One)
18 | {
19 | this.colorSpace = colorSpace;
20 | this.viewChannelMask = viewChannelMask;
21 | this.timeRange = timeRange;
22 | }
23 | }
24 |
25 |
26 | [CustomPropertyDrawer(typeof(LwguiGradientUsageAttribute))]
27 | internal sealed class LwguiGradientUsageDrawer : LwguiGradientPropertyDrawer
28 | {
29 | public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
30 | {
31 | var colorUsage = (LwguiGradientUsageAttribute)attribute;
32 |
33 | colorSpace = colorUsage.colorSpace;
34 | viewChannelMask = colorUsage.viewChannelMask;
35 | timeRange = colorUsage.timeRange;
36 | base.OnGUI(position, property, label);
37 | }
38 | }
39 |
40 |
41 | [CustomPropertyDrawer(typeof(LwguiGradient))]
42 | public class LwguiGradientPropertyDrawer : PropertyDrawer
43 | {
44 | public ColorSpace colorSpace = ColorSpace.Gamma;
45 | public LwguiGradient.ChannelMask viewChannelMask = LwguiGradient.ChannelMask.All;
46 | public LwguiGradient.GradientTimeRange timeRange = LwguiGradient.GradientTimeRange.One;
47 |
48 | public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
49 | {
50 | EditorGUI.BeginChangeCheck();
51 | // var lwguiGradient = property.GetLwguiGradientValue();
52 | LwguiGradientEditorHelper.GradientField(position, label, property, colorSpace, viewChannelMask, timeRange);
53 | if (EditorGUI.EndChangeCheck())
54 | {
55 | // property.SetLwguiGradientValue(LwguiGradientWindow.instance.lwguiGradient);
56 | // property.serializedObject.ApplyModifiedProperties();
57 | // EditorUtility.SetDirty(property.serializedObject.targetObject);
58 | }
59 | }
60 | }
61 | }
--------------------------------------------------------------------------------
/UnityEditorExtension/LwguiGradientEditor/LwguiGradientDrawer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9672b824fb314326a5fd4078a7068d89
3 | timeCreated: 1716793950
--------------------------------------------------------------------------------
/UnityEditorExtension/LwguiGradientEditor/LwguiGradientEditor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0a472009f0e9429c8d503438262f3d34
3 | timeCreated: 1720769127
--------------------------------------------------------------------------------
/UnityEditorExtension/LwguiGradientEditor/LwguiGradientEditorHelper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 016014c82cb94b5d9f271b1b06986541
3 | timeCreated: 1720424032
--------------------------------------------------------------------------------
/UnityEditorExtension/LwguiGradientEditor/LwguiGradientPresetLibrary.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 |
3 | using System.Collections.Generic;
4 | using LWGUI.Runtime.LwguiGradient;
5 | using UnityEditor;
6 | using UnityEngine;
7 | using UnityEngine.Serialization;
8 |
9 | namespace LWGUI.LwguiGradientEditor
10 | {
11 | [ExcludeFromPreset]
12 | class LwguiGradientPresetLibrary : PresetLibrary
13 | {
14 | [SerializeField]
15 | List m_Presets = new List();
16 |
17 | public override int Count()
18 | {
19 | return m_Presets.Count;
20 | }
21 |
22 | public override object GetPreset(int index)
23 | {
24 | return m_Presets[index].lwguiGradient;
25 | }
26 |
27 | public override void Add(object presetObject, string presetName)
28 | {
29 | LwguiGradient gradient = presetObject as LwguiGradient;
30 | if (gradient == null)
31 | {
32 | Debug.LogError("Wrong type used in LwguiGradientPresetLibrary");
33 | return;
34 | }
35 |
36 | m_Presets.Add(new LwguiGradientPreset(new LwguiGradient(gradient), presetName));
37 | }
38 |
39 | public override void Replace(int index, object newPresetObject)
40 | {
41 | LwguiGradient gradient = newPresetObject as LwguiGradient;
42 | if (gradient == null)
43 | {
44 | Debug.LogError("Wrong type used in LwguiGradientPresetLibrary");
45 | return;
46 | }
47 |
48 | m_Presets[index].lwguiGradient = new LwguiGradient(gradient);
49 | }
50 |
51 | public override void Remove(int index)
52 | {
53 | m_Presets.RemoveAt(index);
54 | }
55 |
56 | public override void Move(int index, int destIndex, bool insertAfterDestIndex)
57 | {
58 | PresetLibraryHelpers.MoveListItem(m_Presets, index, destIndex, insertAfterDestIndex);
59 | }
60 |
61 | public override void Draw(Rect rect, int index)
62 | {
63 | Draw(rect, m_Presets[index].lwguiGradient, ColorSpace.Gamma, LwguiGradient.ChannelMask.All);
64 | }
65 |
66 | public override void Draw(Rect rect, object presetObject)
67 | {
68 | Draw(rect, presetObject as LwguiGradient, ColorSpace.Gamma, LwguiGradient.ChannelMask.All);
69 | }
70 |
71 | public void Draw(Rect rect, LwguiGradient gradient, ColorSpace colorSpace, LwguiGradient.ChannelMask viewChannelMask)
72 | {
73 | if (gradient == null)
74 | return;
75 | LwguiGradientEditorHelper.DrawGradientWithSeparateAlphaChannel(rect, gradient, colorSpace, viewChannelMask);
76 | }
77 |
78 | public override string GetName(int index)
79 | {
80 | return m_Presets[index].name;
81 | }
82 |
83 | public override void SetName(int index, string presetName)
84 | {
85 | m_Presets[index].name = presetName;
86 | }
87 |
88 |
89 | [System.Serializable]
90 | class LwguiGradientPreset
91 | {
92 | [SerializeField]
93 | string m_Name;
94 |
95 | [SerializeField]
96 | LwguiGradient m_LwguiGradient;
97 |
98 | public LwguiGradientPreset(LwguiGradient preset, string presetName)
99 | {
100 | lwguiGradient = preset;
101 | name = presetName;
102 | }
103 |
104 | public LwguiGradient lwguiGradient
105 | {
106 | get => m_LwguiGradient;
107 | set => m_LwguiGradient = value;
108 | }
109 |
110 | public string name
111 | {
112 | get => m_Name;
113 | set => m_Name = value;
114 | }
115 | }
116 | }
117 | }
118 |
--------------------------------------------------------------------------------
/UnityEditorExtension/LwguiGradientEditor/LwguiGradientPresetLibrary.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6aa6b41078c94b978a355082d28769f0
3 | timeCreated: 1721013180
--------------------------------------------------------------------------------
/UnityEditorExtension/LwguiGradientEditor/LwguiGradientPresetLibraryInspector.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 |
3 | using LWGUI.Runtime.LwguiGradient;
4 | using UnityEditor;
5 | using UnityEngine;
6 |
7 | namespace LWGUI.LwguiGradientEditor
8 | {
9 | [CustomEditor(typeof(LwguiGradientPresetLibrary))]
10 | internal class LwguiGradientPresetLibraryEditor : Editor
11 | {
12 | private GenericPresetLibraryInspector m_GenericPresetLibraryInspector;
13 |
14 | public void OnEnable()
15 | {
16 | m_GenericPresetLibraryInspector = new GenericPresetLibraryInspector(target, "Lwgui Gradient Preset Library", OnEditButtonClicked)
17 | {
18 | presetSize = new Vector2(72, 16),
19 | lineSpacing = 4f
20 | };
21 | }
22 |
23 | public void OnDestroy()
24 | {
25 | m_GenericPresetLibraryInspector?.OnDestroy();
26 | }
27 |
28 | public override void OnInspectorGUI()
29 | {
30 | m_GenericPresetLibraryInspector.itemViewMode = PresetLibraryEditorState.GetItemViewMode("LwguiGradient"); // ensure in-sync
31 | m_GenericPresetLibraryInspector?.OnInspectorGUI();
32 | }
33 |
34 | private void OnEditButtonClicked(string libraryPath)
35 | {
36 | LwguiGradientWindow.Show(new LwguiGradient());
37 | LwguiGradientWindow.instance.currentPresetLibrary = libraryPath;
38 | }
39 | }
40 | } // namespace
41 |
--------------------------------------------------------------------------------
/UnityEditorExtension/LwguiGradientEditor/LwguiGradientPresetLibraryInspector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c5050da63672448d8f12cf3c82e12a6a
3 | timeCreated: 1721013226
--------------------------------------------------------------------------------
/UnityEditorExtension/LwguiGradientEditor/LwguiGradientWindow.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 097db44e7f52445b80daf9c3c3e9f26b
3 | timeCreated: 1716795885
--------------------------------------------------------------------------------
/UnityEditorExtension/README.md:
--------------------------------------------------------------------------------
1 | ## CN
2 |
3 | 为了能够直接访问UnityEditor的Internal类型, 这里使用了内置的[友元程序集](https://learn.microsoft.com/zh-cn/dotnet/standard/assembly/friend). 通过将自己的代码封装在内置友元程序集中, 无需修改引擎或反射即可访问Internal类型. 详见以下文章:
4 |
5 | https://qiita.com/mob-sakai/items/f3bbc0c45abc31ea7ac0
6 |
7 | 示例项目:
8 |
9 | https://github.com/mob-sakai/MainWindowTitleModifierForUnity
10 |
11 | LWGUI选择将这部分代码封装在`Unity.InternalAPIEditorBridge.020`中, 但是如果你的项目已经定义了此程序集, 那么就会产生编译错误.
12 |
13 | 要解决这个错误, 你可以选择修改LWGUI或你工程中的同名Assembly Definition Asset, 以下两种方法都可以:
14 |
15 | - 将其中一个Assembly Definition Asset删除, 并创建引用向另一个Assembly Definition Asset的[Assembly Definition Reference Asset](https://docs.unity3d.com/Manual/class-AssemblyDefinitionReferenceImporter.html)
16 | - 将其中一个Assembly Definition Asset的名称修改为你的工程还未使用的程序集名称. 如`Unity.InternalAPIEditorBridge.021`, 所有可用的名称可以在[这里](https://github.com/Unity-Technologies/UnityCsReference/blob/1d7b2b49b93ea5773aa4e8dfa504e3c1533ce282/Editor/Mono/AssemblyInfo/AssemblyInfo.cs#L113)查询.
17 |
18 |
19 |
20 | ## EN
21 |
22 | In order to directly access UnityEditor's Internal type, the built-in [Friend Assembly](https://learn.microsoft.com/zh-cn/dotnet/standard/assembly/friend) is used here. By encapsulating your own code In built-in friend assemblies, Internal types can be accessed without modifying the engine or Reflection. See the following articles for details:
23 |
24 | https://qiita.com/mob-sakai/items/f3bbc0c45abc31ea7ac0
25 |
26 | Example project:
27 |
28 | https://github.com/mob-sakai/MainWindowTitleModifierForUnity
29 |
30 | LWGUI chooses to encapsulate this part of the code in `Unity.InternalAPIEditorBridge.020`, but if your project has already defined this assembly, a compilation error will occur.
31 |
32 | To solve this error, you can choose to modify the LWGUI or the Assembly Definition Asset with the same name in your project. Both of the following methods are available:
33 |
34 | - Delete one Assembly Definition Asset and create an [Assembly Definition Reference Asset](https://docs.unity3d.com/Manual/class-AssemblyDefinitionReferenceImporter.html) that references another Assembly Definition Asset.
35 | - Change the name of one of the Assembly Definition Assets to an assembly name not yet used by your project. For example, `Unity.InternalAPIEditorBridge.021`, all available names can be found [here](https://github.com/Unity-Technologies/UnityCsReference/blob/1d7b2b49b93ea5773aa4e8dfa504e3c1533ce282/Editor/Mono/AssemblyInfo/AssemblyInfo.cs#L113) query.
36 |
--------------------------------------------------------------------------------
/UnityEditorExtension/README.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5d0d1d146a4108b4ebb49ce891131f50
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/UnityEditorExtension/ReflectionHelper.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e3451be150a8485bbd83e66540024f35
3 | timeCreated: 1687336811
--------------------------------------------------------------------------------
/UnityEditorExtension/Unity.InternalAPIEditorBridge.020.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Unity.InternalAPIEditorBridge.020",
3 | "rootNamespace": "",
4 | "references": [
5 | "LWGUI.Runtime"
6 | ],
7 | "includePlatforms": [
8 | "Editor"
9 | ],
10 | "excludePlatforms": [],
11 | "allowUnsafeCode": false,
12 | "overrideReferences": false,
13 | "precompiledReferences": [],
14 | "autoReferenced": true,
15 | "defineConstraints": [],
16 | "versionDefines": [],
17 | "noEngineReferences": false
18 | }
--------------------------------------------------------------------------------
/UnityEditorExtension/Unity.InternalAPIEditorBridge.020.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d40b1b73ac7645c43af711c92abd00b3
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/UnityEditorExtension/UnityEditorExtension.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Jason Ma
2 |
3 | using UnityEditor;
4 | using UnityEngine;
5 | using Object = UnityEngine.Object;
6 |
7 | namespace LWGUI
8 | {
9 | public static class UnityEditorExtension
10 | {
11 |
12 | #region MaterialEditor
13 |
14 | // For Developers: Call this after a material has modified in code
15 | public static void ApplyMaterialPropertyAndDecoratorDrawers(Material material)
16 | {
17 | var objs = new Object[] { material };
18 | ApplyMaterialPropertyAndDecoratorDrawers(objs);
19 | }
20 |
21 | // Called after edit or undo
22 | public static void ApplyMaterialPropertyAndDecoratorDrawers(Object[] targets)
23 | {
24 | if (!EditorMaterialUtility.disableApplyMaterialPropertyDrawers)
25 | {
26 | if (targets == null || targets.Length == 0)
27 | return;
28 | var target = targets[0] as Material;
29 | if (target == null)
30 | return;
31 |
32 | var shader = target.shader;
33 | string[] propNames = MaterialEditor.GetMaterialPropertyNames(targets);
34 | for (int i = 0; i < propNames.Length; i++)
35 | {
36 | var prop = MaterialEditor.GetMaterialProperty(targets, i);
37 | var drawer = ReflectionHelper.GetPropertyDrawer(shader, prop, out var decoratorDrawers);
38 |
39 | if (drawer != null)
40 | {
41 | drawer.Apply(prop);
42 | }
43 | if (decoratorDrawers != null)
44 | {
45 | foreach (var decoratorDrawer in decoratorDrawers)
46 | {
47 | decoratorDrawer.Apply(prop);
48 | }
49 | }
50 | }
51 | }
52 | }
53 |
54 | #endregion
55 |
56 | #region MaterialProperty
57 |
58 | public static float GetNumericValue(this MaterialProperty prop)
59 | {
60 | switch (prop.type)
61 | {
62 | case MaterialProperty.PropType.Float or MaterialProperty.PropType.Range:
63 | return prop.floatValue;
64 | case MaterialProperty.PropType.Int:
65 | return prop.intValue;
66 | default:
67 | Debug.LogError($"LWGUI: Material Property { prop.name } is NOT numeric type.");
68 | return 0;
69 | }
70 | }
71 |
72 | public static void SetNumericValue(this MaterialProperty prop, float value)
73 | {
74 | switch (prop.type)
75 | {
76 | case MaterialProperty.PropType.Float or MaterialProperty.PropType.Range:
77 | prop.floatValue = value;
78 | break;
79 | case MaterialProperty.PropType.Int:
80 | prop.intValue = (int)value;
81 | break;
82 | default:
83 | Debug.LogError($"LWGUI: Material Property { prop.name } is NOT numeric type.");
84 | break;
85 | }
86 | }
87 |
88 | #endregion
89 |
90 | }
91 | }
--------------------------------------------------------------------------------
/UnityEditorExtension/UnityEditorExtension.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c461331302de45948d270b0842238473
3 | timeCreated: 1726212440
--------------------------------------------------------------------------------
/assets~/723ddce6-fb86-48ff-9683-a12cf6cff7a0.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/723ddce6-fb86-48ff-9683-a12cf6cff7a0.jpg
--------------------------------------------------------------------------------
/assets~/809c4a1c-ce80-48b1-b415-7e8d4bea716e-16616214059841.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/809c4a1c-ce80-48b1-b415-7e8d4bea716e-16616214059841.png
--------------------------------------------------------------------------------
/assets~/LWGUI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/LWGUI.png
--------------------------------------------------------------------------------
/assets~/Pasted image 20250321174432.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/Pasted image 20250321174432.png
--------------------------------------------------------------------------------
/assets~/Pasted image 20250522183200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/Pasted image 20250522183200.png
--------------------------------------------------------------------------------
/assets~/Pasted image 20250523120309.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/Pasted image 20250523120309.png
--------------------------------------------------------------------------------
/assets~/image-20220822010511978.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20220822010511978.png
--------------------------------------------------------------------------------
/assets~/image-20220828003026556.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20220828003026556.png
--------------------------------------------------------------------------------
/assets~/image-20220828003129588.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20220828003129588.png
--------------------------------------------------------------------------------
/assets~/image-20220828003507825.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20220828003507825.png
--------------------------------------------------------------------------------
/assets~/image-20220828003810353.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20220828003810353.png
--------------------------------------------------------------------------------
/assets~/image-20220926025611208.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20220926025611208.png
--------------------------------------------------------------------------------
/assets~/image-20221122231655378.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20221122231655378.png
--------------------------------------------------------------------------------
/assets~/image-20221122231816714.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20221122231816714.png
--------------------------------------------------------------------------------
/assets~/image-20221122232307362.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20221122232307362.png
--------------------------------------------------------------------------------
/assets~/image-20221122232354623.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20221122232354623.png
--------------------------------------------------------------------------------
/assets~/image-20221122232415972.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20221122232415972.png
--------------------------------------------------------------------------------
/assets~/image-20221122232425194.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20221122232425194.png
--------------------------------------------------------------------------------
/assets~/image-20221231221240686.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20221231221240686.png
--------------------------------------------------------------------------------
/assets~/image-20221231221254101.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20221231221254101.png
--------------------------------------------------------------------------------
/assets~/image-20230625185730363.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20230625185730363.png
--------------------------------------------------------------------------------
/assets~/image-20230821211652918.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20230821211652918.png
--------------------------------------------------------------------------------
/assets~/image-20231007163044176.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20231007163044176.png
--------------------------------------------------------------------------------
/assets~/image-20231023010137495.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20231023010137495.png
--------------------------------------------------------------------------------
/assets~/image-20231023010153213.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20231023010153213.png
--------------------------------------------------------------------------------
/assets~/image-20231023010204399.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20231023010204399.png
--------------------------------------------------------------------------------
/assets~/image-20240416142736663.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20240416142736663.png
--------------------------------------------------------------------------------
/assets~/image-20240716183800118.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20240716183800118.png
--------------------------------------------------------------------------------
/assets~/image-20240717104144821.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20240717104144821.png
--------------------------------------------------------------------------------
/assets~/image-20240717104206365.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20240717104206365.png
--------------------------------------------------------------------------------
/assets~/image-20241126105823397.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20241126105823397.png
--------------------------------------------------------------------------------
/assets~/image-20241126110012922.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20241126110012922.png
--------------------------------------------------------------------------------
/assets~/image-20241126112320151.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20241126112320151.png
--------------------------------------------------------------------------------
/assets~/image-20241127180711449.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20241127180711449.png
--------------------------------------------------------------------------------
/assets~/image-20250314160119094.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JasonMa0012/LWGUI/1559871878988334317a5157347659e254c4199a/assets~/image-20250314160119094.png
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "com.jasonma.lwgui",
3 | "version": "1.25.0",
4 | "displayName": "LWGUI",
5 | "description": "A Lightweight, Flexible, Powerful Shader GUI System for Unity.",
6 | "keywords": [
7 | "shader",
8 | "gui"
9 | ],
10 | "author": {
11 | "name": "Jason Ma",
12 | "email": "jasonma0012@foxmail.com",
13 | "url": "https://github.com/JasonMa0012/LWGUI"
14 | },
15 | "unity": "2021.3",
16 | "changelogUrl": "https://github.com/JasonMa0012/LWGUI/releases",
17 | "documentationUrl": "https://github.com/JasonMa0012/LWGUI",
18 | "licensesUrl": "https://github.com/JasonMa0012/LWGUI/blob/main/LICENSE"
19 | }
--------------------------------------------------------------------------------
/package.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9ba4090a7dd2ff746b1f5e1664d35f82
3 | PackageManifestImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------