Compare commits
100 Commits
temp
...
feature/ui
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
450376c7e0 | ||
|
|
33f07529d3 | ||
|
|
2914667223 | ||
|
|
8ca8bd0df9 | ||
|
|
b9b394935e | ||
|
|
106e7f51be | ||
|
|
9d02afd8e8 | ||
|
|
b64c3e10bc | ||
|
|
ad10e24d13 | ||
|
|
739a62eb9b | ||
|
|
0333b83b57 | ||
|
|
200a7faa6b | ||
|
|
b19fb56c8c | ||
|
|
15886dc1f9 | ||
|
|
85f270fd83 | ||
|
|
93e1423525 | ||
|
|
df6d3e3b5a | ||
|
|
97bbb789ed | ||
|
|
a38efd756e | ||
|
|
a7fc12f32f | ||
|
|
18af2fc9c6 | ||
|
|
c1f5d2c208 | ||
|
|
acd430c5d7 | ||
|
|
c9af0d2d6f | ||
|
|
8181eae4c6 | ||
|
|
297ca29082 | ||
|
|
f2d0f3d423 | ||
|
|
097436a8b0 | ||
|
|
99f9c3b26d | ||
|
|
59d473c87b | ||
|
|
e00953de52 | ||
|
|
fd8f8c6de0 | ||
|
|
ee86f93814 | ||
|
|
c8ff7b503d | ||
|
|
538c8a081e | ||
|
|
24e7f038fe | ||
|
|
eee00cfad6 | ||
|
|
ecbc7e8e4a | ||
|
|
ec2a367245 | ||
|
|
e1f2ac5b02 | ||
|
|
6ae48ff30e | ||
|
|
71831dd4c3 | ||
|
|
ef4e86820c | ||
|
|
b7776f3af0 | ||
|
|
430fb27a10 | ||
|
|
91ca3c0468 | ||
|
|
a9423b7479 | ||
|
|
b5b815170f | ||
|
|
a75d48265a | ||
|
|
bc8e781c90 | ||
|
|
54d8157203 | ||
|
|
192d6963c0 | ||
|
|
49f791746d | ||
|
|
792aa057d3 | ||
|
|
e47ecbdbba | ||
|
|
94dd7782ae | ||
| f4f7a4fcbf | |||
|
|
ac071813f4 | ||
|
|
ddec52df13 | ||
|
|
158a42ab9b | ||
|
|
deeaa9a7ad | ||
| 1144a86c7c | |||
|
|
beca5f0da5 | ||
| b6df64eb9d | |||
|
|
cfd7573ffe | ||
|
|
b5fdf7faeb | ||
| 9cd354b6cb | |||
|
|
0df2f0d8da | ||
| 64478a44ef | |||
|
|
ab86affa32 | ||
|
|
69ae8b22fd | ||
|
|
0e51ffc87f | ||
| a1572f4a39 | |||
|
|
e4d28ccf42 | ||
|
|
b441c46d5d | ||
|
|
a35e806187 | ||
|
|
cf31cc0159 | ||
|
|
bfee6d8745 | ||
| 9568d2e280 | |||
|
|
1e51658e8d | ||
| 4eb0e78c9e | |||
|
|
5704b2d109 | ||
| 8836fd8375 | |||
|
|
bc4056b474 | ||
|
|
d387b97d77 | ||
|
|
e24f221853 | ||
|
|
a813aad171 | ||
|
|
fa774babea | ||
|
|
f58b456ccb | ||
| b72ab54467 | |||
|
|
33ca18aa05 | ||
|
|
235b4bc28a | ||
|
|
934fff54a7 | ||
|
|
c98c1d9d9a | ||
|
|
6920659ed9 | ||
|
|
8850f51193 | ||
|
|
0443abbfab | ||
|
|
ad99a87692 | ||
| 5479fb37e3 | |||
|
|
caf3737111 |
45
.claude/settings.local.json
Normal file
45
.claude/settings.local.json
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(dir:*)",
|
||||
"Bash(powershell -Command:*)",
|
||||
"Bash(mkdir:*)",
|
||||
"Bash(cat:*)",
|
||||
"Bash(move:*)",
|
||||
"Bash(find:*)",
|
||||
"Bash(claude mcp add:*)",
|
||||
"Bash(claude mcp list:*)",
|
||||
"Bash(del \"d:\\\\works\\\\2025\\\\02.Studio\\\\dev\\\\base\\\\XRBase\\\\Assets\\\\Scripts\\\\UVC\\\\UIToolkit\\\\Input\\\\NumberStepper.cs\")",
|
||||
"Bash(del \"d:\\\\works\\\\2025\\\\02.Studio\\\\dev\\\\base\\\\XRBase\\\\Assets\\\\Scripts\\\\UVC\\\\UIToolkit\\\\Modal\\\\UTKColorPickerHSV.cs\")",
|
||||
"mcp__UnityMCP__read_console",
|
||||
"Bash(git mv:*)",
|
||||
"Bash(del \"d:\\\\works\\\\2025\\\\02.Studio\\\\dev\\\\base\\\\XRBase\\\\Assets\\\\Resources\\\\UIToolkit\\\\Tab\\\\UTKTab.uss\")",
|
||||
"Bash(cmd //c \"del /f \"\"d:\\\\works\\\\2025\\\\02.Studio\\\\dev\\\\base\\\\XRBase\\\\Assets\\\\Resources\\\\UIToolkit\\\\Tab\\\\UTKTab.uss\"\"\")",
|
||||
"mcp__UnityMCP__execute_menu_item",
|
||||
"mcp__UnityMCP__manage_editor",
|
||||
"Bash(timeout:*)",
|
||||
"mcp__UnityMCP__manage_asset",
|
||||
"mcp__UnityMCP__manage_scene",
|
||||
"Bash(git checkout:*)",
|
||||
"Bash(git -C \"d:/works/2025/02.Studio/dev/base/XRBase\" checkout HEAD -- \"Assets/Resources/UIToolkit/List/UTKMultiColumnTreeView.uss\" \"Assets/Resources/UIToolkit/List/UTKMultiColumnListView.uss\" \"Assets/Resources/UIToolkit/Style/UTKDefaultStyle.uss\" \"Assets/Resources/UIToolkit/Tab/UTKTabView.uss\" \"Assets/Resources/UIToolkit/List/UTKListView.uss\" \"Assets/Resources/UIToolkit/Style/UTKComponents.uss\")",
|
||||
"Bash(cmd /c \"cd /d d:\\\\works\\\\2025\\\\02.Studio\\\\dev\\\\base\\\\XRBase && git log --oneline -10 -- Assets/Resources/UIToolkit/Style/UTKDefaultStyle.uss\")",
|
||||
"Bash(New-Item -ItemType Directory -Path \"d:\\\\works\\\\2025\\\\02.Studio\\\\dev\\\\base\\\\XRBase\\\\Assets\\\\Resources\\\\UIToolkit\\\\Sample\\\\Window\" -Force)",
|
||||
"Bash(cmd /c \"echo ^<?xml version=\"\"1.0\"\" encoding=\"\"utf-8\"\"?^>^<ui:UXML xmlns:ui=\"\"UnityEngine.UIElements\"\" xmlns:utk=\"\"UVC.UIToolkit\"\"^>^<utk:UTKLabel name=\"\"label\"\" text=\"\"Label\"\" class=\"\"utk-property-item-view__label\"\" /^>^<ui:VisualElement name=\"\"value-container\"\" class=\"\"utk-property-item-view__value\"\"^>^</ui:VisualElement^>^</ui:UXML^>\")",
|
||||
"Bash(del \"d:\\\\works\\\\2025\\\\02.Studio\\\\dev\\\\base\\\\XRBase\\\\Assets\\\\Resources\\\\UIToolkit\\\\Property\\\\Views\\\\UTKBoolPropertyItemView.uxml\")",
|
||||
"Bash(del:*)",
|
||||
"Bash(cmd /c \"del /q \"\"d:\\\\works\\\\2025\\\\02.Studio\\\\dev\\\\base\\\\XRBase\\\\Assets\\\\Resources\\\\UIToolkit\\\\Property\\\\Views\\\\UTKIntPropertyItemViewSliderUss.uss\"\" \"\"d:\\\\works\\\\2025\\\\02.Studio\\\\dev\\\\base\\\\XRBase\\\\Assets\\\\Resources\\\\UIToolkit\\\\Property\\\\Views\\\\UTKFloatPropertyItemViewSliderUss.uss\"\"\")",
|
||||
"mcp__UnityMCP__refresh_unity",
|
||||
"Bash(powershell \"Get-Process Unity -ErrorAction SilentlyContinue | Select-Object -First 1 | Format-List\")",
|
||||
"Bash(cmd /c \"mkdir \"\"d:\\\\works\\\\2025\\\\02.Studio\\\\dev\\\\base\\\\XRBase\\\\Assets\\\\Scripts\\\\UVC\\\\UIToolkit\\\\ToolBar\\\\Data\"\" && mkdir \"\"d:\\\\works\\\\2025\\\\02.Studio\\\\dev\\\\base\\\\XRBase\\\\Assets\\\\Scripts\\\\UVC\\\\UIToolkit\\\\ToolBar\\\\Items\"\" && mkdir \"\"d:\\\\works\\\\2025\\\\02.Studio\\\\dev\\\\base\\\\XRBase\\\\Assets\\\\Resources\\\\UIToolkit\\\\ToolBar\"\"\")",
|
||||
"Bash(/bin/ls:*)",
|
||||
"Bash(/bin/mkdir -p:*)",
|
||||
"Bash(/bin/rm:*)",
|
||||
"WebFetch(domain:docs.unity3d.com)",
|
||||
"Bash(ls:*)",
|
||||
"WebFetch(domain:discussions.unity.com)",
|
||||
"mcp__ai-game-developer__screenshot-game-view"
|
||||
],
|
||||
"deny": [],
|
||||
"ask": []
|
||||
}
|
||||
}
|
||||
2
.github/copilot-instructions.md
vendored
Normal file
2
.github/copilot-instructions.md
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
프로젝트 루트 폴더의 CLAUDE.md를 참조해
|
||||
답변은 항상 한국어로 작성해
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -83,3 +83,8 @@ crashlytics-build.properties
|
||||
/[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Flow/UnitOptions.db.meta
|
||||
/[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Core/Property Providers
|
||||
/[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Core/Property Providers.meta
|
||||
|
||||
|
||||
.DS_Store
|
||||
.idea/
|
||||
.vscode/
|
||||
8
.mcp.json
Normal file
8
.mcp.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"mcpServers": {
|
||||
"ai-game-developer": {
|
||||
"type": "http",
|
||||
"url": "http://localhost:55726"
|
||||
}
|
||||
}
|
||||
}
|
||||
5
.vscode/extensions.json
vendored
Normal file
5
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"visualstudiotoolsforunity.vstuc"
|
||||
]
|
||||
}
|
||||
10
.vscode/launch.json
vendored
Normal file
10
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Attach to Unity",
|
||||
"type": "vstuc",
|
||||
"request": "attach"
|
||||
}
|
||||
]
|
||||
}
|
||||
70
.vscode/settings.json
vendored
Normal file
70
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"files.exclude": {
|
||||
"**/.DS_Store": true,
|
||||
"**/.git": true,
|
||||
"**/.vs": true,
|
||||
"**/.gitmodules": true,
|
||||
"**/.vsconfig": true,
|
||||
"**/*.booproj": true,
|
||||
"**/*.pidb": true,
|
||||
"**/*.suo": true,
|
||||
"**/*.user": true,
|
||||
"**/*.userprefs": true,
|
||||
"**/*.unityproj": true,
|
||||
"**/*.dll": true,
|
||||
"**/*.exe": true,
|
||||
"**/*.pdf": true,
|
||||
"**/*.mid": true,
|
||||
"**/*.midi": true,
|
||||
"**/*.wav": true,
|
||||
"**/*.gif": true,
|
||||
"**/*.ico": true,
|
||||
"**/*.jpg": true,
|
||||
"**/*.jpeg": true,
|
||||
"**/*.png": true,
|
||||
"**/*.psd": true,
|
||||
"**/*.tga": true,
|
||||
"**/*.tif": true,
|
||||
"**/*.tiff": true,
|
||||
"**/*.3ds": true,
|
||||
"**/*.3DS": true,
|
||||
"**/*.fbx": true,
|
||||
"**/*.FBX": true,
|
||||
"**/*.lxo": true,
|
||||
"**/*.LXO": true,
|
||||
"**/*.ma": true,
|
||||
"**/*.MA": true,
|
||||
"**/*.obj": true,
|
||||
"**/*.OBJ": true,
|
||||
"**/*.asset": true,
|
||||
"**/*.cubemap": true,
|
||||
"**/*.flare": true,
|
||||
"**/*.mat": true,
|
||||
"**/*.meta": true,
|
||||
"**/*.prefab": true,
|
||||
"**/*.unity": true,
|
||||
"build/": true,
|
||||
"Build/": true,
|
||||
"Library/": true,
|
||||
"library/": true,
|
||||
"obj/": true,
|
||||
"Obj/": true,
|
||||
"Logs/": true,
|
||||
"logs/": true,
|
||||
"ProjectSettings/": true,
|
||||
"UserSettings/": true,
|
||||
"temp/": true,
|
||||
"Temp/": true
|
||||
},
|
||||
"files.associations": {
|
||||
"*.asset": "yaml",
|
||||
"*.meta": "yaml",
|
||||
"*.prefab": "yaml",
|
||||
"*.unity": "yaml"
|
||||
},
|
||||
"explorer.fileNesting.enabled": true,
|
||||
"explorer.fileNesting.patterns": {
|
||||
"*.sln": "*.csproj"
|
||||
},
|
||||
"dotnet.defaultSolution": "XRBase.slnx"
|
||||
}
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material.003
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &137179864653271884
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-123007150925846499
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material.007
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.51255345, g: 0.30787393, b: 0.23057085, a: 1}
|
||||
- _Color: {r: 0.51255345, g: 0.3078739, b: 0.23057082, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material.008
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.79396564, g: 0.79396564, b: 0.79396564, a: 1}
|
||||
- _Color: {r: 0.79396564, g: 0.79396564, b: 0.79396564, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &7274889956222277372
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-5629488995029396335
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material.009
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _Color: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.93466425, g: 0.8552466, b: 0.6423504, a: 1}
|
||||
- _Color: {r: 0.93466425, g: 0.8552466, b: 0.6423503, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &556528785057012823
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material.005
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &5993905687202951464
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material.007
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.51255345, g: 0.30787393, b: 0.23057085, a: 1}
|
||||
- _Color: {r: 0.51255345, g: 0.3078739, b: 0.23057082, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &7985014593891059092
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material.009
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _Color: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &2888761960158570879
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-1410359613973379343
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.4943396, g: 0.4562747, b: 0.35349944, a: 1}
|
||||
- _Color: {r: 0.49433953, g: 0.4562747, b: 0.35349938, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material.005
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &1231887616125078134
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material.008
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.79396564, g: 0.79396564, b: 0.79396564, a: 1}
|
||||
- _Color: {r: 0.79396564, g: 0.79396564, b: 0.79396564, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &826838563659358727
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-6567634125146546150
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material.009
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _Color: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-3732203623753242269
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.93466425, g: 0.8552466, b: 0.6423504, a: 1}
|
||||
- _Color: {r: 0.93466425, g: 0.8552466, b: 0.6423503, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-3854600230159970195
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material.005
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material.007
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.51255345, g: 0.30787393, b: 0.23057085, a: 1}
|
||||
- _Color: {r: 0.51255345, g: 0.3078739, b: 0.23057082, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &4426285601235986702
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-7507159536094433758
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material.009
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _Color: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material.013
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.45223075, g: 0.43450743, b: 0.41868415, a: 1}
|
||||
- _Color: {r: 0.45223075, g: 0.4345074, b: 0.41868412, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &2007680169531091146
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-950187688533103541
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.93466425, g: 0.8552466, b: 0.6423504, a: 1}
|
||||
- _Color: {r: 0.93466425, g: 0.8552466, b: 0.6423503, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-1126660992807510918
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material.003
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material.008
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.79396564, g: 0.79396564, b: 0.79396564, a: 1}
|
||||
- _Color: {r: 0.79396564, g: 0.79396564, b: 0.79396564, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &3477159752135902743
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-7441279213774965091
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material.009
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _Color: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-8503088254097281887
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material.013
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.45223075, g: 0.43450743, b: 0.41868415, a: 1}
|
||||
- _Color: {r: 0.45223075, g: 0.4345074, b: 0.41868412, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -1,138 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Material
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.7735849, g: 0.7029721, b: 0.51231754, a: 1}
|
||||
- _Color: {r: 0.7735849, g: 0.7029721, b: 0.51231754, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &5980555245048365350
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
8
Assets/Editor.meta
Normal file
8
Assets/Editor.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 025311df5d1d7e54aa8d7ccaf9367bf3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
148
Assets/Editor/FixMCPEditorPrefs.cs
Normal file
148
Assets/Editor/FixMCPEditorPrefs.cs
Normal file
@@ -0,0 +1,148 @@
|
||||
#nullable enable
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// MCP for Unity EditorPrefs 설정 확인 및 수정 도구
|
||||
/// </summary>
|
||||
public static class FixMCPEditorPrefs
|
||||
{
|
||||
private const string GitUrlOverrideKey = "MCPForUnity.GitUrlOverride";
|
||||
|
||||
[MenuItem("Tools/MCP/Fix EditorPrefs Issue")]
|
||||
public static void FixEditorPrefs()
|
||||
{
|
||||
Debug.Log("=== MCP EditorPrefs 확인 시작 ===");
|
||||
|
||||
// 현재 저장된 값 확인
|
||||
string currentValue = EditorPrefs.GetString(GitUrlOverrideKey, "");
|
||||
|
||||
Debug.Log($"현재 GitUrlOverride 값: '{currentValue}'");
|
||||
Debug.Log($"값 길이: {currentValue.Length}");
|
||||
|
||||
if (!string.IsNullOrEmpty(currentValue))
|
||||
{
|
||||
// 잘못된 문자가 있는지 확인
|
||||
char[] invalidChars = System.IO.Path.GetInvalidPathChars();
|
||||
bool hasInvalidChars = currentValue.IndexOfAny(invalidChars) >= 0;
|
||||
|
||||
if (hasInvalidChars)
|
||||
{
|
||||
Debug.LogWarning($"⚠️ 잘못된 경로 문자가 감지되었습니다!");
|
||||
Debug.LogWarning($"문제가 있는 값: '{currentValue}'");
|
||||
|
||||
// 잘못된 값 제거
|
||||
EditorPrefs.DeleteKey(GitUrlOverrideKey);
|
||||
Debug.Log("✅ 잘못된 EditorPrefs 값을 제거했습니다.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("경로 문자 검증: 정상");
|
||||
|
||||
// Path.IsPathRooted() 테스트
|
||||
try
|
||||
{
|
||||
bool isRooted = System.IO.Path.IsPathRooted(currentValue);
|
||||
Debug.Log($"IsPathRooted 테스트: {isRooted} (정상)");
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
Debug.LogError($"❌ IsPathRooted 호출 실패: {ex.Message}");
|
||||
Debug.LogWarning("잘못된 값을 제거합니다...");
|
||||
EditorPrefs.DeleteKey(GitUrlOverrideKey);
|
||||
Debug.Log("✅ 잘못된 EditorPrefs 값을 제거했습니다.");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("GitUrlOverride 값이 비어있습니다. (정상)");
|
||||
}
|
||||
|
||||
Debug.Log("=== MCP EditorPrefs 확인 완료 ===");
|
||||
Debug.Log("Unity 에디터를 재시작하거나 MCP 윈도우를 다시 열어주세요.");
|
||||
}
|
||||
|
||||
[MenuItem("Tools/MCP/Show All MCP EditorPrefs")]
|
||||
public static void ShowAllMCPPrefs()
|
||||
{
|
||||
Debug.Log("=== 모든 MCP EditorPrefs 값 ===");
|
||||
|
||||
string[] keys = new[]
|
||||
{
|
||||
"MCPForUnity.GitUrlOverride",
|
||||
"MCPForUnity.UseHttpTransport",
|
||||
"MCPForUnity.HttpTransportScope",
|
||||
"MCPForUnity.UvxPath",
|
||||
"MCPForUnity.ClaudeCliPath",
|
||||
"MCPForUnity.HttpUrl",
|
||||
"MCPForUnity.HttpRemoteUrl",
|
||||
};
|
||||
|
||||
foreach (string key in keys)
|
||||
{
|
||||
if (EditorPrefs.HasKey(key))
|
||||
{
|
||||
string value = EditorPrefs.GetString(key, "");
|
||||
Debug.Log($"{key}: '{value}'");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log($"{key}: (설정되지 않음)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MenuItem("Tools/MCP/Clear All MCP EditorPrefs")]
|
||||
public static void ClearAllMCPPrefs()
|
||||
{
|
||||
bool confirm = EditorUtility.DisplayDialog(
|
||||
"MCP EditorPrefs 초기화",
|
||||
"모든 MCP for Unity 설정을 초기화하시겠습니까?\n이 작업은 되돌릴 수 없습니다.",
|
||||
"초기화",
|
||||
"취소"
|
||||
);
|
||||
|
||||
if (!confirm)
|
||||
{
|
||||
Debug.Log("취소되었습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Log("=== MCP EditorPrefs 초기화 시작 ===");
|
||||
|
||||
string[] keys = new[]
|
||||
{
|
||||
"MCPForUnity.GitUrlOverride",
|
||||
"MCPForUnity.UseHttpTransport",
|
||||
"MCPForUnity.HttpTransportScope",
|
||||
"MCPForUnity.LastLocalHttpServerPid",
|
||||
"MCPForUnity.LastLocalHttpServerPort",
|
||||
"MCPForUnity.LastLocalHttpServerStartedUtc",
|
||||
"MCPForUnity.LastLocalHttpServerPidArgsHash",
|
||||
"MCPForUnity.LastLocalHttpServerPidFilePath",
|
||||
"MCPForUnity.LastLocalHttpServerInstanceToken",
|
||||
"MCPForUnity.UvxPath",
|
||||
"MCPForUnity.ClaudeCliPath",
|
||||
"MCPForUnity.HttpUrl",
|
||||
"MCPForUnity.HttpRemoteUrl",
|
||||
"MCPForUnity.DebugLogs",
|
||||
"MCPForUnity.ValidationLevel",
|
||||
"MCPForUnity.UnitySocketPort",
|
||||
"MCPForUnity.ResumeHttpAfterReload",
|
||||
"MCPForUnity.ResumeStdioAfterReload",
|
||||
};
|
||||
|
||||
foreach (string key in keys)
|
||||
{
|
||||
if (EditorPrefs.HasKey(key))
|
||||
{
|
||||
EditorPrefs.DeleteKey(key);
|
||||
Debug.Log($"✅ 삭제: {key}");
|
||||
}
|
||||
}
|
||||
|
||||
Debug.Log("=== MCP EditorPrefs 초기화 완료 ===");
|
||||
Debug.Log("Unity 에디터를 재시작해주세요.");
|
||||
}
|
||||
}
|
||||
2
Assets/Editor/FixMCPEditorPrefs.cs.meta
Normal file
2
Assets/Editor/FixMCPEditorPrefs.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 955b75403593bb74fbf0ba110a3e1b83
|
||||
8
Assets/Editor/UIToolkit.meta
Normal file
8
Assets/Editor/UIToolkit.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d07e558de63aead44a5de53bc3a61d4d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
775
Assets/Editor/UIToolkit/UTKImageIconsGenerator.cs
Normal file
775
Assets/Editor/UIToolkit/UTKImageIconsGenerator.cs
Normal file
@@ -0,0 +1,775 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UVC.UIToolkit.Editor
|
||||
{
|
||||
/// <summary>
|
||||
/// 이미지 아이콘 폴더를 스캔하여 아이콘 경로 상수 클래스를 자동 생성하는 에디터 도구입니다.
|
||||
/// </summary>
|
||||
public class UTKImageIconsGenerator : EditorWindow
|
||||
{
|
||||
#region EditorPrefs Keys
|
||||
|
||||
private const string PrefKeyIconsFolder = "UTK_ImageIcons_IconsFolder";
|
||||
private const string PrefKeyOutputPath = "UTK_ImageIcons_OutputPath";
|
||||
private const string PrefKeyClassName = "UTK_ImageIcons_ClassName";
|
||||
private const string PrefKeyNamespace = "UTK_ImageIcons_Namespace";
|
||||
private const string PrefKeyIncludeSubfolders = "UTK_ImageIcons_IncludeSubfolders";
|
||||
private const string PrefKeyGeneratePreview = "UTK_ImageIcons_GeneratePreview";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Default Values
|
||||
|
||||
private const string DefaultIconsFolder = "Assets/Resources/Icons";
|
||||
private const string DefaultOutputPath = "Assets/Scripts/UVC/UIToolkit/Common/UTKImageIcons.cs";
|
||||
private const string DefaultClassName = "UTKImageIcons";
|
||||
private const string DefaultNamespace = "UVC.UIToolkit";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Supported Extensions
|
||||
|
||||
private static readonly string[] SupportedExtensions = { ".png", ".jpg", ".jpeg", ".tga", ".psd", ".gif", ".bmp" };
|
||||
|
||||
#endregion
|
||||
|
||||
#region Fields
|
||||
|
||||
private string _iconsFolder = DefaultIconsFolder;
|
||||
private string _outputPath = DefaultOutputPath;
|
||||
private string _className = DefaultClassName;
|
||||
private string _namespace = DefaultNamespace;
|
||||
private bool _includeSubfolders = true;
|
||||
private bool _generatePreview = true;
|
||||
|
||||
private Vector2 _scrollPosition;
|
||||
private List<IconInfo>? _previewIcons;
|
||||
|
||||
#endregion
|
||||
|
||||
private class IconInfo
|
||||
{
|
||||
public string FilePath { get; set; } = "";
|
||||
public string FileName { get; set; } = "";
|
||||
public string FieldName { get; set; } = "";
|
||||
public string ResourcePath { get; set; } = "";
|
||||
public string RelativePath { get; set; } = "";
|
||||
public Texture2D? Preview { get; set; }
|
||||
}
|
||||
|
||||
[MenuItem("Tools/UTK/Image Icons Generator")]
|
||||
public static void ShowWindow()
|
||||
{
|
||||
var window = GetWindow<UTKImageIconsGenerator>("Image Icons Generator");
|
||||
window.minSize = new Vector2(500, 400);
|
||||
window.LoadSettings();
|
||||
}
|
||||
|
||||
[MenuItem("Tools/UTK/Generate Image Icons Class (Quick)")]
|
||||
public static void GenerateQuick()
|
||||
{
|
||||
var iconsFolder = EditorPrefs.GetString(PrefKeyIconsFolder, DefaultIconsFolder);
|
||||
var outputPath = EditorPrefs.GetString(PrefKeyOutputPath, DefaultOutputPath);
|
||||
var className = EditorPrefs.GetString(PrefKeyClassName, DefaultClassName);
|
||||
var namespaceName = EditorPrefs.GetString(PrefKeyNamespace, DefaultNamespace);
|
||||
var includeSubfolders = EditorPrefs.GetBool(PrefKeyIncludeSubfolders, true);
|
||||
|
||||
Generate(iconsFolder, outputPath, className, namespaceName, includeSubfolders);
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
LoadSettings();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
ClearPreviewTextures();
|
||||
}
|
||||
|
||||
private void LoadSettings()
|
||||
{
|
||||
_iconsFolder = EditorPrefs.GetString(PrefKeyIconsFolder, DefaultIconsFolder);
|
||||
_outputPath = EditorPrefs.GetString(PrefKeyOutputPath, DefaultOutputPath);
|
||||
_className = EditorPrefs.GetString(PrefKeyClassName, DefaultClassName);
|
||||
_namespace = EditorPrefs.GetString(PrefKeyNamespace, DefaultNamespace);
|
||||
_includeSubfolders = EditorPrefs.GetBool(PrefKeyIncludeSubfolders, true);
|
||||
_generatePreview = EditorPrefs.GetBool(PrefKeyGeneratePreview, true);
|
||||
}
|
||||
|
||||
private void SaveSettings()
|
||||
{
|
||||
EditorPrefs.SetString(PrefKeyIconsFolder, _iconsFolder);
|
||||
EditorPrefs.SetString(PrefKeyOutputPath, _outputPath);
|
||||
EditorPrefs.SetString(PrefKeyClassName, _className);
|
||||
EditorPrefs.SetString(PrefKeyNamespace, _namespace);
|
||||
EditorPrefs.SetBool(PrefKeyIncludeSubfolders, _includeSubfolders);
|
||||
EditorPrefs.SetBool(PrefKeyGeneratePreview, _generatePreview);
|
||||
}
|
||||
|
||||
private void ClearPreviewTextures()
|
||||
{
|
||||
_previewIcons = null;
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
EditorGUILayout.Space(10);
|
||||
EditorGUILayout.LabelField("Image Icons Class Generator", EditorStyles.boldLabel);
|
||||
EditorGUILayout.Space(5);
|
||||
EditorGUILayout.HelpBox("이미지 아이콘 폴더를 스캔하여 Resources.Load로 사용할 수 있는 C# 정적 클래스를 생성합니다.", UnityEditor.MessageType.Info);
|
||||
EditorGUILayout.Space(10);
|
||||
|
||||
// 아이콘 폴더 경로
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
_iconsFolder = EditorGUILayout.TextField("Icons Folder", _iconsFolder);
|
||||
if (GUILayout.Button("...", GUILayout.Width(30)))
|
||||
{
|
||||
var path = EditorUtility.OpenFolderPanel("Select Icons Folder", "Assets", "");
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
// 상대 경로로 변환
|
||||
if (path.StartsWith(Application.dataPath))
|
||||
{
|
||||
path = "Assets" + path.Substring(Application.dataPath.Length);
|
||||
}
|
||||
_iconsFolder = path;
|
||||
ClearPreviewTextures();
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// 출력 파일 경로
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
_outputPath = EditorGUILayout.TextField("Output File", _outputPath);
|
||||
if (GUILayout.Button("...", GUILayout.Width(30)))
|
||||
{
|
||||
var directory = Path.GetDirectoryName(_outputPath) ?? "Assets";
|
||||
var filename = Path.GetFileName(_outputPath);
|
||||
var path = EditorUtility.SaveFilePanel("Save Generated Class", directory, filename, "cs");
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
// 상대 경로로 변환
|
||||
if (path.StartsWith(Application.dataPath))
|
||||
{
|
||||
path = "Assets" + path.Substring(Application.dataPath.Length);
|
||||
}
|
||||
_outputPath = path;
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.Space(5);
|
||||
|
||||
// 클래스명
|
||||
_className = EditorGUILayout.TextField("Class Name", _className);
|
||||
|
||||
// 네임스페이스
|
||||
_namespace = EditorGUILayout.TextField("Namespace", _namespace);
|
||||
|
||||
EditorGUILayout.Space(5);
|
||||
|
||||
// 옵션
|
||||
_includeSubfolders = EditorGUILayout.Toggle("Include Subfolders", _includeSubfolders);
|
||||
_generatePreview = EditorGUILayout.Toggle("Show Preview", _generatePreview);
|
||||
|
||||
EditorGUILayout.Space(10);
|
||||
|
||||
// 폴더 존재 여부 및 아이콘 수 표시
|
||||
var folderExists = Directory.Exists(_iconsFolder);
|
||||
var outputExists = File.Exists(_outputPath);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("Icons Folder:", GUILayout.Width(100));
|
||||
EditorGUILayout.LabelField(folderExists ? "Found" : "Not Found",
|
||||
folderExists ? EditorStyles.label : EditorStyles.boldLabel);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
if (folderExists)
|
||||
{
|
||||
var iconCount = CountIcons(_iconsFolder, _includeSubfolders);
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("Icons Found:", GUILayout.Width(100));
|
||||
EditorGUILayout.LabelField($"{iconCount} images");
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("Output File:", GUILayout.Width(100));
|
||||
EditorGUILayout.LabelField(outputExists ? "Exists (will overwrite)" : "New file");
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.Space(10);
|
||||
|
||||
// 버튼들
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
GUI.enabled = folderExists;
|
||||
if (GUILayout.Button("Scan & Preview", GUILayout.Height(25)))
|
||||
{
|
||||
SaveSettings();
|
||||
ScanIcons();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Generate", GUILayout.Height(25)))
|
||||
{
|
||||
SaveSettings();
|
||||
Generate(_iconsFolder, _outputPath, _className, _namespace, _includeSubfolders);
|
||||
}
|
||||
GUI.enabled = true;
|
||||
|
||||
if (GUILayout.Button("Reset", GUILayout.Height(25)))
|
||||
{
|
||||
_iconsFolder = DefaultIconsFolder;
|
||||
_outputPath = DefaultOutputPath;
|
||||
_className = DefaultClassName;
|
||||
_namespace = DefaultNamespace;
|
||||
_includeSubfolders = true;
|
||||
_generatePreview = true;
|
||||
SaveSettings();
|
||||
ClearPreviewTextures();
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// 미리보기 영역
|
||||
if (_generatePreview && _previewIcons != null && _previewIcons.Count > 0)
|
||||
{
|
||||
EditorGUILayout.Space(10);
|
||||
EditorGUILayout.LabelField($"Preview ({_previewIcons.Count} icons)", EditorStyles.boldLabel);
|
||||
|
||||
_scrollPosition = EditorGUILayout.BeginScrollView(_scrollPosition, GUILayout.ExpandHeight(true));
|
||||
|
||||
var iconSize = 48;
|
||||
var padding = 4;
|
||||
var labelHeight = 16;
|
||||
var itemWidth = iconSize + padding * 2;
|
||||
var itemHeight = iconSize + labelHeight + padding * 2;
|
||||
|
||||
var windowWidth = position.width - 20;
|
||||
var columns = Mathf.Max(1, (int)(windowWidth / itemWidth));
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
var currentColumn = 0;
|
||||
|
||||
foreach (var icon in _previewIcons)
|
||||
{
|
||||
if (currentColumn >= columns)
|
||||
{
|
||||
EditorGUILayout.EndHorizontal();
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
currentColumn = 0;
|
||||
}
|
||||
|
||||
EditorGUILayout.BeginVertical(GUILayout.Width(itemWidth), GUILayout.Height(itemHeight));
|
||||
|
||||
// 아이콘 이미지
|
||||
var rect = GUILayoutUtility.GetRect(iconSize, iconSize);
|
||||
if (icon.Preview != null)
|
||||
{
|
||||
GUI.DrawTexture(rect, icon.Preview, ScaleMode.ScaleToFit);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUI.DrawRect(rect, new Color(0.2f, 0.2f, 0.2f));
|
||||
}
|
||||
|
||||
// 필드명
|
||||
var style = new GUIStyle(EditorStyles.miniLabel)
|
||||
{
|
||||
alignment = TextAnchor.MiddleCenter,
|
||||
clipping = TextClipping.Clip
|
||||
};
|
||||
EditorGUILayout.LabelField(icon.FieldName, style, GUILayout.Width(itemWidth), GUILayout.Height(labelHeight));
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
currentColumn++;
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
}
|
||||
|
||||
private void ScanIcons()
|
||||
{
|
||||
ClearPreviewTextures();
|
||||
_previewIcons = GetIconInfos(_iconsFolder, _includeSubfolders);
|
||||
|
||||
// 프리뷰 텍스처 로드
|
||||
foreach (var icon in _previewIcons)
|
||||
{
|
||||
icon.Preview = AssetDatabase.LoadAssetAtPath<Texture2D>(icon.FilePath);
|
||||
}
|
||||
}
|
||||
|
||||
private static int CountIcons(string folder, bool includeSubfolders)
|
||||
{
|
||||
var searchOption = includeSubfolders ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly;
|
||||
var count = 0;
|
||||
|
||||
foreach (var ext in SupportedExtensions)
|
||||
{
|
||||
count += Directory.GetFiles(folder, $"*{ext}", searchOption).Length;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
private static List<IconInfo> GetIconInfos(string folder, bool includeSubfolders)
|
||||
{
|
||||
var result = new List<IconInfo>();
|
||||
var searchOption = includeSubfolders ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly;
|
||||
var usedNames = new HashSet<string>();
|
||||
|
||||
// Resources 폴더 기준 경로 계산
|
||||
var resourcesIndex = folder.IndexOf("Resources/", StringComparison.OrdinalIgnoreCase);
|
||||
var isInResources = resourcesIndex >= 0;
|
||||
var resourcesBasePath = isInResources ? folder.Substring(resourcesIndex + "Resources/".Length) : "";
|
||||
|
||||
foreach (var ext in SupportedExtensions)
|
||||
{
|
||||
var files = Directory.GetFiles(folder, $"*{ext}", searchOption);
|
||||
foreach (var file in files)
|
||||
{
|
||||
var normalizedPath = file.Replace("\\", "/");
|
||||
var fileName = Path.GetFileNameWithoutExtension(normalizedPath);
|
||||
var relativePath = normalizedPath.Substring(folder.Length).TrimStart('/');
|
||||
var relativeDir = Path.GetDirectoryName(relativePath)?.Replace("\\", "/") ?? "";
|
||||
|
||||
// Resources.Load용 경로 (확장자 제외)
|
||||
string resourcePath;
|
||||
if (isInResources)
|
||||
{
|
||||
var fullRelative = string.IsNullOrEmpty(resourcesBasePath)
|
||||
? relativePath
|
||||
: $"{resourcesBasePath}/{relativePath}";
|
||||
resourcePath = Path.ChangeExtension(fullRelative, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
resourcePath = normalizedPath; // Resources 외부면 전체 경로 사용
|
||||
}
|
||||
|
||||
var fieldName = ConvertToFieldName(fileName, relativeDir, usedNames);
|
||||
|
||||
result.Add(new IconInfo
|
||||
{
|
||||
FilePath = normalizedPath,
|
||||
FileName = fileName,
|
||||
FieldName = fieldName,
|
||||
ResourcePath = resourcePath,
|
||||
RelativePath = relativePath
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return result.OrderBy(i => i.FieldName).ToList();
|
||||
}
|
||||
|
||||
public static void Generate(string iconsFolder, string outputPath, string className, string namespaceName, bool includeSubfolders)
|
||||
{
|
||||
if (!Directory.Exists(iconsFolder))
|
||||
{
|
||||
Debug.LogError($"아이콘 폴더를 찾을 수 없습니다: {iconsFolder}");
|
||||
return;
|
||||
}
|
||||
|
||||
var icons = GetIconInfos(iconsFolder, includeSubfolders);
|
||||
if (icons.Count == 0)
|
||||
{
|
||||
Debug.LogError("아이콘을 찾을 수 없습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
var code = GenerateCode(icons, className, namespaceName, iconsFolder);
|
||||
|
||||
// 디렉토리 생성
|
||||
var directory = Path.GetDirectoryName(outputPath);
|
||||
if (!string.IsNullOrEmpty(directory) && !Directory.Exists(directory))
|
||||
{
|
||||
Directory.CreateDirectory(directory);
|
||||
}
|
||||
|
||||
File.WriteAllText(outputPath, code, Encoding.UTF8);
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
Debug.Log($"{className}.cs 생성 완료: {icons.Count}개 아이콘 ({outputPath})");
|
||||
}
|
||||
|
||||
private static string GenerateCode(List<IconInfo> icons, string className, string namespaceName, string sourceFolder)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
|
||||
// Resources 폴더 여부 확인
|
||||
var isInResources = sourceFolder.Contains("Resources");
|
||||
|
||||
sb.AppendLine("// <auto-generated>");
|
||||
sb.AppendLine("// 이 파일은 UTKImageIconsGenerator에 의해 자동 생성되었습니다.");
|
||||
sb.AppendLine("// 직접 수정하지 마세요. Tools > UTK > Image Icons Generator 메뉴로 재생성하세요.");
|
||||
sb.AppendLine($"// Source: {sourceFolder}");
|
||||
sb.AppendLine("// </auto-generated>");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine("#nullable enable");
|
||||
sb.AppendLine("using System.Collections.Generic;");
|
||||
sb.AppendLine("using System.Threading;");
|
||||
sb.AppendLine("using Cysharp.Threading.Tasks;");
|
||||
sb.AppendLine("using UnityEngine;");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine($"namespace {namespaceName}");
|
||||
sb.AppendLine("{");
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 이미지 아이콘 리소스 경로 상수 클래스입니다.");
|
||||
sb.AppendLine($" /// 총 {icons.Count}개의 아이콘을 포함합니다.");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" /// <example>");
|
||||
sb.AppendLine(" /// <code>");
|
||||
sb.AppendLine($" /// // 상수로 리소스 경로 사용");
|
||||
sb.AppendLine($" /// string path = {className}.Home;");
|
||||
sb.AppendLine(" /// ");
|
||||
sb.AppendLine($" /// // 동기 Sprite 로드 (캐싱됨)");
|
||||
sb.AppendLine($" /// Sprite sprite = {className}.LoadSprite({className}.Home);");
|
||||
sb.AppendLine(" /// ");
|
||||
sb.AppendLine($" /// // 비동기 Sprite 로드 (UniTask, 캐싱됨)");
|
||||
sb.AppendLine($" /// Sprite? sprite = await {className}.LoadSpriteAsync({className}.Home, cancellationToken);");
|
||||
sb.AppendLine(" /// ");
|
||||
sb.AppendLine($" /// // 동기 Texture2D 로드 (캐싱됨)");
|
||||
sb.AppendLine($" /// Texture2D texture = {className}.LoadTexture({className}.Settings);");
|
||||
sb.AppendLine(" /// ");
|
||||
sb.AppendLine($" /// // 비동기 Texture2D 로드 (UniTask, 캐싱됨)");
|
||||
sb.AppendLine($" /// Texture2D? texture = await {className}.LoadTextureAsync({className}.Settings, cancellationToken);");
|
||||
sb.AppendLine(" /// ");
|
||||
sb.AppendLine($" /// // 이름으로 Sprite 로드");
|
||||
sb.AppendLine($" /// Sprite icon = {className}.LoadSpriteByName(\"home\");");
|
||||
sb.AppendLine(" /// ");
|
||||
sb.AppendLine($" /// // 이름으로 비동기 Sprite 로드");
|
||||
sb.AppendLine($" /// Sprite? icon = await {className}.LoadSpriteByNameAsync(\"home\", cancellationToken);");
|
||||
sb.AppendLine(" /// ");
|
||||
sb.AppendLine($" /// // 이름으로 경로 조회");
|
||||
sb.AppendLine($" /// string iconPath = {className}.GetPath(\"settings\");");
|
||||
sb.AppendLine(" /// ");
|
||||
sb.AppendLine($" /// // 아이콘 존재 여부 확인");
|
||||
sb.AppendLine($" /// if ({className}.HasIcon(\"search\")) {{ }}");
|
||||
sb.AppendLine(" /// ");
|
||||
sb.AppendLine($" /// // 전체 아이콘 이름 순회");
|
||||
sb.AppendLine($" /// foreach (var name in {className}.GetAllIconNames()) {{ }}");
|
||||
sb.AppendLine(" /// ");
|
||||
sb.AppendLine($" /// // 캐시 클리어");
|
||||
sb.AppendLine($" /// {className}.ClearCache();");
|
||||
sb.AppendLine(" /// </code>");
|
||||
sb.AppendLine(" /// </example>");
|
||||
sb.AppendLine(" /// <remarks>");
|
||||
sb.AppendLine(" /// <para><b>UXML에서 사용하기:</b></para>");
|
||||
sb.AppendLine(" /// <para>UXML에서 이미지 아이콘을 사용하려면 USS에서 background-image를 설정합니다.</para>");
|
||||
sb.AppendLine(" /// <code>");
|
||||
sb.AppendLine(" /// /* USS 파일 */");
|
||||
sb.AppendLine(" /// .my-icon {");
|
||||
sb.AppendLine(" /// width: 24px;");
|
||||
sb.AppendLine(" /// height: 24px;");
|
||||
sb.AppendLine(" /// background-image: resource('UIToolkit/Images/icon_setting_22');");
|
||||
sb.AppendLine(" /// }");
|
||||
sb.AppendLine(" /// </code>");
|
||||
sb.AppendLine(" /// <code>");
|
||||
sb.AppendLine(" /// <!-- UXML 파일 -->");
|
||||
sb.AppendLine(" /// <ui:VisualElement class=\"my-icon\" />");
|
||||
sb.AppendLine(" /// </code>");
|
||||
sb.AppendLine(" /// <para><b>C# 코드에서 UXML 요소에 이미지 적용:</b></para>");
|
||||
sb.AppendLine(" /// <code>");
|
||||
sb.AppendLine($" /// var iconElement = root.Q<VisualElement>(\"my-icon\");");
|
||||
sb.AppendLine($" /// var texture = {className}.LoadTextureByName(\"icon_setting_22\");");
|
||||
sb.AppendLine(" /// iconElement.style.backgroundImage = new StyleBackground(texture);");
|
||||
sb.AppendLine(" /// </code>");
|
||||
sb.AppendLine(" /// <para><b>Image 요소에서 사용:</b></para>");
|
||||
sb.AppendLine(" /// <code>");
|
||||
sb.AppendLine($" /// var image = root.Q<Image>(\"my-image\");");
|
||||
sb.AppendLine($" /// image.sprite = {className}.LoadSpriteByName(\"btn_close_16\");");
|
||||
sb.AppendLine(" /// </code>");
|
||||
sb.AppendLine(" /// </remarks>");
|
||||
sb.AppendLine($" public static class {className}");
|
||||
sb.AppendLine(" {");
|
||||
|
||||
// 아이콘 경로 상수 생성
|
||||
foreach (var icon in icons)
|
||||
{
|
||||
sb.AppendLine($" /// <summary>{icon.RelativePath}</summary>");
|
||||
sb.AppendLine($" public const string {icon.FieldName} = \"{icon.ResourcePath}\";");
|
||||
}
|
||||
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" #region Lookup & Load");
|
||||
sb.AppendLine();
|
||||
|
||||
// 이름으로 경로 조회 딕셔너리
|
||||
sb.AppendLine(" private static readonly Dictionary<string, string> _pathsByName = new()");
|
||||
sb.AppendLine(" {");
|
||||
foreach (var icon in icons)
|
||||
{
|
||||
sb.AppendLine($" [\"{icon.FileName}\"] = \"{icon.ResourcePath}\",");
|
||||
}
|
||||
sb.AppendLine(" };");
|
||||
sb.AppendLine();
|
||||
|
||||
// 캐시 딕셔너리
|
||||
sb.AppendLine(" private static readonly Dictionary<string, Sprite?> _spriteCache = new();");
|
||||
sb.AppendLine(" private static readonly Dictionary<string, Texture2D?> _textureCache = new();");
|
||||
sb.AppendLine();
|
||||
|
||||
// 조회 메서드
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 아이콘 이름으로 리소스 경로를 조회합니다.");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" /// <param name=\"iconName\">아이콘 파일명 (확장자 제외)</param>");
|
||||
sb.AppendLine(" /// <returns>리소스 경로, 없으면 빈 문자열</returns>");
|
||||
sb.AppendLine(" public static string GetPath(string iconName)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" return _pathsByName.TryGetValue(iconName, out var path) ? path : string.Empty;");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 아이콘이 존재하는지 확인합니다.");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" public static bool HasIcon(string iconName) => _pathsByName.ContainsKey(iconName);");
|
||||
sb.AppendLine();
|
||||
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 모든 아이콘 이름 목록을 반환합니다.");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" public static IEnumerable<string> GetAllIconNames() => _pathsByName.Keys;");
|
||||
sb.AppendLine();
|
||||
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 리소스 경로로 아이콘 이름을 조회합니다.");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" /// <param name=\"resourcePath\">리소스 경로 (예: Icons/Home)</param>");
|
||||
sb.AppendLine(" /// <returns>아이콘 이름, 없으면 빈 문자열</returns>");
|
||||
sb.AppendLine(" public static string GetIconName(string resourcePath)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" foreach (var kvp in _pathsByName)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" if (kvp.Value == resourcePath) return kvp.Key;");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine(" return string.Empty;");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 전체 아이콘 수를 반환합니다.");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine($" public static int Count => {icons.Count};");
|
||||
sb.AppendLine();
|
||||
|
||||
// 동기 로드 메서드들
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 리소스 경로로 Sprite를 동기로 로드합니다. (캐싱됨)");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" /// <param name=\"resourcePath\">리소스 경로 (예: Icons/Home)</param>");
|
||||
sb.AppendLine(" public static Sprite? LoadSprite(string resourcePath)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" if (_spriteCache.TryGetValue(resourcePath, out var cached))");
|
||||
sb.AppendLine(" return cached;");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" var sprite = Resources.Load<Sprite>(resourcePath);");
|
||||
sb.AppendLine(" _spriteCache[resourcePath] = sprite;");
|
||||
sb.AppendLine(" return sprite;");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 리소스 경로로 Sprite를 비동기로 로드합니다. (캐싱됨)");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" /// <param name=\"resourcePath\">리소스 경로 (예: Icons/Home)</param>");
|
||||
sb.AppendLine(" /// <param name=\"ct\">취소 토큰</param>");
|
||||
sb.AppendLine(" public static async UniTask<Sprite?> LoadSpriteAsync(string resourcePath, CancellationToken ct = default)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" if (_spriteCache.TryGetValue(resourcePath, out var cached))");
|
||||
sb.AppendLine(" return cached;");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" var request = Resources.LoadAsync<Sprite>(resourcePath);");
|
||||
sb.AppendLine(" await request.ToUniTask(cancellationToken: ct);");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" var sprite = request.asset as Sprite;");
|
||||
sb.AppendLine(" _spriteCache[resourcePath] = sprite;");
|
||||
sb.AppendLine(" return sprite;");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 리소스 경로로 Texture2D를 동기로 로드합니다. (캐싱됨)");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" /// <param name=\"resourcePath\">리소스 경로 (예: Icons/Home)</param>");
|
||||
sb.AppendLine(" public static Texture2D? LoadTexture(string resourcePath)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" if (_textureCache.TryGetValue(resourcePath, out var cached))");
|
||||
sb.AppendLine(" return cached;");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" var texture = Resources.Load<Texture2D>(resourcePath);");
|
||||
sb.AppendLine(" _textureCache[resourcePath] = texture;");
|
||||
sb.AppendLine(" return texture;");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 리소스 경로로 Texture2D를 비동기로 로드합니다. (캐싱됨)");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" /// <param name=\"resourcePath\">리소스 경로 (예: Icons/Home)</param>");
|
||||
sb.AppendLine(" /// <param name=\"ct\">취소 토큰</param>");
|
||||
sb.AppendLine(" public static async UniTask<Texture2D?> LoadTextureAsync(string resourcePath, CancellationToken ct = default)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" if (_textureCache.TryGetValue(resourcePath, out var cached))");
|
||||
sb.AppendLine(" return cached;");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" var request = Resources.LoadAsync<Texture2D>(resourcePath);");
|
||||
sb.AppendLine(" await request.ToUniTask(cancellationToken: ct);");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" var texture = request.asset as Texture2D;");
|
||||
sb.AppendLine(" _textureCache[resourcePath] = texture;");
|
||||
sb.AppendLine(" return texture;");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 아이콘 이름으로 Sprite를 동기로 로드합니다. (캐싱됨)");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" /// <param name=\"iconName\">아이콘 파일명 (확장자 제외)</param>");
|
||||
sb.AppendLine(" public static Sprite? LoadSpriteByName(string iconName)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" var path = GetPath(iconName);");
|
||||
sb.AppendLine(" return string.IsNullOrEmpty(path) ? null : LoadSprite(path);");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 아이콘 이름으로 Sprite를 비동기로 로드합니다. (캐싱됨)");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" /// <param name=\"iconName\">아이콘 파일명 (확장자 제외)</param>");
|
||||
sb.AppendLine(" /// <param name=\"ct\">취소 토큰</param>");
|
||||
sb.AppendLine(" public static async UniTask<Sprite?> LoadSpriteByNameAsync(string iconName, CancellationToken ct = default)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" var path = GetPath(iconName);");
|
||||
sb.AppendLine(" return string.IsNullOrEmpty(path) ? null : await LoadSpriteAsync(path, ct);");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 아이콘 이름으로 Texture2D를 동기로 로드합니다. (캐싱됨)");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" /// <param name=\"iconName\">아이콘 파일명 (확장자 제외)</param>");
|
||||
sb.AppendLine(" public static Texture2D? LoadTextureByName(string iconName)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" var path = GetPath(iconName);");
|
||||
sb.AppendLine(" return string.IsNullOrEmpty(path) ? null : LoadTexture(path);");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 아이콘 이름으로 Texture2D를 비동기로 로드합니다. (캐싱됨)");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" /// <param name=\"iconName\">아이콘 파일명 (확장자 제외)</param>");
|
||||
sb.AppendLine(" /// <param name=\"ct\">취소 토큰</param>");
|
||||
sb.AppendLine(" public static async UniTask<Texture2D?> LoadTextureByNameAsync(string iconName, CancellationToken ct = default)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" var path = GetPath(iconName);");
|
||||
sb.AppendLine(" return string.IsNullOrEmpty(path) ? null : await LoadTextureAsync(path, ct);");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 캐시를 클리어합니다.");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" public static void ClearCache()");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" _spriteCache.Clear();");
|
||||
sb.AppendLine(" _textureCache.Clear();");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" #endregion");
|
||||
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine("}");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
private static string ConvertToFieldName(string fileName, string relativeDir, HashSet<string> usedNames)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
|
||||
// 서브폴더가 있으면 접두사로 추가
|
||||
if (!string.IsNullOrEmpty(relativeDir))
|
||||
{
|
||||
var dirParts = relativeDir.Split('/');
|
||||
foreach (var part in dirParts)
|
||||
{
|
||||
AppendPascalCase(sb, part);
|
||||
}
|
||||
sb.Append('_');
|
||||
}
|
||||
|
||||
// 파일명 변환
|
||||
AppendPascalCase(sb, fileName);
|
||||
|
||||
var result = sb.ToString();
|
||||
|
||||
// 숫자로 시작하면 앞에 _ 추가
|
||||
if (result.Length > 0 && char.IsDigit(result[0]))
|
||||
{
|
||||
result = "_" + result;
|
||||
}
|
||||
|
||||
// 빈 문자열이면 기본값
|
||||
if (string.IsNullOrEmpty(result))
|
||||
{
|
||||
result = "_Icon";
|
||||
}
|
||||
|
||||
// 중복 처리
|
||||
var originalResult = result;
|
||||
var counter = 2;
|
||||
while (usedNames.Contains(result))
|
||||
{
|
||||
result = $"{originalResult}_{counter}";
|
||||
counter++;
|
||||
}
|
||||
|
||||
usedNames.Add(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
private static void AppendPascalCase(StringBuilder sb, string input)
|
||||
{
|
||||
// 특수문자를 구분자로 사용
|
||||
var words = input.Split(new[] { '_', '-', ' ', '.' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
foreach (var word in words)
|
||||
{
|
||||
if (word.Length == 0) continue;
|
||||
|
||||
// 첫 글자 대문자
|
||||
sb.Append(char.ToUpper(word[0]));
|
||||
if (word.Length > 1)
|
||||
{
|
||||
// 나머지는 소문자로 (단, 연속 대문자면 유지)
|
||||
for (int i = 1; i < word.Length; i++)
|
||||
{
|
||||
if (char.IsUpper(word[i]) && i + 1 < word.Length && char.IsUpper(word[i + 1]))
|
||||
{
|
||||
sb.Append(word[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append(char.ToLower(word[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Editor/UIToolkit/UTKImageIconsGenerator.cs.meta
Normal file
2
Assets/Editor/UIToolkit/UTKImageIconsGenerator.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3d7dbdad9e333f4478d838c2d78bb2be
|
||||
615
Assets/Editor/UIToolkit/UTKMaterialIconsGenerator.cs
Normal file
615
Assets/Editor/UIToolkit/UTKMaterialIconsGenerator.cs
Normal file
@@ -0,0 +1,615 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UVC.UIToolkit.Editor
|
||||
{
|
||||
/// <summary>
|
||||
/// MaterialSymbolsOutlinedCodepoints.txt 파일을 파싱하여
|
||||
/// UTKMaterialIcons.cs 정적 클래스를 자동 생성하는 에디터 도구입니다.
|
||||
/// </summary>
|
||||
public class UTKMaterialIconsGenerator : EditorWindow
|
||||
{
|
||||
#region EditorPrefs Keys
|
||||
|
||||
private const string PrefKeyCodepointsPath = "UTK_MaterialIcons_CodepointsPath";
|
||||
private const string PrefKeyOutputPath = "UTK_MaterialIcons_OutputPath";
|
||||
private const string PrefKeyClassName = "UTK_MaterialIcons_ClassName";
|
||||
private const string PrefKeyNamespace = "UTK_MaterialIcons_Namespace";
|
||||
private const string PrefKeyFontPath = "UTK_MaterialIcons_FontPath";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Default Values
|
||||
|
||||
private const string DefaultCodepointsPath = "Assets/Resources/Fonts/Icons/MaterialSymbolsOutlinedCodepoints.txt";
|
||||
private const string DefaultOutputPath = "Assets/Scripts/UVC/UIToolkit/Common/UTKMaterialIcons.cs";
|
||||
private const string DefaultClassName = "UTKMaterialIcons";
|
||||
private const string DefaultNamespace = "UVC.UIToolkit";
|
||||
private const string DefaultFontPath = "Fonts/Icons/MaterialSymbolsOutlined";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Fields
|
||||
|
||||
private string _codepointsPath = DefaultCodepointsPath;
|
||||
private string _outputPath = DefaultOutputPath;
|
||||
private string _className = DefaultClassName;
|
||||
private string _namespace = DefaultNamespace;
|
||||
private string _fontPath = DefaultFontPath;
|
||||
|
||||
#endregion
|
||||
|
||||
[MenuItem("Tools/UTK/Material Icons Generator")]
|
||||
public static void ShowWindow()
|
||||
{
|
||||
var window = GetWindow<UTKMaterialIconsGenerator>("Material Icons Generator");
|
||||
window.minSize = new Vector2(450, 250);
|
||||
window.LoadSettings();
|
||||
}
|
||||
|
||||
[MenuItem("Tools/UTK/Generate Material Icons Class (Quick)")]
|
||||
public static void GenerateQuick()
|
||||
{
|
||||
var codepointsPath = EditorPrefs.GetString(PrefKeyCodepointsPath, DefaultCodepointsPath);
|
||||
var outputPath = EditorPrefs.GetString(PrefKeyOutputPath, DefaultOutputPath);
|
||||
var className = EditorPrefs.GetString(PrefKeyClassName, DefaultClassName);
|
||||
var namespaceName = EditorPrefs.GetString(PrefKeyNamespace, DefaultNamespace);
|
||||
var fontPath = EditorPrefs.GetString(PrefKeyFontPath, DefaultFontPath);
|
||||
|
||||
Generate(codepointsPath, outputPath, className, namespaceName, fontPath);
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
LoadSettings();
|
||||
}
|
||||
|
||||
private void LoadSettings()
|
||||
{
|
||||
_codepointsPath = EditorPrefs.GetString(PrefKeyCodepointsPath, DefaultCodepointsPath);
|
||||
_outputPath = EditorPrefs.GetString(PrefKeyOutputPath, DefaultOutputPath);
|
||||
_className = EditorPrefs.GetString(PrefKeyClassName, DefaultClassName);
|
||||
_namespace = EditorPrefs.GetString(PrefKeyNamespace, DefaultNamespace);
|
||||
_fontPath = EditorPrefs.GetString(PrefKeyFontPath, DefaultFontPath);
|
||||
}
|
||||
|
||||
private void SaveSettings()
|
||||
{
|
||||
EditorPrefs.SetString(PrefKeyCodepointsPath, _codepointsPath);
|
||||
EditorPrefs.SetString(PrefKeyOutputPath, _outputPath);
|
||||
EditorPrefs.SetString(PrefKeyClassName, _className);
|
||||
EditorPrefs.SetString(PrefKeyNamespace, _namespace);
|
||||
EditorPrefs.SetString(PrefKeyFontPath, _fontPath);
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
EditorGUILayout.Space(10);
|
||||
EditorGUILayout.LabelField("Material Icons Class Generator", EditorStyles.boldLabel);
|
||||
EditorGUILayout.Space(5);
|
||||
EditorGUILayout.HelpBox("Codepoints 파일을 파싱하여 C# 정적 클래스를 생성합니다.", UnityEditor.MessageType.Info);
|
||||
EditorGUILayout.Space(10);
|
||||
|
||||
// Codepoints 파일 경로
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
_codepointsPath = EditorGUILayout.TextField("Codepoints File", _codepointsPath);
|
||||
if (GUILayout.Button("...", GUILayout.Width(30)))
|
||||
{
|
||||
var path = EditorUtility.OpenFilePanel("Select Codepoints File", "Assets", "txt");
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
// 상대 경로로 변환
|
||||
if (path.StartsWith(Application.dataPath))
|
||||
{
|
||||
path = "Assets" + path.Substring(Application.dataPath.Length);
|
||||
}
|
||||
_codepointsPath = path;
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// 출력 파일 경로
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
_outputPath = EditorGUILayout.TextField("Output File", _outputPath);
|
||||
if (GUILayout.Button("...", GUILayout.Width(30)))
|
||||
{
|
||||
var directory = Path.GetDirectoryName(_outputPath) ?? "Assets";
|
||||
var filename = Path.GetFileName(_outputPath);
|
||||
var path = EditorUtility.SaveFilePanel("Save Generated Class", directory, filename, "cs");
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
// 상대 경로로 변환
|
||||
if (path.StartsWith(Application.dataPath))
|
||||
{
|
||||
path = "Assets" + path.Substring(Application.dataPath.Length);
|
||||
}
|
||||
_outputPath = path;
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.Space(5);
|
||||
|
||||
// 클래스명
|
||||
_className = EditorGUILayout.TextField("Class Name", _className);
|
||||
|
||||
// 네임스페이스
|
||||
_namespace = EditorGUILayout.TextField("Namespace", _namespace);
|
||||
|
||||
// 폰트 경로 (Resources 기준)
|
||||
_fontPath = EditorGUILayout.TextField("Font Path (Resources)", _fontPath);
|
||||
EditorGUILayout.HelpBox("Resources.Load에 사용할 폰트 경로 (확장자 제외)", UnityEditor.MessageType.None);
|
||||
|
||||
EditorGUILayout.Space(15);
|
||||
|
||||
// 파일 존재 여부 표시
|
||||
var codepointsExists = File.Exists(_codepointsPath);
|
||||
var outputExists = File.Exists(_outputPath);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("Codepoints File:", GUILayout.Width(100));
|
||||
EditorGUILayout.LabelField(codepointsExists ? "Found" : "Not Found",
|
||||
codepointsExists ? EditorStyles.label : EditorStyles.boldLabel);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUILayout.LabelField("Output File:", GUILayout.Width(100));
|
||||
EditorGUILayout.LabelField(outputExists ? "Exists (will overwrite)" : "New file",
|
||||
EditorStyles.label);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.Space(15);
|
||||
|
||||
// 버튼들
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
GUI.enabled = codepointsExists;
|
||||
if (GUILayout.Button("Generate", GUILayout.Height(30)))
|
||||
{
|
||||
SaveSettings();
|
||||
Generate(_codepointsPath, _outputPath, _className, _namespace, _fontPath);
|
||||
}
|
||||
GUI.enabled = true;
|
||||
|
||||
if (GUILayout.Button("Reset to Defaults", GUILayout.Height(30)))
|
||||
{
|
||||
_codepointsPath = DefaultCodepointsPath;
|
||||
_outputPath = DefaultOutputPath;
|
||||
_className = DefaultClassName;
|
||||
_namespace = DefaultNamespace;
|
||||
_fontPath = DefaultFontPath;
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
public static void Generate(string codepointsPath, string outputPath, string className, string namespaceName, string fontPath = DefaultFontPath)
|
||||
{
|
||||
if (!File.Exists(codepointsPath))
|
||||
{
|
||||
Debug.LogError($"Codepoints 파일을 찾을 수 없습니다: {codepointsPath}");
|
||||
return;
|
||||
}
|
||||
|
||||
var icons = ParseCodepoints(codepointsPath);
|
||||
if (icons.Count == 0)
|
||||
{
|
||||
Debug.LogError("파싱된 아이콘이 없습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
var code = GenerateCode(icons, className, namespaceName, fontPath);
|
||||
|
||||
// 디렉토리 생성
|
||||
var directory = Path.GetDirectoryName(outputPath);
|
||||
if (!string.IsNullOrEmpty(directory) && !Directory.Exists(directory))
|
||||
{
|
||||
Directory.CreateDirectory(directory);
|
||||
}
|
||||
|
||||
File.WriteAllText(outputPath, code, Encoding.UTF8);
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
Debug.Log($"{className}.cs 생성 완료: {icons.Count}개 아이콘 ({outputPath})");
|
||||
}
|
||||
|
||||
private static List<(string name, string unicode)> ParseCodepoints(string path)
|
||||
{
|
||||
var result = new List<(string, string)>();
|
||||
var lines = File.ReadAllLines(path);
|
||||
|
||||
foreach (var line in lines)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(line)) continue;
|
||||
|
||||
var parts = line.Split(' ', StringSplitOptions.RemoveEmptyEntries);
|
||||
if (parts.Length >= 2)
|
||||
{
|
||||
result.Add((parts[0], parts[1]));
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private static string GenerateCode(List<(string name, string unicode)> icons, string className, string namespaceName, string fontPath)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
var usedNames = new HashSet<string>();
|
||||
|
||||
sb.AppendLine("// <auto-generated>");
|
||||
sb.AppendLine("// 이 파일은 UTKMaterialIconsGenerator에 의해 자동 생성되었습니다.");
|
||||
sb.AppendLine("// 직접 수정하지 마세요. Tools > UTK > Material Icons Generator 메뉴로 재생성하세요.");
|
||||
sb.AppendLine("// </auto-generated>");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine("#nullable enable");
|
||||
sb.AppendLine("using System;");
|
||||
sb.AppendLine("using System.Collections.Generic;");
|
||||
sb.AppendLine("using System.Threading;");
|
||||
sb.AppendLine("using Cysharp.Threading.Tasks;");
|
||||
sb.AppendLine("using UnityEngine;");
|
||||
sb.AppendLine("using UnityEngine.UIElements;");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine($"namespace {namespaceName}");
|
||||
sb.AppendLine("{");
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// Material Symbols Outlined 아이콘 유니코드 문자 상수 클래스입니다.");
|
||||
sb.AppendLine($" /// 총 {icons.Count}개의 아이콘을 포함합니다.");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" /// <example>");
|
||||
sb.AppendLine(" /// <code>");
|
||||
sb.AppendLine($" /// // 동기 폰트 로드 (캐싱됨)");
|
||||
sb.AppendLine($" /// Font font = {className}.LoadFont();");
|
||||
sb.AppendLine(" /// ");
|
||||
sb.AppendLine($" /// // 비동기 폰트 로드 (UniTask)");
|
||||
sb.AppendLine($" /// Font? font = await {className}.LoadFontAsync(cancellationToken);");
|
||||
sb.AppendLine(" /// ");
|
||||
sb.AppendLine($" /// // Label에 아이콘 적용");
|
||||
sb.AppendLine($" /// var label = new Label({className}.Home);");
|
||||
sb.AppendLine($" /// {className}.ApplyIconStyle(label);");
|
||||
sb.AppendLine(" /// ");
|
||||
sb.AppendLine($" /// // 비동기로 아이콘 스타일 적용");
|
||||
sb.AppendLine($" /// await {className}.ApplyIconStyleAsync(label, cancellationToken);");
|
||||
sb.AppendLine(" /// ");
|
||||
sb.AppendLine($" /// // 또는 StyleFontDefinition 직접 사용");
|
||||
sb.AppendLine($" /// label.style.unityFontDefinition = {className}.GetFontDefinition();");
|
||||
sb.AppendLine(" /// ");
|
||||
sb.AppendLine($" /// // 이름으로 아이콘 조회");
|
||||
sb.AppendLine($" /// string icon = {className}.GetIcon(\"settings\");");
|
||||
sb.AppendLine(" /// ");
|
||||
sb.AppendLine($" /// // 아이콘 존재 여부 확인");
|
||||
sb.AppendLine($" /// if ({className}.HasIcon(\"search\")) {{ }}");
|
||||
sb.AppendLine(" /// ");
|
||||
sb.AppendLine($" /// // 존재하는 유니코드 문자인지 확인");
|
||||
sb.AppendLine($" /// if ({className}.IsIconChar(\"□\")) {{ }}");
|
||||
sb.AppendLine(" /// ");
|
||||
sb.AppendLine($" /// // 전체 아이콘 이름 순회");
|
||||
sb.AppendLine($" /// foreach (var name in {className}.GetAllIconNames()) {{ }}");
|
||||
sb.AppendLine(" /// ");
|
||||
sb.AppendLine($" /// // 아이콘 총 개수");
|
||||
sb.AppendLine($" /// int count = {className}.Count;");
|
||||
sb.AppendLine(" /// </code>");
|
||||
sb.AppendLine(" /// </example>");
|
||||
sb.AppendLine(" /// <remarks>");
|
||||
sb.AppendLine(" /// <para><b>UXML에서 사용하기:</b></para>");
|
||||
sb.AppendLine(" /// <para>UXML에서 Material Icons를 사용하려면 USS에서 폰트를 설정하고, Label의 text에 유니코드 문자를 직접 입력합니다.</para>");
|
||||
sb.AppendLine(" /// <code>");
|
||||
sb.AppendLine(" /// /* USS 파일 */");
|
||||
sb.AppendLine(" /// .material-icon {");
|
||||
sb.AppendLine(" /// -unity-font: resource('Fonts/Icons/MaterialSymbolsOutlined');");
|
||||
sb.AppendLine(" /// font-size: 24px;");
|
||||
sb.AppendLine(" /// }");
|
||||
sb.AppendLine(" /// </code>");
|
||||
sb.AppendLine(" /// <code>");
|
||||
sb.AppendLine(" /// <!-- UXML 파일 -->");
|
||||
sb.AppendLine(" /// <ui:Label class=\"material-icon\" text=\"\" /> <!-- home 아이콘 -->");
|
||||
sb.AppendLine(" /// <ui:Label class=\"material-icon\" text=\"\" /> <!-- settings 아이콘 -->");
|
||||
sb.AppendLine(" /// </code>");
|
||||
sb.AppendLine(" /// <para><b>C# 코드에서 UXML Label에 아이콘 적용:</b></para>");
|
||||
sb.AppendLine(" /// <code>");
|
||||
sb.AppendLine($" /// var iconLabel = root.Q<Label>(\"my-icon\");");
|
||||
sb.AppendLine($" /// iconLabel.text = {className}.Settings;");
|
||||
sb.AppendLine($" /// {className}.ApplyIconStyle(iconLabel);");
|
||||
sb.AppendLine(" /// </code>");
|
||||
sb.AppendLine(" /// </remarks>");
|
||||
sb.AppendLine($" public static class {className}");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" #region Font");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine($" private const string FontResourcePath = \"{fontPath}\";");
|
||||
sb.AppendLine(" private static Font? _cachedFont;");
|
||||
sb.AppendLine(" private static StyleFontDefinition? _cachedFontDefinition;");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 아이콘 폰트를 동기로 로드합니다. (캐싱됨)");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" /// <returns>로드된 Font, 실패 시 null</returns>");
|
||||
sb.AppendLine(" public static Font? LoadFont()");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" if (_cachedFont == null)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" _cachedFont = Resources.Load<Font>(FontResourcePath);");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine(" return _cachedFont;");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 아이콘 폰트를 비동기로 로드합니다. (캐싱됨)");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" /// <param name=\"ct\">취소 토큰</param>");
|
||||
sb.AppendLine(" /// <returns>로드된 Font, 실패 시 null</returns>");
|
||||
sb.AppendLine(" public static async UniTask<Font?> LoadFontAsync(CancellationToken ct = default)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" if (_cachedFont != null)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" return _cachedFont;");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" var request = Resources.LoadAsync<Font>(FontResourcePath);");
|
||||
sb.AppendLine(" await request.ToUniTask(cancellationToken: ct);");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" _cachedFont = request.asset as Font;");
|
||||
sb.AppendLine(" return _cachedFont;");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// UI Toolkit용 StyleFontDefinition을 동기로 반환합니다. (캐싱됨)");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" /// <returns>StyleFontDefinition, 폰트 로드 실패 시 기본값</returns>");
|
||||
sb.AppendLine(" public static StyleFontDefinition GetFontDefinition()");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" if (_cachedFontDefinition == null)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" var font = LoadFont();");
|
||||
sb.AppendLine(" if (font != null)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" _cachedFontDefinition = new StyleFontDefinition(font);");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine(" return _cachedFontDefinition ?? default;");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// UI Toolkit용 StyleFontDefinition을 비동기로 반환합니다. (캐싱됨)");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" /// <param name=\"ct\">취소 토큰</param>");
|
||||
sb.AppendLine(" /// <returns>StyleFontDefinition, 폰트 로드 실패 시 기본값</returns>");
|
||||
sb.AppendLine(" public static async UniTask<StyleFontDefinition> GetFontDefinitionAsync(CancellationToken ct = default)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" if (_cachedFontDefinition == null)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" var font = await LoadFontAsync(ct);");
|
||||
sb.AppendLine(" if (font != null)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" _cachedFontDefinition = new StyleFontDefinition(font);");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine(" return _cachedFontDefinition ?? default;");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// VisualElement에 아이콘 폰트 스타일을 동기로 적용합니다.");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" /// <param name=\"element\">스타일을 적용할 요소</param>");
|
||||
sb.AppendLine(" /// <param name=\"fontSize\">폰트 크기 (기본값: 24)</param>");
|
||||
sb.AppendLine(" public static void ApplyIconStyle(VisualElement element, int? fontSize = 24)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" element.style.unityFontDefinition = GetFontDefinition();");
|
||||
sb.AppendLine(" if(fontSize != null) element.style.fontSize = fontSize.Value;");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// VisualElement에 아이콘 폰트 스타일을 비동기로 적용합니다.");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" /// <param name=\"element\">스타일을 적용할 요소</param>");
|
||||
sb.AppendLine(" /// <param name=\"ct\">취소 토큰</param>");
|
||||
sb.AppendLine(" /// <param name=\"fontSize\">폰트 크기 (기본값: 24)</param>");
|
||||
sb.AppendLine(" public static async UniTask ApplyIconStyleAsync(VisualElement element, CancellationToken ct = default, int fontSize = 24)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" element.style.unityFontDefinition = await GetFontDefinitionAsync(ct);");
|
||||
sb.AppendLine(" element.style.fontSize = fontSize;");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 폰트 캐시를 클리어합니다.");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" public static void ClearFontCache()");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" _cachedFont = null;");
|
||||
sb.AppendLine(" _cachedFontDefinition = null;");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" #endregion");
|
||||
sb.AppendLine();
|
||||
|
||||
// 아이콘 상수 생성
|
||||
foreach (var (name, unicode) in icons)
|
||||
{
|
||||
var fieldName = ConvertToFieldName(name, usedNames);
|
||||
var character = GetCharacterFromUnicode(unicode);
|
||||
var escapedChar = EscapeForCSharp(character);
|
||||
|
||||
sb.AppendLine($" /// <summary>{name} (U+{unicode.ToUpper()})</summary>");
|
||||
sb.AppendLine($" public const string {fieldName} = \"{escapedChar}\";");
|
||||
}
|
||||
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" #region Lookup");
|
||||
sb.AppendLine();
|
||||
|
||||
// 이름으로 아이콘 조회 딕셔너리
|
||||
sb.AppendLine(" private static readonly Dictionary<string, string> _iconsByName = new()");
|
||||
sb.AppendLine(" {");
|
||||
foreach (var (name, unicode) in icons)
|
||||
{
|
||||
var character = GetCharacterFromUnicode(unicode);
|
||||
var escapedChar = EscapeForCSharp(character);
|
||||
sb.AppendLine($" [\"{name}\"] = \"{escapedChar}\",");
|
||||
}
|
||||
sb.AppendLine(" };");
|
||||
sb.AppendLine();
|
||||
|
||||
// 조회 메서드
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 아이콘 이름으로 유니코드 문자를 조회합니다.");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" /// <param name=\"iconName\">아이콘 이름 (예: \"home\", \"settings\")</param>");
|
||||
sb.AppendLine(" /// <returns>아이콘 문자, 없으면 빈 문자열</returns>");
|
||||
sb.AppendLine(" public static string GetIcon(string iconName)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" // 실제 유니코드 문자가 아니라 이스케이프 문자열인 경우 변환");
|
||||
sb.AppendLine(" if (iconName.StartsWith(\"\\u\") && iconName.Length == 6)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" try");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" var code = Convert.ToInt32(iconName.Substring(2), 16);");
|
||||
sb.AppendLine(" iconName = char.ConvertFromUtf32(code);");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine(" catch");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" Debug.LogWarning($\"Failed to convert escape sequence: {iconName}\");");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine(" ");
|
||||
sb.AppendLine(" if(IsIconChar(iconName)) return iconName;");
|
||||
sb.AppendLine(" return _iconsByName.TryGetValue(iconName.ToLower(), out var icon) ? icon : string.Empty;");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 아이콘이 존재하는지 확인합니다.");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" public static bool HasIcon(string iconName) => _iconsByName.ContainsKey(iconName);");
|
||||
sb.AppendLine();
|
||||
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 유니코드 문자로 아이콘이 존재하는지 확인합니다.");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" public static bool IsIconChar(string iconChar) => _iconsByName.Values.Contains(iconChar);");
|
||||
sb.AppendLine();
|
||||
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 유니코드 문자로 아이콘 이름을 조회합니다.");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" public static string GetIconNameByChar(string iconChar)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" foreach (var kvp in _iconsByName)");
|
||||
sb.AppendLine(" {");
|
||||
sb.AppendLine(" if (string.Equals(kvp.Value, iconChar, StringComparison.OrdinalIgnoreCase)) return kvp.Key;");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine(" return string.Empty;");
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine();
|
||||
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 모든 아이콘 이름 목록을 반환합니다.");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine(" public static IEnumerable<string> GetAllIconNames() => _iconsByName.Keys;");
|
||||
sb.AppendLine();
|
||||
|
||||
sb.AppendLine(" /// <summary>");
|
||||
sb.AppendLine(" /// 전체 아이콘 수를 반환합니다.");
|
||||
sb.AppendLine(" /// </summary>");
|
||||
sb.AppendLine($" public static int Count => {icons.Count};");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(" #endregion");
|
||||
|
||||
sb.AppendLine(" }");
|
||||
sb.AppendLine("}");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
private static string ConvertToFieldName(string iconName, HashSet<string> usedNames)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
var words = iconName.Split('_', StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
foreach (var word in words)
|
||||
{
|
||||
if (word.Length == 0) continue;
|
||||
|
||||
// 첫 글자 대문자, 나머지 소문자 (PascalCase)
|
||||
sb.Append(char.ToUpper(word[0]));
|
||||
if (word.Length > 1)
|
||||
{
|
||||
sb.Append(word.Substring(1).ToLower());
|
||||
}
|
||||
}
|
||||
|
||||
var result = sb.ToString();
|
||||
|
||||
// 숫자로 시작하면 앞에 _ 추가
|
||||
if (result.Length > 0 && char.IsDigit(result[0]))
|
||||
{
|
||||
result = "_" + result;
|
||||
}
|
||||
|
||||
// 빈 문자열이면 기본값
|
||||
if (string.IsNullOrEmpty(result))
|
||||
{
|
||||
result = "_Icon";
|
||||
}
|
||||
|
||||
// 중복 처리
|
||||
var originalResult = result;
|
||||
var counter = 2;
|
||||
while (usedNames.Contains(result))
|
||||
{
|
||||
result = $"{originalResult}_{counter}";
|
||||
counter++;
|
||||
}
|
||||
|
||||
usedNames.Add(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
private static string GetCharacterFromUnicode(string hexCode)
|
||||
{
|
||||
try
|
||||
{
|
||||
var codepoint = int.Parse(hexCode, NumberStyles.HexNumber);
|
||||
return char.ConvertFromUtf32(codepoint);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return "?";
|
||||
}
|
||||
}
|
||||
|
||||
private static string EscapeForCSharp(string str)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
foreach (var c in str)
|
||||
{
|
||||
// 유니코드 이스케이프 시퀀스로 변환
|
||||
if (c > 127 || c < 32)
|
||||
{
|
||||
// Surrogate pair 처리
|
||||
sb.Append($"\\u{(int)c:X4}");
|
||||
}
|
||||
else if (c == '"')
|
||||
{
|
||||
sb.Append("\\\"");
|
||||
}
|
||||
else if (c == '\\')
|
||||
{
|
||||
sb.Append("\\\\");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append(c);
|
||||
}
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a4f9ee471e14d684aa1d05c88ee24116
|
||||
@@ -1,79 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 1000010405195716}
|
||||
m_IsPrefabAsset: 1
|
||||
--- !u!1 &1000010405195716
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4000012787411744}
|
||||
- component: {fileID: 108000010531720288}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4000012787411744
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000010405195716}
|
||||
m_LocalRotation: {x: 0.35798958, y: 0.4816777, z: -0.22460999, w: 0.7677112}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 50, y: 64.21, z: 0}
|
||||
--- !u!108 &108000010531720288
|
||||
Light:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000010405195716}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 8
|
||||
m_Type: 1
|
||||
m_Color: {r: 0.9452333, g: 1, b: 0.472, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: 3
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_Lightmapping: 1
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
@@ -1,118 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 1000010853367534}
|
||||
m_IsPrefabAsset: 1
|
||||
--- !u!1 &1000010853367534
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4000011252991948}
|
||||
- component: {fileID: 20000011345892868}
|
||||
- component: {fileID: 92000012621775840}
|
||||
- component: {fileID: 124000013019881202}
|
||||
- component: {fileID: 81000011431798808}
|
||||
- component: {fileID: 114000013036481980}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4000011252991948
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000010853367534}
|
||||
m_LocalRotation: {x: 0.24993351, y: 0.19376343, z: -0.05112216, w: 0.9472991}
|
||||
m_LocalPosition: {x: -2.95, y: 8.21, z: -7.16}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 29.56, y: 23.12, z: 0}
|
||||
--- !u!20 &20000011345892868
|
||||
Camera:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000010853367534}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844}
|
||||
m_projectionMatrixMode: 1
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 0
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!81 &81000011431798808
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000010853367534}
|
||||
m_Enabled: 1
|
||||
--- !u!92 &92000012621775840
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000010853367534}
|
||||
m_Enabled: 1
|
||||
--- !u!114 &114000013036481980
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000010853367534}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 81dbcf422681c1c4ca758d2545310522, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!124 &124000013019881202
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000010853367534}
|
||||
m_Enabled: 1
|
||||
@@ -1,240 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 1000010367924706}
|
||||
m_IsPrefabAsset: 1
|
||||
--- !u!1 &1000010367924706
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4000010654416078}
|
||||
- component: {fileID: 54000013494727520}
|
||||
- component: {fileID: 65000011714920370}
|
||||
m_Layer: 0
|
||||
m_Name: PalletEmpty
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1000011940101718
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4000011572875330}
|
||||
- component: {fileID: 65000011694717970}
|
||||
m_Layer: 0
|
||||
m_Name: Collider1 (1)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1000012623322564
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4000011710664838}
|
||||
- component: {fileID: 65000012467042714}
|
||||
m_Layer: 0
|
||||
m_Name: Collider1 (3)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &1000013525428288
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4000012846995296}
|
||||
- component: {fileID: 33000011068149276}
|
||||
- component: {fileID: 23000011150270100}
|
||||
- component: {fileID: 65000012969618506}
|
||||
m_Layer: 0
|
||||
m_Name: Pallet
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4000010654416078
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000010367924706}
|
||||
m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 5.71}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 4000012846995296}
|
||||
- {fileID: 4000011572875330}
|
||||
- {fileID: 4000011710664838}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
|
||||
--- !u!4 &4000011572875330
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000011940101718}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0.072, z: -0.56}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4000010654416078}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!4 &4000011710664838
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000012623322564}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0.072, z: 0.539}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4000010654416078}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!4 &4000012846995296
|
||||
Transform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000013525428288}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 100, y: 100, z: 100}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4000010654416078}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &23000011150270100
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000013525428288}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RenderingLayerMask: 4294967295
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: bb5b8dcebe22c1c43a002cc9b3d28174, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 0
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!33 &33000011068149276
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000013525428288}
|
||||
m_Mesh: {fileID: 4300000, guid: 5661de86a21f8ef4b8fa880ef2e7b46c, type: 3}
|
||||
--- !u!54 &54000013494727520
|
||||
Rigidbody:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000010367924706}
|
||||
serializedVersion: 2
|
||||
m_Mass: 50
|
||||
m_Drag: 0
|
||||
m_AngularDrag: 0.05
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 0
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 0
|
||||
m_CollisionDetection: 0
|
||||
--- !u!65 &65000011694717970
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000011940101718}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 0.1440002, z: 0.1006759}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!65 &65000011714920370
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000010367924706}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 0.04, z: 1}
|
||||
m_Center: {x: 0, y: 0.12, z: 0}
|
||||
--- !u!65 &65000012467042714
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000012623322564}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 0.1440002, z: 0.1006759}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!65 &65000012969618506
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 1000013525428288}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 0.010000003, y: 0.0014400017, z: 0.0010067594}
|
||||
m_Center: {x: 0.00009318173, y: 0.0007195668, z: -0.005589797}
|
||||
@@ -14,15 +14,45 @@ PluginImporter:
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
Any:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
Editor:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Editor: 0
|
||||
Exclude Linux64: 0
|
||||
Exclude OSXUniversal: 0
|
||||
Exclude WebGL: 1
|
||||
Exclude Win: 0
|
||||
Exclude Win64: 0
|
||||
Exclude WindowsStoreApps: 1
|
||||
Editor:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86_64
|
||||
DefaultValueInitialized: true
|
||||
OS: Windows
|
||||
Linux64:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86_64
|
||||
OSXUniversal:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: None
|
||||
Win:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86
|
||||
Win64:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: None
|
||||
WindowsStoreApps:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DontProcess: false
|
||||
PlaceholderPath:
|
||||
SDK: AnySDK
|
||||
ScriptingBackend: AnyScriptingBackend
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
||||
9
Assets/Plugins/AssetUsageDetector.meta
Normal file
9
Assets/Plugins/AssetUsageDetector.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c1764d69117881843b761dc14ca276d4
|
||||
folderAsset: yes
|
||||
timeCreated: 1561225368
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/Plugins/AssetUsageDetector/Editor.meta
Normal file
9
Assets/Plugins/AssetUsageDetector/Editor.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 19f677a9eb83d3942af6d4c5fa8dbeee
|
||||
folderAsset: yes
|
||||
timeCreated: 1520032274
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "AssetUsageDetector.Editor",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"Unity.Addressables"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [
|
||||
{
|
||||
"name": "com.unity.addressables",
|
||||
"expression": "0.0.0",
|
||||
"define": "ASSET_USAGE_ADDRESSABLES"
|
||||
},
|
||||
{
|
||||
"name": "com.unity.visualeffectgraph",
|
||||
"expression": "0.0.0",
|
||||
"define": "ASSET_USAGE_VFX_GRAPH"
|
||||
}
|
||||
],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8579ab42c9ab63d4bac5fb07bd390b46
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 112837
|
||||
packageName: Asset Usage Detector
|
||||
packageVersion: 2.5.7
|
||||
assetPath: Assets/Plugins/AssetUsageDetector/Editor/AssetUsageDetector.Editor.asmdef
|
||||
uploadId: 761377
|
||||
1370
Assets/Plugins/AssetUsageDetector/Editor/AssetUsageDetector.cs
Normal file
1370
Assets/Plugins/AssetUsageDetector/Editor/AssetUsageDetector.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2c0dea52dcdb16e4e9b13f8dacc1590f
|
||||
timeCreated: 1520032279
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 112837
|
||||
packageName: Asset Usage Detector
|
||||
packageVersion: 2.5.7
|
||||
assetPath: Assets/Plugins/AssetUsageDetector/Editor/AssetUsageDetector.cs
|
||||
uploadId: 761377
|
||||
@@ -0,0 +1,207 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace AssetUsageDetectorNamespace
|
||||
{
|
||||
public partial class AssetUsageDetector
|
||||
{
|
||||
#region Helper Classes
|
||||
private class CacheEntry
|
||||
{
|
||||
public enum Result { Unknown = 0, No = 1, Yes = 2 };
|
||||
|
||||
public string hash;
|
||||
public string[] dependencies;
|
||||
public long[] fileSizes;
|
||||
|
||||
public bool verified;
|
||||
public Result searchResult;
|
||||
|
||||
public CacheEntry( string path )
|
||||
{
|
||||
Verify( path );
|
||||
}
|
||||
|
||||
public CacheEntry( string hash, string[] dependencies, long[] fileSizes )
|
||||
{
|
||||
this.hash = hash;
|
||||
this.dependencies = dependencies;
|
||||
this.fileSizes = fileSizes;
|
||||
}
|
||||
|
||||
public void Verify( string path )
|
||||
{
|
||||
string hash = AssetDatabase.GetAssetDependencyHash( path ).ToString();
|
||||
if( this.hash != hash )
|
||||
{
|
||||
this.hash = hash;
|
||||
Refresh( path );
|
||||
}
|
||||
|
||||
verified = true;
|
||||
}
|
||||
|
||||
public void Refresh( string path )
|
||||
{
|
||||
dependencies = AssetDatabase.GetDependencies( path, false );
|
||||
if( fileSizes == null || fileSizes.Length != dependencies.Length )
|
||||
fileSizes = new long[dependencies.Length];
|
||||
|
||||
int length = dependencies.Length;
|
||||
for( int i = 0; i < length; i++ )
|
||||
{
|
||||
if( !string.IsNullOrEmpty( dependencies[i] ) )
|
||||
{
|
||||
FileInfo assetFile = new FileInfo( dependencies[i] );
|
||||
fileSizes[i] = assetFile.Exists ? assetFile.Length : 0L;
|
||||
}
|
||||
else
|
||||
{
|
||||
// This dependency is empty which causes issues when passed to FileInfo constructor
|
||||
// Find a non-empty dependency and move it to this index
|
||||
for( int j = length - 1; j > i; j--, length-- )
|
||||
{
|
||||
if( !string.IsNullOrEmpty( dependencies[j] ) )
|
||||
{
|
||||
dependencies[i--] = dependencies[j];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
length--;
|
||||
}
|
||||
}
|
||||
|
||||
if( length != fileSizes.Length )
|
||||
{
|
||||
Array.Resize( ref dependencies, length );
|
||||
Array.Resize( ref fileSizes, length );
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
// An optimization to fetch the dependencies of an asset only once (key is the path of the asset)
|
||||
private Dictionary<string, CacheEntry> assetDependencyCache;
|
||||
private CacheEntry lastRefreshedCacheEntry;
|
||||
|
||||
private string CachePath { get { return Application.dataPath + "/../Library/AssetUsageDetector.cache"; } } // Path of the cache file
|
||||
|
||||
public void SaveCache()
|
||||
{
|
||||
if( assetDependencyCache == null )
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
using( FileStream stream = new FileStream( CachePath, FileMode.Create ) )
|
||||
using( BinaryWriter writer = new BinaryWriter( stream ) )
|
||||
{
|
||||
writer.Write( assetDependencyCache.Count );
|
||||
|
||||
foreach( var keyValuePair in assetDependencyCache )
|
||||
{
|
||||
CacheEntry cacheEntry = keyValuePair.Value;
|
||||
string[] dependencies = cacheEntry.dependencies;
|
||||
long[] fileSizes = cacheEntry.fileSizes;
|
||||
|
||||
writer.Write( keyValuePair.Key );
|
||||
writer.Write( cacheEntry.hash );
|
||||
writer.Write( dependencies.Length );
|
||||
|
||||
for( int i = 0; i < dependencies.Length; i++ )
|
||||
{
|
||||
writer.Write( dependencies[i] );
|
||||
writer.Write( fileSizes[i] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
Debug.LogException( e );
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadCache()
|
||||
{
|
||||
if( File.Exists( CachePath ) )
|
||||
{
|
||||
using( FileStream stream = new FileStream( CachePath, FileMode.Open, FileAccess.Read ) )
|
||||
using( BinaryReader reader = new BinaryReader( stream ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
int cacheSize = reader.ReadInt32();
|
||||
assetDependencyCache = new Dictionary<string, CacheEntry>( cacheSize );
|
||||
|
||||
for( int i = 0; i < cacheSize; i++ )
|
||||
{
|
||||
string assetPath = reader.ReadString();
|
||||
string hash = reader.ReadString();
|
||||
|
||||
int dependenciesLength = reader.ReadInt32();
|
||||
string[] dependencies = new string[dependenciesLength];
|
||||
long[] fileSizes = new long[dependenciesLength];
|
||||
for( int j = 0; j < dependenciesLength; j++ )
|
||||
{
|
||||
dependencies[j] = reader.ReadString();
|
||||
fileSizes[j] = reader.ReadInt64();
|
||||
}
|
||||
|
||||
assetDependencyCache[assetPath] = new CacheEntry( hash, dependencies, fileSizes );
|
||||
}
|
||||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
assetDependencyCache = null;
|
||||
Debug.LogWarning( "Couldn't load cache (probably cache format has changed in an update), will regenerate cache.\n" + e.ToString() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Generate cache for all assets for the first time
|
||||
if( assetDependencyCache == null )
|
||||
{
|
||||
assetDependencyCache = new Dictionary<string, CacheEntry>( 1024 * 8 );
|
||||
|
||||
string[] allAssets = AssetDatabase.GetAllAssetPaths();
|
||||
if( allAssets.Length > 0 )
|
||||
{
|
||||
double startTime = EditorApplication.timeSinceStartup;
|
||||
|
||||
try
|
||||
{
|
||||
for( int i = 0; i < allAssets.Length; i++ )
|
||||
{
|
||||
if( i % 30 == 0 && EditorUtility.DisplayCancelableProgressBar( "Please wait...", "Generating cache for the first time (optional)", (float) i / allAssets.Length ) )
|
||||
{
|
||||
EditorUtility.ClearProgressBar();
|
||||
Debug.LogWarning( "Initial cache generation cancelled, cache will be generated on the fly as more and more assets are searched." );
|
||||
break;
|
||||
}
|
||||
|
||||
assetDependencyCache[allAssets[i]] = new CacheEntry( allAssets[i] );
|
||||
}
|
||||
|
||||
EditorUtility.ClearProgressBar();
|
||||
|
||||
Debug.Log( "Cache generated in " + ( EditorApplication.timeSinceStartup - startTime ).ToString( "F2" ) + " seconds" );
|
||||
Debug.Log( "You can always reset the cache by deleting " + Path.GetFullPath( CachePath ) );
|
||||
|
||||
SaveCache();
|
||||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
EditorUtility.ClearProgressBar();
|
||||
Debug.LogException( e );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 71ea9a3fd0b82594d8130d882dbfc844
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 112837
|
||||
packageName: Asset Usage Detector
|
||||
packageVersion: 2.5.7
|
||||
assetPath: Assets/Plugins/AssetUsageDetector/Editor/AssetUsageDetectorCache.cs
|
||||
uploadId: 761377
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 93aaae685d4c3db44baeb91a0296855e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 112837
|
||||
packageName: Asset Usage Detector
|
||||
packageVersion: 2.5.7
|
||||
assetPath: Assets/Plugins/AssetUsageDetector/Editor/AssetUsageDetectorSearchFunctions.cs
|
||||
uploadId: 761377
|
||||
@@ -0,0 +1,289 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AssetUsageDetectorNamespace
|
||||
{
|
||||
public static class AssetUsageDetectorSettings
|
||||
{
|
||||
private static readonly GUILayoutOption GL_WIDTH_60 = GUILayout.Width( 60f );
|
||||
|
||||
#region Colors
|
||||
private static Color? m_settingsHeaderColor = null;
|
||||
public static Color SettingsHeaderColor
|
||||
{
|
||||
get { if( m_settingsHeaderColor == null ) m_settingsHeaderColor = GetColor( "AUD_SettingsHeaderTint", Color.cyan ); return m_settingsHeaderColor.Value; }
|
||||
set { if( m_settingsHeaderColor == value ) return; m_settingsHeaderColor = value; SetColor( "AUD_SettingsHeaderTint", value ); }
|
||||
}
|
||||
|
||||
private static Color? m_searchResultGroupHeaderColor = null;
|
||||
public static Color SearchResultGroupHeaderColor
|
||||
{
|
||||
get { if( m_searchResultGroupHeaderColor == null ) m_searchResultGroupHeaderColor = GetColor( "AUD_ResultGroupHeaderTint", Color.cyan ); return m_searchResultGroupHeaderColor.Value; }
|
||||
set { if( m_searchResultGroupHeaderColor == value ) return; m_searchResultGroupHeaderColor = value; SetColor( "AUD_ResultGroupHeaderTint", value ); }
|
||||
}
|
||||
|
||||
private static Color? m_rootRowsBackgroundColor = null;
|
||||
public static Color RootRowsBackgroundColor
|
||||
{
|
||||
get { if( m_rootRowsBackgroundColor == null ) m_rootRowsBackgroundColor = GetColor( "AUD_RootRowsTint", EditorGUIUtility.isProSkin ? new Color( 0f, 1f, 1f, 0.15f ) : new Color( 0f, 1f, 1f, 0.25f ) ); return m_rootRowsBackgroundColor.Value; }
|
||||
set { if( m_rootRowsBackgroundColor == value ) return; m_rootRowsBackgroundColor = value; SetColor( "AUD_RootRowsTint", value ); }
|
||||
}
|
||||
|
||||
private static Color? m_rootRowsBorderColor = null;
|
||||
public static Color RootRowsBorderColor
|
||||
{
|
||||
get { if( m_rootRowsBorderColor == null ) m_rootRowsBorderColor = GetColor( "AUD_RootRowsBorderColor", EditorGUIUtility.isProSkin ? new Color( 0.15f, 0.15f, 0.15f, 1f ) : new Color( 0.375f, 0.375f, 0.375f, 1f ) ); return m_rootRowsBorderColor.Value; }
|
||||
set { if( m_rootRowsBorderColor == value ) return; m_rootRowsBorderColor = value; SetColor( "AUD_RootRowsBorderColor", value ); }
|
||||
}
|
||||
|
||||
private static Color? m_mainReferencesBackgroundColor = null;
|
||||
public static Color MainReferencesBackgroundColor
|
||||
{
|
||||
get { if( m_mainReferencesBackgroundColor == null ) m_mainReferencesBackgroundColor = GetColor( "AUD_MainRefRowsTint", EditorGUIUtility.isProSkin ? new Color( 0f, 0.35f, 0f, 1f ) : new Color( 0.25f, 0.75f, 0.25f, 1f ) ); return m_mainReferencesBackgroundColor.Value; }
|
||||
set { if( m_mainReferencesBackgroundColor == value ) return; m_mainReferencesBackgroundColor = value; SetColor( "AUD_MainRefRowsTint", value ); }
|
||||
}
|
||||
|
||||
private static Color? m_selectedRowsParentTint = null;
|
||||
public static Color SelectedRowParentsTint
|
||||
{
|
||||
get { if( m_selectedRowsParentTint == null ) m_selectedRowsParentTint = GetColor( "AUD_SelectedRowParentsTint", EditorGUIUtility.isProSkin ? new Color( 0.36f, 0.36f, 0.18f, 1f ) : new Color( 0.825f, 0.825f, 0.55f, 1f ) ); return m_selectedRowsParentTint.Value; }
|
||||
set { if( m_selectedRowsParentTint == value ) return; m_selectedRowsParentTint = value; SetColor( "AUD_SelectedRowParentsTint", value ); }
|
||||
}
|
||||
|
||||
private static Color? m_selectedRowOccurrencesColor = null;
|
||||
public static Color SelectedRowOccurrencesColor
|
||||
{
|
||||
get { if( m_selectedRowOccurrencesColor == null ) m_selectedRowOccurrencesColor = GetColor( "AUD_SelectedRowOccurrencesTint", EditorGUIUtility.isProSkin ? new Color( 0f, 0.3f, 0.75f, 1f ) : new Color( 0.25f, 0.75f, 1f, 1f ) ); return m_selectedRowOccurrencesColor.Value; }
|
||||
set { if( m_selectedRowOccurrencesColor == value ) return; m_selectedRowOccurrencesColor = value; SetColor( "AUD_SelectedRowOccurrencesTint", value ); }
|
||||
}
|
||||
|
||||
private static Color? m_treeLinesColor = null;
|
||||
public static Color TreeLinesColor
|
||||
{
|
||||
get { if( m_treeLinesColor == null ) m_treeLinesColor = GetColor( "AUD_TreeLinesColor", EditorGUIUtility.isProSkin ? new Color( 0.65f, 0.65f, 0.65f, 1f ) : new Color( 0.375f, 0.375f, 0.375f, 1f ) ); return m_treeLinesColor.Value; }
|
||||
set { if( m_treeLinesColor == value ) return; m_treeLinesColor = value; SetColor( "AUD_TreeLinesColor", value ); }
|
||||
}
|
||||
|
||||
private static Color? m_highlightedTreeLinesColor = null;
|
||||
public static Color HighlightedTreeLinesColor
|
||||
{
|
||||
get { if( m_highlightedTreeLinesColor == null ) m_highlightedTreeLinesColor = GetColor( "AUD_HighlightTreeLinesColor", Color.cyan ); return m_highlightedTreeLinesColor.Value; }
|
||||
set { if( m_highlightedTreeLinesColor == value ) return; m_highlightedTreeLinesColor = value; SetColor( "AUD_HighlightTreeLinesColor", value ); }
|
||||
}
|
||||
|
||||
private static Color? m_searchMatchingTextColor = null;
|
||||
public static Color SearchMatchingTextColor
|
||||
{
|
||||
get { if( m_searchMatchingTextColor == null ) m_searchMatchingTextColor = GetColor( "AUD_SearchTextColor", Color.red ); return m_searchMatchingTextColor.Value; }
|
||||
set { if( m_searchMatchingTextColor == value ) return; m_searchMatchingTextColor = value; SetColor( "AUD_SearchTextColor", value ); ForEachAssetUsageDetectorWindow( ( window ) => window.OnSettingsChanged( highlightedSearchTextColorChanged: true ) ); }
|
||||
}
|
||||
|
||||
private static Color? m_tooltipDescriptionTextColor = null;
|
||||
public static Color TooltipDescriptionTextColor
|
||||
{
|
||||
get { if( m_tooltipDescriptionTextColor == null ) m_tooltipDescriptionTextColor = GetColor( "AUD_TooltipUsageTextColor", EditorGUIUtility.isProSkin ? new Color( 0f, 0.9f, 0.9f, 1f ) : new Color( 0.9f, 0f, 0f, 1f ) ); return m_tooltipDescriptionTextColor.Value; }
|
||||
set { if( m_tooltipDescriptionTextColor == value ) return; m_tooltipDescriptionTextColor = value; SetColor( "AUD_TooltipUsageTextColor", value ); ForEachAssetUsageDetectorWindow( ( window ) => window.OnSettingsChanged( tooltipDescriptionsColorChanged: true ) ); }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Size Adjustments
|
||||
private static float? m_extraRowHeight = null;
|
||||
public static float ExtraRowHeight
|
||||
{
|
||||
get { if( m_extraRowHeight == null ) m_extraRowHeight = EditorPrefs.GetFloat( "AUD_ExtraRowHeight", 0f ); return m_extraRowHeight.Value; }
|
||||
set { if( m_extraRowHeight == value ) return; m_extraRowHeight = value; EditorPrefs.SetFloat( "AUD_ExtraRowHeight", value ); ForEachAssetUsageDetectorWindow( ( window ) => window.OnSettingsChanged() ); }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Other Settings
|
||||
private static bool? m_showRootAssetName = null;
|
||||
public static bool ShowRootAssetName
|
||||
{
|
||||
get { if( m_showRootAssetName == null ) m_showRootAssetName = EditorPrefs.GetBool( "AUD_ShowRootAssetName", true ); return m_showRootAssetName.Value; }
|
||||
set { if( m_showRootAssetName == value ) return; m_showRootAssetName = value; EditorPrefs.SetBool( "AUD_ShowRootAssetName", value ); }
|
||||
}
|
||||
|
||||
private static bool? m_pingClickedObjects = null;
|
||||
public static bool PingClickedObjects
|
||||
{
|
||||
get { if( m_pingClickedObjects == null ) m_pingClickedObjects = EditorPrefs.GetBool( "AUD_PingClickedObj", true ); return m_pingClickedObjects.Value; }
|
||||
set { if( m_pingClickedObjects == value ) return; m_pingClickedObjects = value; EditorPrefs.SetBool( "AUD_PingClickedObj", value ); }
|
||||
}
|
||||
|
||||
private static bool? m_selectClickedObjects = null;
|
||||
public static bool SelectClickedObjects
|
||||
{
|
||||
get { if( m_selectClickedObjects == null ) m_selectClickedObjects = EditorPrefs.GetBool( "AUD_SelectClickedObj", false ); return m_selectClickedObjects.Value; }
|
||||
set { if( m_selectClickedObjects == value ) return; m_selectClickedObjects = value; EditorPrefs.SetBool( "AUD_SelectClickedObj", value ); }
|
||||
}
|
||||
|
||||
private static bool? m_selectDoubleClickedObjects = null;
|
||||
public static bool SelectDoubleClickedObjects
|
||||
{
|
||||
get { if( m_selectDoubleClickedObjects == null ) m_selectDoubleClickedObjects = EditorPrefs.GetBool( "AUD_SelectDoubleClickedObj", true ); return m_selectDoubleClickedObjects.Value; }
|
||||
set { if( m_selectDoubleClickedObjects == value ) return; m_selectDoubleClickedObjects = value; EditorPrefs.SetBool( "AUD_SelectDoubleClickedObj", value ); }
|
||||
}
|
||||
|
||||
private static bool? m_markUsedAssetsSubAssetsAsUsed = null;
|
||||
public static bool MarkUsedAssetsSubAssetsAsUsed
|
||||
{
|
||||
get { if( m_markUsedAssetsSubAssetsAsUsed == null ) m_markUsedAssetsSubAssetsAsUsed = EditorPrefs.GetBool( "AUD_MarkUsedAssetsSubAssetsAsUsed", true ); return m_markUsedAssetsSubAssetsAsUsed.Value; }
|
||||
set { if( m_markUsedAssetsSubAssetsAsUsed == value ) return; m_markUsedAssetsSubAssetsAsUsed = value; EditorPrefs.SetBool( "AUD_MarkUsedAssetsSubAssetsAsUsed", value ); }
|
||||
}
|
||||
|
||||
private static bool? m_showUnityTooltip = null;
|
||||
public static bool ShowUnityTooltip
|
||||
{
|
||||
get { if( m_showUnityTooltip == null ) m_showUnityTooltip = EditorPrefs.GetBool( "AUD_ShowUnityTooltip", false ); return m_showUnityTooltip.Value; }
|
||||
set { if( m_showUnityTooltip == value ) return; m_showUnityTooltip = value; EditorPrefs.SetBool( "AUD_ShowUnityTooltip", value ); }
|
||||
}
|
||||
|
||||
private static bool? m_showCustomTooltip = null;
|
||||
public static bool ShowCustomTooltip
|
||||
{
|
||||
get { if( m_showCustomTooltip == null ) m_showCustomTooltip = EditorPrefs.GetBool( "AUD_ShowCustomTooltip", true ); return m_showCustomTooltip.Value; }
|
||||
set { if( m_showCustomTooltip == value ) return; m_showCustomTooltip = value; EditorPrefs.SetBool( "AUD_ShowCustomTooltip", value ); ForEachAssetUsageDetectorWindow( ( window ) => window.OnSettingsChanged() ); }
|
||||
}
|
||||
|
||||
private static float? m_customTooltipDelay = null;
|
||||
public static float CustomTooltipDelay
|
||||
{
|
||||
get { if( m_customTooltipDelay == null ) m_customTooltipDelay = EditorPrefs.GetFloat( "AUD_CustomTooltipDelay", 0.7f ); return m_customTooltipDelay.Value; }
|
||||
set { if( m_customTooltipDelay == value ) return; m_customTooltipDelay = value; EditorPrefs.SetFloat( "AUD_CustomTooltipDelay", value ); }
|
||||
}
|
||||
|
||||
private static bool? m_showTreeLines = null;
|
||||
public static bool ShowTreeLines
|
||||
{
|
||||
get { if( m_showTreeLines == null ) m_showTreeLines = EditorPrefs.GetBool( "AUD_ShowTreeLines", true ); return m_showTreeLines.Value; }
|
||||
set { if( m_showTreeLines == value ) return; m_showTreeLines = value; EditorPrefs.SetBool( "AUD_ShowTreeLines", value ); }
|
||||
}
|
||||
|
||||
private static bool? m_applySelectedRowParentsTintToRootRows = null;
|
||||
public static bool ApplySelectedRowParentsTintToRootRows
|
||||
{
|
||||
get { if( m_applySelectedRowParentsTintToRootRows == null ) m_applySelectedRowParentsTintToRootRows = EditorPrefs.GetBool( "AUD_SelectedRowParentsTintAtRoot", true ); return m_applySelectedRowParentsTintToRootRows.Value; }
|
||||
set { if( m_applySelectedRowParentsTintToRootRows == value ) return; m_applySelectedRowParentsTintToRootRows = value; EditorPrefs.SetBool( "AUD_SelectedRowParentsTintAtRoot", value ); }
|
||||
}
|
||||
#endregion
|
||||
|
||||
[SettingsProvider]
|
||||
public static SettingsProvider CreatePreferencesGUI()
|
||||
{
|
||||
return new SettingsProvider( "Project/yasirkula/Asset Usage Detector", SettingsScope.Project )
|
||||
{
|
||||
guiHandler = ( searchContext ) => PreferencesGUI(),
|
||||
keywords = new System.Collections.Generic.HashSet<string>() { "Asset", "Usage", "Detector" }
|
||||
};
|
||||
}
|
||||
|
||||
public static void PreferencesGUI()
|
||||
{
|
||||
float labelWidth = EditorGUIUtility.labelWidth;
|
||||
EditorGUIUtility.labelWidth += 60f;
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
ShowRootAssetName = AssetUsageDetectorWindow.WordWrappingToggleLeft( "Show Root Asset's Name For Sub-Assets (Requires Refresh)", ShowRootAssetName );
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
PingClickedObjects = AssetUsageDetectorWindow.WordWrappingToggleLeft( "Ping Clicked Objects", PingClickedObjects );
|
||||
SelectClickedObjects = AssetUsageDetectorWindow.WordWrappingToggleLeft( "Select Clicked Objects", SelectClickedObjects );
|
||||
SelectDoubleClickedObjects = AssetUsageDetectorWindow.WordWrappingToggleLeft( "Select Double Clicked Objects", SelectDoubleClickedObjects );
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
MarkUsedAssetsSubAssetsAsUsed = AssetUsageDetectorWindow.WordWrappingToggleLeft( "Hide unused sub-assets in \"Unused Objects\" list if their parent assets are used (Requires Refresh)", MarkUsedAssetsSubAssetsAsUsed );
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
ShowUnityTooltip = AssetUsageDetectorWindow.WordWrappingToggleLeft( "Show Unity Tooltip", ShowUnityTooltip );
|
||||
ShowCustomTooltip = AssetUsageDetectorWindow.WordWrappingToggleLeft( "Show Custom Tooltip", ShowCustomTooltip );
|
||||
EditorGUI.indentLevel++;
|
||||
CustomTooltipDelay = FloatField( "Delay", CustomTooltipDelay, 0.7f );
|
||||
EditorGUI.indentLevel--;
|
||||
TooltipDescriptionTextColor = ColorField( "Tooltip Descriptions Text Color", TooltipDescriptionTextColor, EditorGUIUtility.isProSkin ? new Color( 0f, 0.9f, 0.9f, 1f ) : new Color( 0.9f, 0f, 0f, 1f ) );
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
ExtraRowHeight = Mathf.Max( 0f, FloatField( "Extra Row Height", ExtraRowHeight, 0f ) );
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
SettingsHeaderColor = ColorField( "Settings Header Color", SettingsHeaderColor, Color.cyan );
|
||||
SearchResultGroupHeaderColor = ColorField( "Group Header Color", SearchResultGroupHeaderColor, Color.cyan );
|
||||
RootRowsBackgroundColor = ColorField( "Root Rows Background Color", RootRowsBackgroundColor, EditorGUIUtility.isProSkin ? new Color( 0f, 1f, 1f, 0.15f ) : new Color( 0f, 1f, 1f, 0.25f ) );
|
||||
RootRowsBorderColor = ColorField( "Root Rows Border Color", RootRowsBorderColor, EditorGUIUtility.isProSkin ? new Color( 0.15f, 0.15f, 0.15f, 1f ) : new Color( 0.375f, 0.375f, 0.375f, 1f ) );
|
||||
MainReferencesBackgroundColor = ColorField( "Main References Background Color", MainReferencesBackgroundColor, EditorGUIUtility.isProSkin ? new Color( 0f, 0.35f, 0f, 1f ) : new Color( 0.25f, 0.75f, 0.25f, 1f ) );
|
||||
SelectedRowParentsTint = ColorField( "Selected Row Parents Tint", SelectedRowParentsTint, EditorGUIUtility.isProSkin ? new Color( 0.36f, 0.36f, 0.18f, 1f ) : new Color( 0.825f, 0.825f, 0.55f, 1f ) );
|
||||
EditorGUI.indentLevel++;
|
||||
ApplySelectedRowParentsTintToRootRows = !EditorGUILayout.Toggle( "Ignore Root Rows", !ApplySelectedRowParentsTintToRootRows );
|
||||
EditorGUI.indentLevel--;
|
||||
SelectedRowOccurrencesColor = ColorField( "Selected Row All Occurrences Tint", SelectedRowOccurrencesColor, EditorGUIUtility.isProSkin ? new Color( 0f, 0.3f, 0.75f, 1f ) : new Color( 0.25f, 0.75f, 1f, 1f ) );
|
||||
SearchMatchingTextColor = ColorField( "Matching Search Text Color", SearchMatchingTextColor, Color.red );
|
||||
|
||||
ShowTreeLines = AssetUsageDetectorWindow.WordWrappingToggleLeft( "Show Tree Lines", ShowTreeLines );
|
||||
EditorGUI.indentLevel++;
|
||||
TreeLinesColor = ColorField( "Normal Color", TreeLinesColor, EditorGUIUtility.isProSkin ? new Color( 0.65f, 0.65f, 0.65f, 1f ) : new Color( 0.375f, 0.375f, 0.375f, 1f ) );
|
||||
HighlightedTreeLinesColor = ColorField( "Highlighted Color", HighlightedTreeLinesColor, Color.cyan );
|
||||
EditorGUI.indentLevel--;
|
||||
|
||||
EditorGUIUtility.labelWidth = labelWidth;
|
||||
|
||||
if( EditorGUI.EndChangeCheck() )
|
||||
ForEachAssetUsageDetectorWindow( ( window ) => window.Repaint() );
|
||||
}
|
||||
|
||||
private static Color ColorField( string label, Color value, Color defaultValue )
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
Color result = EditorGUILayout.ColorField( label, value );
|
||||
if( GUILayout.Button( "Reset", GL_WIDTH_60 ) )
|
||||
result = defaultValue;
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private static float FloatField( string label, float value, float defaultValue )
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
float result = EditorGUILayout.FloatField( label, value );
|
||||
if( GUILayout.Button( "Reset", GL_WIDTH_60 ) )
|
||||
result = defaultValue;
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private static Color GetColor( string pref, Color defaultColor )
|
||||
{
|
||||
if( EditorGUIUtility.isProSkin )
|
||||
pref += "_Pro";
|
||||
|
||||
if( !EditorPrefs.HasKey( pref ) )
|
||||
return defaultColor;
|
||||
|
||||
string[] parts = EditorPrefs.GetString( pref ).Split( ';' );
|
||||
return new Color32( byte.Parse( parts[0] ), byte.Parse( parts[1] ), byte.Parse( parts[2] ), byte.Parse( parts[3] ) );
|
||||
}
|
||||
|
||||
private static void SetColor( string pref, Color32 value )
|
||||
{
|
||||
if( EditorGUIUtility.isProSkin )
|
||||
pref += "_Pro";
|
||||
|
||||
EditorPrefs.SetString( pref, string.Concat( value.r.ToString(), ";", value.g.ToString(), ";", value.b.ToString(), ";", value.a.ToString() ) );
|
||||
}
|
||||
|
||||
private static void ForEachAssetUsageDetectorWindow( System.Action<AssetUsageDetectorWindow> action )
|
||||
{
|
||||
foreach( AssetUsageDetectorWindow window in Resources.FindObjectsOfTypeAll<AssetUsageDetectorWindow>() )
|
||||
{
|
||||
if( window )
|
||||
action( window );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 13295073724765e45aa3b77486e515f4
|
||||
timeCreated: 1639982865
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 112837
|
||||
packageName: Asset Usage Detector
|
||||
packageVersion: 2.5.7
|
||||
assetPath: Assets/Plugins/AssetUsageDetector/Editor/AssetUsageDetectorSettings.cs
|
||||
uploadId: 761377
|
||||
@@ -0,0 +1,784 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using Object = UnityEngine.Object;
|
||||
#if UNITY_2021_2_OR_NEWER
|
||||
using PrefabStage = UnityEditor.SceneManagement.PrefabStage;
|
||||
using PrefabStageUtility = UnityEditor.SceneManagement.PrefabStageUtility;
|
||||
#elif UNITY_2018_3_OR_NEWER
|
||||
using PrefabStage = UnityEditor.Experimental.SceneManagement.PrefabStage;
|
||||
using PrefabStageUtility = UnityEditor.Experimental.SceneManagement.PrefabStageUtility;
|
||||
#endif
|
||||
|
||||
namespace AssetUsageDetectorNamespace
|
||||
{
|
||||
public enum Phase { Setup, Processing, Complete };
|
||||
|
||||
public class AssetUsageDetectorWindow : EditorWindow, IHasCustomMenu
|
||||
{
|
||||
private enum WindowFilter { AlwaysReturnActive, ReturnActiveIfNotLocked, AlwaysReturnNew };
|
||||
|
||||
private const string PREFS_SEARCH_SCENES = "AUD_SceneSearch";
|
||||
private const string PREFS_SEARCH_SCENE_LIGHTING_SETTINGS = "AUD_LightingSettingsSearch";
|
||||
private const string PREFS_SEARCH_ASSETS = "AUD_AssetsSearch";
|
||||
private const string PREFS_SEARCH_PROJECT_SETTINGS = "AUD_ProjectSettingsSearch";
|
||||
private const string PREFS_DONT_SEARCH_SOURCE_ASSETS = "AUD_AssetsExcludeSrc";
|
||||
private const string PREFS_SEARCH_DEPTH_LIMIT = "AUD_Depth";
|
||||
private const string PREFS_SEARCH_FIELDS = "AUD_Fields";
|
||||
private const string PREFS_SEARCH_PROPERTIES = "AUD_Properties";
|
||||
private const string PREFS_SEARCH_NON_SERIALIZABLES = "AUD_NonSerializables";
|
||||
private const string PREFS_SEARCH_UNUSED_MATERIAL_PROPERTIES = "AUD_SearchUnusedMaterialProps";
|
||||
private const string PREFS_LAZY_SCENE_SEARCH = "AUD_LazySceneSearch";
|
||||
#if ASSET_USAGE_ADDRESSABLES
|
||||
private const string PREFS_ADDRESSABLES_SUPPORT = "AUD_AddressablesSupport";
|
||||
#endif
|
||||
private const string PREFS_CALCULATE_UNUSED_OBJECTS = "AUD_FindUnusedObjs";
|
||||
private const string PREFS_HIDE_DUPLICATE_ROWS = "AUD_HideDuplicates";
|
||||
private const string PREFS_HIDE_REDUNDANT_PREFAB_REFERENCES_IN_ASSETS = "AUD_HideRedundantPRefsInAssets";
|
||||
private const string PREFS_HIDE_REDUNDANT_PREFAB_REFERENCES_IN_SCENES = "AUD_HideRedundantPRefsInScenes";
|
||||
private const string PREFS_SHOW_PROGRESS = "AUD_Progress";
|
||||
|
||||
private static readonly GUIContent windowTitle = new GUIContent( "Asset Usage Detector" );
|
||||
private static readonly Vector2 windowMinSize = new Vector2( 325f, 220f );
|
||||
|
||||
private static readonly GUILayoutOption GL_WIDTH_12 = GUILayout.Width( 12f );
|
||||
|
||||
private static readonly GUIContent sharedGUIContent = new GUIContent();
|
||||
|
||||
private readonly GUIContent hideRedundantPrefabReferencesInAssetsLabel = new GUIContent( "Hide redundant prefab references in Assets", "Hides redundant/non-overridden references in prefab variants and nested prefabs. " +
|
||||
"This will help focus on only the references that actually matter. For example:\n\n" +
|
||||
"- Material CloudMat is assigned to prefab Cloud and its variant CloudBig. Since changing Cloud's material will also affect CloudBig, search results won't show CloudBig's reference" );
|
||||
private readonly GUIContent hideRedundantPrefabReferencesInScenesLabel = new GUIContent( "Hide redundant prefab references in Scenes", "Hides redundant/non-overridden references in prefab instances. " +
|
||||
"This will help focus on only the references that actually matter. For example:\n\n" +
|
||||
"- Prefab Healthbar is nested inside prefab Player. An instance of Player exists in the current scene and its Healthbar isn't modified. Since modifying Healthbar in Player prefab will also affect " +
|
||||
"the instance in the scene, search results won't show the instance in the scene while searching for Healthbar's references" );
|
||||
|
||||
private GUIStyle lockButtonStyle;
|
||||
|
||||
private readonly AssetUsageDetector core = new AssetUsageDetector();
|
||||
private SearchResult searchResult; // Overall search results
|
||||
|
||||
// This isn't readonly so that it can be serialized
|
||||
private List<ObjectToSearch> objectsToSearch = new List<ObjectToSearch>() { new ObjectToSearch( null ) };
|
||||
|
||||
[SerializeField] // Since titleContent persists between Editor sessions, so should the IsLocked property because otherwise, "[L]" in title becomes confusing when the EditorWindow isn't actually locked
|
||||
private bool m_isLocked;
|
||||
private bool IsLocked
|
||||
{
|
||||
get { return m_isLocked; }
|
||||
set
|
||||
{
|
||||
if( m_isLocked != value )
|
||||
{
|
||||
m_isLocked = value;
|
||||
titleContent = value ? new GUIContent( "[L] " + windowTitle.text, EditorGUIUtility.IconContent( "InspectorLock" ).image ) : windowTitle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Phase currentPhase = Phase.Setup;
|
||||
|
||||
private bool searchInOpenScenes = true; // Scenes currently open in Hierarchy view
|
||||
private bool searchInScenesInBuild = true; // Scenes in build
|
||||
private bool searchInScenesInBuildTickedOnly = true; // Scenes in build (ticked only or not)
|
||||
private bool searchInAllScenes = true; // All scenes (including scenes that are not in build)
|
||||
private bool searchInSceneLightingSettings = true; // Window-Rendering-Lighting settings
|
||||
private bool searchInAssetsFolder = true; // Assets in Project window
|
||||
private bool dontSearchInSourceAssets = true; // objectsToSearch won't be searched for internal references
|
||||
private bool searchInProjectSettings = true; // Player Settings, Graphics Settings etc.
|
||||
|
||||
private List<Object> searchInAssetsSubset = new List<Object>() { null }; // If not empty, only these assets are searched for references
|
||||
private List<Object> excludedAssets = new List<Object>() { null }; // These assets won't be searched for references
|
||||
private List<Object> excludedScenes = new List<Object>() { null }; // These scenes won't be searched for references
|
||||
|
||||
private int searchDepthLimit = 4; // Depth limit for recursively searching variables of objects
|
||||
|
||||
private bool lazySceneSearch = true;
|
||||
#if ASSET_USAGE_ADDRESSABLES
|
||||
private bool addressablesSupport = false;
|
||||
#endif
|
||||
private bool searchNonSerializableVariables = true;
|
||||
private bool searchUnusedMaterialProperties = true;
|
||||
private bool calculateUnusedObjects = false;
|
||||
private bool hideDuplicateRows = true;
|
||||
private bool hideRedundantPrefabReferencesInAssets = false;
|
||||
private bool hideRedundantPrefabReferencesInScenes = false;
|
||||
private bool noAssetDatabaseChanges = false;
|
||||
private bool showDetailedProgressBar = true;
|
||||
|
||||
private BindingFlags fieldModifiers, propertyModifiers;
|
||||
|
||||
private SearchRefactoring searchRefactoring = null; // Its value can be assigned via ShowAndSearch
|
||||
|
||||
private readonly ObjectToSearchListDrawer objectsToSearchDrawer = new ObjectToSearchListDrawer();
|
||||
private readonly ObjectListDrawer searchInAssetsSubsetDrawer = new ObjectListDrawer( "Search following asset(s) only:", false );
|
||||
private readonly ObjectListDrawer excludedAssetsDrawer = new ObjectListDrawer( "Don't search following asset(s):", false );
|
||||
private readonly ObjectListDrawer excludedScenesDrawer = new ObjectListDrawer( "Don't search in following scene(s):", false );
|
||||
|
||||
private bool drawObjectsToSearchSection = true;
|
||||
|
||||
private Vector2 scrollPosition = Vector2.zero;
|
||||
|
||||
private bool shouldRepositionSelf;
|
||||
private Rect windowTargetPosition;
|
||||
|
||||
void IHasCustomMenu.AddItemsToMenu( GenericMenu contextMenu )
|
||||
{
|
||||
contextMenu.AddItem( new GUIContent( "Lock" ), IsLocked, () => IsLocked = !IsLocked );
|
||||
contextMenu.AddSeparator( "" );
|
||||
contextMenu.AddItem( new GUIContent( "Settings" ), false, () => SettingsService.OpenProjectSettings( "Project/yasirkula/Asset Usage Detector" ) );
|
||||
|
||||
if( currentPhase == Phase.Setup )
|
||||
{
|
||||
contextMenu.AddSeparator( "" );
|
||||
contextMenu.AddItem( new GUIContent( "Refresh Sub-Assets of Searched Objects" ), false, () =>
|
||||
{
|
||||
for( int i = objectsToSearch.Count - 1; i >= 0; i-- )
|
||||
objectsToSearch[i].RefreshSubAssets();
|
||||
} );
|
||||
}
|
||||
else if( currentPhase == Phase.Complete )
|
||||
{
|
||||
if( searchResult != null && searchResult.NumberOfGroups > 0 )
|
||||
{
|
||||
contextMenu.AddSeparator( "" );
|
||||
contextMenu.AddItem( new GUIContent( "Collapse All" ), false, searchResult.CollapseAllSearchResultGroups );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Shows lock button at the top-right corner
|
||||
// Credit: http://leahayes.co.uk/2013/04/30/adding-the-little-padlock-button-to-your-editorwindow.html
|
||||
private void ShowButton( Rect position )
|
||||
{
|
||||
if( lockButtonStyle == null )
|
||||
lockButtonStyle = "IN LockButton";
|
||||
|
||||
IsLocked = GUI.Toggle( position, IsLocked, GUIContent.none, lockButtonStyle );
|
||||
}
|
||||
|
||||
private static AssetUsageDetectorWindow GetWindow( WindowFilter filter )
|
||||
{
|
||||
AssetUsageDetectorWindow[] windows = Resources.FindObjectsOfTypeAll<AssetUsageDetectorWindow>();
|
||||
AssetUsageDetectorWindow window = System.Array.Find( windows, ( w ) => w && !w.IsLocked );
|
||||
if( !window )
|
||||
window = System.Array.Find( windows, ( w ) => w );
|
||||
|
||||
if( window && ( filter == WindowFilter.AlwaysReturnActive || ( !window.IsLocked && filter == WindowFilter.ReturnActiveIfNotLocked ) ) )
|
||||
{
|
||||
window.Show();
|
||||
window.Focus();
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
Rect? windowTargetPosition = null;
|
||||
if( window )
|
||||
{
|
||||
Rect position = window.position;
|
||||
position.position += new Vector2( 50f, 50f );
|
||||
windowTargetPosition = position;
|
||||
}
|
||||
|
||||
window = CreateInstance<AssetUsageDetectorWindow>();
|
||||
window.titleContent = windowTitle;
|
||||
window.minSize = windowMinSize;
|
||||
|
||||
if( windowTargetPosition.HasValue )
|
||||
{
|
||||
window.shouldRepositionSelf = true;
|
||||
window.windowTargetPosition = windowTargetPosition.Value;
|
||||
}
|
||||
|
||||
window.Show( true );
|
||||
window.Focus();
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
[MenuItem( "Window/Asset Usage Detector/Active Window" )]
|
||||
private static void OpenActiveWindow()
|
||||
{
|
||||
GetWindow( WindowFilter.AlwaysReturnActive );
|
||||
}
|
||||
|
||||
[MenuItem( "Window/Asset Usage Detector/New Window" )]
|
||||
private static void OpenNewWindow()
|
||||
{
|
||||
GetWindow( WindowFilter.AlwaysReturnNew );
|
||||
}
|
||||
|
||||
// Quickly initiate search for the selected assets
|
||||
[MenuItem( "GameObject/Search for References/This Object Only", priority = 49 )]
|
||||
[MenuItem( "Assets/Search for References", priority = 1000 )]
|
||||
private static void SearchSelectedAssetReferences( MenuCommand command )
|
||||
{
|
||||
// This happens when this button is clicked via hierarchy's right click context menu
|
||||
// and is called once for each object in the selection. We don't want that, we want
|
||||
// the function to be called only once
|
||||
if( command.context )
|
||||
{
|
||||
EditorApplication.update -= CallSearchSelectedAssetReferencesOnce;
|
||||
EditorApplication.update += CallSearchSelectedAssetReferencesOnce;
|
||||
}
|
||||
else
|
||||
ShowAndSearch( Selection.objects );
|
||||
}
|
||||
|
||||
[MenuItem( "GameObject/Search for References/Include Children", priority = 49 )]
|
||||
private static void SearchSelectedAssetReferencesWithChildren( MenuCommand command )
|
||||
{
|
||||
if( command.context )
|
||||
{
|
||||
EditorApplication.update -= CallSearchSelectedAssetReferencesWithChildrenOnce;
|
||||
EditorApplication.update += CallSearchSelectedAssetReferencesWithChildrenOnce;
|
||||
}
|
||||
else
|
||||
ShowAndSearch( Selection.objects, true );
|
||||
}
|
||||
|
||||
// Show the menu item only if there is a selection in the Editor
|
||||
[MenuItem( "GameObject/Search for References/This Object Only", validate = true )]
|
||||
[MenuItem( "GameObject/Search for References/Include Children", validate = true )]
|
||||
[MenuItem( "Assets/Search for References", validate = true )]
|
||||
private static bool SearchSelectedAssetReferencesValidate( MenuCommand command )
|
||||
{
|
||||
return Selection.objects.Length > 0;
|
||||
}
|
||||
|
||||
// Quickly show the AssetUsageDetector window and initiate a search
|
||||
public static void ShowAndSearch( IEnumerable<Object> searchObjects, bool? shouldSearchChildren = null )
|
||||
{
|
||||
GetWindow( WindowFilter.ReturnActiveIfNotLocked ).ShowAndSearchInternal( searchObjects, null, shouldSearchChildren );
|
||||
}
|
||||
|
||||
// Quickly show the AssetUsageDetector window and initiate a search
|
||||
public static void ShowAndSearch( AssetUsageDetector.Parameters searchParameters, bool? shouldSearchChildren = null )
|
||||
{
|
||||
if( searchParameters == null )
|
||||
{
|
||||
Debug.LogError( "searchParameters can't be null!" );
|
||||
return;
|
||||
}
|
||||
|
||||
GetWindow( WindowFilter.ReturnActiveIfNotLocked ).ShowAndSearchInternal( searchParameters.objectsToSearch, searchParameters, shouldSearchChildren );
|
||||
}
|
||||
|
||||
private static void CallSearchSelectedAssetReferencesOnce()
|
||||
{
|
||||
EditorApplication.update -= CallSearchSelectedAssetReferencesOnce;
|
||||
SearchSelectedAssetReferences( new MenuCommand( null ) );
|
||||
}
|
||||
|
||||
private static void CallSearchSelectedAssetReferencesWithChildrenOnce()
|
||||
{
|
||||
EditorApplication.update -= CallSearchSelectedAssetReferencesWithChildrenOnce;
|
||||
SearchSelectedAssetReferencesWithChildren( new MenuCommand( null ) );
|
||||
}
|
||||
|
||||
private void ShowAndSearchInternal( IEnumerable<Object> searchObjects, AssetUsageDetector.Parameters searchParameters, bool? shouldSearchChildren )
|
||||
{
|
||||
if( !ReturnToSetupPhase() )
|
||||
{
|
||||
Debug.LogError( "Need to reset the previous search first!" );
|
||||
return;
|
||||
}
|
||||
|
||||
objectsToSearch.Clear();
|
||||
if( searchObjects != null )
|
||||
{
|
||||
foreach( Object obj in searchObjects )
|
||||
objectsToSearch.Add( new ObjectToSearch( obj, shouldSearchChildren ) );
|
||||
}
|
||||
|
||||
if( searchParameters != null )
|
||||
{
|
||||
ParseSceneSearchMode( searchParameters.searchInScenes );
|
||||
searchInSceneLightingSettings = searchParameters.searchInSceneLightingSettings;
|
||||
searchInAssetsFolder = searchParameters.searchInAssetsFolder;
|
||||
dontSearchInSourceAssets = searchParameters.dontSearchInSourceAssets;
|
||||
searchInProjectSettings = searchParameters.searchInProjectSettings;
|
||||
searchDepthLimit = searchParameters.searchDepthLimit;
|
||||
fieldModifiers = searchParameters.fieldModifiers;
|
||||
propertyModifiers = searchParameters.propertyModifiers;
|
||||
searchNonSerializableVariables = searchParameters.searchNonSerializableVariables;
|
||||
searchUnusedMaterialProperties = searchParameters.searchUnusedMaterialProperties;
|
||||
searchRefactoring = searchParameters.searchRefactoring;
|
||||
lazySceneSearch = searchParameters.lazySceneSearch;
|
||||
#if ASSET_USAGE_ADDRESSABLES
|
||||
addressablesSupport = searchParameters.addressablesSupport;
|
||||
#endif
|
||||
calculateUnusedObjects = searchParameters.calculateUnusedObjects;
|
||||
hideDuplicateRows = searchParameters.hideDuplicateRows;
|
||||
hideRedundantPrefabReferencesInAssets = searchParameters.hideRedundantPrefabReferencesInAssets;
|
||||
hideRedundantPrefabReferencesInScenes = searchParameters.hideRedundantPrefabReferencesInScenes;
|
||||
noAssetDatabaseChanges = searchParameters.noAssetDatabaseChanges;
|
||||
showDetailedProgressBar = searchParameters.showDetailedProgressBar;
|
||||
|
||||
searchInAssetsSubset.Clear();
|
||||
if( searchParameters.searchInAssetsSubset != null )
|
||||
{
|
||||
foreach( Object obj in searchParameters.searchInAssetsSubset )
|
||||
searchInAssetsSubset.Add( obj );
|
||||
}
|
||||
|
||||
excludedAssets.Clear();
|
||||
if( searchParameters.excludedAssetsFromSearch != null )
|
||||
{
|
||||
foreach( Object obj in searchParameters.excludedAssetsFromSearch )
|
||||
excludedAssets.Add( obj );
|
||||
}
|
||||
|
||||
excludedScenes.Clear();
|
||||
if( searchParameters.excludedScenesFromSearch != null )
|
||||
{
|
||||
foreach( Object obj in searchParameters.excludedScenesFromSearch )
|
||||
excludedScenes.Add( obj );
|
||||
}
|
||||
}
|
||||
|
||||
InitiateSearch();
|
||||
Repaint();
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
LoadPrefs();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
if( currentPhase == Phase.Complete && AssetUsageDetectorSettings.ShowCustomTooltip )
|
||||
wantsMouseMove = wantsMouseEnterLeaveWindow = true; // These values aren't preserved during domain reload on Unity 2020.3.0f1
|
||||
|
||||
PrefabStage.prefabStageClosing += ReplacePrefabStageObjectsWithAssets;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
PrefabStage.prefabStageClosing -= ReplacePrefabStageObjectsWithAssets;
|
||||
SearchResultTooltip.Hide();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if( core != null )
|
||||
core.SaveCache();
|
||||
|
||||
SavePrefs();
|
||||
|
||||
if( searchResult != null && currentPhase == Phase.Complete )
|
||||
searchResult.RestoreInitialSceneSetup();
|
||||
}
|
||||
|
||||
private void SavePrefs()
|
||||
{
|
||||
EditorPrefs.SetInt( PREFS_SEARCH_SCENES, (int) GetSceneSearchMode( false ) );
|
||||
EditorPrefs.SetBool( PREFS_SEARCH_SCENE_LIGHTING_SETTINGS, searchInSceneLightingSettings );
|
||||
EditorPrefs.SetBool( PREFS_SEARCH_ASSETS, searchInAssetsFolder );
|
||||
EditorPrefs.SetBool( PREFS_DONT_SEARCH_SOURCE_ASSETS, dontSearchInSourceAssets );
|
||||
EditorPrefs.SetBool( PREFS_SEARCH_PROJECT_SETTINGS, searchInProjectSettings );
|
||||
EditorPrefs.SetInt( PREFS_SEARCH_DEPTH_LIMIT, searchDepthLimit );
|
||||
EditorPrefs.SetInt( PREFS_SEARCH_FIELDS, (int) fieldModifiers );
|
||||
EditorPrefs.SetInt( PREFS_SEARCH_PROPERTIES, (int) propertyModifiers );
|
||||
EditorPrefs.SetBool( PREFS_SEARCH_NON_SERIALIZABLES, searchNonSerializableVariables );
|
||||
EditorPrefs.SetBool( PREFS_SEARCH_UNUSED_MATERIAL_PROPERTIES, searchUnusedMaterialProperties );
|
||||
EditorPrefs.SetBool( PREFS_LAZY_SCENE_SEARCH, lazySceneSearch );
|
||||
#if ASSET_USAGE_ADDRESSABLES
|
||||
EditorPrefs.SetBool( PREFS_ADDRESSABLES_SUPPORT, addressablesSupport );
|
||||
#endif
|
||||
EditorPrefs.SetBool( PREFS_CALCULATE_UNUSED_OBJECTS, calculateUnusedObjects );
|
||||
EditorPrefs.SetBool( PREFS_HIDE_DUPLICATE_ROWS, hideDuplicateRows );
|
||||
EditorPrefs.SetBool( PREFS_HIDE_REDUNDANT_PREFAB_REFERENCES_IN_ASSETS, hideRedundantPrefabReferencesInAssets );
|
||||
EditorPrefs.SetBool( PREFS_HIDE_REDUNDANT_PREFAB_REFERENCES_IN_SCENES, hideRedundantPrefabReferencesInScenes );
|
||||
EditorPrefs.SetBool( PREFS_SHOW_PROGRESS, showDetailedProgressBar );
|
||||
}
|
||||
|
||||
private void LoadPrefs()
|
||||
{
|
||||
ParseSceneSearchMode( (SceneSearchMode) EditorPrefs.GetInt( PREFS_SEARCH_SCENES, (int) ( SceneSearchMode.OpenScenes | SceneSearchMode.ScenesInBuildSettingsTickedOnly | SceneSearchMode.AllScenes ) ) );
|
||||
searchInSceneLightingSettings = EditorPrefs.GetBool( PREFS_SEARCH_SCENE_LIGHTING_SETTINGS, true );
|
||||
searchInAssetsFolder = EditorPrefs.GetBool( PREFS_SEARCH_ASSETS, true );
|
||||
dontSearchInSourceAssets = EditorPrefs.GetBool( PREFS_DONT_SEARCH_SOURCE_ASSETS, true );
|
||||
searchInProjectSettings = EditorPrefs.GetBool( PREFS_SEARCH_PROJECT_SETTINGS, true );
|
||||
searchDepthLimit = EditorPrefs.GetInt( PREFS_SEARCH_DEPTH_LIMIT, 4 );
|
||||
fieldModifiers = (BindingFlags) EditorPrefs.GetInt( PREFS_SEARCH_FIELDS, (int) ( BindingFlags.Public | BindingFlags.NonPublic ) );
|
||||
propertyModifiers = (BindingFlags) EditorPrefs.GetInt( PREFS_SEARCH_PROPERTIES, (int) ( BindingFlags.Public | BindingFlags.NonPublic ) );
|
||||
searchNonSerializableVariables = EditorPrefs.GetBool( PREFS_SEARCH_NON_SERIALIZABLES, true );
|
||||
searchUnusedMaterialProperties = EditorPrefs.GetBool( PREFS_SEARCH_UNUSED_MATERIAL_PROPERTIES, true );
|
||||
lazySceneSearch = EditorPrefs.GetBool( PREFS_LAZY_SCENE_SEARCH, true );
|
||||
#if ASSET_USAGE_ADDRESSABLES
|
||||
addressablesSupport = EditorPrefs.GetBool( PREFS_ADDRESSABLES_SUPPORT, false );
|
||||
#endif
|
||||
calculateUnusedObjects = EditorPrefs.GetBool( PREFS_CALCULATE_UNUSED_OBJECTS, false );
|
||||
hideDuplicateRows = EditorPrefs.GetBool( PREFS_HIDE_DUPLICATE_ROWS, true );
|
||||
hideRedundantPrefabReferencesInAssets = EditorPrefs.GetBool( PREFS_HIDE_REDUNDANT_PREFAB_REFERENCES_IN_ASSETS, hideRedundantPrefabReferencesInAssets );
|
||||
hideRedundantPrefabReferencesInScenes = EditorPrefs.GetBool( PREFS_HIDE_REDUNDANT_PREFAB_REFERENCES_IN_SCENES, hideRedundantPrefabReferencesInScenes );
|
||||
showDetailedProgressBar = EditorPrefs.GetBool( PREFS_SHOW_PROGRESS, true );
|
||||
}
|
||||
|
||||
private SceneSearchMode GetSceneSearchMode( bool hideOptionsInPlayMode )
|
||||
{
|
||||
SceneSearchMode sceneSearchMode = SceneSearchMode.None;
|
||||
if( searchInOpenScenes )
|
||||
sceneSearchMode |= SceneSearchMode.OpenScenes;
|
||||
if( !hideOptionsInPlayMode || !EditorApplication.isPlaying )
|
||||
{
|
||||
if( searchInScenesInBuild )
|
||||
sceneSearchMode |= searchInScenesInBuildTickedOnly ? SceneSearchMode.ScenesInBuildSettingsTickedOnly : SceneSearchMode.ScenesInBuildSettingsAll;
|
||||
if( searchInAllScenes )
|
||||
sceneSearchMode |= SceneSearchMode.AllScenes;
|
||||
}
|
||||
|
||||
return sceneSearchMode;
|
||||
}
|
||||
|
||||
private void ParseSceneSearchMode( SceneSearchMode sceneSearchMode )
|
||||
{
|
||||
searchInOpenScenes = ( sceneSearchMode & SceneSearchMode.OpenScenes ) == SceneSearchMode.OpenScenes;
|
||||
searchInScenesInBuild = ( sceneSearchMode & SceneSearchMode.ScenesInBuildSettingsAll ) == SceneSearchMode.ScenesInBuildSettingsAll || ( sceneSearchMode & SceneSearchMode.ScenesInBuildSettingsTickedOnly ) == SceneSearchMode.ScenesInBuildSettingsTickedOnly;
|
||||
searchInScenesInBuildTickedOnly = ( sceneSearchMode & SceneSearchMode.ScenesInBuildSettingsAll ) != SceneSearchMode.ScenesInBuildSettingsAll;
|
||||
searchInAllScenes = ( sceneSearchMode & SceneSearchMode.AllScenes ) == SceneSearchMode.AllScenes;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if( shouldRepositionSelf )
|
||||
{
|
||||
shouldRepositionSelf = false;
|
||||
position = windowTargetPosition;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
// Make the window scrollable
|
||||
scrollPosition = EditorGUILayout.BeginScrollView( scrollPosition, Utilities.GL_EXPAND_WIDTH, Utilities.GL_EXPAND_HEIGHT );
|
||||
|
||||
GUILayout.BeginVertical();
|
||||
|
||||
if( currentPhase == Phase.Processing )
|
||||
{
|
||||
// If we are stuck at this phase, then we have encountered an exception
|
||||
GUILayout.Label( ". . . Search in progress or something went wrong (check console) . . ." );
|
||||
|
||||
if( GUILayout.Button( "RETURN", Utilities.GL_HEIGHT_30 ) )
|
||||
{
|
||||
ReturnToSetupPhase();
|
||||
GUIUtility.ExitGUI();
|
||||
}
|
||||
}
|
||||
else if( currentPhase == Phase.Setup )
|
||||
{
|
||||
DrawObjectsToSearchSection();
|
||||
|
||||
GUILayout.Space( 10f );
|
||||
|
||||
Utilities.DrawHeader( "<b>SEARCH IN</b>" );
|
||||
|
||||
searchInAssetsFolder = WordWrappingToggleLeft( "Project window (Assets folder)", searchInAssetsFolder );
|
||||
|
||||
if( searchInAssetsFolder )
|
||||
{
|
||||
BeginIndentedGUI();
|
||||
searchInAssetsSubsetDrawer.Draw( searchInAssetsSubset );
|
||||
excludedAssetsDrawer.Draw( excludedAssets );
|
||||
EndIndentedGUI();
|
||||
}
|
||||
|
||||
GUILayout.Space( 5f );
|
||||
|
||||
dontSearchInSourceAssets = WordWrappingToggleLeft( "Don't search \"SEARCHED OBJECTS\" themselves for references", dontSearchInSourceAssets );
|
||||
searchUnusedMaterialProperties = WordWrappingToggleLeft( "Search unused material properties (e.g. normal map of a material that no longer uses normal mapping)", searchUnusedMaterialProperties );
|
||||
|
||||
Utilities.DrawSeparatorLine();
|
||||
|
||||
if( searchInAllScenes && !EditorApplication.isPlaying )
|
||||
GUI.enabled = false;
|
||||
|
||||
searchInOpenScenes = WordWrappingToggleLeft( "Currently open (loaded) scene(s)", searchInOpenScenes );
|
||||
|
||||
if( !EditorApplication.isPlaying )
|
||||
{
|
||||
searchInScenesInBuild = WordWrappingToggleLeft( "Scenes in Build Settings", searchInScenesInBuild );
|
||||
|
||||
if( searchInScenesInBuild )
|
||||
{
|
||||
BeginIndentedGUI( false );
|
||||
searchInScenesInBuildTickedOnly = EditorGUILayout.ToggleLeft( "Ticked only", searchInScenesInBuildTickedOnly, Utilities.GL_WIDTH_100 );
|
||||
searchInScenesInBuildTickedOnly = !EditorGUILayout.ToggleLeft( "All", !searchInScenesInBuildTickedOnly, Utilities.GL_WIDTH_100 );
|
||||
EndIndentedGUI( false );
|
||||
}
|
||||
|
||||
GUI.enabled = true;
|
||||
|
||||
searchInAllScenes = WordWrappingToggleLeft( "All scenes in the project", searchInAllScenes );
|
||||
}
|
||||
|
||||
BeginIndentedGUI();
|
||||
excludedScenesDrawer.Draw( excludedScenes );
|
||||
EndIndentedGUI();
|
||||
|
||||
EditorGUI.BeginDisabledGroup( !searchInOpenScenes && !searchInScenesInBuild && !searchInAllScenes );
|
||||
searchInSceneLightingSettings = WordWrappingToggleLeft( "Scene Lighting Settings (WARNING: This may change the active scene during search)", searchInSceneLightingSettings );
|
||||
EditorGUI.EndDisabledGroup();
|
||||
|
||||
Utilities.DrawSeparatorLine();
|
||||
|
||||
searchInProjectSettings = WordWrappingToggleLeft( "Project Settings (Player Settings, Graphics Settings etc.)", searchInProjectSettings );
|
||||
|
||||
GUILayout.Space( 10f );
|
||||
|
||||
Utilities.DrawHeader( "<b>SETTINGS</b>" );
|
||||
|
||||
#if ASSET_USAGE_ADDRESSABLES
|
||||
EditorGUI.BeginDisabledGroup( addressablesSupport );
|
||||
#endif
|
||||
lazySceneSearch = WordWrappingToggleLeft( "Lazy scene search: scenes are searched in detail only when they are manually refreshed (faster search)", lazySceneSearch );
|
||||
#if ASSET_USAGE_ADDRESSABLES
|
||||
EditorGUI.EndDisabledGroup();
|
||||
addressablesSupport = WordWrappingToggleLeft( "Addressables support (Experimental) (WARNING: 'Lazy scene search' will be disabled) (slower search)", addressablesSupport );
|
||||
#endif
|
||||
calculateUnusedObjects = WordWrappingToggleLeft( "Calculate unused objects", calculateUnusedObjects );
|
||||
hideDuplicateRows = WordWrappingToggleLeft( "Hide duplicate rows in search results", hideDuplicateRows );
|
||||
hideRedundantPrefabReferencesInAssets = WordWrappingToggleLeft( hideRedundantPrefabReferencesInAssetsLabel, hideRedundantPrefabReferencesInAssets );
|
||||
hideRedundantPrefabReferencesInScenes = WordWrappingToggleLeft( hideRedundantPrefabReferencesInScenesLabel, hideRedundantPrefabReferencesInScenes );
|
||||
noAssetDatabaseChanges = WordWrappingToggleLeft( "I haven't modified any assets/scenes since the last search (faster search)", noAssetDatabaseChanges );
|
||||
showDetailedProgressBar = WordWrappingToggleLeft( "Update search progress bar more often (cancelable search) (slower search)", showDetailedProgressBar );
|
||||
|
||||
GUILayout.Space( 10f );
|
||||
|
||||
// Don't let the user press the GO button without any valid search location
|
||||
if( !searchInAllScenes && !searchInOpenScenes && !searchInScenesInBuild && !searchInAssetsFolder && !searchInProjectSettings )
|
||||
GUI.enabled = false;
|
||||
|
||||
if( GUILayout.Button( "GO!", Utilities.GL_HEIGHT_30 ) )
|
||||
{
|
||||
InitiateSearch();
|
||||
GUIUtility.ExitGUI();
|
||||
}
|
||||
|
||||
GUILayout.Space( 5f );
|
||||
}
|
||||
else if( currentPhase == Phase.Complete )
|
||||
{
|
||||
// Draw the results of the search
|
||||
GUI.enabled = false;
|
||||
|
||||
DrawObjectsToSearchSection();
|
||||
|
||||
if( drawObjectsToSearchSection )
|
||||
GUILayout.Space( 10f );
|
||||
|
||||
GUI.enabled = true;
|
||||
|
||||
if( GUILayout.Button( "Reset Search", Utilities.GL_HEIGHT_30 ) )
|
||||
{
|
||||
ReturnToSetupPhase();
|
||||
GUIUtility.ExitGUI();
|
||||
}
|
||||
|
||||
if( searchResult == null )
|
||||
{
|
||||
EditorGUILayout.HelpBox( "ERROR: searchResult is null", MessageType.Error );
|
||||
return;
|
||||
}
|
||||
else if( !searchResult.SearchCompletedSuccessfully )
|
||||
EditorGUILayout.HelpBox( "ERROR: search was interrupted, check the logs for more info", MessageType.Error );
|
||||
|
||||
if( searchResult.NumberOfGroups == 0 )
|
||||
{
|
||||
GUILayout.Space( 10f );
|
||||
GUILayout.Box( "No references found...", Utilities.BoxGUIStyle, Utilities.GL_EXPAND_WIDTH );
|
||||
}
|
||||
else
|
||||
{
|
||||
noAssetDatabaseChanges = WordWrappingToggleLeft( "I haven't modified any assets/scenes since the last search (faster Refresh)", noAssetDatabaseChanges );
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
scrollPosition.y = searchResult.DrawOnGUI( this, scrollPosition.y, noAssetDatabaseChanges );
|
||||
}
|
||||
}
|
||||
|
||||
if( Event.current.type == EventType.MouseLeaveWindow )
|
||||
{
|
||||
SearchResultTooltip.Hide();
|
||||
|
||||
if( searchResult != null )
|
||||
searchResult.CancelDelayedTreeViewTooltip();
|
||||
}
|
||||
|
||||
GUILayout.EndVertical();
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
private void DrawObjectsToSearchSection()
|
||||
{
|
||||
Utilities.DrawHeader( "<b>SEARCHED OBJECTS</b>" );
|
||||
|
||||
Rect searchedObjectsHeaderRect = GUILayoutUtility.GetLastRect();
|
||||
searchedObjectsHeaderRect.x += 5f;
|
||||
searchedObjectsHeaderRect.yMin += ( searchedObjectsHeaderRect.height - EditorGUIUtility.singleLineHeight ) * 0.5f;
|
||||
searchedObjectsHeaderRect.height = EditorGUIUtility.singleLineHeight;
|
||||
|
||||
drawObjectsToSearchSection = EditorGUI.Foldout( searchedObjectsHeaderRect, drawObjectsToSearchSection, GUIContent.none, true );
|
||||
|
||||
if( drawObjectsToSearchSection )
|
||||
objectsToSearchDrawer.Draw( objectsToSearch );
|
||||
}
|
||||
|
||||
private void BeginIndentedGUI( bool isVertical = true )
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space( 35f );
|
||||
|
||||
if( isVertical )
|
||||
GUILayout.BeginVertical();
|
||||
}
|
||||
|
||||
private void EndIndentedGUI( bool isVertical = true )
|
||||
{
|
||||
if( isVertical )
|
||||
GUILayout.EndVertical();
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
public static bool WordWrappingToggleLeft( string label, bool value )
|
||||
{
|
||||
sharedGUIContent.text = label;
|
||||
sharedGUIContent.tooltip = null;
|
||||
return WordWrappingToggleLeft( sharedGUIContent, value );
|
||||
}
|
||||
|
||||
public static bool WordWrappingToggleLeft( GUIContent label, bool value )
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
bool result = EditorGUILayout.ToggleLeft( GUIContent.none, value, GL_WIDTH_12 );
|
||||
if( GUILayout.Button( label, EditorStyles.wordWrappedLabel ) )
|
||||
{
|
||||
GUI.FocusControl( null );
|
||||
result = !value;
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private void InitiateSearch()
|
||||
{
|
||||
currentPhase = Phase.Processing;
|
||||
|
||||
SavePrefs();
|
||||
ReplacePrefabStageObjectsWithAssets( PrefabStageUtility.GetCurrentPrefabStage() );
|
||||
|
||||
// Start searching
|
||||
searchResult = core.Run( new AssetUsageDetector.Parameters()
|
||||
{
|
||||
objectsToSearch = !objectsToSearch.IsEmpty() ? new ObjectToSearchEnumerator( objectsToSearch ).ToArray() : null,
|
||||
searchInScenes = GetSceneSearchMode( true ),
|
||||
searchInSceneLightingSettings = searchInSceneLightingSettings,
|
||||
searchInAssetsFolder = searchInAssetsFolder,
|
||||
searchInAssetsSubset = !searchInAssetsSubset.IsEmpty() ? searchInAssetsSubset.ToArray() : null,
|
||||
excludedAssetsFromSearch = !excludedAssets.IsEmpty() ? excludedAssets.ToArray() : null,
|
||||
dontSearchInSourceAssets = dontSearchInSourceAssets,
|
||||
excludedScenesFromSearch = !excludedScenes.IsEmpty() ? excludedScenes.ToArray() : null,
|
||||
searchInProjectSettings = searchInProjectSettings,
|
||||
//fieldModifiers = fieldModifiers,
|
||||
//propertyModifiers = propertyModifiers,
|
||||
//searchDepthLimit = searchDepthLimit,
|
||||
//searchNonSerializableVariables = searchNonSerializableVariables,
|
||||
searchUnusedMaterialProperties = searchUnusedMaterialProperties,
|
||||
searchRefactoring = searchRefactoring,
|
||||
#if ASSET_USAGE_ADDRESSABLES
|
||||
lazySceneSearch = lazySceneSearch && !addressablesSupport,
|
||||
addressablesSupport = addressablesSupport,
|
||||
#else
|
||||
lazySceneSearch = lazySceneSearch,
|
||||
#endif
|
||||
calculateUnusedObjects = calculateUnusedObjects,
|
||||
hideDuplicateRows = hideDuplicateRows,
|
||||
hideRedundantPrefabReferencesInAssets = hideRedundantPrefabReferencesInAssets,
|
||||
hideRedundantPrefabReferencesInScenes = hideRedundantPrefabReferencesInScenes && searchInAssetsFolder,
|
||||
noAssetDatabaseChanges = noAssetDatabaseChanges,
|
||||
showDetailedProgressBar = showDetailedProgressBar
|
||||
} );
|
||||
|
||||
currentPhase = Phase.Complete;
|
||||
|
||||
// We really don't want SearchRefactoring to affect next searches unless the search is initiated via ShowAndSearch again
|
||||
searchRefactoring = null;
|
||||
|
||||
if( AssetUsageDetectorSettings.ShowCustomTooltip )
|
||||
wantsMouseMove = wantsMouseEnterLeaveWindow = true;
|
||||
}
|
||||
|
||||
// Try replacing searched objects who are part of currently open prefab stage with their corresponding prefab assets
|
||||
public void ReplacePrefabStageObjectsWithAssets( PrefabStage prefabStage )
|
||||
{
|
||||
if( prefabStage == null || !prefabStage.stageHandle.IsValid() )
|
||||
return;
|
||||
|
||||
GameObject prefabAsset = AssetDatabase.LoadAssetAtPath<GameObject>( prefabStage.assetPath );
|
||||
if( prefabAsset == null || prefabAsset.Equals( null ) )
|
||||
return;
|
||||
|
||||
for( int i = 0; i < objectsToSearch.Count; i++ )
|
||||
{
|
||||
Object obj = objectsToSearch[i].obj;
|
||||
if( obj != null && !obj.Equals( null ) && obj is GameObject && prefabStage.IsPartOfPrefabContents( (GameObject) obj ) )
|
||||
{
|
||||
GameObject prefabStageObjectSource = ( (GameObject) obj ).FollowSymmetricHierarchy( prefabStage.prefabContentsRoot, prefabAsset );
|
||||
if( prefabStageObjectSource != null )
|
||||
objectsToSearch[i].obj = prefabStageObjectSource;
|
||||
|
||||
List<ObjectToSearch.SubAsset> subAssets = objectsToSearch[i].subAssets;
|
||||
for( int j = 0; j < subAssets.Count; j++ )
|
||||
{
|
||||
obj = subAssets[j].subAsset;
|
||||
if( obj != null && !obj.Equals( null ) && obj is GameObject && prefabStage.IsPartOfPrefabContents( (GameObject) obj ) )
|
||||
{
|
||||
prefabStageObjectSource = ( (GameObject) obj ).FollowSymmetricHierarchy( prefabStage.prefabContentsRoot, prefabAsset );
|
||||
if( prefabStageObjectSource != null )
|
||||
subAssets[j].subAsset = prefabStageObjectSource;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool ReturnToSetupPhase()
|
||||
{
|
||||
if( searchResult != null && !EditorApplication.isPlaying && !searchResult.RestoreInitialSceneSetup() )
|
||||
return false;
|
||||
|
||||
searchResult = null;
|
||||
currentPhase = Phase.Setup;
|
||||
wantsMouseMove = wantsMouseEnterLeaveWindow = false;
|
||||
|
||||
SearchResultTooltip.Hide();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
internal void OnSettingsChanged( bool highlightedSearchTextColorChanged = false, bool tooltipDescriptionsColorChanged = false )
|
||||
{
|
||||
if( searchResult == null )
|
||||
return;
|
||||
|
||||
wantsMouseMove = wantsMouseEnterLeaveWindow = AssetUsageDetectorSettings.ShowCustomTooltip;
|
||||
|
||||
for( int i = searchResult.NumberOfGroups - 1; i >= 0; i-- )
|
||||
{
|
||||
if( searchResult[i].treeView != null )
|
||||
{
|
||||
searchResult[i].treeView.rowHeight = EditorGUIUtility.singleLineHeight + AssetUsageDetectorSettings.ExtraRowHeight;
|
||||
searchResult[i].treeView.OnSettingsChanged( highlightedSearchTextColorChanged, tooltipDescriptionsColorChanged );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 271a22c69c3d96c4dbdd04cca415a840
|
||||
timeCreated: 1520032279
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 112837
|
||||
packageName: Asset Usage Detector
|
||||
packageVersion: 2.5.7
|
||||
assetPath: Assets/Plugins/AssetUsageDetector/Editor/AssetUsageDetectorWindow.cs
|
||||
uploadId: 761377
|
||||
130
Assets/Plugins/AssetUsageDetector/Editor/Enumerators.cs
Normal file
130
Assets/Plugins/AssetUsageDetector/Editor/Enumerators.cs
Normal file
@@ -0,0 +1,130 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AssetUsageDetectorNamespace
|
||||
{
|
||||
public class EmptyEnumerator<T> : IEnumerable<T>, IEnumerator<T>
|
||||
{
|
||||
public T Current { get { return default( T ); } }
|
||||
object IEnumerator.Current { get { return Current; } }
|
||||
|
||||
public void Dispose() { }
|
||||
public void Reset() { }
|
||||
|
||||
public bool MoveNext()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public IEnumerator<T> GetEnumerator()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public class ObjectToSearchEnumerator : IEnumerable<Object>
|
||||
{
|
||||
public class Enumerator : IEnumerator<Object>
|
||||
{
|
||||
public Object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if( subAssetIndex < 0 )
|
||||
return source[index].obj;
|
||||
|
||||
return source[index].subAssets[subAssetIndex].subAsset;
|
||||
}
|
||||
}
|
||||
|
||||
object IEnumerator.Current { get { return Current; } }
|
||||
|
||||
private List<ObjectToSearch> source;
|
||||
private int index;
|
||||
private int subAssetIndex;
|
||||
|
||||
public Enumerator( List<ObjectToSearch> source )
|
||||
{
|
||||
this.source = source;
|
||||
Reset();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
source = null;
|
||||
}
|
||||
|
||||
public bool MoveNext()
|
||||
{
|
||||
if( subAssetIndex < -1 )
|
||||
{
|
||||
subAssetIndex = -1;
|
||||
|
||||
if( ++index >= source.Count )
|
||||
return false;
|
||||
|
||||
// Skip folder assets in the enumeration, AssetUsageDetector expands encountered folders automatically
|
||||
// and we don't want that to happen as source[index].subAssets already contains the folder's contents
|
||||
if( !source[index].obj.IsFolder() )
|
||||
return true;
|
||||
}
|
||||
|
||||
List<ObjectToSearch.SubAsset> subAssets = source[index].subAssets;
|
||||
if( subAssets != null )
|
||||
{
|
||||
while( ++subAssetIndex < subAssets.Count && !subAssets[subAssetIndex].shouldSearch )
|
||||
continue;
|
||||
|
||||
if( subAssetIndex < subAssets.Count )
|
||||
return true;
|
||||
}
|
||||
|
||||
subAssetIndex = -2;
|
||||
return MoveNext();
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
index = -1;
|
||||
subAssetIndex = -2;
|
||||
}
|
||||
}
|
||||
|
||||
private readonly List<ObjectToSearch> source;
|
||||
|
||||
public ObjectToSearchEnumerator( List<ObjectToSearch> source )
|
||||
{
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public IEnumerator<Object> GetEnumerator()
|
||||
{
|
||||
return new Enumerator( source );
|
||||
}
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
|
||||
public Object[] ToArray()
|
||||
{
|
||||
int count = 0;
|
||||
foreach( Object obj in this )
|
||||
count++;
|
||||
|
||||
Object[] result = new Object[count];
|
||||
int index = 0;
|
||||
foreach( Object obj in this )
|
||||
result[index++] = obj;
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/Plugins/AssetUsageDetector/Editor/Enumerators.cs.meta
Normal file
19
Assets/Plugins/AssetUsageDetector/Editor/Enumerators.cs.meta
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 894047c47ce45cf40939dae24afcc72b
|
||||
timeCreated: 1562079461
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 112837
|
||||
packageName: Asset Usage Detector
|
||||
packageVersion: 2.5.7
|
||||
assetPath: Assets/Plugins/AssetUsageDetector/Editor/Enumerators.cs
|
||||
uploadId: 761377
|
||||
252
Assets/Plugins/AssetUsageDetector/Editor/ListDrawer.cs
Normal file
252
Assets/Plugins/AssetUsageDetector/Editor/ListDrawer.cs
Normal file
@@ -0,0 +1,252 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AssetUsageDetectorNamespace
|
||||
{
|
||||
public abstract class ListDrawer<T>
|
||||
{
|
||||
private readonly string label;
|
||||
private readonly bool acceptSceneObjects;
|
||||
|
||||
protected ListDrawer( string label, bool acceptSceneObjects )
|
||||
{
|
||||
this.label = label;
|
||||
this.acceptSceneObjects = acceptSceneObjects;
|
||||
}
|
||||
|
||||
// Exposes a list on GUI
|
||||
public bool Draw( List<T> list )
|
||||
{
|
||||
bool hasChanged = false;
|
||||
bool guiEnabled = GUI.enabled;
|
||||
|
||||
Event ev = Event.current;
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
|
||||
GUILayout.Label( label );
|
||||
|
||||
if( guiEnabled )
|
||||
{
|
||||
// Handle drag & drop references to array
|
||||
// Credit: https://answers.unity.com/answers/657877/view.html
|
||||
if( ( ev.type == EventType.DragPerform || ev.type == EventType.DragUpdated ) && GUILayoutUtility.GetLastRect().Contains( ev.mousePosition ) )
|
||||
{
|
||||
DragAndDrop.visualMode = DragAndDropVisualMode.Copy;
|
||||
if( ev.type == EventType.DragPerform )
|
||||
{
|
||||
DragAndDrop.AcceptDrag();
|
||||
|
||||
Object[] draggedObjects = DragAndDrop.objectReferences;
|
||||
if( draggedObjects.Length > 0 )
|
||||
{
|
||||
for( int i = 0; i < draggedObjects.Length; i++ )
|
||||
{
|
||||
if( draggedObjects[i] != null && !draggedObjects[i].Equals( null ) )
|
||||
{
|
||||
bool replacedNullElement = false;
|
||||
for( int j = 0; j < list.Count; j++ )
|
||||
{
|
||||
if( IsElementNull( list[j] ) )
|
||||
{
|
||||
list[j] = CreateElement( draggedObjects[i] );
|
||||
|
||||
replacedNullElement = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( !replacedNullElement )
|
||||
list.Add( CreateElement( draggedObjects[i] ) );
|
||||
|
||||
hasChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ev.Use();
|
||||
}
|
||||
else if( ev.type == EventType.ContextClick && GUILayoutUtility.GetLastRect().Contains( ev.mousePosition ) )
|
||||
{
|
||||
GenericMenu contextMenu = new GenericMenu();
|
||||
contextMenu.AddItem( new GUIContent( "Clear" ), false, () =>
|
||||
{
|
||||
list.Clear();
|
||||
list.Add( CreateElement( null ) );
|
||||
} );
|
||||
contextMenu.ShowAsContext();
|
||||
|
||||
ev.Use();
|
||||
}
|
||||
|
||||
if( GUILayout.Button( "+", Utilities.GL_WIDTH_25 ) )
|
||||
list.Insert( 0, CreateElement( null ) );
|
||||
}
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
for( int i = 0; i < list.Count; i++ )
|
||||
{
|
||||
T element = list[i];
|
||||
|
||||
GUI.changed = false;
|
||||
GUILayout.BeginHorizontal();
|
||||
|
||||
Object prevObject = GetObjectFromElement( element );
|
||||
Object newObject = EditorGUILayout.ObjectField( "", prevObject, typeof( Object ), acceptSceneObjects );
|
||||
|
||||
if( GUI.changed )
|
||||
{
|
||||
hasChanged = true;
|
||||
SetObjectOfElement( list, i, newObject );
|
||||
}
|
||||
|
||||
if( guiEnabled )
|
||||
{
|
||||
if( GUILayout.Button( "+", Utilities.GL_WIDTH_25 ) )
|
||||
list.Insert( i + 1, CreateElement( null ) );
|
||||
|
||||
if( GUILayout.Button( "-", Utilities.GL_WIDTH_25 ) )
|
||||
{
|
||||
if( element != null && !element.Equals( null ) )
|
||||
hasChanged = true;
|
||||
|
||||
// Lists with no elements look ugly, always keep a dummy null variable
|
||||
if( list.Count > 1 )
|
||||
list.RemoveAt( i-- );
|
||||
else
|
||||
list[0] = CreateElement( null );
|
||||
}
|
||||
}
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
PostElementDrawer( element );
|
||||
}
|
||||
|
||||
return hasChanged;
|
||||
}
|
||||
|
||||
protected abstract T CreateElement( Object source );
|
||||
protected abstract Object GetObjectFromElement( T element );
|
||||
protected abstract void SetObjectOfElement( List<T> list, int index, Object value );
|
||||
protected abstract bool IsElementNull( T element );
|
||||
protected abstract void PostElementDrawer( T element );
|
||||
}
|
||||
|
||||
public class ObjectListDrawer : ListDrawer<Object>
|
||||
{
|
||||
public ObjectListDrawer( string label, bool acceptSceneObjects ) : base( label, acceptSceneObjects )
|
||||
{
|
||||
}
|
||||
|
||||
protected override Object CreateElement( Object source )
|
||||
{
|
||||
return source;
|
||||
}
|
||||
|
||||
protected override Object GetObjectFromElement( Object element )
|
||||
{
|
||||
return element;
|
||||
}
|
||||
|
||||
protected override void SetObjectOfElement( List<Object> list, int index, Object value )
|
||||
{
|
||||
list[index] = value;
|
||||
}
|
||||
|
||||
protected override bool IsElementNull( Object element )
|
||||
{
|
||||
return element == null || element.Equals( null );
|
||||
}
|
||||
|
||||
protected override void PostElementDrawer( Object element )
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class ObjectToSearchListDrawer : ListDrawer<ObjectToSearch>
|
||||
{
|
||||
public ObjectToSearchListDrawer() : base( "Find references of:", true )
|
||||
{
|
||||
}
|
||||
|
||||
protected override ObjectToSearch CreateElement( Object source )
|
||||
{
|
||||
return new ObjectToSearch( source );
|
||||
}
|
||||
|
||||
protected override Object GetObjectFromElement( ObjectToSearch element )
|
||||
{
|
||||
return element.obj;
|
||||
}
|
||||
|
||||
protected override void SetObjectOfElement( List<ObjectToSearch> list, int index, Object value )
|
||||
{
|
||||
list[index].obj = value;
|
||||
list[index].RefreshSubAssets();
|
||||
}
|
||||
|
||||
protected override bool IsElementNull( ObjectToSearch element )
|
||||
{
|
||||
return element == null || element.obj == null || element.obj.Equals( null );
|
||||
}
|
||||
|
||||
protected override void PostElementDrawer( ObjectToSearch element )
|
||||
{
|
||||
List<ObjectToSearch.SubAsset> subAssetsToSearch = element.subAssets;
|
||||
if( subAssetsToSearch.Count > 0 )
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
|
||||
// 0-> all toggles off, 1-> mixed, 2-> all toggles on
|
||||
bool toggleAllSubAssets = subAssetsToSearch[0].shouldSearch;
|
||||
bool mixedToggle = false;
|
||||
for( int j = 1; j < subAssetsToSearch.Count; j++ )
|
||||
{
|
||||
if( subAssetsToSearch[j].shouldSearch != toggleAllSubAssets )
|
||||
{
|
||||
mixedToggle = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( mixedToggle )
|
||||
EditorGUI.showMixedValue = true;
|
||||
|
||||
GUI.changed = false;
|
||||
toggleAllSubAssets = EditorGUILayout.Toggle( toggleAllSubAssets, Utilities.GL_WIDTH_25 );
|
||||
if( GUI.changed )
|
||||
{
|
||||
for( int j = 0; j < subAssetsToSearch.Count; j++ )
|
||||
subAssetsToSearch[j].shouldSearch = toggleAllSubAssets;
|
||||
}
|
||||
|
||||
EditorGUI.showMixedValue = false;
|
||||
|
||||
element.showSubAssetsFoldout = EditorGUILayout.Foldout( element.showSubAssetsFoldout, "Include sub-assets in search:", true );
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
if( element.showSubAssetsFoldout )
|
||||
{
|
||||
for( int j = 0; j < subAssetsToSearch.Count; j++ )
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
|
||||
subAssetsToSearch[j].shouldSearch = EditorGUILayout.Toggle( subAssetsToSearch[j].shouldSearch, Utilities.GL_WIDTH_25 );
|
||||
|
||||
bool guiEnabled = GUI.enabled;
|
||||
GUI.enabled = false;
|
||||
EditorGUILayout.ObjectField( string.Empty, subAssetsToSearch[j].subAsset, typeof( Object ), true );
|
||||
GUI.enabled = guiEnabled;
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/Plugins/AssetUsageDetector/Editor/ListDrawer.cs.meta
Normal file
19
Assets/Plugins/AssetUsageDetector/Editor/ListDrawer.cs.meta
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88a4a4e861026b2498a437ce1e12b054
|
||||
timeCreated: 1568758673
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 112837
|
||||
packageName: Asset Usage Detector
|
||||
packageVersion: 2.5.7
|
||||
assetPath: Assets/Plugins/AssetUsageDetector/Editor/ListDrawer.cs
|
||||
uploadId: 761377
|
||||
133
Assets/Plugins/AssetUsageDetector/Editor/ObjectToSearch.cs
Normal file
133
Assets/Plugins/AssetUsageDetector/Editor/ObjectToSearch.cs
Normal file
@@ -0,0 +1,133 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.U2D;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace AssetUsageDetectorNamespace
|
||||
{
|
||||
[Serializable]
|
||||
public class ObjectToSearch
|
||||
{
|
||||
[Serializable]
|
||||
public class SubAsset
|
||||
{
|
||||
public Object subAsset;
|
||||
public bool shouldSearch;
|
||||
|
||||
public SubAsset( Object subAsset, bool shouldSearch )
|
||||
{
|
||||
this.subAsset = subAsset;
|
||||
this.shouldSearch = shouldSearch;
|
||||
}
|
||||
}
|
||||
|
||||
public Object obj;
|
||||
public List<SubAsset> subAssets;
|
||||
public bool showSubAssetsFoldout;
|
||||
|
||||
private static HashSet<Object> currentSubAssets;
|
||||
|
||||
public ObjectToSearch( Object obj, bool? shouldSearchChildren = null )
|
||||
{
|
||||
this.obj = obj;
|
||||
RefreshSubAssets( shouldSearchChildren );
|
||||
}
|
||||
|
||||
public void RefreshSubAssets( bool? shouldSearchChildren = null )
|
||||
{
|
||||
if( subAssets == null )
|
||||
subAssets = new List<SubAsset>();
|
||||
else
|
||||
subAssets.Clear();
|
||||
|
||||
if( currentSubAssets == null )
|
||||
currentSubAssets = new HashSet<Object>();
|
||||
else
|
||||
currentSubAssets.Clear();
|
||||
|
||||
AddSubAssets( obj, false, shouldSearchChildren );
|
||||
currentSubAssets.Clear();
|
||||
}
|
||||
|
||||
private void AddSubAssets( Object target, bool includeTarget, bool? shouldSearchChildren )
|
||||
{
|
||||
if( target == null || target.Equals( null ) )
|
||||
return;
|
||||
|
||||
if( !target.IsAsset() )
|
||||
{
|
||||
GameObject go = target as GameObject;
|
||||
if( !go || !go.scene.IsValid() )
|
||||
return;
|
||||
|
||||
// If this is a scene object, add its child objects to the sub-assets list
|
||||
// but don't include them in the search by default
|
||||
Transform goTransform = go.transform;
|
||||
Transform[] children = go.GetComponentsInChildren<Transform>( true );
|
||||
for( int i = 0; i < children.Length; i++ )
|
||||
{
|
||||
if( ReferenceEquals( children[i], goTransform ) )
|
||||
continue;
|
||||
|
||||
subAssets.Add( new SubAsset( children[i].gameObject, shouldSearchChildren ?? false ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( !AssetDatabase.IsMainAsset( target ) || target is SceneAsset )
|
||||
return;
|
||||
|
||||
if( includeTarget )
|
||||
{
|
||||
if( currentSubAssets.Add( target ) )
|
||||
subAssets.Add( new SubAsset( target, shouldSearchChildren ?? true ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
// If asset is a directory, add all of its contents as sub-assets recursively
|
||||
if( target.IsFolder() )
|
||||
{
|
||||
foreach( string filePath in Utilities.EnumerateFolderContents( target ) )
|
||||
AddSubAssets( AssetDatabase.LoadAssetAtPath<Object>( filePath ), true, shouldSearchChildren );
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Add Sprites of SpriteAtlases to the sub-assets list
|
||||
if( target is SpriteAtlas spriteAtlas )
|
||||
{
|
||||
Sprite[] packedSprites = AssetUsageDetector.spriteAtlasPackedSpritesGetter( spriteAtlas );
|
||||
if( packedSprites != null )
|
||||
{
|
||||
for( int i = 0; i < packedSprites.Length; i++ )
|
||||
{
|
||||
if( packedSprites[i] != null && currentSubAssets.Add( packedSprites[i] ) )
|
||||
subAssets.Add( new SubAsset( packedSprites[i], shouldSearchChildren ?? true ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Find sub-asset(s) of the asset (if any)
|
||||
Object[] assets = AssetDatabase.LoadAllAssetsAtPath( AssetDatabase.GetAssetPath( target ) );
|
||||
for( int i = 0; i < assets.Length; i++ )
|
||||
{
|
||||
Object asset = assets[i];
|
||||
if( asset == null || asset.Equals( null ) || asset is Component || asset == target )
|
||||
continue;
|
||||
|
||||
// Nested prefabs in prefab assets add an additional native object of type 'UnityEngine.PrefabInstance' to the prefab. Managed type of that native type
|
||||
// is UnityEngine.Object (i.e. GetType() returns UnityEngine.Object, not UnityEngine.PrefabInstance). There are no possible references to these native
|
||||
// objects so skip them (we're checking for UnityEngine.Prefab because it includes other native types like UnityEngine.PrefabCreation, as well)
|
||||
if( target is GameObject && asset.GetType() == typeof( Object ) && asset.ToString().Contains( "(UnityEngine.Prefab" ) )
|
||||
continue;
|
||||
|
||||
if( currentSubAssets.Add( asset ) )
|
||||
subAssets.Add( new SubAsset( asset, shouldSearchChildren ?? true ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 66d5a144a723fea40945afc069d4231d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 112837
|
||||
packageName: Asset Usage Detector
|
||||
packageVersion: 2.5.7
|
||||
assetPath: Assets/Plugins/AssetUsageDetector/Editor/ObjectToSearch.cs
|
||||
uploadId: 761377
|
||||
374
Assets/Plugins/AssetUsageDetector/Editor/SearchRefactoring.cs
Normal file
374
Assets/Plugins/AssetUsageDetector/Editor/SearchRefactoring.cs
Normal file
@@ -0,0 +1,374 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace AssetUsageDetectorNamespace
|
||||
{
|
||||
public delegate void SearchRefactoring( SearchMatch match );
|
||||
|
||||
public abstract class SearchMatch
|
||||
{
|
||||
public readonly object Source;
|
||||
public readonly Object Context; // Almost always equal to Source. This is the Object that needs to be dirtied (if not null) to notify Unity of changes to Value
|
||||
public Object Value { get; private set; }
|
||||
|
||||
protected SearchMatch( object source, Object value )
|
||||
{
|
||||
Source = source;
|
||||
Context = source as Object;
|
||||
Value = value;
|
||||
}
|
||||
|
||||
protected SearchMatch( object source, Object value, Object context ) : this( source, value )
|
||||
{
|
||||
Context = context;
|
||||
}
|
||||
|
||||
public void ChangeValue( Object newValue )
|
||||
{
|
||||
if( newValue == Value )
|
||||
return;
|
||||
|
||||
if( Context && ( Context.hideFlags & HideFlags.NotEditable ) == HideFlags.NotEditable )
|
||||
{
|
||||
Debug.LogWarning( "Can't change value of read-only Object: " + Context, Context );
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
bool setContextDirty;
|
||||
if( ChangeValue( newValue, out setContextDirty ) )
|
||||
OnValueChanged( newValue, setContextDirty );
|
||||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
Debug.LogException( e );
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract bool ChangeValue( Object newValue, out bool setContextDirty );
|
||||
|
||||
public void OnValueChanged( Object newValue, bool setContextDirty = true )
|
||||
{
|
||||
Value = newValue;
|
||||
|
||||
if( setContextDirty )
|
||||
{
|
||||
if( Context )
|
||||
{
|
||||
if( AssetDatabase.Contains( Context ) )
|
||||
EditorUtility.SetDirty( Context );
|
||||
else if( !EditorApplication.isPlaying )
|
||||
{
|
||||
EditorUtility.SetDirty( Context );
|
||||
|
||||
if( Context is Component )
|
||||
EditorSceneManager.MarkSceneDirty( ( (Component) Context ).gameObject.scene );
|
||||
else if( Context is GameObject )
|
||||
EditorSceneManager.MarkSceneDirty( ( (GameObject) Context ).scene );
|
||||
else
|
||||
EditorSceneManager.MarkAllScenesDirty();
|
||||
}
|
||||
}
|
||||
else if( !EditorApplication.isPlaying )
|
||||
EditorSceneManager.MarkAllScenesDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class GenericSearchMatch : SearchMatch
|
||||
{
|
||||
public delegate void SetterFunction( Object newValue );
|
||||
|
||||
public readonly SetterFunction Setter;
|
||||
|
||||
internal GenericSearchMatch( object source, Object value, SetterFunction setter ) : base( source, value ) { Setter = setter; }
|
||||
internal GenericSearchMatch( object source, Object value, Object context, SetterFunction setter ) : base( source, value, context ) { Setter = setter; }
|
||||
|
||||
protected override bool ChangeValue( Object newValue, out bool setContextDirty )
|
||||
{
|
||||
Setter( newValue );
|
||||
|
||||
setContextDirty = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class ReadOnlySearchMatch : SearchMatch
|
||||
{
|
||||
internal ReadOnlySearchMatch( object source, Object value ) : base( source, value ) { }
|
||||
|
||||
protected override bool ChangeValue( Object newValue, out bool setContextDirty )
|
||||
{
|
||||
Debug.LogWarning( "Can't change value of " + GetType().Name );
|
||||
|
||||
setContextDirty = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// - Source: Object whose SerializedProperty points to Value
|
||||
/// - Value: Referenced object
|
||||
/// - SerializedProperty: The SerializedProperty that points to Value
|
||||
/// </summary>
|
||||
public class SerializedPropertyMatch : SearchMatch
|
||||
{
|
||||
public readonly SerializedProperty SerializedProperty; // Next or NextVisible mustn't be called with this SerializedProperty
|
||||
|
||||
internal SerializedPropertyMatch( Object source, Object value, SerializedProperty property ) : base( source, value ) { SerializedProperty = property; }
|
||||
|
||||
protected override bool ChangeValue( Object newValue, out bool setContextDirty )
|
||||
{
|
||||
setContextDirty = true;
|
||||
|
||||
switch( SerializedProperty.propertyType )
|
||||
{
|
||||
case SerializedPropertyType.ObjectReference:
|
||||
SerializedProperty.objectReferenceValue = newValue;
|
||||
if( SerializedProperty.objectReferenceValue != newValue )
|
||||
{
|
||||
Debug.LogWarning( "Couldn't cast " + newValue.GetType() + " to " + SerializedProperty.type );
|
||||
SerializedProperty.objectReferenceValue = Value;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
break;
|
||||
case SerializedPropertyType.ExposedReference:
|
||||
SerializedProperty.exposedReferenceValue = newValue;
|
||||
if( SerializedProperty.exposedReferenceValue != newValue )
|
||||
{
|
||||
Debug.LogWarning( "Couldn't cast " + newValue.GetType() + " to " + SerializedProperty.type );
|
||||
SerializedProperty.exposedReferenceValue = Value;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
break;
|
||||
case SerializedPropertyType.ManagedReference: SerializedProperty.managedReferenceValue = newValue; break;
|
||||
}
|
||||
|
||||
SerializedProperty.serializedObject.ApplyModifiedPropertiesWithoutUndo();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// - Source: Object whose variable points to Value
|
||||
/// - Value: Referenced object
|
||||
/// - Variable: FieldInfo, PropertyInfo or IEnumerable (ChangeValue may not work for all IEnumerables)
|
||||
/// </summary>
|
||||
public class ReflectionMatch : SearchMatch
|
||||
{
|
||||
public readonly object Variable;
|
||||
|
||||
internal ReflectionMatch( object source, Object value, object variable ) : base( source, value ) { Variable = variable; }
|
||||
|
||||
protected override bool ChangeValue( Object newValue, out bool setContextDirty )
|
||||
{
|
||||
setContextDirty = true;
|
||||
|
||||
if( Variable is FieldInfo )
|
||||
( (FieldInfo) Variable ).SetValue( Source, newValue );
|
||||
else if( Variable is PropertyInfo )
|
||||
{
|
||||
PropertyInfo property = (PropertyInfo) Variable;
|
||||
if( !property.CanWrite )
|
||||
{
|
||||
Debug.LogWarning( "Property is read-only: " + property.DeclaringType.FullName + "." + property.Name );
|
||||
return false;
|
||||
}
|
||||
|
||||
property.SetValue( Source, newValue, null );
|
||||
}
|
||||
else if( Variable is IList )
|
||||
{
|
||||
IList list = (IList) Variable;
|
||||
for( int i = list.Count - 1; i >= 0; i-- )
|
||||
{
|
||||
if( ReferenceEquals( list[i], Value ) )
|
||||
list[i] = newValue;
|
||||
}
|
||||
}
|
||||
else if( Variable is IDictionary )
|
||||
{
|
||||
IDictionary dictionary = (IDictionary) Variable;
|
||||
bool dictionaryModified;
|
||||
do
|
||||
{
|
||||
dictionaryModified = false;
|
||||
foreach( object dictKey in dictionary.Keys )
|
||||
{
|
||||
object dictValue = dictionary[dictKey];
|
||||
if( ReferenceEquals( dictKey, Value ) )
|
||||
{
|
||||
dictionary.Remove( dictKey );
|
||||
if( newValue )
|
||||
dictionary[newValue] = dictValue;
|
||||
|
||||
dictionaryModified = true;
|
||||
break;
|
||||
}
|
||||
else if( ReferenceEquals( dictValue, Value ) )
|
||||
{
|
||||
dictionary[dictKey] = newValue;
|
||||
dictionaryModified = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while( dictionaryModified );
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning( "Can't change value of " + Variable.GetType().Name );
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// - Source: MonoImporter (for scripts) or ShaderImporter
|
||||
/// - Value: Default value assigned to Source's specified variable in the Inspector
|
||||
/// - Variable: The variable of Source that Value is assigned to as default value
|
||||
/// - MonoScriptAllVariables: All variables of Source script if it's MonoImporter
|
||||
/// </summary>
|
||||
public class AssetImporterDefaultValueMatch : SearchMatch
|
||||
{
|
||||
public readonly string Variable;
|
||||
public readonly VariableGetterHolder[] MonoScriptAllVariables;
|
||||
|
||||
internal AssetImporterDefaultValueMatch( Object source, Object value, string variable, VariableGetterHolder[] monoScriptAllVariables ) : base( source, value )
|
||||
{
|
||||
Variable = variable;
|
||||
MonoScriptAllVariables = monoScriptAllVariables;
|
||||
}
|
||||
|
||||
protected override bool ChangeValue( Object newValue, out bool setContextDirty )
|
||||
{
|
||||
setContextDirty = false;
|
||||
|
||||
if( Source is MonoImporter )
|
||||
{
|
||||
MonoImporter monoImporter = (MonoImporter) Source;
|
||||
|
||||
List<string> variableNames = new List<string>( 8 );
|
||||
List<Object> variableValues = new List<Object>( 8 );
|
||||
|
||||
for( int i = 0; i < MonoScriptAllVariables.Length; i++ )
|
||||
{
|
||||
if( MonoScriptAllVariables[i].isSerializable && !MonoScriptAllVariables[i].IsProperty )
|
||||
{
|
||||
Object variableDefaultValue = monoImporter.GetDefaultReference( MonoScriptAllVariables[i].Name );
|
||||
if( variableDefaultValue == Value && MonoScriptAllVariables[i].Name == Variable )
|
||||
variableDefaultValue = newValue;
|
||||
|
||||
variableNames.Add( MonoScriptAllVariables[i].Name );
|
||||
variableValues.Add( variableDefaultValue );
|
||||
}
|
||||
}
|
||||
|
||||
monoImporter.SetDefaultReferences( variableNames.ToArray(), variableValues.ToArray() );
|
||||
EditorApplication.delayCall += () => AssetDatabase.ImportAsset( monoImporter.assetPath ); // If code recompiles during search, it will break the search. Give it a 1 frame delay
|
||||
}
|
||||
else if( Source is ShaderImporter )
|
||||
{
|
||||
ShaderImporter shaderImporter = (ShaderImporter) Source;
|
||||
Shader shader = shaderImporter.GetShader();
|
||||
|
||||
List<string> textureNames = new List<string>( 16 );
|
||||
List<Texture> textureValues = new List<Texture>( 16 );
|
||||
List<string> nonModifiableTextureNames = new List<string>( 16 );
|
||||
List<Texture> nonModifiableTextureValues = new List<Texture>( 16 );
|
||||
|
||||
int shaderPropertyCount = ShaderUtil.GetPropertyCount( shader );
|
||||
for( int i = 0; i < shaderPropertyCount; i++ )
|
||||
{
|
||||
if( ShaderUtil.GetPropertyType( shader, i ) != ShaderUtil.ShaderPropertyType.TexEnv )
|
||||
continue;
|
||||
|
||||
string propertyName = ShaderUtil.GetPropertyName( shader, i );
|
||||
if( ShaderUtil.IsShaderPropertyNonModifiableTexureProperty( shader, i ) )
|
||||
{
|
||||
Texture propertyDefaultValue = shaderImporter.GetNonModifiableTexture( propertyName );
|
||||
if( propertyDefaultValue == Value && propertyName == Variable )
|
||||
propertyDefaultValue = (Texture) newValue;
|
||||
|
||||
nonModifiableTextureNames.Add( propertyName );
|
||||
nonModifiableTextureValues.Add( propertyDefaultValue );
|
||||
}
|
||||
else
|
||||
{
|
||||
Texture propertyDefaultValue = shaderImporter.GetDefaultTexture( propertyName );
|
||||
if( propertyDefaultValue == Value && propertyName == Variable )
|
||||
propertyDefaultValue = (Texture) newValue;
|
||||
|
||||
textureNames.Add( propertyName );
|
||||
textureValues.Add( propertyDefaultValue );
|
||||
}
|
||||
}
|
||||
|
||||
shaderImporter.SetDefaultTextures( textureNames.ToArray(), textureValues.ToArray() );
|
||||
shaderImporter.SetNonModifiableTextures( nonModifiableTextureNames.ToArray(), nonModifiableTextureValues.ToArray() );
|
||||
AssetDatabase.ImportAsset( shaderImporter.assetPath );
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning( "Can't change default value of: " + Source.GetType() );
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// - Source: Animation, Animator, AnimatorStateMachine, AnimatorState, AnimatorControllerLayer, BlendTree, PlayableDirector* or AnimationClip*
|
||||
/// - Context: If Source is AnimatorControllerLayer, then its RuntimeAnimatorController. Otherwise, equal to Source
|
||||
/// - Value: AnimationClip, AnimatorController or AvatarMask used in Source (*for PlayableDirector and AnimationClip, it can be any Object value)
|
||||
/// </summary>
|
||||
public class AnimationSystemMatch : GenericSearchMatch
|
||||
{
|
||||
internal AnimationSystemMatch( object source, Object value, SetterFunction setter ) : base( source, value, setter ) { }
|
||||
internal AnimationSystemMatch( object source, Object value, Object context, SetterFunction setter ) : base( source, value, context, setter ) { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// - Source: GameObject, AnimatorStateMachine or AnimatorState
|
||||
/// - Value: The attached behaviour's source script (C# script or DLL, i.e. MonoScript)
|
||||
/// - Behaviour: The attached behaviour (MonoBehaviour or StateMachineBehaviour)
|
||||
/// </summary>
|
||||
public class BehaviourUsageMatch : ReadOnlySearchMatch
|
||||
{
|
||||
public readonly Object Behaviour;
|
||||
|
||||
internal BehaviourUsageMatch( Object source, MonoScript value, Object behaviour ) : base( source, value ) { Behaviour = behaviour; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// - Source: GameObject Instance
|
||||
/// - Value: Prefab of that GameObject
|
||||
/// </summary>
|
||||
public class PrefabMatch : ReadOnlySearchMatch
|
||||
{
|
||||
internal PrefabMatch( Object source, Object value ) : base( source, value ) { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// - Source: Object that references Value
|
||||
/// - Value: Matched object
|
||||
/// </summary>
|
||||
public class OtherSearchMatch : GenericSearchMatch
|
||||
{
|
||||
internal OtherSearchMatch( object source, Object value, SetterFunction setter ) : base( source, value, setter ) { }
|
||||
internal OtherSearchMatch( object source, Object value, Object context, SetterFunction setter ) : base( source, value, context, setter ) { }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3d15ef8bd8f7c7c4e8d228c99713b7eb
|
||||
timeCreated: 1641132238
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 112837
|
||||
packageName: Asset Usage Detector
|
||||
packageVersion: 2.5.7
|
||||
assetPath: Assets/Plugins/AssetUsageDetector/Editor/SearchRefactoring.cs
|
||||
uploadId: 761377
|
||||
1413
Assets/Plugins/AssetUsageDetector/Editor/SearchResult.cs
Normal file
1413
Assets/Plugins/AssetUsageDetector/Editor/SearchResult.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ca236e4f3c5a9f447be89f0e61e485fa
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 112837
|
||||
packageName: Asset Usage Detector
|
||||
packageVersion: 2.5.7
|
||||
assetPath: Assets/Plugins/AssetUsageDetector/Editor/SearchResult.cs
|
||||
uploadId: 761377
|
||||
@@ -0,0 +1,91 @@
|
||||
using System.Reflection;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AssetUsageDetectorNamespace
|
||||
{
|
||||
public class SearchResultTooltip : EditorWindow
|
||||
{
|
||||
private static SearchResultTooltip mainWindow;
|
||||
private static string tooltip;
|
||||
|
||||
private static GUIStyle m_style;
|
||||
internal static GUIStyle Style
|
||||
{
|
||||
get
|
||||
{
|
||||
if( m_style == null )
|
||||
{
|
||||
m_style = (GUIStyle) typeof( EditorStyles ).GetProperty( "tooltip", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static ).GetValue( null, null );
|
||||
m_style.richText = true;
|
||||
}
|
||||
|
||||
return m_style;
|
||||
}
|
||||
}
|
||||
|
||||
public static void Show( Rect sourcePosition, string tooltip )
|
||||
{
|
||||
// Don't lose focus to the previous window
|
||||
EditorWindow prevFocusedWindow = focusedWindow;
|
||||
|
||||
if (!mainWindow)
|
||||
{
|
||||
mainWindow = CreateInstance<SearchResultTooltip>();
|
||||
mainWindow.ShowPopup();
|
||||
}
|
||||
|
||||
Vector2 preferredSize = Style.CalcSize( new GUIContent( tooltip ) ) + Style.contentOffset + new Vector2( Style.padding.horizontal + Style.margin.horizontal, Style.padding.vertical + Style.margin.vertical );
|
||||
Rect preferredPosition;
|
||||
|
||||
Rect positionLeft = new Rect( sourcePosition.position - new Vector2( preferredSize.x, 0f ), preferredSize );
|
||||
Rect screenFittedPositionLeft = Utilities.GetScreenFittedRect(positionLeft, mainWindow);
|
||||
|
||||
Vector2 positionOffset = positionLeft.position - screenFittedPositionLeft.position;
|
||||
Vector2 sizeOffset = positionLeft.size - screenFittedPositionLeft.size;
|
||||
if( positionOffset.sqrMagnitude <= 400f && sizeOffset.sqrMagnitude <= 400f )
|
||||
preferredPosition = screenFittedPositionLeft;
|
||||
else
|
||||
{
|
||||
Rect positionRight = new Rect( sourcePosition.position + new Vector2( sourcePosition.width, 0f ), preferredSize );
|
||||
Rect screenFittedPositionRight = Utilities.GetScreenFittedRect(positionRight, mainWindow);
|
||||
|
||||
Vector2 positionOffset2 = positionRight.position - screenFittedPositionRight.position;
|
||||
Vector2 sizeOffset2 = positionRight.size - screenFittedPositionRight.size;
|
||||
if( positionOffset2.magnitude + sizeOffset2.magnitude < positionOffset.magnitude + sizeOffset.magnitude )
|
||||
preferredPosition = screenFittedPositionRight;
|
||||
else
|
||||
preferredPosition = screenFittedPositionLeft;
|
||||
}
|
||||
|
||||
SearchResultTooltip.tooltip = tooltip;
|
||||
mainWindow.minSize = preferredPosition.size;
|
||||
mainWindow.position = preferredPosition;
|
||||
mainWindow.Repaint();
|
||||
|
||||
if( prevFocusedWindow )
|
||||
prevFocusedWindow.Focus();
|
||||
}
|
||||
|
||||
public static void Hide()
|
||||
{
|
||||
if( mainWindow )
|
||||
{
|
||||
mainWindow.Close();
|
||||
mainWindow = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
// If somehow the tooltip isn't automatically closed, allow closing it by clicking on it
|
||||
if( Event.current.type == EventType.MouseDown )
|
||||
{
|
||||
Hide();
|
||||
GUIUtility.ExitGUI();
|
||||
}
|
||||
|
||||
GUI.Label( new Rect( Vector2.zero, position.size ), tooltip, Style );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8bd4351b5024324ca5974ebcad1dde3
|
||||
timeCreated: 1639247551
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 112837
|
||||
packageName: Asset Usage Detector
|
||||
packageVersion: 2.5.7
|
||||
assetPath: Assets/Plugins/AssetUsageDetector/Editor/SearchResultTooltip.cs
|
||||
uploadId: 761377
|
||||
1323
Assets/Plugins/AssetUsageDetector/Editor/SearchResultTreeView.cs
Normal file
1323
Assets/Plugins/AssetUsageDetector/Editor/SearchResultTreeView.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b3903f1d3149e9b4990e49206f8255c8
|
||||
timeCreated: 1638690728
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 112837
|
||||
packageName: Asset Usage Detector
|
||||
packageVersion: 2.5.7
|
||||
assetPath: Assets/Plugins/AssetUsageDetector/Editor/SearchResultTreeView.cs
|
||||
uploadId: 761377
|
||||
600
Assets/Plugins/AssetUsageDetector/Editor/Utilities.cs
Normal file
600
Assets/Plugins/AssetUsageDetector/Editor/Utilities.cs
Normal file
@@ -0,0 +1,600 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using Unity.Collections;
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using Object = UnityEngine.Object;
|
||||
#if UNITY_2018_3_OR_NEWER && !UNITY_2021_2_OR_NEWER
|
||||
using PrefabStage = UnityEditor.Experimental.SceneManagement.PrefabStage;
|
||||
using PrefabStageUtility = UnityEditor.Experimental.SceneManagement.PrefabStageUtility;
|
||||
#endif
|
||||
|
||||
namespace AssetUsageDetectorNamespace
|
||||
{
|
||||
public static class Utilities
|
||||
{
|
||||
// A set of commonly used Unity types
|
||||
private static readonly HashSet<Type> primitiveUnityTypes = new HashSet<Type>()
|
||||
{
|
||||
typeof( string ), typeof( Vector4 ), typeof( Vector3 ), typeof( Vector2 ), typeof( Rect ),
|
||||
typeof( Quaternion ), typeof( Color ), typeof( Color32 ), typeof( LayerMask ), typeof( Bounds ),
|
||||
typeof( Matrix4x4 ), typeof( AnimationCurve ), typeof( Gradient ), typeof( RectOffset ),
|
||||
typeof( bool[] ), typeof( byte[] ), typeof( sbyte[] ), typeof( char[] ), typeof( decimal[] ),
|
||||
typeof( double[] ), typeof( float[] ), typeof( int[] ), typeof( uint[] ), typeof( long[] ),
|
||||
typeof( ulong[] ), typeof( short[] ), typeof( ushort[] ), typeof( string[] ),
|
||||
typeof( Vector4[] ), typeof( Vector3[] ), typeof( Vector2[] ), typeof( Rect[] ),
|
||||
typeof( Quaternion[] ), typeof( Color[] ), typeof( Color32[] ), typeof( LayerMask[] ), typeof( Bounds[] ),
|
||||
typeof( Matrix4x4[] ), typeof( AnimationCurve[] ), typeof( Gradient[] ), typeof( RectOffset[] ),
|
||||
typeof( List<bool> ), typeof( List<byte> ), typeof( List<sbyte> ), typeof( List<char> ), typeof( List<decimal> ),
|
||||
typeof( List<double> ), typeof( List<float> ), typeof( List<int> ), typeof( List<uint> ), typeof( List<long> ),
|
||||
typeof( List<ulong> ), typeof( List<short> ), typeof( List<ushort> ), typeof( List<string> ),
|
||||
typeof( List<Vector4> ), typeof( List<Vector3> ), typeof( List<Vector2> ), typeof( List<Rect> ),
|
||||
typeof( List<Quaternion> ), typeof( List<Color> ), typeof( List<Color32> ), typeof( List<LayerMask> ), typeof( List<Bounds> ),
|
||||
typeof( List<Matrix4x4> ), typeof( List<AnimationCurve> ), typeof( List<Gradient> ), typeof( List<RectOffset> ),
|
||||
typeof( Vector3Int ), typeof( Vector2Int ), typeof( RectInt ), typeof( BoundsInt ),
|
||||
typeof( Vector3Int[] ), typeof( Vector2Int[] ), typeof( RectInt[] ), typeof( BoundsInt[] ),
|
||||
typeof( List<Vector3Int> ), typeof( List<Vector2Int> ), typeof( List<RectInt> ), typeof( List<BoundsInt> )
|
||||
};
|
||||
|
||||
private static readonly string reflectionNamespace = typeof( Assembly ).Namespace;
|
||||
private static readonly string nativeCollectionsNamespace = typeof( NativeArray<int> ).Namespace;
|
||||
|
||||
private static MethodInfo screenFittedRectGetter;
|
||||
private static FieldInfo editorWindowHostViewGetter;
|
||||
private static PropertyInfo hostViewContainerWindowGetter;
|
||||
|
||||
private static readonly Func<Object, bool, bool> prefabHasAnyOverridesGetter = (Func<Object, bool, bool>) Delegate.CreateDelegate( typeof( Func<Object, bool, bool> ), typeof( PrefabUtility ).GetMethod( "HasObjectOverride", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static ) );
|
||||
|
||||
private static readonly HashSet<string> folderContentsSet = new HashSet<string>();
|
||||
|
||||
internal static readonly StringBuilder stringBuilder = new StringBuilder( 400 );
|
||||
|
||||
public static readonly GUILayoutOption GL_EXPAND_WIDTH = GUILayout.ExpandWidth( true );
|
||||
public static readonly GUILayoutOption GL_EXPAND_HEIGHT = GUILayout.ExpandHeight( true );
|
||||
public static readonly GUILayoutOption GL_WIDTH_25 = GUILayout.Width( 25 );
|
||||
public static readonly GUILayoutOption GL_WIDTH_100 = GUILayout.Width( 100 );
|
||||
public static readonly GUILayoutOption GL_WIDTH_250 = GUILayout.Width( 250 );
|
||||
public static readonly GUILayoutOption GL_HEIGHT_0 = GUILayout.Height( 0 );
|
||||
public static readonly GUILayoutOption GL_HEIGHT_2 = GUILayout.Height( 2 );
|
||||
public static readonly GUILayoutOption GL_HEIGHT_30 = GUILayout.Height( 30 );
|
||||
public static readonly GUILayoutOption GL_HEIGHT_35 = GUILayout.Height( 35 );
|
||||
public static readonly GUILayoutOption GL_HEIGHT_40 = GUILayout.Height( 40 );
|
||||
|
||||
private static GUIStyle m_boxGUIStyle; // GUIStyle used to draw the results of the search
|
||||
public static GUIStyle BoxGUIStyle
|
||||
{
|
||||
get
|
||||
{
|
||||
if( m_boxGUIStyle == null )
|
||||
{
|
||||
m_boxGUIStyle = new GUIStyle( EditorStyles.helpBox )
|
||||
{
|
||||
alignment = TextAnchor.MiddleCenter,
|
||||
font = EditorStyles.label.font,
|
||||
richText = true
|
||||
};
|
||||
|
||||
Color textColor = GUI.skin.button.normal.textColor;
|
||||
m_boxGUIStyle.normal.textColor = textColor;
|
||||
m_boxGUIStyle.hover.textColor = textColor;
|
||||
m_boxGUIStyle.focused.textColor = textColor;
|
||||
m_boxGUIStyle.active.textColor = textColor;
|
||||
m_boxGUIStyle.fontSize = ( m_boxGUIStyle.fontSize + GUI.skin.button.fontSize ) / 2;
|
||||
}
|
||||
|
||||
return m_boxGUIStyle;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if object is an asset or a Scene object
|
||||
public static bool IsAsset( this object obj )
|
||||
{
|
||||
return obj is Object && AssetDatabase.Contains( (Object) obj );
|
||||
}
|
||||
|
||||
public static bool IsAsset( this Object obj )
|
||||
{
|
||||
return AssetDatabase.Contains( obj );
|
||||
}
|
||||
|
||||
// Check if object is a folder asset
|
||||
public static bool IsFolder( this Object obj )
|
||||
{
|
||||
return obj is DefaultAsset && AssetDatabase.IsValidFolder( AssetDatabase.GetAssetPath( obj ) );
|
||||
}
|
||||
|
||||
public static T GetPrefabParent<T>( this T obj ) where T : Object
|
||||
{
|
||||
return PrefabUtility.GetCorrespondingObjectFromSource( obj );
|
||||
}
|
||||
|
||||
public static bool HasAnyPrefabOverrides( this Object obj )
|
||||
{
|
||||
if( obj.GetPrefabParent() == null )
|
||||
return false;
|
||||
|
||||
return prefabHasAnyOverridesGetter( obj, false );
|
||||
}
|
||||
|
||||
public static bool HasAnyPrefabOverrides( this GameObject gameObject )
|
||||
{
|
||||
if( gameObject.GetPrefabParent() == null )
|
||||
return false;
|
||||
|
||||
if( !PrefabUtility.HasPrefabInstanceAnyOverrides( gameObject, false ) )
|
||||
return false;
|
||||
|
||||
Transform rootTransform = gameObject.transform;
|
||||
List<Component> components = new List<Component>( 8 );
|
||||
Stack<Transform> stack = new Stack<Transform>( 8 );
|
||||
stack.Push( rootTransform );
|
||||
|
||||
while( stack.Count > 0 )
|
||||
{
|
||||
Transform transform = stack.Pop();
|
||||
Transform prefab = transform.GetPrefabParent();
|
||||
if( prefab == null ) // GameObject is added as override
|
||||
return true;
|
||||
|
||||
if( transform.childCount != prefab.childCount ) // Has some added/destroyed children as override
|
||||
return true;
|
||||
|
||||
bool isRootTransform = ReferenceEquals( transform, rootTransform );
|
||||
if( !isRootTransform && ( transform.gameObject as Object ).HasAnyPrefabOverrides() ) // GameObject's properties are modified (e.g. name or tag) (excluding root GameObject)
|
||||
return true;
|
||||
|
||||
components.Clear();
|
||||
transform.GetComponents( components );
|
||||
foreach( Component component in components )
|
||||
{
|
||||
if( component == null )
|
||||
continue;
|
||||
|
||||
if( component.GetPrefabParent() == null ) // Component is added as override
|
||||
return true;
|
||||
|
||||
if( ( !isRootTransform || !( component is Transform ) ) && component.HasAnyPrefabOverrides() ) // Component is modified (excluding root Transform)
|
||||
return true;
|
||||
}
|
||||
|
||||
int componentCount = components.Count;
|
||||
components.Clear();
|
||||
prefab.GetComponents( components );
|
||||
if( components.Count != componentCount ) // Has some destroyed components as override
|
||||
return true;
|
||||
|
||||
for( int i = 0, childCount = transform.childCount; i < childCount; i++ )
|
||||
{
|
||||
Transform child = transform.GetChild( i );
|
||||
if( child != null )
|
||||
stack.Push( child );
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Returns an enumerator to iterate through all asset paths in the folder
|
||||
public static IEnumerable<string> EnumerateFolderContents( Object folderAsset )
|
||||
{
|
||||
string[] folderContents = AssetDatabase.FindAssets( "", new string[] { AssetDatabase.GetAssetPath( folderAsset ) } );
|
||||
if( folderContents == null )
|
||||
return new EmptyEnumerator<string>();
|
||||
|
||||
folderContentsSet.Clear();
|
||||
for( int i = 0; i < folderContents.Length; i++ )
|
||||
{
|
||||
string filePath = AssetDatabase.GUIDToAssetPath( folderContents[i] );
|
||||
if( !string.IsNullOrEmpty( filePath ) && !AssetDatabase.IsValidFolder( filePath ) )
|
||||
folderContentsSet.Add( filePath );
|
||||
}
|
||||
|
||||
return folderContentsSet;
|
||||
}
|
||||
|
||||
public static void GetObjectsToSelectAndPing( this Object obj, out Object selection, out Object pingTarget )
|
||||
{
|
||||
if( obj == null || obj.Equals( null ) )
|
||||
{
|
||||
selection = pingTarget = null;
|
||||
return;
|
||||
}
|
||||
|
||||
if( obj is Component )
|
||||
obj = ( (Component) obj ).gameObject;
|
||||
|
||||
selection = pingTarget = obj;
|
||||
|
||||
if( obj.IsAsset() )
|
||||
{
|
||||
if( obj is GameObject )
|
||||
{
|
||||
// Pinging a prefab only works if the pinged object is the root of the prefab or a direct child of it. Pinging any grandchildren
|
||||
// of the prefab doesn't work; in which case, traverse the parent hierarchy until a pingable parent is reached
|
||||
Transform objTR = ( (GameObject) obj ).transform.root;
|
||||
|
||||
PrefabAssetType prefabAssetType = PrefabUtility.GetPrefabAssetType( objTR.gameObject );
|
||||
if( prefabAssetType == PrefabAssetType.Regular || prefabAssetType == PrefabAssetType.Variant )
|
||||
{
|
||||
string assetPath = AssetDatabase.GetAssetPath( objTR.gameObject );
|
||||
PrefabStage openPrefabStage = PrefabStageUtility.GetCurrentPrefabStage();
|
||||
if( openPrefabStage != null && openPrefabStage.stageHandle.IsValid() && assetPath == openPrefabStage.assetPath )
|
||||
{
|
||||
GameObject prefabStageGO = FollowSymmetricHierarchy( (GameObject) obj, ( (GameObject) obj ).transform.root.gameObject, openPrefabStage.prefabContentsRoot );
|
||||
if( prefabStageGO != null )
|
||||
{
|
||||
objTR = prefabStageGO.transform;
|
||||
selection = objTR.gameObject;
|
||||
}
|
||||
}
|
||||
else if( obj != objTR.gameObject )
|
||||
selection = objTR.gameObject;
|
||||
}
|
||||
else if( prefabAssetType == PrefabAssetType.Model )
|
||||
{
|
||||
objTR = ( (GameObject) obj ).transform;
|
||||
while( objTR.parent != null && objTR.parent.parent != null )
|
||||
objTR = objTR.parent;
|
||||
}
|
||||
|
||||
pingTarget = objTR.gameObject;
|
||||
}
|
||||
else if( ( obj.hideFlags & ( HideFlags.HideInInspector | HideFlags.HideInHierarchy ) ) != HideFlags.None )
|
||||
{
|
||||
// Can't ping assets that are hidden from Project window (e.g. animator states of AnimatorController), ping the main asset at that path instead
|
||||
pingTarget = AssetDatabase.LoadMainAssetAtPath( AssetDatabase.GetAssetPath( obj ) );
|
||||
}
|
||||
else if( !AssetDatabase.IsMainAsset( obj ) && Array.IndexOf( AssetDatabase.LoadAllAssetRepresentationsAtPath( AssetDatabase.GetAssetPath( obj ) ), obj ) < 0 )
|
||||
{
|
||||
// VFX Graph assets' nodes are serialized as part of the graph but they are invisible in the Project window even though their hideFlags is None (I don't know how)
|
||||
pingTarget = AssetDatabase.LoadMainAssetAtPath( AssetDatabase.GetAssetPath( obj ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// We are passing "go"s root Transform to thisRoot parameter. If we use go.transform.root instead, when we are in prefab mode on
|
||||
// newer Unity versions, it points to the preview scene at the root of the prefab stage instead of pointing to the actual root of "go"
|
||||
public static GameObject FollowSymmetricHierarchy( this GameObject go, GameObject thisRoot, GameObject symmetricRoot )
|
||||
{
|
||||
Transform target = go.transform;
|
||||
Transform root1 = thisRoot.transform;
|
||||
Transform root2 = symmetricRoot.transform;
|
||||
while( root1 != target )
|
||||
{
|
||||
Transform temp = target;
|
||||
while( temp.parent != root1 )
|
||||
temp = temp.parent;
|
||||
|
||||
Transform newRoot2;
|
||||
int siblingIndex = temp.GetSiblingIndex();
|
||||
if( siblingIndex < root2.childCount )
|
||||
{
|
||||
newRoot2 = root2.GetChild( siblingIndex );
|
||||
if( newRoot2.name != temp.name )
|
||||
newRoot2 = root2.Find( temp.name );
|
||||
}
|
||||
else
|
||||
newRoot2 = root2.Find( temp.name );
|
||||
|
||||
if( newRoot2 == null )
|
||||
return null;
|
||||
|
||||
root2 = newRoot2;
|
||||
root1 = temp;
|
||||
}
|
||||
|
||||
return root2.gameObject;
|
||||
}
|
||||
|
||||
// Returns -1 if t1 is above t2 in Hierarchy, 1 if t1 is below t2 in Hierarchy and 0 if they are the same object
|
||||
public static int CompareHierarchySiblingIndices( Transform t1, Transform t2 )
|
||||
{
|
||||
Transform parent1 = t1.parent;
|
||||
Transform parent2 = t2.parent;
|
||||
|
||||
if( parent1 == parent2 )
|
||||
return t1.GetSiblingIndex() - t2.GetSiblingIndex();
|
||||
|
||||
int deltaHierarchyDepth = 0;
|
||||
for( ; parent1; parent1 = parent1.parent )
|
||||
deltaHierarchyDepth++;
|
||||
for( ; parent2; parent2 = parent2.parent )
|
||||
deltaHierarchyDepth--;
|
||||
|
||||
for( ; deltaHierarchyDepth > 0; deltaHierarchyDepth-- )
|
||||
{
|
||||
t1 = t1.parent;
|
||||
if( t1 == t2 )
|
||||
return 1;
|
||||
}
|
||||
for( ; deltaHierarchyDepth < 0; deltaHierarchyDepth++ )
|
||||
{
|
||||
t2 = t2.parent;
|
||||
if( t1 == t2 )
|
||||
return -1;
|
||||
}
|
||||
|
||||
while( t1.parent != t2.parent )
|
||||
{
|
||||
t1 = t1.parent;
|
||||
t2 = t2.parent;
|
||||
}
|
||||
|
||||
return t1.GetSiblingIndex() - t2.GetSiblingIndex();
|
||||
}
|
||||
|
||||
// Check if the field is serializable
|
||||
public static bool IsSerializable( this FieldInfo fieldInfo )
|
||||
{
|
||||
// See Serialization Rules: https://docs.unity3d.com/Manual/script-Serialization.html
|
||||
if( fieldInfo.IsInitOnly )
|
||||
return false;
|
||||
|
||||
// SerializeReference makes even System.Object fields serializable
|
||||
if( Attribute.IsDefined( fieldInfo, typeof( SerializeReference ) ) )
|
||||
return true;
|
||||
|
||||
if( ( !fieldInfo.IsPublic || fieldInfo.IsNotSerialized ) && !Attribute.IsDefined( fieldInfo, typeof( SerializeField ) ) )
|
||||
return false;
|
||||
|
||||
return IsTypeSerializable( fieldInfo.FieldType );
|
||||
}
|
||||
|
||||
// Check if the property is serializable
|
||||
public static bool IsSerializable( this PropertyInfo propertyInfo )
|
||||
{
|
||||
return IsTypeSerializable( propertyInfo.PropertyType );
|
||||
}
|
||||
|
||||
// Check if type is serializable
|
||||
private static bool IsTypeSerializable( Type type )
|
||||
{
|
||||
// see Serialization Rules: https://docs.unity3d.com/Manual/script-Serialization.html
|
||||
if( typeof( Object ).IsAssignableFrom( type ) )
|
||||
return true;
|
||||
|
||||
if( type.IsArray )
|
||||
{
|
||||
if( type.GetArrayRank() != 1 )
|
||||
return false;
|
||||
|
||||
type = type.GetElementType();
|
||||
|
||||
if( typeof( Object ).IsAssignableFrom( type ) )
|
||||
return true;
|
||||
}
|
||||
else if( type.IsGenericType )
|
||||
{
|
||||
// Generic types are allowed on 2020.1 and later
|
||||
if( type.GetGenericTypeDefinition() == typeof( List<> ) )
|
||||
{
|
||||
type = type.GetGenericArguments()[0];
|
||||
|
||||
if( typeof( Object ).IsAssignableFrom( type ) )
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return Attribute.IsDefined( type, typeof( SerializableAttribute ), false );
|
||||
}
|
||||
|
||||
// Check if instances of this type should be searched for references
|
||||
public static bool IsIgnoredUnityType( this Type type )
|
||||
{
|
||||
if( type.IsPrimitive || primitiveUnityTypes.Contains( type ) || type.IsEnum )
|
||||
return true;
|
||||
|
||||
// Searching NativeArrays for reference can throw InvalidOperationException if the collection is disposed
|
||||
if( type.Namespace == nativeCollectionsNamespace )
|
||||
return true;
|
||||
|
||||
// Searching assembly variables for reference throws InvalidCastException on .NET 4.0 runtime
|
||||
if( typeof( Type ).IsAssignableFrom( type ) || type.Namespace == reflectionNamespace )
|
||||
return true;
|
||||
|
||||
// Searching pointers or ref variables for reference throws ArgumentException
|
||||
if( type.IsPointer || type.IsByRef )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get <get> function for a field
|
||||
public static VariableGetVal CreateGetter( this FieldInfo fieldInfo, Type type )
|
||||
{
|
||||
// Commented the IL generator code below because it might actually be slower than simply using reflection
|
||||
// Credit: https://www.codeproject.com/Articles/14560/Fast-Dynamic-Property-Field-Accessors
|
||||
//DynamicMethod dm = new DynamicMethod( "Get" + fieldInfo.Name, fieldInfo.FieldType, new Type[] { typeof( object ) }, type );
|
||||
//ILGenerator il = dm.GetILGenerator();
|
||||
//// Load the instance of the object (argument 0) onto the stack
|
||||
//il.Emit( OpCodes.Ldarg_0 );
|
||||
//// Load the value of the object's field (fi) onto the stack
|
||||
//il.Emit( OpCodes.Ldfld, fieldInfo );
|
||||
//// return the value on the top of the stack
|
||||
//il.Emit( OpCodes.Ret );
|
||||
|
||||
//return (VariableGetVal) dm.CreateDelegate( typeof( VariableGetVal ) );
|
||||
|
||||
return fieldInfo.GetValue;
|
||||
}
|
||||
|
||||
// Get <get> function for a property
|
||||
public static VariableGetVal CreateGetter( this PropertyInfo propertyInfo )
|
||||
{
|
||||
// Can't use PropertyWrapper (which uses CreateDelegate) for property getters of structs
|
||||
if( propertyInfo.DeclaringType.IsValueType )
|
||||
{
|
||||
return !propertyInfo.CanRead ? (VariableGetVal) null : ( obj ) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
return propertyInfo.GetValue( obj, null );
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Property getters may return various kinds of exceptions if their backing fields are not initialized (yet)
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Type GenType = typeof( PropertyWrapper<,> ).MakeGenericType( propertyInfo.DeclaringType, propertyInfo.PropertyType );
|
||||
return ( (IPropertyAccessor) Activator.CreateInstance( GenType, propertyInfo.GetGetMethod( true ) ) ).GetValue;
|
||||
}
|
||||
|
||||
// Check if all open scenes are saved (not dirty)
|
||||
public static bool AreScenesSaved()
|
||||
{
|
||||
for( int i = 0; i < SceneManager.sceneCount; i++ )
|
||||
{
|
||||
Scene scene = SceneManager.GetSceneAt( i );
|
||||
if( scene.isDirty || string.IsNullOrEmpty( scene.path ) )
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Returns file extension in lowercase (period not included)
|
||||
public static string GetFileExtension( string path )
|
||||
{
|
||||
int extensionIndex = path.LastIndexOf( '.' );
|
||||
if( extensionIndex < 0 || extensionIndex >= path.Length - 1 )
|
||||
return "";
|
||||
|
||||
stringBuilder.Length = 0;
|
||||
for( extensionIndex++; extensionIndex < path.Length; extensionIndex++ )
|
||||
{
|
||||
char ch = path[extensionIndex];
|
||||
if( ch >= 65 && ch <= 90 ) // A-Z
|
||||
ch += (char) 32; // Converted to a-z
|
||||
|
||||
stringBuilder.Append( ch );
|
||||
}
|
||||
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
// Draw header inside OnGUI
|
||||
public static void DrawHeader( string label )
|
||||
{
|
||||
Color c = GUI.backgroundColor;
|
||||
GUI.backgroundColor = AssetUsageDetectorSettings.SettingsHeaderColor;
|
||||
GUILayout.Box( label, BoxGUIStyle, GL_EXPAND_WIDTH );
|
||||
GUI.backgroundColor = c;
|
||||
}
|
||||
|
||||
// Draw horizontal line inside OnGUI
|
||||
public static void DrawSeparatorLine()
|
||||
{
|
||||
GUILayout.Space( 4f );
|
||||
GUILayout.Box( "", GL_HEIGHT_2, GL_EXPAND_WIDTH );
|
||||
GUILayout.Space( 4f );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restricts the given Rect within the screen's bounds.
|
||||
/// </summary>
|
||||
public static Rect GetScreenFittedRect(Rect originalRect, EditorWindow editorWindow)
|
||||
{
|
||||
screenFittedRectGetter ??= typeof(EditorWindow).Assembly.GetType("UnityEditor.ContainerWindow").GetMethod("FitRectToScreen", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static);
|
||||
|
||||
if (screenFittedRectGetter.GetParameters().Length == 3)
|
||||
return (Rect)screenFittedRectGetter.Invoke(null, new object[] { originalRect, true, true });
|
||||
else
|
||||
{
|
||||
// New version introduced in Unity 2022.3.62f1, Unity 6.0.49f1 and Unity 6.1.0f1.
|
||||
// Usage example: https://github.com/Unity-Technologies/UnityCsReference/blob/10f8718268a7e34844ba7d59792117c28d75a99b/Editor/Mono/EditorWindow.cs#L1264
|
||||
editorWindowHostViewGetter ??= typeof(EditorWindow).GetField("m_Parent", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
hostViewContainerWindowGetter ??= typeof(EditorWindow).Assembly.GetType("UnityEditor.HostView").GetProperty("window", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
return (Rect)screenFittedRectGetter.Invoke(null, new object[] { originalRect, originalRect.center, true, hostViewContainerWindowGetter.GetValue(editorWindowHostViewGetter.GetValue(editorWindow), null) });
|
||||
}
|
||||
}
|
||||
|
||||
// Check if all the objects inside the list are null
|
||||
public static bool IsEmpty( this List<ObjectToSearch> objectsToSearch )
|
||||
{
|
||||
if( objectsToSearch == null )
|
||||
return true;
|
||||
|
||||
for( int i = 0; i < objectsToSearch.Count; i++ )
|
||||
{
|
||||
if( objectsToSearch[i].obj != null )
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check if all the objects inside the list are null
|
||||
public static bool IsEmpty<T>( this List<T> objects ) where T : Object
|
||||
{
|
||||
if( objects == null )
|
||||
return true;
|
||||
|
||||
for( int i = 0; i < objects.Count; i++ )
|
||||
{
|
||||
if( objects[i] != null )
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Returns true is str starts with prefix
|
||||
public static bool StartsWithFast( this string str, string prefix )
|
||||
{
|
||||
int aLen = str.Length;
|
||||
int bLen = prefix.Length;
|
||||
int ap = 0; int bp = 0;
|
||||
while( ap < aLen && bp < bLen && str[ap] == prefix[bp] )
|
||||
{
|
||||
ap++;
|
||||
bp++;
|
||||
}
|
||||
|
||||
return bp == bLen;
|
||||
}
|
||||
|
||||
// Returns true is str ends with postfix
|
||||
public static bool EndsWithFast( this string str, string postfix )
|
||||
{
|
||||
int ap = str.Length - 1;
|
||||
int bp = postfix.Length - 1;
|
||||
while( ap >= 0 && bp >= 0 && str[ap] == postfix[bp] )
|
||||
{
|
||||
ap--;
|
||||
bp--;
|
||||
}
|
||||
|
||||
return bp < 0;
|
||||
}
|
||||
|
||||
public static bool ContainsFast<T>( this List<T> list, T element )
|
||||
{
|
||||
if( !( element is ValueType ) )
|
||||
{
|
||||
for( int i = list.Count - 1; i >= 0; i-- )
|
||||
{
|
||||
if( ReferenceEquals( list[i], element ) )
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for( int i = list.Count - 1; i >= 0; i-- )
|
||||
{
|
||||
if( element.Equals( list[i] ) )
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
18
Assets/Plugins/AssetUsageDetector/Editor/Utilities.cs.meta
Normal file
18
Assets/Plugins/AssetUsageDetector/Editor/Utilities.cs.meta
Normal file
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 52b272b7591fb90499916205261524e0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 112837
|
||||
packageName: Asset Usage Detector
|
||||
packageVersion: 2.5.7
|
||||
assetPath: Assets/Plugins/AssetUsageDetector/Editor/Utilities.cs
|
||||
uploadId: 761377
|
||||
83
Assets/Plugins/AssetUsageDetector/Editor/VariableGetter.cs
Normal file
83
Assets/Plugins/AssetUsageDetector/Editor/VariableGetter.cs
Normal file
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AssetUsageDetectorNamespace
|
||||
{
|
||||
// Delegate to get the value of a variable (either field or property)
|
||||
public delegate object VariableGetVal( object obj );
|
||||
|
||||
// Custom struct to hold a variable, its important properties and its getter function
|
||||
public readonly struct VariableGetterHolder
|
||||
{
|
||||
public readonly MemberInfo variable;
|
||||
public readonly bool isSerializable;
|
||||
private readonly VariableGetVal getter;
|
||||
|
||||
public readonly string Name { get { return variable.Name; } }
|
||||
public readonly bool IsProperty { get { return variable is PropertyInfo; } }
|
||||
|
||||
public VariableGetterHolder( FieldInfo fieldInfo, VariableGetVal getter, bool isSerializable )
|
||||
{
|
||||
this.variable = fieldInfo;
|
||||
this.isSerializable = isSerializable;
|
||||
this.getter = getter;
|
||||
}
|
||||
|
||||
public VariableGetterHolder( PropertyInfo propertyInfo, VariableGetVal getter, bool isSerializable )
|
||||
{
|
||||
this.variable = propertyInfo;
|
||||
this.isSerializable = isSerializable;
|
||||
this.getter = getter;
|
||||
}
|
||||
|
||||
public readonly object Get( object obj )
|
||||
{
|
||||
try
|
||||
{
|
||||
return getter( obj );
|
||||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
StringBuilder sb = Utilities.stringBuilder;
|
||||
sb.Length = 0;
|
||||
sb.Append( "Error while getting the value of (" ).Append( IsProperty ? ( (PropertyInfo) variable ).PropertyType : ( (FieldInfo) variable ).FieldType ).Append( ") " )
|
||||
.Append( variable.DeclaringType ).Append( "." ).Append( Name ).Append( ": " ).Append( e );
|
||||
|
||||
Debug.LogError( sb.ToString() );
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Credit: http://stackoverflow.com/questions/724143/how-do-i-create-a-delegate-for-a-net-property
|
||||
public interface IPropertyAccessor
|
||||
{
|
||||
object GetValue( object source );
|
||||
}
|
||||
|
||||
// A wrapper class for properties to get their values more efficiently
|
||||
public class PropertyWrapper<TObject, TValue> : IPropertyAccessor where TObject : class
|
||||
{
|
||||
private readonly Func<TObject, TValue> getter;
|
||||
|
||||
public PropertyWrapper( MethodInfo getterMethod )
|
||||
{
|
||||
getter = (Func<TObject, TValue>) Delegate.CreateDelegate( typeof( Func<TObject, TValue> ), getterMethod );
|
||||
}
|
||||
|
||||
public object GetValue( object obj )
|
||||
{
|
||||
try
|
||||
{
|
||||
return getter( (TObject) obj );
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Property getters may return various kinds of exceptions if their backing fields are not initialized (yet)
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9e94c83e8b850514ca0217aeff1491a6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 112837
|
||||
packageName: Asset Usage Detector
|
||||
packageVersion: 2.5.7
|
||||
assetPath: Assets/Plugins/AssetUsageDetector/Editor/VariableGetter.cs
|
||||
uploadId: 761377
|
||||
4
Assets/Plugins/AssetUsageDetector/README.txt
Normal file
4
Assets/Plugins/AssetUsageDetector/README.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
= Asset Usage Detector (v2.5.7) =
|
||||
|
||||
Documentation: https://github.com/yasirkula/UnityAssetUsageDetector
|
||||
E-mail: yasirkula@gmail.com
|
||||
15
Assets/Plugins/AssetUsageDetector/README.txt.meta
Normal file
15
Assets/Plugins/AssetUsageDetector/README.txt.meta
Normal file
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac528f1751f33a647a45caeff6a9344b
|
||||
timeCreated: 1520032521
|
||||
licenseType: Store
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 112837
|
||||
packageName: Asset Usage Detector
|
||||
packageVersion: 2.5.7
|
||||
assetPath: Assets/Plugins/AssetUsageDetector/README.txt
|
||||
uploadId: 761377
|
||||
@@ -139,4 +139,4 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
version: 10
|
||||
|
||||
@@ -139,4 +139,4 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
version: 10
|
||||
|
||||
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
version: 10
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
|
||||
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
version: 10
|
||||
--- !u!114 &-1894498150400101907
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
|
||||
@@ -360,7 +360,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
version: 10
|
||||
--- !u!114 &5719775629763815823
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
|
||||
@@ -384,4 +384,4 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
version: 10
|
||||
|
||||
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
version: 10
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
|
||||
@@ -390,4 +390,4 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
version: 10
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0cd3b73ac6aa05a4d8d25efe1060fe74
|
||||
folderAsset: yes
|
||||
timeCreated: 1596819199
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,9 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 698d5ca0970d8ce45aa330be970fa36f
|
||||
folderAsset: yes
|
||||
timeCreated: 1506880293
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,9 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b0daca6285f51cd4eab91ffd8980c529
|
||||
folderAsset: yes
|
||||
timeCreated: 1505891693
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,233 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &144440
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 22434076}
|
||||
- component: {fileID: 22230716}
|
||||
- component: {fileID: 11463902}
|
||||
m_Layer: 5
|
||||
m_Name: Selector_In
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &154636
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 22415502}
|
||||
- component: {fileID: 22203708}
|
||||
- component: {fileID: 11400054}
|
||||
- component: {fileID: 11458508}
|
||||
m_Layer: 5
|
||||
m_Name: ColorWheel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!1 &155348
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
serializedVersion: 5
|
||||
m_Component:
|
||||
- component: {fileID: 22430678}
|
||||
- component: {fileID: 22201174}
|
||||
- component: {fileID: 11484078}
|
||||
m_Layer: 5
|
||||
m_Name: Selector_Out
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &11400054
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 154636}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 2100000, guid: 412232a98a56d684a9350a77ef21058d, type: 2}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
--- !u!114 &11458508
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 154636}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ed2c6afe74ecb7548b7c676d57a2373c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
SelectorOut: {fileID: 22430678}
|
||||
SelectorIn: {fileID: 22434076}
|
||||
--- !u!114 &11463902
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 144440}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Sprite: {fileID: 21300000, guid: f577070d7be21e24e9ed69d3c5f2c20c, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
--- !u!114 &11484078
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 155348}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Sprite: {fileID: 21300000, guid: f577070d7be21e24e9ed69d3c5f2c20c, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
--- !u!222 &22201174
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 155348}
|
||||
--- !u!222 &22203708
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 154636}
|
||||
--- !u!222 &22230716
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 144440}
|
||||
--- !u!224 &22415502
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 154636}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 22430678}
|
||||
- {fileID: 22434076}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 250, y: 250}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!224 &22430678
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 155348}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -1}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 22415502}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 12.5, y: 12.5}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!224 &22434076
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 100100000}
|
||||
m_GameObject: {fileID: 144440}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -1}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 22415502}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 12.5, y: 12.5}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1001 &100100000
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 1
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications: []
|
||||
m_RemovedComponents: []
|
||||
m_ParentPrefab: {fileID: 0}
|
||||
m_RootGameObject: {fileID: 154636}
|
||||
m_IsPrefabParent: 1
|
||||
@@ -1,15 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: af8ebf3eda3f41146bb902219c03964f
|
||||
timeCreated: 1429524040
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 111349
|
||||
packageName: Runtime Inspector & Hierarchy
|
||||
packageVersion: 1.7.4
|
||||
assetPath: Assets/Plugins/RuntimeInspector/ExternalResources/ColorWheel/ColorWheel.prefab
|
||||
uploadId: 744571
|
||||
@@ -1,207 +0,0 @@
|
||||
// Copyright (c) 2015, Felix Kate All rights reserved.
|
||||
// Usage of this code is governed by a BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace RuntimeInspectorNamespace
|
||||
{
|
||||
public class ColorWheelControl : MonoBehaviour, IPointerDownHandler, IDragHandler, IPointerUpHandler
|
||||
{
|
||||
private const float RGB_CONST = 2 / Mathf.PI;
|
||||
private const float G_CONST = 2 * Mathf.PI * ( 1.0f / 3.0f );
|
||||
private const float B_CONST = 2 * Mathf.PI * ( 2.0f / 3.0f );
|
||||
|
||||
private Color m_color;
|
||||
public Color Color
|
||||
{
|
||||
get { return m_color; }
|
||||
private set
|
||||
{
|
||||
if( m_color != value )
|
||||
{
|
||||
m_color = value;
|
||||
m_color.a = Alpha;
|
||||
|
||||
if( OnColorChanged != null )
|
||||
OnColorChanged( m_color );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public float Alpha { get; set; }
|
||||
|
||||
private RectTransform rectTransform;
|
||||
|
||||
#pragma warning disable 0649
|
||||
[SerializeField]
|
||||
private RectTransform SelectorOut;
|
||||
|
||||
[SerializeField]
|
||||
private RectTransform SelectorIn;
|
||||
|
||||
[SerializeField]
|
||||
private WindowDragHandler colorPickerWindow;
|
||||
#pragma warning restore 0649
|
||||
|
||||
private float outer;
|
||||
private Vector2 inner;
|
||||
private Material mat;
|
||||
private bool draggingOuter, draggingInner;
|
||||
private float halfSize, halfSizeSqr, outerCirclePaddingSqr, innerSquareHalfSize;
|
||||
|
||||
private int pointerId = -98765;
|
||||
|
||||
public delegate void OnColorChangedDelegate( Color32 color );
|
||||
public event OnColorChangedDelegate OnColorChanged;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
rectTransform = (RectTransform) transform;
|
||||
Image img = GetComponent<Image>();
|
||||
|
||||
mat = new Material( img.material );
|
||||
img.material = mat;
|
||||
|
||||
UpdateProperties();
|
||||
}
|
||||
|
||||
private void OnRectTransformDimensionsChange()
|
||||
{
|
||||
if( rectTransform == null )
|
||||
return;
|
||||
|
||||
UpdateProperties();
|
||||
UpdateSelectors();
|
||||
}
|
||||
|
||||
private void UpdateProperties()
|
||||
{
|
||||
halfSize = rectTransform.rect.size.x * 0.5f;
|
||||
halfSizeSqr = halfSize * halfSize;
|
||||
outerCirclePaddingSqr = halfSizeSqr * 0.75f * 0.75f;
|
||||
innerSquareHalfSize = halfSize * 0.5f;
|
||||
}
|
||||
|
||||
public void PickColor( Color c )
|
||||
{
|
||||
Alpha = c.a;
|
||||
|
||||
float h, s, v;
|
||||
Color.RGBToHSV( c, out h, out s, out v );
|
||||
|
||||
outer = h * 2f * Mathf.PI;
|
||||
inner.x = 1 - s;
|
||||
inner.y = 1 - v;
|
||||
|
||||
UpdateSelectors();
|
||||
|
||||
Color = c;
|
||||
mat.SetColor( "_Color", GetCurrentBaseColor() );
|
||||
}
|
||||
|
||||
public void OnPointerDown( PointerEventData eventData )
|
||||
{
|
||||
Vector2 position;
|
||||
if( !RectTransformUtility.ScreenPointToLocalPointInRectangle( rectTransform, eventData.position, eventData.pressEventCamera, out position ) )
|
||||
return;
|
||||
|
||||
//Check if click was in outer circle, inner box or neither
|
||||
float distanceSqr = position.sqrMagnitude;
|
||||
if( distanceSqr <= halfSizeSqr && distanceSqr >= outerCirclePaddingSqr )
|
||||
draggingOuter = true;
|
||||
else if( Mathf.Abs( position.x ) <= innerSquareHalfSize && Mathf.Abs( position.y ) <= innerSquareHalfSize )
|
||||
draggingInner = true;
|
||||
else //Invalid touch, don't track
|
||||
return;
|
||||
|
||||
GetSelectedColor( position );
|
||||
pointerId = eventData.pointerId;
|
||||
}
|
||||
|
||||
public void OnDrag( PointerEventData eventData )
|
||||
{
|
||||
if( pointerId != eventData.pointerId )
|
||||
{
|
||||
eventData.pointerDrag = colorPickerWindow.gameObject;
|
||||
colorPickerWindow.OnBeginDrag( eventData );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Vector2 position;
|
||||
RectTransformUtility.ScreenPointToLocalPointInRectangle( rectTransform, eventData.position, eventData.pressEventCamera, out position );
|
||||
|
||||
GetSelectedColor( position );
|
||||
}
|
||||
|
||||
public void OnPointerUp( PointerEventData eventData )
|
||||
{
|
||||
if( pointerId != eventData.pointerId )
|
||||
return;
|
||||
|
||||
Vector2 position;
|
||||
RectTransformUtility.ScreenPointToLocalPointInRectangle( rectTransform, eventData.position, eventData.pressEventCamera, out position );
|
||||
|
||||
GetSelectedColor( position );
|
||||
|
||||
draggingOuter = false;
|
||||
draggingInner = false;
|
||||
|
||||
pointerId = -98765;
|
||||
}
|
||||
|
||||
private void GetSelectedColor( Vector2 pointerPos )
|
||||
{
|
||||
if( draggingOuter )
|
||||
{
|
||||
Vector2 dir = -pointerPos.normalized;
|
||||
outer = Mathf.Atan2( -dir.x, -dir.y );
|
||||
|
||||
UpdateColor();
|
||||
}
|
||||
else if( draggingInner )
|
||||
{
|
||||
Vector2 dir = -pointerPos;
|
||||
dir.x = Mathf.Clamp( dir.x, -innerSquareHalfSize, innerSquareHalfSize ) + innerSquareHalfSize;
|
||||
dir.y = Mathf.Clamp( dir.y, -innerSquareHalfSize, innerSquareHalfSize ) + innerSquareHalfSize;
|
||||
inner = dir / halfSize;
|
||||
|
||||
UpdateColor();
|
||||
}
|
||||
|
||||
UpdateSelectors();
|
||||
}
|
||||
|
||||
private void UpdateColor()
|
||||
{
|
||||
Color c = GetCurrentBaseColor();
|
||||
mat.SetColor( "_Color", c );
|
||||
|
||||
c = Color.Lerp( c, Color.white, inner.x );
|
||||
c = Color.Lerp( c, Color.black, inner.y );
|
||||
|
||||
Color = c;
|
||||
}
|
||||
|
||||
private Color GetCurrentBaseColor()
|
||||
{
|
||||
Color color = Color.white;
|
||||
|
||||
//Calculation of rgb from degree with a modified 3 wave function
|
||||
//Check out http://en.wikipedia.org/wiki/File:HSV-RGB-comparison.svg to understand how it should look
|
||||
color.r = Mathf.Clamp( RGB_CONST * Mathf.Asin( Mathf.Cos( outer ) ) * 1.5f + 0.5f, 0f, 1f );
|
||||
color.g = Mathf.Clamp( RGB_CONST * Mathf.Asin( Mathf.Cos( G_CONST - outer ) ) * 1.5f + 0.5f, 0f, 1f );
|
||||
color.b = Mathf.Clamp( RGB_CONST * Mathf.Asin( Mathf.Cos( B_CONST - outer ) ) * 1.5f + 0.5f, 0f, 1f );
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
private void UpdateSelectors()
|
||||
{
|
||||
SelectorOut.anchoredPosition = new Vector2( Mathf.Sin( outer ) * halfSize * 0.85f, Mathf.Cos( outer ) * halfSize * 0.85f );
|
||||
SelectorIn.anchoredPosition = new Vector2( innerSquareHalfSize - inner.x * halfSize, innerSquareHalfSize - inner.y * halfSize );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ed2c6afe74ecb7548b7c676d57a2373c
|
||||
timeCreated: 1429517417
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 111349
|
||||
packageName: Runtime Inspector & Hierarchy
|
||||
packageVersion: 1.7.4
|
||||
assetPath: Assets/Plugins/RuntimeInspector/ExternalResources/ColorWheel/ColorWheelControl.cs
|
||||
uploadId: 744571
|
||||
@@ -1,27 +0,0 @@
|
||||
Copyright (c) 2015, Felix Kate
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of Unity_ColorWheel nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,15 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bd20edc15d6b63c468da09ded7ed8ed5
|
||||
timeCreated: 1430238877
|
||||
licenseType: Store
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 111349
|
||||
packageName: Runtime Inspector & Hierarchy
|
||||
packageVersion: 1.7.4
|
||||
assetPath: Assets/Plugins/RuntimeInspector/ExternalResources/ColorWheel/ColorWheelLICENSE.txt
|
||||
uploadId: 744571
|
||||
@@ -1,9 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e85b56eeb74ca74d9cfc5a72750d0d2
|
||||
folderAsset: yes
|
||||
timeCreated: 1505899421
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -1,130 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f577070d7be21e24e9ed69d3c5f2c20c
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 1
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 1
|
||||
pSDShowRemoveMatteOption: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 111349
|
||||
packageName: Runtime Inspector & Hierarchy
|
||||
packageVersion: 1.7.4
|
||||
assetPath: Assets/Plugins/RuntimeInspector/ExternalResources/ColorWheel/Visuals/ColorSelector.psd
|
||||
uploadId: 744571
|
||||
@@ -1,75 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: ColorWheelMaterial
|
||||
m_Shader: {fileID: 4800000, guid: 9b76b6ef36124ee43b115ddf566992c5, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 5
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _BorderWhiteness: 1
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _EmissionScaleUI: 0
|
||||
- _Glossiness: 0.5
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0, g: 1, b: 0.88534933, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _EmissionColorUI: {r: 1, g: 1, b: 1, a: 1}
|
||||
@@ -1,15 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 412232a98a56d684a9350a77ef21058d
|
||||
timeCreated: 1429510354
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 111349
|
||||
packageName: Runtime Inspector & Hierarchy
|
||||
packageVersion: 1.7.4
|
||||
assetPath: Assets/Plugins/RuntimeInspector/ExternalResources/ColorWheel/Visuals/ColorWheelMaterial.mat
|
||||
uploadId: 744571
|
||||
@@ -1,169 +0,0 @@
|
||||
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
|
||||
|
||||
//Copyright (c) 2015, Felix Kate All rights reserved.
|
||||
// Usage of this code is governed by a BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
Shader "UI/ColorWheel"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex("Dummy", 2D) = "white" { }
|
||||
_Color ("Color", Color) = (1,1,1,1)
|
||||
//_BorderWhiteness ("Border Whiteness", Range(0.0,1.0)) = 1.0
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue"="Transparent"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
"PreviewType"="Plane"
|
||||
"CanUseSpriteAtlas"="True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma target 2.5
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
//Prepare the inputs
|
||||
struct vertIN
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct fragIN
|
||||
{
|
||||
float4 pos : SV_POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
//Function for making smooth circles from gradient
|
||||
fixed smoothCircle(fixed size, fixed gradient)
|
||||
{
|
||||
fixed scaleFactor = size + 1;
|
||||
return smoothstep(0.5 - 0.0025 * scaleFactor, 0.5 + 0.0025 * scaleFactor, 1 - gradient * scaleFactor);
|
||||
}
|
||||
|
||||
//Function for making box from gradient
|
||||
fixed smoothBox(fixed size, fixed2 gradient)
|
||||
{
|
||||
fixed scaleFactor = size * 0.5;
|
||||
fixed alpha = ceil(gradient.x - scaleFactor);
|
||||
alpha *= ceil((1 - gradient.x) - scaleFactor);
|
||||
alpha *= ceil(gradient.y - scaleFactor);
|
||||
alpha *= ceil((1 - gradient.y) - scaleFactor);
|
||||
|
||||
return alpha;
|
||||
}
|
||||
|
||||
//Get the values from outside
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
//fixed _BorderWhiteness;
|
||||
|
||||
//Fill the vert struct
|
||||
fragIN vert (vertIN v)
|
||||
{
|
||||
fragIN o;
|
||||
|
||||
o.pos = UnityObjectToClipPos(v.vertex);
|
||||
o.uv = v.texcoord0;
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
//Draw the circle
|
||||
fixed4 frag(fragIN i) : COLOR
|
||||
{
|
||||
fixed4 c = 1;// _BorderWhiteness1;
|
||||
|
||||
//Make the inner area of the box
|
||||
fixed2 bGrad = 1;
|
||||
bGrad.x = smoothstep(0.25, 0.75, i.uv.x);
|
||||
bGrad.y = smoothstep(0.25, 0.75, i.uv.y);
|
||||
|
||||
fixed4 cBox = lerp(fixed4(1, 1, 1, 1), _Color, bGrad.x) * bGrad.y;
|
||||
|
||||
//Set up PI
|
||||
fixed PI = 3.14159265359;
|
||||
fixed PI_INV = 3 / PI;
|
||||
|
||||
//Circular gradient
|
||||
fixed cGrad = distance(i.uv, fixed2(0.5, 0.5));
|
||||
|
||||
//Angle gradient
|
||||
fixed ang = atan2(1 - i.uv.x - 0.5, 1 - i.uv.y - 0.5) + PI;
|
||||
|
||||
//Calculate hue
|
||||
fixed4 cWheel = 1;
|
||||
|
||||
cWheel.r = clamp(PI_INV * asin(clamp(cos(ang), -0.99, 0.99)) + 0.5, 0, 1); // 0.01 flexibility -> fixes precision issues on WebGL
|
||||
cWheel.g = clamp(PI_INV * asin(clamp(cos(2 * PI / 3.0 - ang), -0.99, 0.99)) + 0.5, 0, 1);
|
||||
cWheel.b = clamp(PI_INV * asin(clamp(cos(4 * PI / 3.0 - ang), -0.99, 0.99)) + 0.5, 0, 1);
|
||||
|
||||
//Calculate white part
|
||||
//fixed aWhite = 1;// smoothCircle(0.025, cGrad);
|
||||
|
||||
//aWhite -= smoothCircle(0.37, cGrad);
|
||||
|
||||
//aWhite += smoothBox(0.46, i.uv.xy);
|
||||
|
||||
//c = lerp(_BorderWhiteness, 0.8, aWhite);
|
||||
|
||||
//Add color
|
||||
fixed aCol = smoothCircle(0.02, cGrad);
|
||||
|
||||
aCol -= smoothCircle(0.35, cGrad);
|
||||
|
||||
c = lerp(c, cWheel, aCol);
|
||||
|
||||
aCol = smoothBox(0.51, i.uv.xy);
|
||||
|
||||
c = lerp(c, cBox, aCol);
|
||||
|
||||
//Set alpha
|
||||
fixed alpha = smoothCircle(0, cGrad);
|
||||
|
||||
alpha -= smoothCircle(0.4, cGrad);
|
||||
|
||||
alpha += smoothBox(0.49, i.uv.xy);
|
||||
|
||||
c.a = alpha;
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9b76b6ef36124ee43b115ddf566992c5
|
||||
timeCreated: 1429510240
|
||||
licenseType: Store
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 111349
|
||||
packageName: Runtime Inspector & Hierarchy
|
||||
packageVersion: 1.7.4
|
||||
assetPath: Assets/Plugins/RuntimeInspector/ExternalResources/ColorWheel/Visuals/ColorWheelShader.shader
|
||||
uploadId: 744571
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user