├── .gitignore
├── Document~
└── img
│ ├── General.png
│ └── CreateAsset.png
├── PluginSource~
├── copy.bat
├── ShaderVariantLogger.vcxproj.user
├── ShaderVariantLogger.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcuserdata
│ │ │ └── ykurokawa.xcuserdatad
│ │ │ │ └── UserInterfaceState.xcuserstate
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── xcuserdata
│ │ └── ykurokawa.xcuserdatad
│ │ │ └── xcschemes
│ │ │ └── xcschememanagement.plist
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── ShaderVariantLogger.xcscheme
│ └── project.pbxproj
├── MacSource
│ └── dll.cpp
├── WinSource
│ └── dllmain.cpp
├── ShaderVariantLogger.sln
├── ShaderVariantLogger.vcxproj.filters
├── Source
│ ├── Program.cpp
│ └── UnityPluginHeaders
│ │ ├── IUnityInterface.h
│ │ ├── IUnityProfilerCallbacks.h
│ │ └── IUnityProfiler.h
└── ShaderVariantLogger.vcxproj
├── Runtime
├── Plugins
│ ├── x86_64
│ │ ├── ShaderVariantLogger.dll
│ │ └── ShaderVariantLogger.dll.meta
│ ├── osx.meta
│ ├── x86_64.meta
│ └── osx
│ │ ├── ShaderVariantLogger.bundle
│ │ ├── Contents
│ │ │ ├── MacOS
│ │ │ │ ├── ShaderVariantLogger
│ │ │ │ └── ShaderVariantLogger.meta
│ │ │ ├── Info.plist.meta
│ │ │ ├── MacOS.meta
│ │ │ ├── _CodeSignature
│ │ │ │ ├── CodeResources.meta
│ │ │ │ └── CodeResources
│ │ │ ├── _CodeSignature.meta
│ │ │ └── Info.plist
│ │ └── Contents.meta
│ │ └── ShaderVariantLogger.bundle.meta
├── Plugins.meta
├── Runtime.UnityShaderVariantLogerForEditor.asmdef.meta
├── ShaderVariantLoggerBehaviour.cs.meta
├── ShaderVariantLoggerInterface.cs.meta
├── Runtime.UnityShaderVariantLogerForEditor.asmdef
├── ShaderVariantLoggerBehaviour.cs
└── ShaderVariantLoggerInterface.cs
├── LICENSE.meta
├── README.ja.md.meta
├── README.md.meta
├── package.json.meta
├── Editor.meta
├── Runtime.meta
├── Editor
├── UXML.meta
├── Editor.UnityShaderVariantLogerForEditor.asmdef.meta
├── GeneralSettingsUI.cs.meta
├── VariantLoggerWindow.cs.meta
├── EditorShaderVariantLogger.cs.meta
├── EditorVariantLoggerConfig.cs.meta
├── ShaderPassLightModeConverter.cs.meta
├── CreateVariantCollectionAssetFromLog.cs.meta
├── UXML
│ ├── GeneralSettingsUI.uxml.meta
│ ├── VariantCollectionCreateUI.uxml.meta
│ ├── GeneralSettingsUI.uxml
│ └── VariantCollectionCreateUI.uxml
├── Editor.UnityShaderVariantLogerForEditor.asmdef
├── EditorShaderVariantLogger.cs
├── EditorVariantLoggerConfig.cs
├── GeneralSettingsUI.cs
├── ShaderPassLightModeConverter.cs
├── VariantLoggerWindow.cs
└── CreateVariantCollectionAssetFromLog.cs
├── Extentions.meta
├── Extentions
├── SceneCoverage.meta
└── SceneCoverage
│ ├── Editor.meta
│ ├── Runtime.meta
│ ├── Editor
│ ├── UXML.meta
│ ├── Editor.SceneCoverage.UnityShaderVariantLogerForEditor.asmdef.meta
│ ├── SceneCorvarageEditorUI.cs.meta
│ ├── SceneCoverageAnalyzer.cs.meta
│ ├── BuildTargetSceneCollector.cs.meta
│ ├── UXML
│ │ ├── SceneLogAnalyze.uxml.meta
│ │ └── SceneLogAnalyze.uxml
│ ├── Editor.SceneCoverage.UnityShaderVariantLogerForEditor.asmdef
│ ├── SceneCorvarageEditorUI.cs
│ ├── BuildTargetSceneCollector.cs
│ └── SceneCoverageAnalyzer.cs
│ └── Runtime
│ ├── Runtime.SceneCoverage.UnityShaderVariantLogerForEditor.asmdef.meta
│ ├── SceneLogger.cs.meta
│ ├── Runtime.SceneCoverage.UnityShaderVariantLogerForEditor.asmdef
│ └── SceneLogger.cs
├── package.json
├── LICENSE
├── README.ja.md
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | PluginSource~/Debug
2 | PluginSource~/x64
3 | PluginSource~/.vs
--------------------------------------------------------------------------------
/Document~/img/General.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wotakuro/UnityShaderVariantLoggerForEditor/HEAD/Document~/img/General.png
--------------------------------------------------------------------------------
/Document~/img/CreateAsset.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wotakuro/UnityShaderVariantLoggerForEditor/HEAD/Document~/img/CreateAsset.png
--------------------------------------------------------------------------------
/PluginSource~/copy.bat:
--------------------------------------------------------------------------------
1 | cd %~dp0
2 | copy x64\Release\ShaderVariantLogger.dll ..\Runtime\Plugins\x86_64\ShaderVariantLogger.dll
3 | pause;
--------------------------------------------------------------------------------
/Runtime/Plugins/x86_64/ShaderVariantLogger.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wotakuro/UnityShaderVariantLoggerForEditor/HEAD/Runtime/Plugins/x86_64/ShaderVariantLogger.dll
--------------------------------------------------------------------------------
/LICENSE.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fa13ecb1445c5c244be32299b4a2b3e5
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/README.ja.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c2ca77d5f3f70b6499f1c7ac4f8bc379
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/README.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 108e573f94966dd40857ae4d7798641f
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/package.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 71d8e0db2c005b440a6640da87d3fa84
3 | PackageManifestImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ed2dfac3ae7b2a14ebf0e1bdb3ce7be9
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 55535008e971c704ea4afa31da8a8af0
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/UXML.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fa8794d4d46bca9479d25dbfe0063330
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Extentions.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dd639430449b2ee47a6fc1a7f08be3c6
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/PluginSource~/ShaderVariantLogger.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Runtime/Plugins.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 776d3bc1f576bfb4294678830664ae96
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Plugins/osx.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ab1f16e90d92545cc9f8a0dd5a6c2f95
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Extentions/SceneCoverage.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d471f25a12f0d364abd57a7585cfcb04
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Plugins/x86_64.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0795adee1cb82d0478ba6457336a7dc0
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Extentions/SceneCoverage/Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f9157e59ad4f5aa459f65c7cbbe2f437
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Extentions/SceneCoverage/Runtime.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6185622df5353a341ac81d290b448216
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Plugins/osx/ShaderVariantLogger.bundle/Contents/MacOS/ShaderVariantLogger:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wotakuro/UnityShaderVariantLoggerForEditor/HEAD/Runtime/Plugins/osx/ShaderVariantLogger.bundle/Contents/MacOS/ShaderVariantLogger
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "com.utj.shadervariantlogger",
3 | "displayName": "UnityShaderVariantLoggerForEditor",
4 | "description": "Auto logging ShaderVariant when compiling.",
5 | "version": "1.0.0",
6 | "unity": "2019.4"
7 | }
--------------------------------------------------------------------------------
/Extentions/SceneCoverage/Editor/UXML.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 780ddaa05292eef47898733b397c546f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Editor/Editor.UnityShaderVariantLogerForEditor.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4c278788055e44446b7c7434e5f66747
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/PluginSource~/ShaderVariantLogger.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Runtime/Plugins/osx/ShaderVariantLogger.bundle/Contents/Info.plist.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9c967354b24824e4abb90d70badb535a
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Runtime/Runtime.UnityShaderVariantLogerForEditor.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2f711816e3053da42b1e0cdc220d5b59
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Runtime/Plugins/osx/ShaderVariantLogger.bundle/Contents.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 60dbd1ddbc63b4dcca3e665bcdd09bef
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Plugins/osx/ShaderVariantLogger.bundle/Contents/MacOS.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 136d188e3510e4a5ab6d9a6fece6dc12
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Runtime/Plugins/osx/ShaderVariantLogger.bundle/Contents/MacOS/ShaderVariantLogger.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 17f1ac539e95d4865807473158e98b09
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Runtime/Plugins/osx/ShaderVariantLogger.bundle/Contents/_CodeSignature/CodeResources.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ce5740c4c03fb4a74baca46dfba7a661
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/PluginSource~/MacSource/dll.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | // From PlatformDependSource
4 | long GetThreadId(){
5 | __uint64_t tid;
6 | pthread_t pthread = pthread_self();
7 | pthread_threadid_np(pthread,&tid);
8 |
9 | return tid;
10 | }
11 |
--------------------------------------------------------------------------------
/Runtime/Plugins/osx/ShaderVariantLogger.bundle/Contents/_CodeSignature.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0e3d568edb85a4e71a51addd794c29be
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Extentions/SceneCoverage/Editor/Editor.SceneCoverage.UnityShaderVariantLogerForEditor.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6e5f6d9dd3c73b040b8078d8f0ac51ae
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Extentions/SceneCoverage/Runtime/Runtime.SceneCoverage.UnityShaderVariantLogerForEditor.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2d5443d9950c21640851c811a1af8caf
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Editor/GeneralSettingsUI.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9913a1ded8422164ea5e5dc2cd853a31
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/VariantLoggerWindow.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3c54d025d6e3b494da9d76d11a3d146c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/PluginSource~/ShaderVariantLogger.xcodeproj/project.xcworkspace/xcuserdata/ykurokawa.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wotakuro/UnityShaderVariantLoggerForEditor/HEAD/PluginSource~/ShaderVariantLogger.xcodeproj/project.xcworkspace/xcuserdata/ykurokawa.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Editor/EditorShaderVariantLogger.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 48ab338b908257b4f966f6f15ad39c3f
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/EditorVariantLoggerConfig.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6be6a3c1910dbf046971f7606e6d9073
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/ShaderPassLightModeConverter.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f38928f78ae48b24bbfcfc5fe535dfbf
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/ShaderVariantLoggerBehaviour.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3ff7ba4b6a750774896a7d1157a6ffc4
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Runtime/ShaderVariantLoggerInterface.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cc0f27533e5b52748a38480d4f20c857
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/CreateVariantCollectionAssetFromLog.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3cdbf2faffb04494e8cd6207b9ade0ae
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Extentions/SceneCoverage/Runtime/SceneLogger.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ffc032220fc19644db7cdd7df8a33e30
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Extentions/SceneCoverage/Editor/SceneCorvarageEditorUI.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b9387a7d005294b489d68159dcf0adf1
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Extentions/SceneCoverage/Editor/SceneCoverageAnalyzer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2fcc39690c18c6547933c6e9060933f1
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Extentions/SceneCoverage/Editor/BuildTargetSceneCollector.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5c6fdc316c49e6f4d8423e5930ffeffb
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Editor/UXML/GeneralSettingsUI.uxml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4960756fb7542d14caa45c40f975bb4b
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
11 |
--------------------------------------------------------------------------------
/PluginSource~/ShaderVariantLogger.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Editor/UXML/VariantCollectionCreateUI.uxml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2caae30a6907782419f93fe23f887813
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
11 |
--------------------------------------------------------------------------------
/Extentions/SceneCoverage/Editor/UXML/SceneLogAnalyze.uxml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 47961f67474bdc54ab54138839fbbc62
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
11 |
--------------------------------------------------------------------------------
/Editor/Editor.UnityShaderVariantLogerForEditor.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Editor.UnityShaderVariantLogerForEditor",
3 | "rootNamespace": "",
4 | "references": [
5 | "GUID:2f711816e3053da42b1e0cdc220d5b59"
6 | ],
7 | "includePlatforms": [
8 | "Editor"
9 | ],
10 | "excludePlatforms": [],
11 | "allowUnsafeCode": false,
12 | "overrideReferences": false,
13 | "precompiledReferences": [],
14 | "autoReferenced": false,
15 | "defineConstraints": [],
16 | "versionDefines": [],
17 | "noEngineReferences": false
18 | }
--------------------------------------------------------------------------------
/Runtime/Runtime.UnityShaderVariantLogerForEditor.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Runtime.UnityShaderVariantLogerForEditor",
3 | "rootNamespace": "",
4 | "references": [],
5 | "includePlatforms": [
6 | "Editor",
7 | "WindowsStandalone32",
8 | "WindowsStandalone64"
9 | ],
10 | "excludePlatforms": [],
11 | "allowUnsafeCode": false,
12 | "overrideReferences": false,
13 | "precompiledReferences": [],
14 | "autoReferenced": false,
15 | "defineConstraints": [],
16 | "versionDefines": [],
17 | "noEngineReferences": false
18 | }
--------------------------------------------------------------------------------
/Extentions/SceneCoverage/Runtime/Runtime.SceneCoverage.UnityShaderVariantLogerForEditor.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Runtime.SceneCoverage.UnityShaderVariantLogerForEditor",
3 | "rootNamespace": "",
4 | "references": [
5 | "GUID:2f711816e3053da42b1e0cdc220d5b59"
6 | ],
7 | "includePlatforms": [
8 | "Editor",
9 | "WindowsStandalone32",
10 | "WindowsStandalone64"
11 | ],
12 | "excludePlatforms": [],
13 | "allowUnsafeCode": false,
14 | "overrideReferences": false,
15 | "precompiledReferences": [],
16 | "autoReferenced": false,
17 | "defineConstraints": [],
18 | "versionDefines": [],
19 | "noEngineReferences": false
20 | }
--------------------------------------------------------------------------------
/PluginSource~/ShaderVariantLogger.xcodeproj/xcuserdata/ykurokawa.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | ShaderVariantLogger.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | C506E88727A3FBA1009E0904
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/PluginSource~/WinSource/dllmain.cpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #define WIN32_LEAN_AND_MEAN // Windows ヘッダーからほとんど使用されていない部分を除外する
4 | // Windows ヘッダー ファイル
5 | #include
6 |
7 | #include
8 | #include
9 |
10 |
11 | BOOL APIENTRY DllMain( HMODULE hModule,
12 | DWORD ul_reason_for_call,
13 | LPVOID lpReserved
14 | )
15 | {
16 | switch (ul_reason_for_call)
17 | {
18 | case DLL_PROCESS_ATTACH:
19 | case DLL_THREAD_ATTACH:
20 | case DLL_THREAD_DETACH:
21 | case DLL_PROCESS_DETACH:
22 | break;
23 | }
24 | return TRUE;
25 | }
26 |
27 | long GetThreadId() {
28 |
29 | return GetCurrentThreadId();
30 | }
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Extentions/SceneCoverage/Editor/Editor.SceneCoverage.UnityShaderVariantLogerForEditor.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Editor.SceneCoverage.UnityShaderVariantLogerForEditor",
3 | "references": [
4 | "GUID:2f711816e3053da42b1e0cdc220d5b59",
5 | "GUID:4c278788055e44446b7c7434e5f66747",
6 | "GUID:69448af7b92c7f342b298e06a37122aa"
7 | ],
8 | "includePlatforms": [
9 | "Editor"
10 | ],
11 | "excludePlatforms": [],
12 | "allowUnsafeCode": false,
13 | "overrideReferences": false,
14 | "precompiledReferences": [],
15 | "autoReferenced": false,
16 | "defineConstraints": [],
17 | "versionDefines": [
18 | {
19 | "name": "com.unity.addressables",
20 | "expression": "",
21 | "define": "VARIANT_LOGGER_COVERAGE_ADDRESSABLE"
22 | }
23 | ],
24 | "noEngineReferences": false
25 | }
--------------------------------------------------------------------------------
/Runtime/ShaderVariantLoggerBehaviour.cs:
--------------------------------------------------------------------------------
1 | #if UNITY_EDITOR
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 |
6 | namespace UTJ.VariantLogger
7 | {
8 | public class ShaderVariantLoggerBehaviour : MonoBehaviour
9 | {
10 | [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)]
11 | public static void Init()
12 | {
13 | if (ShaderVariantLoggerInterface.GetEnable())
14 | {
15 | var gmo = new GameObject("ShaderVariantLogger");
16 | gmo.AddComponent();
17 | DontDestroyOnLoad(gmo);
18 | }
19 | }
20 | void Update()
21 | {
22 | ShaderVariantLoggerInterface.SetFrame(Time.frameCount);
23 | }
24 | private void OnDestroy()
25 | {
26 | ShaderVariantLoggerInterface.SetEnable(false);
27 | }
28 | }
29 | }
30 | #endif
--------------------------------------------------------------------------------
/Extentions/SceneCoverage/Editor/UXML/SceneLogAnalyze.uxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Yusuke Kurokawa
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Editor/UXML/GeneralSettingsUI.uxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/README.ja.md:
--------------------------------------------------------------------------------
1 | # UnityShaderVariantLoggerForEditor
2 | UnityEditor上で実行した時に、Shaderコンパイルをログに書き出してます。
3 | そのログをもとにイイ感じにShaderVariantCollectionを作れるようにします。
4 |
5 | 対応は、Windows 10 / Mac (Intel MacOS12.0でテスト)
6 |
7 | また姉妹ツールの [ProfilerModuleForShaderCompile](https://github.com/wotakuro/ProfilerModuleForShaderCompile/)もあります。
8 | こちらは ShaderCompile情報に特化したProfilerModuleを提供しています。
9 |
10 | # 利用方法
11 |
12 | メニューの 「Tools/UTJ/ShaderVariantLogger」でWindowを開きます
13 |
14 |
15 | ## 1.Shaderコンパイルのログ収集について
16 |
17 | 
18 |
19 | 画面の「Enabled」を有効にします。
20 | この状態でEditor上でプレイをしていると、Editor上でのShaderコンパイルログが「Library/com.utj.shadervariantlogger/logs」以下に蓄積されます
21 | このログにアクセスしたいときは「Open Directory」を押すことでログが溜まっているディレクトリにアクセスすることができます。
22 |
23 | 後にこのログをもとにShaderVariantCollectionアセットを作成することが可能です。
24 |
25 |
26 | Editor上でプレイをするごとにShaderCacheを消します。
27 | 毎回削除されるのを止めたい場合は 「Clear ShaderCache」のチェックを外してください。
28 | ※ただしチェックを外すと、Shaderコンパイルを取りこぼす可能性があります。
29 |
30 | ## 2.ログからVariantCollectionを作成する
31 |
32 | 
33 |
34 | 「Add Variants from logs」を押すことで実行します。
35 |
36 | このとき、ログに溜まった内容をもとに「ShaderVariantCollection」で指定されたShaderVariantCollectionに対してVariant追加を試みます。
37 | もし指定がないときには新規にファイルを作成します。
38 |
39 | 「Delete logs after adding」にチェックを入れると、処理完了後にもともとあったログファイルを削除します。
40 | 「Shader Path Config Advanced」では、Variantに追加するShaderの条件を指定することが可能です。
41 |
--------------------------------------------------------------------------------
/PluginSource~/ShaderVariantLogger.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.31005.135
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShaderVariantLogger", "ShaderVariantLogger.vcxproj", "{ABCE4658-44AD-41B2-B557-362CF24A84BA}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Debug|x86 = Debug|x86
12 | Release|x64 = Release|x64
13 | Release|x86 = Release|x86
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {ABCE4658-44AD-41B2-B557-362CF24A84BA}.Debug|x64.ActiveCfg = Debug|x64
17 | {ABCE4658-44AD-41B2-B557-362CF24A84BA}.Debug|x64.Build.0 = Debug|x64
18 | {ABCE4658-44AD-41B2-B557-362CF24A84BA}.Debug|x86.ActiveCfg = Debug|Win32
19 | {ABCE4658-44AD-41B2-B557-362CF24A84BA}.Debug|x86.Build.0 = Debug|Win32
20 | {ABCE4658-44AD-41B2-B557-362CF24A84BA}.Release|x64.ActiveCfg = Release|x64
21 | {ABCE4658-44AD-41B2-B557-362CF24A84BA}.Release|x64.Build.0 = Release|x64
22 | {ABCE4658-44AD-41B2-B557-362CF24A84BA}.Release|x86.ActiveCfg = Release|Win32
23 | {ABCE4658-44AD-41B2-B557-362CF24A84BA}.Release|x86.Build.0 = Release|Win32
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {40932A68-91C3-4341-9B4D-1E7EA6C393D4}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/Runtime/Plugins/osx/ShaderVariantLogger.bundle/Contents/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildMachineOSBuild
6 | 21A559
7 | CFBundleDevelopmentRegion
8 | en
9 | CFBundleExecutable
10 | ShaderVariantLogger
11 | CFBundleIdentifier
12 | UTJ.ShaderVariantLogger
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ShaderVariantLogger
17 | CFBundlePackageType
18 | BNDL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSupportedPlatforms
22 |
23 | MacOSX
24 |
25 | CFBundleVersion
26 | 1
27 | DTCompiler
28 | com.apple.compilers.llvm.clang.1_0
29 | DTPlatformBuild
30 | 13A1030d
31 | DTPlatformName
32 | macosx
33 | DTPlatformVersion
34 | 12.0
35 | DTSDKBuild
36 | 21A344
37 | DTSDKName
38 | macosx12.0
39 | DTXcode
40 | 1310
41 | DTXcodeBuild
42 | 13A1030d
43 | LSMinimumSystemVersion
44 | 11.0
45 | NSHumanReadableCopyright
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/Runtime/Plugins/x86_64/ShaderVariantLogger.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e405b074ed791ac4ba98f019eb296b47
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 1
10 | isOverridable: 1
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | : Any
16 | second:
17 | enabled: 0
18 | settings:
19 | Exclude Android: 1
20 | Exclude Editor: 0
21 | Exclude Linux64: 1
22 | Exclude OSXUniversal: 1
23 | Exclude Win: 1
24 | Exclude Win64: 1
25 | - first:
26 | Android: Android
27 | second:
28 | enabled: 0
29 | settings:
30 | CPU: ARMv7
31 | - first:
32 | Any:
33 | second:
34 | enabled: 0
35 | settings: {}
36 | - first:
37 | Editor: Editor
38 | second:
39 | enabled: 1
40 | settings:
41 | CPU: x86_64
42 | DefaultValueInitialized: true
43 | OS: Windows
44 | - first:
45 | Standalone: Linux64
46 | second:
47 | enabled: 0
48 | settings:
49 | CPU: None
50 | - first:
51 | Standalone: OSXUniversal
52 | second:
53 | enabled: 0
54 | settings:
55 | CPU: None
56 | - first:
57 | Standalone: Win
58 | second:
59 | enabled: 0
60 | settings:
61 | CPU: x86
62 | - first:
63 | Standalone: Win64
64 | second:
65 | enabled: 0
66 | settings:
67 | CPU: x86_64
68 | userData:
69 | assetBundleName:
70 | assetBundleVariant:
71 |
--------------------------------------------------------------------------------
/Runtime/Plugins/osx/ShaderVariantLogger.bundle.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dc5424b30b6fd4a618c2b96c31b4b115
3 | folderAsset: yes
4 | PluginImporter:
5 | externalObjects: {}
6 | serializedVersion: 2
7 | iconMap: {}
8 | executionOrder: {}
9 | defineConstraints: []
10 | isPreloaded: 1
11 | isOverridable: 1
12 | isExplicitlyReferenced: 0
13 | validateReferences: 1
14 | platformData:
15 | - first:
16 | : Any
17 | second:
18 | enabled: 0
19 | settings:
20 | Exclude Editor: 0
21 | Exclude Linux64: 1
22 | Exclude OSXUniversal: 1
23 | Exclude Win: 1
24 | Exclude Win64: 1
25 | Exclude iOS: 1
26 | - first:
27 | Any:
28 | second:
29 | enabled: 0
30 | settings: {}
31 | - first:
32 | Editor: Editor
33 | second:
34 | enabled: 1
35 | settings:
36 | CPU: AnyCPU
37 | DefaultValueInitialized: true
38 | OS: OSX
39 | - first:
40 | Standalone: Linux64
41 | second:
42 | enabled: 0
43 | settings:
44 | CPU: None
45 | - first:
46 | Standalone: OSXUniversal
47 | second:
48 | enabled: 0
49 | settings:
50 | CPU: AnyCPU
51 | - first:
52 | Standalone: Win
53 | second:
54 | enabled: 0
55 | settings:
56 | CPU: None
57 | - first:
58 | Standalone: Win64
59 | second:
60 | enabled: 0
61 | settings:
62 | CPU: None
63 | - first:
64 | iPhone: iOS
65 | second:
66 | enabled: 0
67 | settings:
68 | AddToEmbeddedBinaries: false
69 | CPU: AnyCPU
70 | CompileFlags:
71 | FrameworkDependencies:
72 | userData:
73 | assetBundleName:
74 | assetBundleVariant:
75 |
--------------------------------------------------------------------------------
/Runtime/ShaderVariantLoggerInterface.cs:
--------------------------------------------------------------------------------
1 | #if UNITY_EDITOR
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.Runtime.InteropServices;
5 | using UnityEngine;
6 |
7 | namespace UTJ.VariantLogger
8 | {
9 | public class ShaderVariantLoggerInterface
10 | {
11 |
12 | const string DllName = "ShaderVariantLogger";
13 | [DllImport(DllName)]
14 | private extern static void _ShaderCompileWatcherForEditorSetupFile(string file);
15 |
16 | [DllImport(DllName)]
17 | private extern static void _ShaderCompileWatcherForEditorSetFrame(int idx);
18 |
19 | [DllImport(DllName)]
20 | private extern static void _ShaderCompileWatcherForEditorSetEnable(bool enable);
21 |
22 | [DllImport(DllName)]
23 | private extern static bool _ShaderCompileWatcherForEditorGetEnable();
24 |
25 | [DllImport(DllName)]
26 | private extern static System.IntPtr _ShaderCompileWatcherForEditorGetCurrentFile();
27 |
28 | public static void SetupFile(string file)
29 | {
30 | _ShaderCompileWatcherForEditorSetupFile(file);
31 | }
32 | public static void SetFrame(int index)
33 | {
34 | _ShaderCompileWatcherForEditorSetFrame(index);
35 | }
36 | public static void SetEnable(bool flag)
37 | {
38 | _ShaderCompileWatcherForEditorSetEnable(flag);
39 | }
40 |
41 | public static bool GetEnable()
42 | {
43 | return _ShaderCompileWatcherForEditorGetEnable();
44 | }
45 |
46 | public static string GetCurrentFile()
47 | {
48 | var ptr = _ShaderCompileWatcherForEditorGetCurrentFile();
49 | return Marshal.PtrToStringAnsi(ptr);
50 | }
51 | }
52 | }
53 |
54 | #endif
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # UnityShaderVariantLoggerForEditor
2 | [日本語はコチラ](README.ja.md)
3 |
4 | Logging the ShaderCompile when running on Editor.
5 | And then generate the ShadervariantCollection from the "ShaderCompile log".
6 |
7 |
8 | Windows 10 - Mac/ Mac (test with Intel MacOS 12.0)
9 |
10 |
11 | There is also a sister tool, [ProfilerModuleForShaderCompile](https://github.com/wotakuro/ProfilerModuleForShaderCompile/).
12 | This tool provides a ProfilerModule specialized for ShaderCompile information.
13 |
14 |
15 | # How to use
16 |
17 | Call "Tools/UTJ/ShaderVariantLogger" and open the window.
18 |
19 |
20 |
21 | ## 1.logging "Shader Compile"
22 | 
23 |
24 | If you enabled "Enabled", you play on the UnityEditor and then the "ShaderCompiling log" will be generated in "Library/com.utj.shadervariantlogger/logs"
25 | If you want to access the log , press the "Open Directory".
26 |
27 | Also you can generate ShaderVariantCollection by using this log.
28 |
29 | When you play on the Editor,ShaderCache will be deleted every time.
30 | If you want to stop clear the Shader cachefolder, disable the flag "Clear ShaderCache".
31 | * However some shader compile could be missed when disabling "Clear ShaderCache".
32 |
33 | ## 2.Generate ShaderVariantCollection from log.
34 |
35 | 
36 |
37 | Press "Add Variants from logs".
38 |
39 | You can select ShaderVariantCollection Asset that you want to add ShaderVariant by selecting "ShaderVariantCollection".
40 | If "ShaderVariant Collection" is none, new file will be generated.
41 |
42 | If you enabled "Delete logs after adding",the ShaderCompile logs will be deleted.
43 | Also you can configurate which Shader should be added by "Shader Path Config Advanced".
44 |
45 |
--------------------------------------------------------------------------------
/Editor/UXML/VariantCollectionCreateUI.uxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/PluginSource~/ShaderVariantLogger.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 | {f4d8e897-be2c-46b7-8e89-79c1ab64f24f}
18 |
19 |
20 | {dc9d4202-8484-433f-8ece-e7ac7d155e6b}
21 |
22 |
23 |
24 |
25 | ソース ファイル\WinSource
26 |
27 |
28 | ソース ファイル
29 |
30 |
31 |
32 |
33 | ヘッダー ファイル\UnityPluginHeaders
34 |
35 |
36 | ヘッダー ファイル\UnityPluginHeaders
37 |
38 |
39 | ヘッダー ファイル\UnityPluginHeaders
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Editor/EditorShaderVariantLogger.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 | using System.IO;
5 | using UnityEditor;
6 |
7 | namespace UTJ.VariantLogger
8 | {
9 |
10 | internal class EditorShaderVariantLogger
11 | {
12 |
13 | [InitializeOnLoadMethod]
14 | public static void Init()
15 | {
16 | EditorApplication.playModeStateChanged += EditorApplication_playModeStateChanged;
17 | }
18 |
19 | private static void EditorApplication_playModeStateChanged(PlayModeStateChange obj)
20 | {
21 | if (obj == PlayModeStateChange.ExitingEditMode)
22 | {
23 | Execute();
24 | }
25 | }
26 |
27 | public static void Execute()
28 | {
29 | if (!EditorVariantLoggerConfig.EnableFlag) {
30 | ShaderVariantLoggerInterface.SetEnable(false);
31 | return;
32 | }
33 | if (!EditorSettings.asyncShaderCompilation)
34 | {
35 | EditorUtility.DisplayDialog("Change EditorSettings", "[EditorSettings]Asynchronous Shader Compilation Disable->Enable", "OK");
36 | EditorSettings.asyncShaderCompilation = true;
37 | }
38 | ReloadShaders();
39 | SetupLogger();
40 | }
41 |
42 | public static void SetupLogger()
43 | {
44 |
45 | ShaderVariantLoggerInterface.SetEnable(true);
46 | ShaderVariantLoggerInterface.SetFrame(0);
47 |
48 |
49 | if (!Directory.Exists(EditorVariantLoggerConfig.LogSaveDir))
50 | {
51 | Directory.CreateDirectory(EditorVariantLoggerConfig.LogSaveDir);
52 | }
53 | var currentTime = System.DateTime.Now;
54 | ShaderVariantLoggerInterface.SetupFile(EditorVariantLoggerConfig.LogSaveDir + "/" +
55 | EditorVariantLoggerConfig .FileHeader + currentTime.ToString("_yyyyMMdd_HHmmss") + ".log");
56 | }
57 |
58 | public static void ReloadShaders() {
59 | var backupCompilation = ShaderUtil.allowAsyncCompilation;
60 | ShaderUtil.allowAsyncCompilation = true;
61 | if (EditorVariantLoggerConfig.ClearShaderCache)
62 | {
63 | System.IO.Directory.Delete("Library/ShaderCache", true);
64 | }
65 |
66 | var method = typeof(ShaderUtil).GetMethod("ReloadAllShaders", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic|System.Reflection.BindingFlags.Static);
67 | method.Invoke(null,null);
68 | }
69 |
70 | }
71 | }
--------------------------------------------------------------------------------
/PluginSource~/ShaderVariantLogger.xcodeproj/xcshareddata/xcschemes/ShaderVariantLogger.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
43 |
44 |
50 |
51 |
57 |
58 |
59 |
60 |
62 |
63 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/Runtime/Plugins/osx/ShaderVariantLogger.bundle/Contents/_CodeSignature/CodeResources:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | files
6 |
7 | files2
8 |
9 | rules
10 |
11 | ^Resources/
12 |
13 | ^Resources/.*\.lproj/
14 |
15 | optional
16 |
17 | weight
18 | 1000
19 |
20 | ^Resources/.*\.lproj/locversion.plist$
21 |
22 | omit
23 |
24 | weight
25 | 1100
26 |
27 | ^Resources/Base\.lproj/
28 |
29 | weight
30 | 1010
31 |
32 | ^version.plist$
33 |
34 |
35 | rules2
36 |
37 | .*\.dSYM($|/)
38 |
39 | weight
40 | 11
41 |
42 | ^(.*/)?\.DS_Store$
43 |
44 | omit
45 |
46 | weight
47 | 2000
48 |
49 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/
50 |
51 | nested
52 |
53 | weight
54 | 10
55 |
56 | ^.*
57 |
58 | ^Info\.plist$
59 |
60 | omit
61 |
62 | weight
63 | 20
64 |
65 | ^PkgInfo$
66 |
67 | omit
68 |
69 | weight
70 | 20
71 |
72 | ^Resources/
73 |
74 | weight
75 | 20
76 |
77 | ^Resources/.*\.lproj/
78 |
79 | optional
80 |
81 | weight
82 | 1000
83 |
84 | ^Resources/.*\.lproj/locversion.plist$
85 |
86 | omit
87 |
88 | weight
89 | 1100
90 |
91 | ^Resources/Base\.lproj/
92 |
93 | weight
94 | 1010
95 |
96 | ^[^/]+$
97 |
98 | nested
99 |
100 | weight
101 | 10
102 |
103 | ^embedded\.provisionprofile$
104 |
105 | weight
106 | 20
107 |
108 | ^version\.plist$
109 |
110 | weight
111 | 20
112 |
113 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/Editor/EditorVariantLoggerConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.IO;
3 | using UnityEngine;
4 | using UnityEditor;
5 |
6 | namespace UTJ.VariantLogger
7 | {
8 | public class EditorVariantLoggerConfig
9 | {
10 | [System.Serializable]
11 | struct ConfigData
12 | {
13 | public bool flag;
14 | public bool clearShaderCache;
15 | public string fileHeader;
16 | }
17 | private const string WorkingDir = "Library/com.utj.shadervariantlogger";
18 | private const string ConfigFile = WorkingDir + "/config.txt";
19 | public static readonly string LogSaveDir = WorkingDir + "/logs";
20 |
21 | private static ConfigData currentConfig;
22 | public static bool EnableFlag
23 | {
24 | get
25 | {
26 | return currentConfig.flag;
27 | }
28 | set
29 | {
30 | currentConfig.flag = value;
31 | SaveConfigData();
32 | }
33 | }
34 | internal static bool ClearShaderCache {
35 | get
36 | {
37 | return currentConfig.clearShaderCache;
38 | }
39 | set
40 | {
41 | currentConfig.clearShaderCache = value;
42 | SaveConfigData();
43 | }
44 | }
45 | internal static string FileHeader
46 | {
47 | get
48 | {
49 | return currentConfig.fileHeader;
50 | }
51 | set
52 | {
53 | string old = currentConfig.fileHeader;
54 | currentConfig.fileHeader = value;
55 | if(old != value) { SaveConfigData(); }
56 | }
57 | }
58 |
59 |
60 | [InitializeOnLoadMethod]
61 | internal static void Init()
62 | {
63 | if (!File.Exists(ConfigFile))
64 | {
65 | EnableFlag = false;
66 | ClearShaderCache = true;
67 | FileHeader = GetDefaultHeader();
68 | return;
69 | }
70 | currentConfig = ReadConfigData();
71 | if(FileHeader == null)
72 | {
73 | FileHeader = GetDefaultHeader();
74 | }
75 | }
76 | private static string GetDefaultHeader()
77 | {
78 | return SystemInfo.deviceName.Replace("/", "").Replace("\\", ""); ;
79 | }
80 |
81 |
82 |
83 |
84 |
85 | private static ConfigData ReadConfigData()
86 | {
87 | string str = File.ReadAllText(ConfigFile);
88 | var data = JsonUtility.FromJson(str);
89 | return data;
90 | }
91 |
92 | private static void SaveConfigData()
93 | {
94 | var str = JsonUtility.ToJson(currentConfig);
95 | string dir = Path.GetDirectoryName(ConfigFile);
96 | if (!Directory.Exists(dir))
97 | {
98 | Directory.CreateDirectory(dir);
99 | }
100 | File.WriteAllText(ConfigFile, str);
101 | }
102 | }
103 |
104 | }
--------------------------------------------------------------------------------
/Extentions/SceneCoverage/Editor/SceneCorvarageEditorUI.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 | using UnityEditor;
5 | using UnityEngine.UIElements;
6 | using UnityEditor.UIElements;
7 | #if VARIANT_LOGGER_COVERAGE_ADDRESSABLE
8 | using UnityEditor.AddressableAssets;
9 | #endif
10 |
11 | namespace UTJ.VariantLogger
12 | {
13 | public class SceneCorvarageEditorUI : VariantLoggerWindow.UIMenuItem
14 | {
15 |
16 | public override string toolbar => "Scenes";
17 |
18 | public override int order => 10;
19 |
20 | private SceneCoverageAnalyzer analyzer;
21 | private BuildTargetSceneCollector targetSceneCollector;
22 |
23 | private ScrollView resultArea;
24 | private Toggle showNoActiveOnlyToggle;
25 | private Toggle showNoLoadOnlyToggle;
26 |
27 |
28 | public override void OnEnable()
29 | {
30 | var treePath = "Packages/com.utj.shadervariantlogger/Extentions/SceneCoverage/Editor/UXML/SceneLogAnalyze.uxml";
31 | var tree = AssetDatabase.LoadAssetAtPath(treePath);
32 | this.rootVisualElement.Add(tree.CloneTree());
33 |
34 |
35 | var analyzeButton = this.rootVisualElement.Q