├── .gitattributes ├── README.md ├── Runtime ├── assembly-info.cs ├── jp.lilxyzw.editortoolbox.runtime.asmdef.meta ├── EditorOnlyBehaviour.cs ├── CameraMover.cs.meta ├── ObjectMarker.cs.meta ├── SceneMSAA.cs.meta ├── assembly-info.cs.meta ├── ConstantValues.cs.meta ├── CoroutineHandler.cs.meta ├── CustomLightmapping.cs.meta ├── EditorOnlyBehaviour.cs.meta ├── ConstantValues.cs ├── jp.lilxyzw.editortoolbox.runtime.asmdef ├── CoroutineHandler.cs ├── SceneMSAA.cs ├── CameraMover.cs └── ObjectMarker.cs ├── Editor ├── Localization │ ├── en-US.po │ ├── en-US.po.meta │ ├── ja-JP.po.meta │ ├── zh-Hans.po.meta │ ├── Localization.GUI.cs.meta │ └── Localization.cs.meta ├── GUI.meta ├── Shaders.meta ├── Shaders │ ├── StencilChecker.prefab.meta │ ├── AttributeViewer-main.hlsl.meta │ ├── AttributeViewer-geometory.hlsl.meta │ ├── ppsquad.asset.meta │ ├── StencilChecker.mat.meta │ ├── CopyAlpha.shader.meta │ ├── FixColor.shader.meta │ ├── IconMaker.shader.meta │ ├── AttributeViewer.shader.meta │ ├── OutlineMaker.shader.meta │ ├── StencilChecker.shader.meta │ ├── TexturePacker.shader.meta │ ├── KeywordInitializer.shader.meta │ ├── StencilChecker.mat │ ├── FixColor.shader │ ├── AttributeViewer.shader │ ├── IconMaker.shader │ ├── CopyAlpha.shader │ ├── AttributeViewer-geometory.hlsl │ ├── KeywordInitializer.shader │ ├── StencilChecker.shader │ ├── StencilChecker.prefab │ ├── OutlineMaker.shader │ ├── TexturePacker.shader │ └── AttributeViewer-main.hlsl ├── Utils.meta ├── VRChat.meta ├── Wraps.meta ├── DocsGenerator │ ├── SampleObject.prefab.meta │ ├── SampleMaterialA.mat.meta │ ├── SampleMaterialB.mat.meta │ ├── DocsGeneratorMenu.cs.meta │ ├── DocsGeneratorMenu.Capture.cs.meta │ ├── DocsGeneratorMenu.Home.cs.meta │ ├── DocsGeneratorMenu.Index.cs.meta │ ├── DocsGeneratorMenu.DocsIndex.cs.meta │ ├── DocsGeneratorMenu.IndexMts.cs.meta │ ├── SampleMaterialA.mat │ ├── SampleMaterialB.mat │ ├── DocsGeneratorMenu.Home.cs │ ├── DocsGeneratorMenu.IndexMts.cs │ └── DocsGeneratorMenu.DocsIndex.cs ├── Inspector.meta ├── Localization.meta ├── ToolbarExtension │ ├── Components │ │ ├── assembly-info.cs │ │ ├── assembly-info.cs.meta │ │ ├── AddInspectorTabButton.cs.meta │ │ ├── LockReloadAssembliesButton.cs.meta │ │ ├── AddInspectorTabButton.cs │ │ └── LockReloadAssembliesButton.cs │ ├── Components.meta │ ├── ToolbarExtension.cs.meta │ ├── IToolbarExtensionComponent.cs.meta │ ├── IToolbarExtensionComponent.cs │ └── ToolbarExtension.cs ├── AssetGrimoire.meta ├── DocsGenerator.meta ├── ImportExtension.meta ├── ProjectExtension.meta ├── ToolbarExtension.meta ├── HierarchyExtension.meta ├── jp.lilxyzw.editortoolbox.asmdef.meta ├── ProjectExtension │ ├── Components.meta │ ├── ProjectExtension.cs.meta │ ├── Components │ │ ├── AssetMarker.cs.meta │ │ ├── IconOverlay.cs.meta │ │ ├── PrefabInfo.cs.meta │ │ ├── ProjectLine.cs.meta │ │ ├── AssetMarkerData.cs.meta │ │ ├── ExtensionDrawer.cs.meta │ │ ├── IconOverlayData.cs.meta │ │ ├── MaterialQueue.cs.meta │ │ ├── MaterialShader.cs.meta │ │ ├── MaterialVariant.cs.meta │ │ ├── assembly-info.cs.meta │ │ ├── OverlayFileInFolder.cs.meta │ │ ├── UnitypackageHilighter.cs.meta │ │ ├── AlternatingProjectBackground.cs.meta │ │ ├── assembly-info.cs │ │ ├── MaterialQueue.cs │ │ ├── AlternatingProjectBackground.cs │ │ ├── MaterialVariant.cs │ │ ├── ExtensionDrawer.cs │ │ ├── MaterialShader.cs │ │ ├── IconOverlay.cs │ │ ├── PrefabInfo.cs │ │ ├── AssetMarker.cs │ │ ├── ProjectLine.cs │ │ └── OverlayFileInFolder.cs │ ├── IProjectExtensionComponent.cs.meta │ ├── ProjectToolbarExtension.cs.meta │ ├── IProjectExtensionComponent.cs │ └── ProjectToolbarExtension.cs ├── AnimatorControllerEditorPatch.meta ├── HierarchyExtension │ ├── Components.meta │ ├── HierarchyExtension.cs.meta │ ├── Components │ │ ├── ActiveToggle.cs.meta │ │ ├── ChildrenDrawer.cs.meta │ │ ├── HierarchyLine.cs.meta │ │ ├── LayerAndTag.cs.meta │ │ ├── assembly-info.cs.meta │ │ ├── ComponentsDrawer.cs.meta │ │ ├── EditorOnlyLabel.cs.meta │ │ ├── HierarchySpacer.cs.meta │ │ ├── AlternatingBackground.cs.meta │ │ ├── ObjectMarkerBackground.cs.meta │ │ ├── assembly-info.cs │ │ ├── HierarchySpacer.cs │ │ ├── AlternatingBackground.cs │ │ ├── ObjectMarkerBackground.cs │ │ ├── ActiveToggle.cs │ │ ├── EditorOnlyLabel.cs │ │ ├── HierarchyLine.cs │ │ ├── ChildrenDrawer.cs │ │ ├── LayerAndTag.cs │ │ └── ComponentsDrawer.cs │ ├── IHierarchyExtensionConponent.cs.meta │ ├── IHierarchyExtensionConponent.cs │ └── HierarchyExtension.cs ├── VRChat │ ├── jp.lilxyzw.editortoolbox.vrchat.asmdef.meta │ ├── Preprocessor.cs.meta │ ├── Preprocessor.cs │ └── jp.lilxyzw.editortoolbox.vrchat.asmdef ├── Common.cs.meta ├── GUIHelper.cs.meta ├── DeveloperMode.cs.meta ├── FolderOpener.cs.meta ├── GUI │ ├── IconPopup.cs.meta │ └── IconPopup.cs ├── MissingFinder.cs.meta ├── PlayModeSaver.cs.meta ├── SceneCapture.cs.meta ├── SceneExtension.cs.meta ├── SceneToolbar.cs.meta ├── TabInspector.cs.meta ├── TexturePacker.cs.meta ├── Wraps │ ├── MenuWrap.cs.meta │ ├── EditorGUIWrap.cs.meta │ ├── ToolbarWrap.cs.meta │ ├── WrapBase.Utils.cs │ ├── EditorUtilityWrap.cs.meta │ ├── MenuServiceWrap.cs.meta │ ├── PackageImportWrap.cs.meta │ ├── ProjectBrowserWrap.cs.meta │ ├── WindowLayoutWrap.cs.meta │ ├── WrapBase.Field.cs.meta │ ├── WrapBase.Method.cs.meta │ ├── WrapBase.Property.cs.meta │ ├── WrapBase.Utils.cs.meta │ ├── ImportPackageItemWrap.cs.meta │ ├── InspectorWindowWrap.cs.meta │ ├── AnimatorControllerToolWrap.cs.meta │ ├── EditorUtilityWrap.cs │ ├── WindowLayoutWrap.cs │ ├── MenuServiceWrap.cs │ ├── MenuWrap.cs │ ├── EditorGUIWrap.cs │ ├── ToolbarWrap.cs │ ├── PackageImportWrap.cs │ ├── ProjectBrowserWrap.cs │ ├── ImportPackageItemWrap.cs │ ├── InspectorWindowWrap.cs │ ├── WrapBase.Field.cs │ ├── WrapBase.Property.cs │ └── AnimatorControllerToolWrap.cs ├── EasySettingProvider.cs.meta ├── JsonObjectViewer.cs.meta ├── MenuItemModifier.cs.meta ├── ReferenceReplacer.cs.meta ├── ScenePreprocessor.cs.meta ├── SelectionInventory.cs.meta ├── ShaderKeywordViewer.cs.meta ├── TransformResetter.cs.meta ├── Utils │ ├── CallerUtils.cs.meta │ ├── GraphicUtils.cs.meta │ ├── MouseUtils.cs.meta │ ├── ObjectUtils.cs.meta │ ├── SubAssetCleaner.cs.meta │ ├── CallerUtils.cs │ ├── GraphicUtils.cs │ ├── MouseUtils.cs │ ├── ObjectUtils.cs │ └── SubAssetCleaner.cs ├── AssetGrimoire │ ├── Gatherer.cs.meta │ ├── Grimoire.cs.meta │ └── GUIDLibrary.cs.meta ├── EditorToolboxSettings.cs.meta ├── LockReloadAssemblies.cs.meta ├── SelectionInventoryData.cs.meta ├── EditorToolboxSettingsProject.cs.meta ├── Inspector │ ├── CameraMoverEditor.cs.meta │ ├── LocalizedComponentEditor.cs.meta │ └── LocalizedComponentEditor.cs ├── ImportExtension │ ├── AssetOverwriter.cs.meta │ ├── ImportSettingOptimizer.cs.meta │ ├── UnitypackageImporter.cs.meta │ └── AssetOverwriter.cs ├── AnimatorControllerEditorPatch │ ├── GraphGUIPatch.cs.meta │ ├── LayerCloner.cs.meta │ ├── StateNodePatch.cs.meta │ ├── StateEditorPatch.cs.meta │ ├── AnimatorControllerEditorMenu.cs.meta │ ├── AnimatorControllerEditorPatch.cs.meta │ ├── ParameterControllerViewPatch.cs.meta │ ├── AnimatorTransitionInspectorBasePatch.cs.meta │ ├── GraphGUIPatch.cs │ ├── StateNodePatch.cs │ └── AnimatorControllerEditorMenu.cs ├── EditorToolboxSettingsProject.cs ├── SelectionInventoryData.cs ├── DeveloperMode.cs ├── LockReloadAssemblies.cs ├── ScenePreprocessor.cs ├── EasySettingProvider.cs ├── jp.lilxyzw.editortoolbox.asmdef ├── JsonObjectViewer.cs ├── Common.cs ├── PlayModeSaver.cs ├── SceneToolbar.cs ├── FolderOpener.cs └── TabInspector.cs ├── LICENSE.meta ├── README.md.meta ├── package.json.meta ├── Editor.meta ├── Runtime.meta ├── DocsGenerator.meta ├── DocsGenerator ├── jp.lilxyzw.editortoolbox.docsgenerator.asmdef.meta ├── DocsGenerator.cs.meta └── jp.lilxyzw.editortoolbox.docsgenerator.asmdef ├── package.json ├── LICENSE └── .gitignore /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | lilEditorToolbox 2 | ==== 3 | 4 | https://lilxyzw.github.io/lilEditorToolbox/ 5 | -------------------------------------------------------------------------------- /Runtime/assembly-info.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | [assembly:InternalsVisibleTo("jp.lilxyzw.editortoolbox")] 3 | -------------------------------------------------------------------------------- /Editor/Localization/en-US.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "MIME-Version: 1.0\n" 4 | "Content-Type: text/plain; charset=UTF-8\n" 5 | "Content-Transfer-Encoding: 8bit\n" 6 | "Language: en-US\n" 7 | -------------------------------------------------------------------------------- /LICENSE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3300c449ea920464f9a2e7ef7a693e1f 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 94b646e0193bb8b49924d0b3d8090835 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15d67df85fe3104459fd9ee357de4af2 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0070d99d9d7f45a4d973509bedc5c5b8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c4390e3233d9c54a8e391b8366c525d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /DocsGenerator.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e9ea458ac22b9340a51624dd6f3752d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/GUI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9a40c8ca41727b4c91346f9b0cd0c34 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/Localization/en-US.po.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e8142ab764cd9548a878bc1ab1ae81c 3 | LocalizationImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/Localization/ja-JP.po.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 85a6a439651dad74da82373ab5ee1973 3 | LocalizationImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/Localization/zh-Hans.po.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8fd34e6cc7f19244d932511ccfbfc27f 3 | LocalizationImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc38b228680641344b7faa1e0203baf6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/Shaders/StencilChecker.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c28722eb6f3f73469b6c0047bc87619 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/Utils.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ade0c9bb195b12347bcde276b7b790bb 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/VRChat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b7c091b0de9f0945ac6559daa540553 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/Wraps.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15e810e7b47f525459520da90dcaf7c4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/DocsGenerator/SampleObject.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 570ab5666cbbf3646a455dd3e56dcbae 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/Inspector.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 88b219aa13f2dc248ae56b5313bedbe7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/Localization.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e480d0d691fbaf4c82d5ea65c66a497 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/ToolbarExtension/Components/assembly-info.cs: -------------------------------------------------------------------------------- 1 | using jp.lilxyzw.editortoolbox; 2 | [assembly: ExportsToolbarExtensionComponent( 3 | typeof(LockReloadAssembliesButton), 4 | typeof(AddInspectorTabButton) 5 | )] 6 | -------------------------------------------------------------------------------- /Editor/AssetGrimoire.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98826446b84960c478556e21b0aa54fa 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/DocsGenerator.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9ee98103023c7647927f7cedfdcddc9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/ImportExtension.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 891d4a6e8966aa3449ec6942f9db8ac2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/ProjectExtension.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d456f3d84a8b1f5459ef1a16b17943fc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/ToolbarExtension.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a6ed9650fa87819479538a3b4cdb530a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 647cbebb8dd9aab4f9082c580a9fbab4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/Shaders/AttributeViewer-main.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1fa25bf6e7a2d834eba72a188c707dad 3 | ShaderIncludeImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/jp.lilxyzw.editortoolbox.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 172c8aa43ed3ff74c925350c6c015fb8 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3dc9ce1fc346ac44897f8aaf4bf165cc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/Shaders/AttributeViewer-geometory.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd2fad966a9ca3b4284fe519b8196734 3 | ShaderIncludeImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/ToolbarExtension/Components.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c112dcb2e8fc99489433e36b78f8658 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/AnimatorControllerEditorPatch.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cc07dc89cc37e0b4395be5638f6a530c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 71144a69feb61954390ca2126d7db9ca 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/jp.lilxyzw.editortoolbox.runtime.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b4c508dac0619ab4da83be2f1d10a90e 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/Shaders/ppsquad.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ea9f96c2df18f345be26e4eaed41a93 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4300000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/VRChat/jp.lilxyzw.editortoolbox.vrchat.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 248783aa934dd5c4cafe085d25b491fe 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /DocsGenerator/jp.lilxyzw.editortoolbox.docsgenerator.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6983a2f3f6e708143b270292ed8e3756 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/Shaders/StencilChecker.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0434717cc94776441854e09df57feea3 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/DocsGenerator/SampleMaterialA.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 21e309c40a0620543b17dabc7ee33a66 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/DocsGenerator/SampleMaterialB.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f396356d8a3428418d243364f348690 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/Shaders/CopyAlpha.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f69abe80baaf0f438f12fb4d218b3d6 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/Shaders/FixColor.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18498b7b10fcfd14e9c1af3fea794b9e 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/Shaders/IconMaker.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 20bb69691f9f41c4ea1205c8058db58b 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Runtime/EditorOnlyBehaviour.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace jp.lilxyzw.editortoolbox.runtime 4 | { 5 | public abstract class EditorOnlyBehaviour : MonoBehaviour 6 | #if LIL_VRCSDK3 7 | , VRC.SDKBase.IEditorOnly 8 | #endif 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Editor/Shaders/AttributeViewer.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a21999ac3e45c31499204d988293fcee 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/Shaders/OutlineMaker.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aa65934ed60796d42af44bcc52caca80 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/Shaders/StencilChecker.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b9315fc1dbed1f4c9b1eecb08251ac4 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/Shaders/TexturePacker.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e3a0c233f1f46554885a8e180c2626c7 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/Shaders/KeywordInitializer.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd3ca69b755a7ac4697d46b5fc433619 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/Common.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 792c45d8abea15b488009e5b20ddd644 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/GUIHelper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ccbf794edaaf263448277335221f132c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/DeveloperMode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f911f6cdd2d3c51458d99ee12d984f07 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/FolderOpener.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dabcce937cb0b0b42a22a436bc752343 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/GUI/IconPopup.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1ab494a2a39c941488a7fadcbc068d38 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/MissingFinder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b68165798e96514e9ca008b8e21dd74 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/PlayModeSaver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ffcfdd13791bd06478435644ba97e2da 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/SceneCapture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f09c6d38f73b3d4394a88888a2d4792 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/SceneExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 23d5f753039c2ea44a45fee6eef82dea 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/SceneToolbar.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7873f8be126bff7438e884499abda84a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/TabInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e5b3a11a4af6ce342bd694007a37ad3c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/TexturePacker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d53ea95c67667744aaba54695746c4bf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Wraps/MenuWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 881a9435de591644c8b5d712830ab877 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/CameraMover.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e69c046c055e0e54ba19c7a366a7b843 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/ObjectMarker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17c62b766a1cf9c468dc212b8a761c91 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/SceneMSAA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 554439de7f89bdc48a38a0c79f32a249 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/assembly-info.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e5f0d5ba1a4de0f4ab5cbb0349b98529 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/EasySettingProvider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11bd083e854a64245ae83641867f015c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/JsonObjectViewer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 742aeaa14e127b14bb1442b2b39c2689 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/MenuItemModifier.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7927a96392494844dadee9ac96cf7f1e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ReferenceReplacer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2212224a0cd409140a9651cb2575d3d9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ScenePreprocessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db96635b208c1ef40af962a643b13869 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/SelectionInventory.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b1e250683ece8804fa5d177481d683dd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ShaderKeywordViewer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 85d8e4192776f33499ee254a87b32d68 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/TransformResetter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70d04721f185ce94ab7112042d552bff 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Utils/CallerUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ffd509666ca5b334cbab54711ff3fb54 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Utils/GraphicUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2407cc47b2a6d3346b6d953948a62b2c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Utils/MouseUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: afb00e43d73b24e4c8897ebb1ed8c6ad 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Utils/ObjectUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 017a2f0b82aea2943bbcaa964b127c9d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/VRChat/Preprocessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 838ae57e10f05ec45a54bfece433b103 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Wraps/EditorGUIWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9133c6d24bf6edd44b4fe86969279129 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Wraps/ToolbarWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e8d0998c3be14944b8e3bb7b8d896f1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Wraps/WrapBase.Utils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace jp.lilxyzw.editortoolbox 4 | { 5 | internal abstract partial class WrapBase 6 | { 7 | protected static Type MakeGeneric(Type type) 8 | { 9 | return typeof(T).MakeGenericType(type); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Runtime/ConstantValues.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d194b3f3ccc3a8a44b7e85ca0bdcc8e2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/CoroutineHandler.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4d54ee88e3526146adf40d9fdeb0c88 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/CustomLightmapping.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68e4c490b8a441c40a3d98ebf3d69c13 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /DocsGenerator/DocsGenerator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f86572372adfd745a7b7b287b65c6d0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/AssetGrimoire/Gatherer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 10d5ab47b67812049a13cb6583b8a220 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/AssetGrimoire/Grimoire.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f05dcbe69ecd17a4f8c06f2c44ced2d4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/EditorToolboxSettings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 787b1cf04e43e6645b73c52e5a5a7472 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/LockReloadAssemblies.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d9187c2c0c99474a93925150fab5151 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/SelectionInventoryData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00b4d644f6f0b97498bf32c12bed6023 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Utils/SubAssetCleaner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e7157bb1f17948428f1535281350948 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Wraps/EditorUtilityWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d632bd6252bd1c54ab2ef10b22c97bc1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Wraps/MenuServiceWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b40db0c902ecbf47bc634d5e94031a4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Wraps/PackageImportWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4f536074150a5a4089e1d5afc2dd047 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Wraps/ProjectBrowserWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e81a0a630fec26a41b6f45b187de0943 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Wraps/WindowLayoutWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7abe745a76c104b4593f30098f8764b0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Wraps/WrapBase.Field.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70eb0d980b0d2ef4091e8c04d1e96e5d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Wraps/WrapBase.Method.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d16fefc1cf7488a43a09ea1d6d6773ed 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Wraps/WrapBase.Property.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bac2864709e36bc4d998d554f59e0b37 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Wraps/WrapBase.Utils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e53b45e14121da8498bb44c89b2c576b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/EditorOnlyBehaviour.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d963469a47d138348b793a150313bd90 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/AssetGrimoire/GUIDLibrary.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3878b99ae573e324d92bc3692116e6ab 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/EditorToolboxSettingsProject.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f136f9817a464d4eb7f57be9e624808 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Inspector/CameraMoverEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dda724a1c04776c44a712d9c21772f4f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Localization/Localization.GUI.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f21d624a3131f2d45a87179cdf7fb340 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Localization/Localization.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e27f04e3cec8584087cfffa946d9666 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Wraps/ImportPackageItemWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff7344b2d2a00554ebd1addf3645e82d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Wraps/InspectorWindowWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a2af9c5af3dec5945a7811861e09f06f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/DocsGenerator/DocsGeneratorMenu.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b80711a2ef7fbd74cbbde56eef607d25 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ImportExtension/AssetOverwriter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8a67f263f8ee3044db4d371caa757df8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Inspector/LocalizedComponentEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6e7bce3c0e5178741adb8071e798225e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/ProjectExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: be6174944a5772f41a0938ca76542993 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ToolbarExtension/ToolbarExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 16ae7735eecdb1e42905e28a9124b9ec 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Wraps/AnimatorControllerToolWrap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95b67b8c3b5e7ef4197be44b6cffc7bf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/DocsGenerator/DocsGeneratorMenu.Capture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 058eeac9613cd33439b0b569aff0eab1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/DocsGenerator/DocsGeneratorMenu.Home.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: de857b8c621735b4295b4400d093009e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/DocsGenerator/DocsGeneratorMenu.Index.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 08a96daaae4b3bb41b85f078f0a52fdc 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/HierarchyExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1356607cf62786843aa0b14a3229f242 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ImportExtension/ImportSettingOptimizer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64e61985bafd1c44b98e946e913e13af 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ImportExtension/UnitypackageImporter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3cfde2293e444c740906820ed431157c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/AssetMarker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7a0746fa3b63a24cafe5d712962f243 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/IconOverlay.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af281301a5d496a40bab5fdbd4dcdf5b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/PrefabInfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ad9ea6fc8f7cf44f85a56f190ee08d8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/ProjectLine.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e80f3416c7fc74e449be65773920935a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/AnimatorControllerEditorPatch/GraphGUIPatch.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8639118106e4a834c9d74f3f0ff3cfda 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/AnimatorControllerEditorPatch/LayerCloner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f948f738b9b360840aa50be0d965c3a8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/AnimatorControllerEditorPatch/StateNodePatch.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 958f52345febe78469f166ee68562121 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/DocsGenerator/DocsGeneratorMenu.DocsIndex.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9fc7531c04173443a38dbc1709afb28 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/DocsGenerator/DocsGeneratorMenu.IndexMts.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: be6201569c92e3b419c534ce615c1370 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/ActiveToggle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea11b23817958dd4c99ff8249b3268ec 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/ChildrenDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9651a95a4f4f784ebbf09710375ae19 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/HierarchyLine.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31ff8b7d9c4ac4b4fa679d679eb8f50b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/LayerAndTag.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 59a9eee1ce1dd1741b0e94a258d48720 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/assembly-info.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d3d70be4842fded46b3505d9d8e74007 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/AssetMarkerData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 734eb365d8ff93c4fa01706aa993bb31 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/ExtensionDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97e88a72434566e4a828b4c486cc9ce0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/IconOverlayData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70d4dbe0a27c6e64e99e2f8b34449394 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/MaterialQueue.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fdbd1afe2b83cba49b8326fd8b19a7f6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/MaterialShader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af0982697849d244bbbd96fcb6687e04 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/MaterialVariant.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9bd57c7e0d898d64a9f16f87d37a8351 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/assembly-info.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87d31755f3eac4645b3f6d766dccf836 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/IProjectExtensionComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a07d2582ccaee85428f1de270fb84a2b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/ProjectToolbarExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f642a6144d82f93468f883cc0aca6e1a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ToolbarExtension/Components/assembly-info.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0f2db2bafb259e4e9060988b1c0b61e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ToolbarExtension/IToolbarExtensionComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fff9781bee00f8c43b2126069b4f6496 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/AnimatorControllerEditorPatch/StateEditorPatch.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 14d254a3849acdd479aebc89705129e7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/ComponentsDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 92335ce238b9add4fa0fc6dc262f152f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/EditorOnlyLabel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d5c5197dc17fdc43a842b8e14941bfa 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/HierarchySpacer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb3d4e4d09ddcfe4aaed48932d5ca39d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/IHierarchyExtensionConponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 142c8fbaf1a900e419e2c8f7b696d1c8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/OverlayFileInFolder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2aa1dab355051b84ea01ca563f5ff235 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/UnitypackageHilighter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a084344548ae9b5469ca8628a62432fe 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ToolbarExtension/Components/AddInspectorTabButton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4752487f8b667b542be32f004c73fd9f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/AlternatingBackground.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0d3ee099e51e837489ad03f66fa8e3a0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/ObjectMarkerBackground.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c81807c2f8abf149879e3dde6daa910 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ToolbarExtension/Components/LockReloadAssembliesButton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a13246f3a521a8a49a815fb353ae91f4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/AnimatorControllerEditorPatch/AnimatorControllerEditorMenu.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2dcfb2bf364b58e4c8800d5be1350571 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/AnimatorControllerEditorPatch/AnimatorControllerEditorPatch.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33e28c2d453a214408f496754dc3aab8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/AnimatorControllerEditorPatch/ParameterControllerViewPatch.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb766c22c26f1f9439ccfdb04cfe5683 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/AlternatingProjectBackground.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7db5402aade4bb945a24a725096db9a6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/AnimatorControllerEditorPatch/AnimatorTransitionInspectorBasePatch.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e9fa41f450293d46b2f4eedb7abf662 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Wraps/EditorUtilityWrap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEditor; 3 | 4 | namespace jp.lilxyzw.editortoolbox 5 | { 6 | internal class EditorUtilityWrap : WrapBase 7 | { 8 | private static readonly Type type = typeof(EditorUtility); 9 | internal static readonly Action Internal_UpdateAllMenus = GetAction(type, "Internal_UpdateAllMenus"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Editor/Wraps/WindowLayoutWrap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEditor; 3 | 4 | namespace jp.lilxyzw.editortoolbox 5 | { 6 | internal class WindowLayoutWrap : WrapBase 7 | { 8 | private static readonly Type type = typeof(Editor).Assembly.GetType("UnityEditor.WindowLayout"); 9 | internal static Action UpdateWindowLayoutMenu = GetAction(type, "UpdateWindowLayoutMenu"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jp.lilxyzw.editortoolbox", 3 | "version": "1.11.0", 4 | "displayName": "lilEditorToolbox", 5 | "description": "Extensions for Unity Editor.", 6 | "unity": "2022.3", 7 | "license": "MIT", 8 | "url" : "https://github.com/lilxyzw/lilEditorToolbox/releases/download/1.11.0/jp.lilxyzw.editortoolbox-1.11.0.zip?", 9 | "repo" : "https://lilxyzw.github.io/vpm-repos/vpm.json" 10 | } 11 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/assembly-info.cs: -------------------------------------------------------------------------------- 1 | using jp.lilxyzw.editortoolbox; 2 | [assembly: ExportsHierarchyExtensionComponent( 3 | typeof(HierarchySpacer), 4 | typeof(ActiveToggle), 5 | typeof(AlternatingBackground), 6 | typeof(ObjectMarkerBackground), 7 | typeof(ChildrenDrawer), 8 | typeof(ComponentsDrawer), 9 | typeof(EditorOnlyLabel), 10 | typeof(HierarchyLine), 11 | typeof(LayerAndTag) 12 | )] 13 | -------------------------------------------------------------------------------- /Editor/EditorToolboxSettingsProject.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | 3 | namespace jp.lilxyzw.editortoolbox 4 | { 5 | [FilePath("ProjectSettings/jp.lilxyzw.editortoolbox.asset", FilePathAttribute.Location.ProjectFolder)] 6 | internal class EditorToolboxSettingsProject : ScriptableSingleton 7 | { 8 | public string settingPreset; 9 | internal static void Save() => instance.Save(true); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /DocsGenerator/jp.lilxyzw.editortoolbox.docsgenerator.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jp.lilxyzw.editortoolbox.docsgenerator", 3 | "rootNamespace": "", 4 | "references": [], 5 | "includePlatforms": [], 6 | "excludePlatforms": [], 7 | "allowUnsafeCode": false, 8 | "overrideReferences": false, 9 | "precompiledReferences": [], 10 | "autoReferenced": false, 11 | "defineConstraints": [], 12 | "versionDefines": [], 13 | "noEngineReferences": true 14 | } -------------------------------------------------------------------------------- /Editor/SelectionInventoryData.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace jp.lilxyzw.editortoolbox 6 | { 7 | [FilePath("./jp.lilxyzw.editortoolbox.SelectionInventoryData.asset", FilePathAttribute.Location.ProjectFolder)] 8 | internal class SelectionInventoryData : ScriptableSingleton 9 | { 10 | public List objects = new(); 11 | internal void Save() => Save(true); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/assembly-info.cs: -------------------------------------------------------------------------------- 1 | using jp.lilxyzw.editortoolbox; 2 | [assembly: ExportsProjectExtensionComponent( 3 | typeof(OverlayFileInFolder), 4 | typeof(IconOverlay), 5 | typeof(AlternatingProjectBackground), 6 | typeof(UnitypackageHilighter), 7 | typeof(ExtensionDrawer), 8 | typeof(PrefabInfo), 9 | typeof(MaterialVariant), 10 | typeof(MaterialQueue), 11 | typeof(MaterialShader), 12 | typeof(ProjectLine), 13 | typeof(AssetMarker) 14 | )] 15 | -------------------------------------------------------------------------------- /Editor/Utils/CallerUtils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace jp.lilxyzw.editortoolbox 4 | { 5 | public static class CallerUtils 6 | { 7 | public static bool CallerIs(Type type, int skipFrames) 8 | { 9 | return type == new System.Diagnostics.StackFrame(skipFrames + 1, false).GetMethod().ReflectedType; 10 | } 11 | 12 | public static Type GetCaller(int skipFrames) 13 | { 14 | return new System.Diagnostics.StackFrame(skipFrames + 1, false).GetMethod().ReflectedType; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Editor/DeveloperMode.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | 3 | namespace jp.lilxyzw.editortoolbox 4 | { 5 | internal static class DeveloperMode 6 | { 7 | private const string MENU_PATH = Common.MENU_HEAD + "Unity Developer Mode"; 8 | private const string KEY = "DeveloperMode"; 9 | [MenuItem(MENU_PATH)] 10 | private static void Toggle() 11 | { 12 | var isDev = EditorPrefs.GetBool(KEY, false); 13 | EditorPrefs.SetBool(KEY, !isDev); 14 | Menu.SetChecked(MENU_PATH, !isDev); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Editor/Wraps/MenuServiceWrap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using UnityEditor; 4 | 5 | namespace jp.lilxyzw.editortoolbox 6 | { 7 | internal class MenuServiceWrap : WrapBase 8 | { 9 | private static readonly Type type = typeof(Editor).Assembly.GetType("UnityEditor.MenuService"); 10 | internal static readonly Func ValidateMethodForMenuCommand = GetFunc(type, "ValidateMethodForMenuCommand"); 11 | internal static readonly Func SanitizeMenuItemName = GetFunc(type, "SanitizeMenuItemName"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Editor/AnimatorControllerEditorPatch/GraphGUIPatch.cs: -------------------------------------------------------------------------------- 1 | #if LIL_HARMONY 2 | using HarmonyLib; 3 | using System.Reflection; 4 | using static jp.lilxyzw.editortoolbox.AnimatorControllerEditorPatch; 5 | 6 | namespace jp.lilxyzw.editortoolbox 7 | { 8 | [HarmonyPatch] 9 | internal class GraphGUIPatch 10 | { 11 | [HarmonyTargetMethod] 12 | private static MethodBase TargetMethod() => AccessTools.Method(T_GraphGUI, "CopySelectionToPasteboard"); 13 | 14 | [HarmonyPostfix] 15 | private static void Prefix() 16 | { 17 | LayerCloner.layer = null; 18 | } 19 | } 20 | } 21 | #endif -------------------------------------------------------------------------------- /Editor/Wraps/MenuWrap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEditor; 3 | 4 | namespace jp.lilxyzw.editortoolbox 5 | { 6 | internal class MenuWrap : WrapBase 7 | { 8 | private static readonly Type type = typeof(Menu); 9 | internal static readonly Action> AddMenuItem = GetAction>(type, "AddMenuItem"); 10 | internal static readonly Action RemoveMenuItem = GetAction(type, "RemoveMenuItem"); 11 | internal static readonly Action RebuildAllMenus = GetAction(type, "RebuildAllMenus"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/HierarchySpacer.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace jp.lilxyzw.editortoolbox 4 | { 5 | [Tooltip("Add margins so as not to interfere with other Hierarchy extensions.")] 6 | internal class HierarchySpacer : IHierarchyExtensionComponent 7 | { 8 | public int Priority => EditorToolboxSettings.instance.hierarchySpacerPriority; 9 | 10 | public void OnGUI(ref Rect currentRect, GameObject gameObject, int instanceID, Rect fullRect) 11 | { 12 | currentRect.x = fullRect.xMax - EditorToolboxSettings.instance.hierarchySpacerWidth; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Editor/VRChat/Preprocessor.cs: -------------------------------------------------------------------------------- 1 | #if LIL_VRCSDK3 2 | using jp.lilxyzw.editortoolbox.runtime; 3 | using UnityEngine; 4 | using VRC.SDKBase.Editor.BuildPipeline; 5 | 6 | namespace jp.lilxyzw.editortoolbox.vrchat 7 | { 8 | public class Preprocessor : IVRCSDKPreprocessAvatarCallback 9 | { 10 | public int callbackOrder => -10000; 11 | public bool OnPreprocessAvatar(GameObject avatarGameObject) 12 | { 13 | foreach(var c in avatarGameObject.GetComponentsInChildren()) 14 | Object.DestroyImmediate(c); 15 | 16 | return true; 17 | } 18 | } 19 | } 20 | #endif 21 | -------------------------------------------------------------------------------- /Editor/LockReloadAssemblies.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | 3 | namespace jp.lilxyzw.editortoolbox 4 | { 5 | internal static class LockReloadAssemblies 6 | { 7 | private const string MENU_PATH = Common.MENU_HEAD + "Lock Reload Assemblies"; 8 | internal static bool isLocked = false; 9 | [MenuItem(MENU_PATH)] 10 | internal static void ToggleLock() 11 | { 12 | isLocked = !isLocked; 13 | Menu.SetChecked(MENU_PATH, isLocked); 14 | if(isLocked) EditorApplication.LockReloadAssemblies(); 15 | else EditorApplication.UnlockReloadAssemblies(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Editor/ToolbarExtension/IToolbarExtensionComponent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine.UIElements; 3 | 4 | namespace jp.lilxyzw.editortoolbox 5 | { 6 | public interface IToolbarExtensionComponent 7 | { 8 | public int Priority { get; } 9 | public bool InLeftSide { get; } 10 | public VisualElement GetRootElement(); 11 | } 12 | 13 | [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] 14 | public sealed class ExportsToolbarExtensionComponent : Attribute 15 | { 16 | public Type[] Types { get; } 17 | public ExportsToolbarExtensionComponent(params Type[] types) => Types = types; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Runtime/ConstantValues.cs: -------------------------------------------------------------------------------- 1 | namespace jp.lilxyzw.editortoolbox.runtime 2 | { 3 | // URLやGUIDなどの定数はここに集約して、変更があった場合に更新しやすくします。 4 | internal class ConstantValues 5 | { 6 | internal const string TOOL_NAME = "lilEditorToolbox"; 7 | internal const string PACKAGE_NAME = "editortoolbox"; 8 | internal const string PACKAGE_NAME_FULL = "jp.lilxyzw." + PACKAGE_NAME; 9 | internal const string COMPONENTS_BASE = TOOL_NAME + "/LE "; 10 | internal const string URL_DOCS_BASE = "https://lilxyzw.github.io/lilEditorToolbox/redirect#"; 11 | internal const string URL_DOCS_COMPONENT = URL_DOCS_BASE + "docs/Components/"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/IProjectExtensionComponent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace jp.lilxyzw.editortoolbox 5 | { 6 | public interface IProjectExtensionComponent 7 | { 8 | public int Priority { get; } 9 | public void OnGUI(ref Rect currentRect, string guid, string path, string name, string extension, Rect fullRect); 10 | } 11 | 12 | [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] 13 | public sealed class ExportsProjectExtensionComponent : Attribute 14 | { 15 | public Type[] Types { get; } 16 | public ExportsProjectExtensionComponent(params Type[] types) => Types = types; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/AlternatingBackground.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace jp.lilxyzw.editortoolbox 5 | { 6 | [Tooltip("Alternates the background color of the Hierarchy.")] 7 | internal class AlternatingBackground : IHierarchyExtensionComponent 8 | { 9 | public int Priority => -1500; 10 | 11 | public void OnGUI(ref Rect currentRect, GameObject gameObject, int instanceID, Rect fullRect) 12 | { 13 | if((int)fullRect.y % (int)(fullRect.height*2) >= (int)fullRect.height) 14 | EditorGUI.DrawRect(fullRect, EditorToolboxSettings.instance.backgroundColor); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/MaterialQueue.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace jp.lilxyzw.editortoolbox 4 | { 5 | [Tooltip("Displays the Render Queue for materials.")] 6 | internal class MaterialQueue : IProjectExtensionComponent 7 | { 8 | public int Priority => 1; 9 | 10 | public void OnGUI(ref Rect currentRect, string guid, string path, string name, string extension, Rect fullRect) 11 | { 12 | if(ProjectExtension.isIconGUI || extension != ".mat" || ProjectExtension.GUIDToObject(guid) is not Material material) return; 13 | 14 | GUIHelper.DrawLabel(ref currentRect, $"Q: {material.renderQueue}"); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Runtime/jp.lilxyzw.editortoolbox.runtime.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jp.lilxyzw.editortoolbox.runtime", 3 | "rootNamespace": "", 4 | "references": [ 5 | "jp.lilxyzw.editortoolbox.docsgenerator", 6 | "VRC.SDKBase" 7 | ], 8 | "includePlatforms": [], 9 | "excludePlatforms": [], 10 | "allowUnsafeCode": false, 11 | "overrideReferences": false, 12 | "precompiledReferences": [], 13 | "autoReferenced": false, 14 | "defineConstraints": [], 15 | "versionDefines": [ 16 | { 17 | "name": "com.vrchat.base", 18 | "expression": "", 19 | "define": "LIL_VRCSDK3" 20 | } 21 | ], 22 | "noEngineReferences": false 23 | } -------------------------------------------------------------------------------- /Runtime/CoroutineHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using UnityEngine; 3 | 4 | namespace jp.lilxyzw.editortoolbox.runtime 5 | { 6 | [AddComponentMenu("/")] 7 | internal class CoroutineHandler : EditorOnlyBehaviour 8 | { 9 | private static CoroutineHandler m_Instance; 10 | private static CoroutineHandler Instance => m_Instance ? m_Instance : m_Instance = new GameObject("CoroutineHandler"){hideFlags = HideFlags.HideAndDontSave}.AddComponent(); 11 | private void OnDisable(){if(m_Instance) Destroy(m_Instance.gameObject);} 12 | internal static Coroutine StartStaticCoroutine(IEnumerator coroutine) => Instance.StartCoroutine(coroutine); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Editor/VRChat/jp.lilxyzw.editortoolbox.vrchat.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jp.lilxyzw.editortoolbox.vrchat", 3 | "rootNamespace": "", 4 | "references": [ 5 | "jp.lilxyzw.editortoolbox.runtime", 6 | "VRC.SDKBase" 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.vrchat.base", 20 | "expression": "", 21 | "define": "LIL_VRCSDK3" 22 | } 23 | ], 24 | "noEngineReferences": false 25 | } -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/AlternatingProjectBackground.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace jp.lilxyzw.editortoolbox 5 | { 6 | [Tooltip("Alternates the background color of the Project window.")] 7 | internal class AlternatingProjectBackground : IProjectExtensionComponent 8 | { 9 | public int Priority => -1500; 10 | 11 | public void OnGUI(ref Rect currentRect, string guid, string path, string name, string extension, Rect fullRect) 12 | { 13 | if(!ProjectExtension.isIconGUI && (int)fullRect.y % (int)(fullRect.height*2) >= (int)fullRect.height) 14 | EditorGUI.DrawRect(fullRect, EditorToolboxSettings.instance.backgroundColor); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/MaterialVariant.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace jp.lilxyzw.editortoolbox 4 | { 5 | [Tooltip("Displays the parent material if the material is a variant.")] 6 | internal class MaterialVariant : IProjectExtensionComponent 7 | { 8 | public int Priority => 0; 9 | 10 | public void OnGUI(ref Rect currentRect, string guid, string path, string name, string extension, Rect fullRect) 11 | { 12 | if(ProjectExtension.isIconGUI || extension != ".mat" || ProjectExtension.GUIDToObject(guid) is not Material material) return; 13 | 14 | if(material.isVariant && material.parent) GUIHelper.DrawLabel(ref currentRect, $"Variant: {material.parent.name}"); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Runtime/SceneMSAA.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace jp.lilxyzw.editortoolbox.runtime 4 | { 5 | [Docs( 6 | "SceneMSAA", 7 | "Merged into [Scene View Extension](../SceneExtension)." 8 | )] 9 | [AddComponentMenu("/")] 10 | [HelpURL(ConstantValues.URL_DOCS_COMPONENT + nameof(SceneMSAA))] 11 | internal class SceneMSAA : EditorOnlyBehaviour 12 | { 13 | #if UNITY_EDITOR 14 | void OnValidate() 15 | { 16 | void DestroySelf() 17 | { 18 | DestroyImmediate(this); 19 | UnityEditor.EditorApplication.update -= DestroySelf; 20 | } 21 | UnityEditor.EditorApplication.update += DestroySelf; 22 | } 23 | #endif 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Editor/Wraps/EditorGUIWrap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace jp.lilxyzw.editortoolbox 6 | { 7 | internal class EditorGUIWrap : WrapBase 8 | { 9 | private static readonly Type type = typeof(EditorGUI); 10 | internal static readonly Func AdvancedPopup = GetFunc(type, "AdvancedPopup"); 11 | private static readonly (Delegate g, Delegate s) FI_kFloatFieldFormatString = GetField(type, "kFloatFieldFormatString", typeof(string)); 12 | public static string kFloatFieldFormatString 13 | { 14 | get => (string)FI_kFloatFieldFormatString.g.DynamicInvoke(null); 15 | set => FI_kFloatFieldFormatString.s.DynamicInvoke(value); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Editor/Wraps/ToolbarWrap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEditor; 3 | using UnityEngine.UIElements; 4 | 5 | namespace jp.lilxyzw.editortoolbox 6 | { 7 | internal class ToolbarWrap : WrapBase 8 | { 9 | private static readonly Type type = typeof(Editor).Assembly.GetType("UnityEditor.Toolbar"); 10 | private static readonly Func FI_get = GetField(type, "get", type).g; 11 | private static readonly Delegate FI_m_Root = GetFieldIns(type, "m_Root", typeof(VisualElement)).g; 12 | 13 | public object instance; 14 | public ToolbarWrap(object instance) => this.instance = instance; 15 | 16 | public static ToolbarWrap get => new(FI_get()); 17 | public VisualElement m_Root => FI_m_Root.DynamicInvoke(instance) as VisualElement; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/ExtensionDrawer.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace jp.lilxyzw.editortoolbox 6 | { 7 | [Tooltip("Displays the file extension.")] 8 | internal class ExtensionDrawer : IProjectExtensionComponent 9 | { 10 | public int Priority => 0; 11 | 12 | public void OnGUI(ref Rect currentRect, string guid, string path, string name, string extension, Rect fullRect) 13 | { 14 | if(ProjectExtension.isIconGUI || !File.Exists(path) || ProjectExtension.isSubAsset) return; 15 | currentRect.width = Common.GetTextWidth(extension); 16 | GUI.Label(currentRect, extension, EditorStyles.label); 17 | currentRect.x += currentRect.width; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/MaterialShader.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace jp.lilxyzw.editortoolbox 4 | { 5 | [Tooltip("Displays the material's shader.")] 6 | internal class MaterialShader : IProjectExtensionComponent 7 | { 8 | public int Priority => 2; 9 | 10 | public void OnGUI(ref Rect currentRect, string guid, string path, string name, string extension, Rect fullRect) 11 | { 12 | if(ProjectExtension.isIconGUI || extension != ".mat" || ProjectExtension.GUIDToObject(guid) is not Material material) return; 13 | 14 | if(material.shader && material.shader.isSupported) GUIHelper.DrawLabel(ref currentRect, material.shader.name); 15 | else GUIHelper.DrawLabel(ref currentRect, "ERROR MATERIAL"); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/ObjectMarkerBackground.cs: -------------------------------------------------------------------------------- 1 | using jp.lilxyzw.editortoolbox.runtime; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace jp.lilxyzw.editortoolbox 6 | { 7 | [Tooltip("Applies a background color to the ObjectMarker.")] 8 | internal class ObjectMarkerBackground : IHierarchyExtensionComponent 9 | { 10 | public int Priority => -1450; 11 | 12 | public void OnGUI(ref Rect currentRect, GameObject gameObject, int instanceID, Rect fullRect) 13 | { 14 | var marker = gameObject.GetComponent(); 15 | if(marker) 16 | { 17 | var rect = fullRect; 18 | if(marker.underline) rect.yMin = rect.yMax - 2; 19 | EditorGUI.DrawRect(rect, marker.color); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/IconOverlay.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace jp.lilxyzw.editortoolbox 5 | { 6 | [Tooltip("Overlay any image on the icon.")] 7 | internal class IconOverlay : IProjectExtensionComponent 8 | { 9 | public int Priority => -1600; 10 | 11 | public void OnGUI(ref Rect currentRect, string guid, string path, string name, string extension, Rect fullRect) 12 | { 13 | if(!IconOverlayData.Dic.TryGetValue(guid, out var icon) || !icon) return; 14 | var rect = fullRect; 15 | var size = Mathf.Min(rect.width, rect.height); 16 | rect.width = size; 17 | rect.height = size; 18 | if(!ProjectExtension.isIconGUI) rect.x += 4; 19 | 20 | GUI.DrawTexture(rect, icon); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Editor/ScenePreprocessor.cs: -------------------------------------------------------------------------------- 1 | using jp.lilxyzw.editortoolbox.runtime; 2 | using UnityEditor; 3 | using UnityEditor.Build; 4 | using UnityEditor.Build.Reporting; 5 | using UnityEngine; 6 | using UnityEngine.SceneManagement; 7 | 8 | namespace jp.lilxyzw.editortoolbox 9 | { 10 | internal class ScenePreprocessor : IProcessSceneWithReport 11 | { 12 | public int callbackOrder => 0; 13 | 14 | public void OnProcessScene(Scene scene, BuildReport report) 15 | { 16 | if(!EditorApplication.isPlaying) 17 | foreach(var root in scene.GetRootGameObjects()) 18 | foreach(var component in root.GetComponentsInChildren(true)) 19 | { 20 | Debug.Log(component); 21 | Object.DestroyImmediate(component); 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Editor/Shaders/StencilChecker.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: StencilChecker 11 | m_Shader: {fileID: 4800000, guid: 4b9315fc1dbed1f4c9b1eecb08251ac4, type: 3} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 0 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: -1 20 | stringTagMap: {} 21 | disabledShaderPasses: [] 22 | m_LockedProperties: 23 | m_SavedProperties: 24 | serializedVersion: 3 25 | m_TexEnvs: [] 26 | m_Ints: [] 27 | m_Floats: [] 28 | m_Colors: [] 29 | m_BuildTextureStacks: [] 30 | -------------------------------------------------------------------------------- /Editor/ToolbarExtension/Components/AddInspectorTabButton.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEditor.UIElements; 3 | using UnityEngine; 4 | using UnityEngine.UIElements; 5 | 6 | namespace jp.lilxyzw.editortoolbox 7 | { 8 | [Tooltip("Displays a button to add a tab to the Inspector that is locked on the selected object.")] 9 | internal class AddInspectorTabButton : IToolbarExtensionComponent 10 | { 11 | public int Priority => 0; 12 | public bool InLeftSide => false; 13 | 14 | private static Texture tex = EditorGUIUtility.IconContent("Toolbar Plus").image; 15 | public VisualElement GetRootElement() 16 | { 17 | var root = new ToolbarButton(); 18 | var icon = new Image{image = tex}; 19 | root.Add(icon); 20 | root.clicked += () => TabInspector.Init(); 21 | return root; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Runtime/CameraMover.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace jp.lilxyzw.editortoolbox.runtime 4 | { 5 | [Docs( 6 | "CameraMover", 7 | "By attaching this component to a camera, you can control the camera with WASDQE." 8 | )] 9 | [DocsHowTo("Just attach the component to the camera object and press the `Operate` button. You can end the interaction by clicking it again or pressing the escape key.")] 10 | [DisallowMultipleComponent] 11 | [AddComponentMenu(ConstantValues.COMPONENTS_BASE + nameof(CameraMover))] 12 | [HelpURL(ConstantValues.URL_DOCS_COMPONENT + nameof(CameraMover))] 13 | internal class CameraMover : EditorOnlyBehaviour 14 | { 15 | [Tooltip("The moving speed of the camera.")] 16 | public float moveSpeed = 1; 17 | 18 | [Tooltip("The amount the camera rotates when you move the mouse.")] 19 | public float sensitivity = 15; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Editor/DocsGenerator/SampleMaterialA.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: SampleMaterialA 11 | m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 0 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: -1 20 | stringTagMap: {} 21 | disabledShaderPasses: [] 22 | m_LockedProperties: 23 | m_SavedProperties: 24 | serializedVersion: 3 25 | m_TexEnvs: [] 26 | m_Ints: [] 27 | m_Floats: [] 28 | m_Colors: 29 | - _Color: {r: 1, g: 1, b: 1, a: 1} 30 | m_BuildTextureStacks: [] 31 | -------------------------------------------------------------------------------- /Editor/DocsGenerator/SampleMaterialB.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: SampleMaterialB 11 | m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 0 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: -1 20 | stringTagMap: {} 21 | disabledShaderPasses: [] 22 | m_LockedProperties: 23 | m_SavedProperties: 24 | serializedVersion: 3 25 | m_TexEnvs: [] 26 | m_Ints: [] 27 | m_Floats: [] 28 | m_Colors: 29 | - _Color: {r: 1, g: 1, b: 1, a: 1} 30 | m_BuildTextureStacks: [] 31 | -------------------------------------------------------------------------------- /Editor/ToolbarExtension/Components/LockReloadAssembliesButton.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor.UIElements; 2 | using UnityEngine; 3 | using UnityEngine.UIElements; 4 | 5 | namespace jp.lilxyzw.editortoolbox 6 | { 7 | [Tooltip("Locks the assembly to reduce the wait time for script compilation. This is useful if you frequently rewrite scripts.")] 8 | internal class LockReloadAssembliesButton : IToolbarExtensionComponent 9 | { 10 | public int Priority => 0; 11 | public bool InLeftSide => true; 12 | 13 | public VisualElement GetRootElement() 14 | { 15 | var root = new ToolbarToggle (){text = L10n.L("Assemblies Unlocked")}; 16 | root.RegisterValueChangedCallback(e => { 17 | LockReloadAssemblies.ToggleLock(); 18 | root.text = LockReloadAssemblies.isLocked ? L10n.L("Assemblies Locked") : L10n.L("Assemblies Unlocked"); 19 | }); 20 | return root; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/IHierarchyExtensionConponent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace jp.lilxyzw.editortoolbox 5 | { 6 | public interface IHierarchyExtensionComponent 7 | { 8 | /// 9 | /// -2000 to -1001 : Background 10 | /// -1000 to -1 : No width decoration 11 | /// 0 to 999 : Monospaced decoration 12 | /// 1000 to 1999 : Variable width decoration 13 | /// 14 | /// 15 | public int Priority { get; } 16 | public void OnGUI(ref Rect currentRect, GameObject gameObject, int instanceID, Rect fullRect); 17 | } 18 | 19 | [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] 20 | public sealed class ExportsHierarchyExtensionComponent : Attribute 21 | { 22 | public Type[] Types { get; } 23 | public ExportsHierarchyExtensionComponent(params Type[] types) => Types = types; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Editor/EasySettingProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEditor; 3 | using UnityEngine; 4 | using UnityEngine.UIElements; 5 | 6 | namespace jp.lilxyzw.editortoolbox 7 | { 8 | public abstract class EasySettingProvider : SettingsProvider 9 | { 10 | public abstract ScriptableObject SO { get; } 11 | private Editor _editor; 12 | 13 | public EasySettingProvider(string path, SettingsScope scopes, IEnumerable keywords) : base(path, scopes, keywords){} 14 | public static SettingsProvider Create(string path) => new EditorToolboxSettingsProvider($"Preferences/{path}", SettingsScope.User, null); 15 | 16 | public override void OnActivate(string searchContext, VisualElement rootElement) 17 | { 18 | SO.hideFlags = HideFlags.HideAndDontSave & ~HideFlags.NotEditable; 19 | Editor.CreateCachedEditor(SO, null, ref _editor); 20 | } 21 | 22 | public override void OnGUI(string searchContext) => _editor.OnInspectorGUI(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/PrefabInfo.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace jp.lilxyzw.editortoolbox 5 | { 6 | [Tooltip("Displays Prefab information.")] 7 | internal class PrefabInfo : IProjectExtensionComponent 8 | { 9 | public int Priority => 0; 10 | 11 | public void OnGUI(ref Rect currentRect, string guid, string path, string name, string extension, Rect fullRect) 12 | { 13 | if(ProjectExtension.isIconGUI || extension != ".prefab" || ProjectExtension.GUIDToObject(guid) is not Object prefab || !prefab) return; 14 | 15 | var type = PrefabUtility.GetPrefabAssetType(prefab); 16 | var label = type.ToString(); 17 | if(type == PrefabAssetType.Variant) 18 | { 19 | var parent = PrefabUtility.GetCorrespondingObjectFromSource(prefab); 20 | if(parent) label = $"Variant: {parent.name}"; 21 | } 22 | GUIHelper.DrawLabel(ref currentRect, label); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Editor/DocsGenerator/DocsGeneratorMenu.Home.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text; 4 | 5 | namespace jp.lilxyzw.editortoolbox 6 | { 7 | internal static partial class DocsGeneratorMenu 8 | { 9 | private static void BuildHome(string root, string code, Func loc) 10 | { 11 | var sb = new StringBuilder(); 12 | sb.Append(File.ReadAllText("docs_base/home.md")); 13 | sb.Replace("TOOLNAME", "lilEditorToolbox"); 14 | sb.Replace("LANG", code); 15 | sb.Replace("TEXT", loc("Useful tool box")); 16 | sb.Replace("TAGLINE", loc("This package contains various useful editor extensions.")); 17 | sb.Replace("ADDTOVCC", loc("Add to VCC")); 18 | sb.Replace("DOCUMENT", loc("Document")); 19 | sb.Replace("BOOTHLINK", "https://lilxyzw.booth.pm/items/6166069"); 20 | 21 | WriteText($"{root}/index.md", sb.ToString()); 22 | if(code == "ja_JP") WriteText($"docs/index.md", sb.ToString()); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Runtime/ObjectMarker.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace jp.lilxyzw.editortoolbox.runtime 4 | { 5 | [Docs( 6 | "ObjectMarker", 7 | "By attaching this component to a GameObject, you can change the background color of the hierarchy to highlight it." 8 | )] 9 | [DocsHowTo("It is intended to be used to organize the hierarchy. For example, you can create a GameObject named `Summer`, add an ObjectMarker component, and place summer costumes under it, and similarly create `Autumn` and place autumn costumes under it, etc.")] 10 | [DisallowMultipleComponent] 11 | [AddComponentMenu(ConstantValues.COMPONENTS_BASE + nameof(ObjectMarker))] 12 | [HelpURL(ConstantValues.URL_DOCS_COMPONENT + nameof(ObjectMarker))] 13 | internal class ObjectMarker : EditorOnlyBehaviour 14 | { 15 | [Tooltip("The background color. You can set the color using the color picker.")] 16 | public Color color = new(1,0,0,0.2f); 17 | 18 | [Tooltip("Instead of painting the color over the entire background, it paints it as an underline.")] 19 | public bool underline = false; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 lilxyzw 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/jp.lilxyzw.editortoolbox.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jp.lilxyzw.editortoolbox", 3 | "rootNamespace": "jp.lilxyzw.editortoolbox", 4 | "references": [ 5 | "jp.lilxyzw.editortoolbox.runtime", 6 | "jp.lilxyzw.editortoolbox.docsgenerator" 7 | ], 8 | "includePlatforms": [ 9 | "Editor" 10 | ], 11 | "excludePlatforms": [], 12 | "allowUnsafeCode": false, 13 | "overrideReferences": true, 14 | "precompiledReferences": [ 15 | "Unity.SharpZipLib.dll", 16 | "0Harmony.dll" 17 | ], 18 | "autoReferenced": false, 19 | "defineConstraints": [], 20 | "versionDefines": [ 21 | { 22 | "name": "com.unity.sharp-zip-lib", 23 | "expression": "", 24 | "define": "LIL_SHADPZIPLIB" 25 | }, 26 | { 27 | "name": "com.vrchat.base", 28 | "expression": "", 29 | "define": "LIL_HARMONY" 30 | }, 31 | { 32 | "name": "nadena.dev.modular-avatar", 33 | "expression": "", 34 | "define": "LIL_MODULAR_AVATAR" 35 | } 36 | ], 37 | "noEngineReferences": false 38 | } -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/ActiveToggle.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace jp.lilxyzw.editortoolbox 5 | { 6 | [Tooltip("A checkbox that turns an object on and off.")] 7 | internal class ActiveToggle : IHierarchyExtensionComponent 8 | { 9 | private const int ICON_SIZE = 16; 10 | 11 | public int Priority => 100; 12 | 13 | public void OnGUI(ref Rect currentRect, GameObject gameObject, int instanceID, Rect fullRect) 14 | { 15 | currentRect.x -= ICON_SIZE; 16 | currentRect.width = ICON_SIZE; 17 | EditorGUI.BeginChangeCheck(); 18 | var active = GUIHelper.DToggle("jp.lilxyzw.editortoolbox.ActiveToggle", instanceID.ToString(), currentRect, gameObject.activeSelf); 19 | if(EditorGUI.EndChangeCheck()) 20 | { 21 | using var so = new SerializedObject(gameObject); 22 | using var m_IsActive = so.FindProperty("m_IsActive"); 23 | m_IsActive.boolValue = active; 24 | so.ApplyModifiedProperties(); 25 | } 26 | currentRect.x -= 8; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Editor/Shaders/FixColor.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/_lil/FixColor" 2 | { 3 | Properties 4 | { 5 | [MainTexture] _MainTex ("Texture", 2D) = "white" {} 6 | _RemoveAlpha ("Remove Alpha", Int) = 0 7 | } 8 | SubShader 9 | { 10 | Pass 11 | { 12 | CGPROGRAM 13 | #pragma vertex vert 14 | #pragma fragment frag 15 | 16 | #include "UnityCG.cginc" 17 | 18 | Texture2D _MainTex; 19 | uint _RemoveAlpha; 20 | 21 | float4 vert(float4 vertex : POSITION) : SV_POSITION 22 | { 23 | return UnityObjectToClipPos(vertex); 24 | } 25 | 26 | float4 frag(float4 vertex : SV_POSITION) : SV_Target 27 | { 28 | float4 col = _MainTex[vertex.xy]; 29 | if(_RemoveAlpha) 30 | { 31 | col.a = 1; 32 | } 33 | else 34 | { 35 | if(col.a != 0) col.rgb /= saturate(col.a); 36 | } 37 | if(!IsGammaSpace()) col.rgb = LinearToGammaSpace(col.rgb); 38 | return col; 39 | } 40 | ENDCG 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Editor/Shaders/AttributeViewer.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/_lil/AttributeViewer" 2 | { 3 | Properties 4 | { 5 | _MainTex ("Texture", 2D) = "white" {} 6 | } 7 | 8 | SubShader 9 | { 10 | Pass 11 | { 12 | Cull Off 13 | CGPROGRAM 14 | #pragma exclude_renderers metal 15 | #pragma vertex vert 16 | #pragma fragment frag 17 | 18 | #include "UnityCG.cginc" 19 | #include "./AttributeViewer-main.hlsl" 20 | ENDCG 21 | } 22 | 23 | Pass 24 | { 25 | Cull Off 26 | CGPROGRAM 27 | #pragma exclude_renderers metal 28 | #pragma vertex vert 29 | #pragma geometry geom 30 | #pragma fragment frag 31 | 32 | #include "UnityCG.cginc" 33 | #include "./AttributeViewer-geometory.hlsl" 34 | ENDCG 35 | } 36 | } 37 | 38 | SubShader 39 | { 40 | Pass 41 | { 42 | Cull Off 43 | CGPROGRAM 44 | #pragma vertex vert 45 | #pragma fragment frag 46 | 47 | #include "UnityCG.cginc" 48 | #include "./AttributeViewer-main.hlsl" 49 | ENDCG 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Editor/Shaders/IconMaker.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/_lil/IconMaker" 2 | { 3 | Properties 4 | { 5 | _MainTex ("Texture", 2D) = "white" {} 6 | } 7 | SubShader 8 | { 9 | Pass 10 | { 11 | CGPROGRAM 12 | #pragma vertex vert 13 | #pragma fragment frag 14 | 15 | #include "UnityCG.cginc" 16 | 17 | Texture2D _MainTex; 18 | SamplerState sampler_linear_clamp; 19 | 20 | struct appdata 21 | { 22 | float4 vertex : POSITION; 23 | float2 uv : TEXCOORD0; 24 | }; 25 | 26 | struct v2f 27 | { 28 | float4 vertex : SV_POSITION; 29 | float2 uv : TEXCOORD0; 30 | }; 31 | 32 | v2f vert(appdata v) 33 | { 34 | v2f o; 35 | o.vertex = UnityObjectToClipPos(v.vertex); 36 | o.uv = v.uv; 37 | return o; 38 | } 39 | 40 | float4 frag(v2f i) : SV_Target 41 | { 42 | float4 col = _MainTex.Sample(sampler_linear_clamp, i.uv); 43 | col.rgb = 1; 44 | return col; 45 | } 46 | ENDCG 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Editor/Wraps/PackageImportWrap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using UnityEditor; 4 | 5 | namespace jp.lilxyzw.editortoolbox 6 | { 7 | internal class PackageImportWrap : WrapBase 8 | { 9 | public static readonly Type type = typeof(Editor).Assembly.GetType("UnityEditor.PackageImport"); 10 | private static readonly MethodInfo MI_HasOpenInstances = typeof(EditorWindow).GetMethod("HasOpenInstances", BindingFlags.Static | BindingFlags.Public); 11 | private static readonly MethodInfo MI_HasOpenInstancesPackageImport = MI_HasOpenInstances.MakeGenericMethod(type); 12 | private static readonly Delegate FI_m_ImportPackageItems = GetFieldIns(type, "m_ImportPackageItems", ImportPackageItemWrap.type.MakeArrayType()).g; 13 | private static readonly MethodInfo MI_ShowTreeGUI = type.GetMethod("ShowTreeGUI", BindingFlags.NonPublic | BindingFlags.Instance); 14 | 15 | public EditorWindow w; 16 | public PackageImportWrap(object instance) => w = instance as EditorWindow; 17 | public static bool HasOpenInstances() => (bool)MI_HasOpenInstancesPackageImport.Invoke(null,null); 18 | public object[] m_ImportPackageItems => FI_m_ImportPackageItems.DynamicInvoke(w) as object[]; 19 | public bool ShowTreeGUI(object[] items) => (bool)MI_ShowTreeGUI.Invoke(w, new object[]{items}); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Editor/DocsGenerator/DocsGeneratorMenu.IndexMts.cs: -------------------------------------------------------------------------------- 1 | using System.Globalization; 2 | using System.Linq; 3 | using System.Text; 4 | 5 | namespace jp.lilxyzw.editortoolbox 6 | { 7 | internal static partial class DocsGeneratorMenu 8 | { 9 | private static void BuildIndexMts(string[] langs) 10 | { 11 | var codes = langs.Select(l => l.Replace('-', '_')).ToArray(); 12 | var sb = new StringBuilder(); 13 | sb.AppendLine("import { defineConfig } from 'vitepress'"); 14 | sb.AppendLine("import { shared } from './shared'"); 15 | foreach(var code in codes) 16 | sb.AppendLine($"import {{ {code} }} from './{code}'"); 17 | sb.AppendLine(); 18 | sb.AppendLine("export default defineConfig({"); 19 | sb.AppendLine(" ...shared,"); 20 | sb.AppendLine(" locales: {"); 21 | foreach(var code in codes) 22 | { 23 | var name = new CultureInfo(code.Replace('_', '-')).NativeName; 24 | if(name.Contains('(')) name = name.Substring(0, name.IndexOf('(')-1); 25 | sb.AppendLine($" {code}: {{ label: '{name}', ...{code} }},"); 26 | } 27 | sb.AppendLine(" }"); 28 | sb.AppendLine("})"); 29 | 30 | WriteText($"docs/.vitepress/config/index.mts", sb.ToString()); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Editor/Utils/GraphicUtils.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace jp.lilxyzw.editortoolbox 4 | { 5 | internal static class GraphicUtils 6 | { 7 | internal static Texture ProcessTexture(Material material, Texture texture, int width, int height, bool forceLinear = false) 8 | { 9 | var currentRT = RenderTexture.active; 10 | var renderTexture = RenderTexture.GetTemporary(width, height, 0, RenderTextureFormat.Default, forceLinear ? RenderTextureReadWrite.Linear : RenderTextureReadWrite.Default); 11 | RenderTexture.active = renderTexture; 12 | Graphics.Blit(texture, renderTexture, material); 13 | var outTex = new Texture2D(width, height, TextureFormat.RGBA32, false, false); 14 | outTex.ReadPixels(new Rect(0, 0, width, height), 0, 0); 15 | outTex.Apply(); 16 | RenderTexture.active = currentRT; 17 | RenderTexture.ReleaseTemporary(renderTexture); 18 | return outTex; 19 | } 20 | 21 | internal static Texture ProcessTexture(Material material, Texture texture, bool forceLinear = false) => ProcessTexture(material, texture, texture.width, texture.height, forceLinear); 22 | internal static Texture ProcessTexture(string shaderName, Texture texture, bool forceLinear = false) => ProcessTexture(new Material(Shader.Find(shaderName)), texture, forceLinear); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Editor/Wraps/ProjectBrowserWrap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | using UnityEditor; 5 | 6 | namespace jp.lilxyzw.editortoolbox 7 | { 8 | internal class ProjectBrowserWrap : WrapBase 9 | { 10 | public static readonly Type type = typeof(Editor).Assembly.GetType("UnityEditor.ProjectBrowser"); 11 | private static readonly Func MI_GetAllProjectBrowsers = GetFunc(type, "GetAllProjectBrowsers"); 12 | 13 | private static Type T_List_ProjectBrowser = typeof(List<>).MakeGenericType(type); 14 | private static readonly PropertyInfo PI_Count = T_List_ProjectBrowser.GetProperty("Count"); 15 | private static readonly PropertyInfo PI_Item = T_List_ProjectBrowser.GetProperty("Item"); 16 | 17 | public EditorWindow w; 18 | public ProjectBrowserWrap(object instance) => w = instance as EditorWindow; 19 | 20 | public static List GetAllProjectBrowsers() 21 | { 22 | var list = MI_GetAllProjectBrowsers(); 23 | var count = (int)PI_Count.GetValue(list, null); 24 | 25 | var res = new List(); 26 | for(int i = 0; i < count; i++) 27 | { 28 | res.Add(new ProjectBrowserWrap(PI_Item.GetValue(list, new object[]{i}))); 29 | } 30 | return res; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Editor/Utils/MouseUtils.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using UnityEngine; 3 | 4 | namespace jp.lilxyzw.editortoolbox 5 | { 6 | internal static class MouseUtils 7 | { 8 | #if UNITY_EDITOR_WIN 9 | [DllImport ("user32.dll")] 10 | private static extern bool SetCursorPos(int X, int Y); 11 | 12 | [DllImport("user32.dll")] 13 | private static extern bool GetCursorPos(ref POINT pt); 14 | 15 | [DllImport("user32.dll")] 16 | private static extern int ShowCursor(bool show); 17 | 18 | [StructLayout(LayoutKind.Sequential)] 19 | private struct POINT 20 | { 21 | public int x; 22 | public int y; 23 | } 24 | 25 | internal static Vector2 SetPos(Vector2 pos) 26 | { 27 | SetCursorPos((int)pos.x, (int)pos.y); 28 | return pos; 29 | } 30 | 31 | internal static Vector2 GetPos() 32 | { 33 | var pt = new POINT(); 34 | GetCursorPos(ref pt); 35 | return new(pt.x, pt.y); 36 | } 37 | 38 | internal static void Hide(bool hide) => ShowCursor(!hide); 39 | #else 40 | internal static Vector2 SetPos(Vector2 pos) => Event.current.mousePosition; 41 | internal static Vector2 GetPos() => Event.current.mousePosition; 42 | internal static void Hide(bool hide){} 43 | #endif 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/EditorOnlyLabel.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace jp.lilxyzw.editortoolbox 5 | { 6 | [Tooltip("Shows the icon if the object is EditorOnly.")] 7 | internal class EditorOnlyLabel : IHierarchyExtensionComponent 8 | { 9 | public int Priority => -800; 10 | 11 | public void OnGUI(ref Rect currentRect, GameObject gameObject, int instanceID, Rect fullRect) 12 | { 13 | var rectEO = fullRect; 14 | rectEO.x = 36; 15 | rectEO.width = rectEO.height; 16 | 17 | EditorGUI.BeginChangeCheck(); 18 | var isEditorOnly = GUIHelper.DToggleMiniLabel("E", "jp.lilxyzw.editortoolbox.EditorOnlyLabel", instanceID.ToString(), rectEO, IsEditorOnly(gameObject.transform)); 19 | if(EditorGUI.EndChangeCheck()) 20 | { 21 | using var so = new SerializedObject(gameObject); 22 | using var m_TagString = so.FindProperty("m_TagString"); 23 | m_TagString.stringValue = isEditorOnly ? "EditorOnly" : "Untagged"; 24 | so.ApplyModifiedProperties(); 25 | } 26 | } 27 | 28 | private static bool IsEditorOnly(Transform obj) 29 | { 30 | if(obj.tag == "EditorOnly") return true; 31 | if(obj.transform.parent == null) return false; 32 | return IsEditorOnly(obj.transform.parent); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/AssetMarker.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace jp.lilxyzw.editortoolbox 6 | { 7 | [Tooltip("Mark any asset to make it easier to find.")] 8 | internal class AssetMarker : IProjectExtensionComponent 9 | { 10 | public int Priority => -1700; 11 | private Dictionary iconDic = new(); 12 | 13 | public void OnGUI(ref Rect currentRect, string guid, string path, string name, string extension, Rect fullRect) 14 | { 15 | if(AssetMarkerData.instance.TryGetColor(guid, out var color)) 16 | { 17 | var defaultIcon = AssetDatabase.GetCachedIcon(path); 18 | if(!iconDic.TryGetValue(defaultIcon, out var icon)) 19 | iconDic[defaultIcon] = icon = GraphicUtils.ProcessTexture("Hidden/_lil/IconMaker", defaultIcon); 20 | 21 | if(ProjectExtension.isIconGUI) 22 | { 23 | var rect = fullRect; 24 | var size = Mathf.Min(rect.width, rect.height); 25 | rect.width = size; 26 | rect.height = size; 27 | GUI.DrawTexture(rect, icon, ScaleMode.StretchToFill, true, 0f, color, 0f, 0f); 28 | } 29 | else 30 | { 31 | EditorGUI.DrawRect(fullRect, new Color(color.r, color.g, color.b, 0.25f)); 32 | } 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Editor/JsonObjectViewer.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace jp.lilxyzw.editortoolbox 5 | { 6 | [Docs( 7 | "A tool to view and edit any object in json format", 8 | "For developers. When editing an Object as a SerializedObject, if you need to check the property names or structure, you can display it as JSON to quickly check the contents. You can also edit JSON directly and reflect it in the Object." 9 | )] 10 | [DocsMenuLocation(Common.MENU_HEAD + "Json Object Viewer")] 11 | internal class JsonObjectViewer : EditorWindow 12 | { 13 | public Vector2 scrollPos; 14 | public Object target; 15 | public string json; 16 | 17 | [MenuItem(Common.MENU_HEAD + "Json Object Viewer")] 18 | static void Init() => GetWindow(typeof(JsonObjectViewer)).Show(); 19 | 20 | void OnGUI() 21 | { 22 | EditorGUI.BeginChangeCheck(); 23 | target = EditorGUILayout.ObjectField(target, typeof(Object), true); 24 | if(EditorGUI.EndChangeCheck()) json = target ? EditorJsonUtility.ToJson(target, true) : ""; 25 | if(!target) return; 26 | 27 | if(L10n.Button("Refresh")) json = EditorJsonUtility.ToJson(target, true); 28 | if(L10n.Button("Apply Modification")) ObjectUtils.FromJsonOverwrite(json, target); 29 | 30 | scrollPos = EditorGUILayout.BeginScrollView(scrollPos); 31 | json = EditorGUILayout.TextArea(json); 32 | EditorGUILayout.EndScrollView(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Editor/GUI/IconPopup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using UnityEditor.UIElements; 5 | using UnityEngine; 6 | using UnityEngine.UIElements; 7 | 8 | namespace jp.lilxyzw.editortoolbox 9 | { 10 | internal class IconPopup : VisualElement 11 | { 12 | private ToolbarButton root; 13 | private Image icon; 14 | public string value; 15 | public List choices; 16 | public Action valueChanged; 17 | public Action rightClicked; 18 | 19 | public IconPopup(Texture tex, List choices, string defaultValue) 20 | { 21 | root = new ToolbarButton(); 22 | icon = new Image{image = tex}; 23 | value = defaultValue; 24 | this.choices = choices; 25 | 26 | root.Add(icon); 27 | root.clicked += ShowMenu; 28 | root.RegisterCallback((e) => { 29 | if(e.button == 1) rightClicked?.Invoke(); 30 | }); 31 | Add(root); 32 | } 33 | 34 | private void ShowMenu() 35 | { 36 | var menu = new GenericDropdownMenu(); 37 | foreach(var choice in choices) menu.AddItem(choice, choice == value, () => { 38 | value = choice; 39 | valueChanged?.Invoke(choice); 40 | }); 41 | var rect = worldBound; 42 | rect.width = choices.Max(c => Common.GetTextWidth(c)) + 28; 43 | menu.DropDown(rect, this, anchored: true); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Uu]ser[Ss]ettings/ 12 | 13 | # MemoryCaptures can get excessive in size. 14 | # They also could contain extremely sensitive data 15 | /[Mm]emoryCaptures/ 16 | 17 | # Recordings can get excessive in size 18 | /[Rr]ecordings/ 19 | 20 | # Uncomment this line if you wish to ignore the asset store tools plugin 21 | # /[Aa]ssets/AssetStoreTools* 22 | 23 | # Autogenerated Jetbrains Rider plugin 24 | /[Aa]ssets/Plugins/Editor/JetBrains* 25 | 26 | # Visual Studio cache directory 27 | .vs/ 28 | 29 | # Gradle cache directory 30 | .gradle/ 31 | 32 | # Autogenerated VS/MD/Consulo solution and project files 33 | ExportedObj/ 34 | .consulo/ 35 | *.csproj 36 | *.unityproj 37 | *.sln 38 | *.suo 39 | *.tmp 40 | *.user 41 | *.userprefs 42 | *.pidb 43 | *.booproj 44 | *.svd 45 | *.pdb 46 | *.mdb 47 | *.opendb 48 | *.VC.db 49 | 50 | # Unity3D generated meta files 51 | *.pidb.meta 52 | *.pdb.meta 53 | *.mdb.meta 54 | 55 | # Unity3D generated file on crash reports 56 | sysinfo.txt 57 | 58 | # Builds 59 | *.apk 60 | *.aab 61 | *.unitypackage 62 | *.app 63 | 64 | # Crashlytics generated file 65 | crashlytics-build.properties 66 | 67 | # Packed Addressables 68 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 69 | 70 | # Temporary auto-generated Android Assets 71 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 72 | /[Aa]ssets/[Ss]treamingAssets/aa/* 73 | -------------------------------------------------------------------------------- /Editor/Wraps/ImportPackageItemWrap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEditor; 3 | 4 | namespace jp.lilxyzw.editortoolbox 5 | { 6 | internal class ImportPackageItemWrap : WrapBase 7 | { 8 | internal static readonly Type type = typeof(Editor).Assembly.GetType("UnityEditor.ImportPackageItem"); 9 | private static readonly (Delegate g, Delegate s) FI_existingAssetPath = GetFieldIns(type, "existingAssetPath", typeof(string)); 10 | private static readonly (Delegate g, Delegate s) FI_destinationAssetPath = GetFieldIns(type, "destinationAssetPath", typeof(string)); 11 | private static readonly (Delegate g, Delegate s) FI_isFolder = GetFieldIns(type, "isFolder", typeof(bool)); 12 | private static readonly (Delegate g, Delegate s) FI_assetChanged = GetFieldIns(type, "assetChanged", typeof(bool)); 13 | private static readonly (Delegate g, Delegate s) FI_guid = GetFieldIns(type, "guid", typeof(string)); 14 | 15 | public object instance; 16 | public ImportPackageItemWrap(object i) => instance = i; 17 | 18 | public string existingAssetPath => FI_existingAssetPath.g.DynamicInvoke(instance) as string; 19 | public bool isFolder => (bool)FI_isFolder.g.DynamicInvoke(instance); 20 | public string guid => FI_guid.g.DynamicInvoke(instance) as string; 21 | public string destinationAssetPath 22 | { 23 | get => FI_destinationAssetPath.g.DynamicInvoke(instance) as string; 24 | set => FI_destinationAssetPath.s.DynamicInvoke(instance, value); 25 | } 26 | public bool assetChanged 27 | { 28 | get => (bool)FI_assetChanged.g.DynamicInvoke(instance); 29 | set => FI_assetChanged.s.DynamicInvoke(instance, value); 30 | } 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Editor/Utils/ObjectUtils.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace jp.lilxyzw.editortoolbox 6 | { 7 | internal static class ObjectUtils 8 | { 9 | internal static void FromJsonOverwrite(string json, Object target) 10 | { 11 | var clone = Object.Instantiate(target); 12 | EditorJsonUtility.FromJsonOverwrite(json, clone); 13 | CopyProperties(clone, target); 14 | if (clone is Component c) Object.DestroyImmediate(c.gameObject); 15 | else Object.DestroyImmediate(clone); 16 | } 17 | 18 | internal static void CopyProperties(Object from, Object to, params string[] ignores) 19 | { 20 | using var so = new SerializedObject(to); 21 | using var soOrig = new SerializedObject(from); 22 | using var iter = soOrig.GetIterator(); 23 | iter.Next(true); 24 | CopyFromSerializedProperty(so, iter, ignores); 25 | while (iter.Next(false)) 26 | CopyFromSerializedProperty(so, iter, ignores); 27 | so.ApplyModifiedProperties(); 28 | } 29 | 30 | private static void CopyFromSerializedProperty(SerializedObject so, SerializedProperty prop, params string[] ignores) 31 | { 32 | if( 33 | prop.propertyPath == "m_ObjectHideFlags" || 34 | prop.propertyPath == "m_CorrespondingSourceObject" || 35 | prop.propertyPath == "m_PrefabInstance" || 36 | prop.propertyPath == "m_PrefabAsset" || 37 | prop.propertyPath == "m_GameObject" || 38 | prop.propertyPath == "m_EditorHideFlags" || 39 | ignores.Contains(prop.propertyPath) 40 | ) return; 41 | 42 | so.CopyFromSerializedProperty(prop); 43 | } 44 | } 45 | 46 | internal abstract class DirectElements{} 47 | } 48 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/ProjectToolbarExtension.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEditor; 3 | using UnityEngine.UIElements; 4 | 5 | namespace jp.lilxyzw.editortoolbox 6 | { 7 | internal class ProjectToolbarExtension 8 | { 9 | internal static void Add(VisualElement visualElement) => root.Add(visualElement); 10 | private static readonly VisualElement root = new(); 11 | private static readonly HashSet modifiedWindows = new(); 12 | 13 | private static void AddButton() 14 | { 15 | var windows = ProjectBrowserWrap.GetAllProjectBrowsers(); 16 | foreach(var window in windows) AddButton(window.w); 17 | EditorApplication.update -= AddButton; 18 | } 19 | 20 | private static void AddButton(EditorWindow window) 21 | { 22 | if(modifiedWindows.Add(window)) 23 | window.rootVisualElement.Add(root); 24 | } 25 | 26 | private static EditorWindow prevWindow; 27 | private static void AddButtonPerWindow() 28 | { 29 | if (!EditorWindow.focusedWindow || prevWindow == EditorWindow.focusedWindow || EditorWindow.focusedWindow.GetType().FullName != "UnityEditor.ProjectBrowser") return; 30 | prevWindow = EditorWindow.focusedWindow; 31 | AddButton(prevWindow); 32 | } 33 | 34 | [InitializeOnLoadMethod] 35 | private static void Init() 36 | { 37 | root.style.marginRight = 470; // 検索バーをクリックできるように 38 | root.style.marginLeft = 36; 39 | root.style.height = 20; 40 | root.style.flexDirection = FlexDirection.Row; 41 | EditorApplication.update -= AddButton; 42 | EditorApplication.update += AddButton; 43 | EditorApplication.update -= AddButtonPerWindow; 44 | EditorApplication.update += AddButtonPerWindow; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Editor/Shaders/CopyAlpha.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/_lil/CopyAlpha" 2 | { 3 | Properties 4 | { 5 | _TextureMain ("Texture", 2D) = "white" {} 6 | _TextureBack ("Texture", 2D) = "white" {} 7 | clipBottom ("clipBottom", Int) = 0 8 | clipTop ("clipTop", Int) = 0 9 | } 10 | SubShader 11 | { 12 | Pass 13 | { 14 | CGPROGRAM 15 | #pragma vertex vert 16 | #pragma fragment frag 17 | 18 | #include "UnityCG.cginc" 19 | 20 | struct appdata 21 | { 22 | float4 vertex : POSITION; 23 | float2 uv : TEXCOORD0; 24 | }; 25 | 26 | struct v2f 27 | { 28 | float2 uv : TEXCOORD0; 29 | float4 vertex : SV_POSITION; 30 | }; 31 | 32 | Texture2D _TextureMain; 33 | Texture2D _TextureBack; 34 | SamplerState sampler_linear_clamp; 35 | float4 _TextureMain_ST; 36 | int clipBottom; 37 | int clipTop; 38 | 39 | v2f vert(appdata v) 40 | { 41 | v2f o; 42 | o.vertex = UnityObjectToClipPos(v.vertex); 43 | o.uv = v.uv; 44 | return o; 45 | } 46 | 47 | float4 frag(v2f i) : SV_Target 48 | { 49 | float2 uv = i.uv * _TextureMain_ST.xy + _TextureMain_ST.zw; 50 | float4 main = _TextureMain.Sample(sampler_linear_clamp, uv); 51 | if(uv.x != saturate(uv.x) || uv.y != saturate(uv.y)) main.a = 0; 52 | if(clipBottom == 1) main.a *= _TextureBack.Sample(sampler_linear_clamp, float2(i.uv.x, min(0.5, i.uv.y))).a; 53 | if(clipTop == 1) main.a *= _TextureBack.Sample(sampler_linear_clamp, float2(i.uv.x, max(0.5, i.uv.y))).a; 54 | if(!IsGammaSpace()) main.rgb = LinearToGammaSpace(main.rgb); 55 | return main; 56 | } 57 | ENDCG 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Editor/Wraps/InspectorWindowWrap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | using UnityEditor; 5 | using Object = UnityEngine.Object; 6 | 7 | namespace jp.lilxyzw.editortoolbox 8 | { 9 | internal class InspectorWindowWrap : WrapBase 10 | { 11 | public static readonly Type type = typeof(Editor).Assembly.GetType("UnityEditor.InspectorWindow"); 12 | private static readonly Type T_PropertyEditor = typeof(Editor).Assembly.GetType("UnityEditor.PropertyEditor"); 13 | private static readonly MethodInfo MI_SetObjectsLocked = type.GetMethod("SetObjectsLocked", BindingFlags.NonPublic | BindingFlags.Instance); 14 | private static readonly MethodInfo MI_SetNormal = T_PropertyEditor.GetMethod("SetNormal", BindingFlags.NonPublic | BindingFlags.Instance); 15 | private static readonly MethodInfo MI_SetDebug = T_PropertyEditor.GetMethod("SetDebug", BindingFlags.NonPublic | BindingFlags.Instance); 16 | private static readonly MethodInfo MI_SetDebugInternal = T_PropertyEditor.GetMethod("SetDebugInternal", BindingFlags.NonPublic | BindingFlags.Instance); 17 | private static readonly MethodInfo MI_Update = T_PropertyEditor.GetMethod("Update", BindingFlags.NonPublic | BindingFlags.Instance); 18 | private static readonly MethodInfo MI_GetInspectedObjects = type.GetMethod("GetInspectedObjects", BindingFlags.NonPublic | BindingFlags.Instance); 19 | 20 | public EditorWindow w; 21 | public InspectorWindowWrap(object instance) => w = instance as EditorWindow; 22 | public void SetNormal() => MI_SetNormal.Invoke(w, null); 23 | public void SetDebug() => MI_SetDebug.Invoke(w, null); 24 | public void SetDebugInternal() => MI_SetDebugInternal.Invoke(w, null); 25 | public void SetObjectsLocked(List objs) => MI_SetObjectsLocked.Invoke(w, new object[]{objs}); 26 | public void Update() => MI_Update.Invoke(w, null); 27 | public Object[] GetInspectedObjects() => MI_GetInspectedObjects.Invoke(w, null) as Object[]; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Editor/Wraps/WrapBase.Field.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq.Expressions; 3 | using System.Reflection; 4 | 5 | namespace jp.lilxyzw.editortoolbox 6 | { 7 | internal abstract partial class WrapBase 8 | { 9 | protected static (Func g, Action s) GetField(Type type, string name) 10 | { 11 | var expR = Expression.Parameter(typeof(R)); 12 | var (get, set) = GetFieldBase(type, name, null, expR); 13 | var getL = Expression.Lambda>(get).Compile(); 14 | var setL = Expression.Lambda>(set, expR).Compile(); 15 | return (getL, setL); 16 | } 17 | 18 | protected static (Func g, Delegate s) GetField(Type type, string name, Type typeR) 19 | { 20 | var expR = Expression.Parameter(typeR); 21 | var (get, set) = GetFieldBase(type, name, null, expR); 22 | var getL = Expression.Lambda>(get).Compile(); 23 | var setL = Expression.Lambda(set, expR).Compile(); 24 | return (getL, setL); 25 | } 26 | 27 | protected static (Delegate g, Delegate s) GetFieldIns(Type type, string name, Type typeR) 28 | { 29 | var expT = Expression.Parameter(type); 30 | var expR = Expression.Parameter(typeR); 31 | var (get, set) = GetFieldBase(type, name, expT, expR); 32 | var getL = Expression.Lambda(get, expT).Compile(); 33 | var setL = Expression.Lambda(set, expT, expR).Compile(); 34 | return (getL, setL); 35 | } 36 | 37 | // Base 38 | private static (MemberExpression get, BinaryExpression set) GetFieldBase(Type type, string name, ParameterExpression expT, ParameterExpression expR) 39 | { 40 | var fi = type.GetField(name, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); 41 | var get = Expression.Field(expT, fi); 42 | var set = Expression.Assign(get, expR); 43 | return (get, set); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Editor/Wraps/WrapBase.Property.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq.Expressions; 3 | using System.Reflection; 4 | 5 | namespace jp.lilxyzw.editortoolbox 6 | { 7 | internal abstract partial class WrapBase 8 | { 9 | protected static (Func g, Action s) GetProperty(Type type, string name) 10 | { 11 | var expR = Expression.Parameter(typeof(R)); 12 | var (get, set) = GetPropertyBase(type, name, null, expR); 13 | var getL = Expression.Lambda>(get).Compile(); 14 | var setL = Expression.Lambda>(set, expR).Compile(); 15 | return (getL, setL); 16 | } 17 | 18 | protected static (Func g, Delegate s) GetProperty(Type type, string name, Type typeR) 19 | { 20 | var expR = Expression.Parameter(typeR); 21 | var (get, set) = GetPropertyBase(type, name, null, expR); 22 | var getL = Expression.Lambda>(get).Compile(); 23 | var setL = Expression.Lambda(set, expR).Compile(); 24 | return (getL, setL); 25 | } 26 | 27 | protected static (Delegate g, Delegate s) GetPropertyIns(Type type, string name, Type typeR) 28 | { 29 | var expT = Expression.Parameter(type); 30 | var expR = Expression.Parameter(typeR); 31 | var (get, set) = GetPropertyBase(type, name, expT, expR); 32 | var getL = Expression.Lambda(get, expT).Compile(); 33 | var setL = Expression.Lambda(set, expT, expR).Compile(); 34 | return (getL, setL); 35 | } 36 | 37 | // Base 38 | private static (MemberExpression get, BinaryExpression set) GetPropertyBase(Type type, string name, ParameterExpression expT, ParameterExpression expR) 39 | { 40 | var pi = type.GetProperty(name, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); 41 | var get = Expression.Property(expT, pi); 42 | var set = Expression.Assign(get, expR); 43 | return (get, set); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Editor/Common.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | namespace jp.lilxyzw.editortoolbox 7 | { 8 | internal static class Common 9 | { 10 | internal const string MENU_HEAD = "Tools/lilEditorToolbox/"; 11 | internal static readonly string PREFERENCE_FOLDER = $"{UnityEditorInternal.InternalEditorUtility.unityPreferencesFolder}/jp.lilxyzw"; 12 | 13 | internal static bool SkipScan(Object obj) 14 | { 15 | return obj is GameObject || 16 | // Skip - Component 17 | obj is Transform || 18 | // Skip - Asset 19 | obj is Mesh || 20 | obj is Texture || 21 | obj is Shader || 22 | obj is TextAsset || 23 | obj.GetType() == typeof(Object); 24 | } 25 | 26 | internal static string ToDisplayName(string name) 27 | => string.Concat(name.Select(c => char.IsUpper(c) ? $" {c}" : $"{c}")).TrimStart(); 28 | 29 | internal static float GetTextWidth(string text) => GetTextWidth(GetContent(text)); 30 | internal static float GetTextWidth(GUIContent content) => EditorStyles.label.CalcSize(content).x; 31 | 32 | private static Dictionary tempContents = new(); 33 | private static GUIContent GetContent(string text) 34 | { 35 | if(tempContents.TryGetValue(text, out var content)) return content; 36 | return tempContents[text] = new GUIContent(text); 37 | } 38 | } 39 | 40 | internal class ToggleLeftAttribute : PropertyAttribute { } 41 | 42 | [CustomPropertyDrawer(typeof(ToggleLeftAttribute))] 43 | internal class ToggleLeftDrawer : PropertyDrawer 44 | { 45 | public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) 46 | { 47 | EditorGUI.BeginChangeCheck(); 48 | var boolValue = EditorGUI.ToggleLeft(position, label, property.boolValue); 49 | if(EditorGUI.EndChangeCheck()) property.boolValue = boolValue; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/HierarchyLine.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace jp.lilxyzw.editortoolbox 5 | { 6 | [Tooltip("Displays lines representing the parent-child relationships of objects in the Hierarchy.")] 7 | internal class HierarchyLine : IHierarchyExtensionComponent 8 | { 9 | public int Priority => -900; 10 | 11 | public void OnGUI(ref Rect currentRect, GameObject gameObject, int instanceID, Rect fullRect) 12 | { 13 | if(gameObject.transform.parent) 14 | { 15 | var transform = gameObject.transform; 16 | 17 | // 横線 18 | var rectHorizLine = fullRect; 19 | rectHorizLine.height = 1; 20 | rectHorizLine.x -= fullRect.height * 0.5f; 21 | rectHorizLine.x -= fullRect.height - 2; 22 | rectHorizLine.width = transform.childCount > 0 ? fullRect.height * 0.5f : fullRect.height * 1.2f; 23 | rectHorizLine.y += fullRect.height * 0.5f; 24 | EditorGUI.DrawRect(rectHorizLine, EditorToolboxSettings.instance.lineColor); 25 | 26 | // 縦線 27 | var rectLine = fullRect; 28 | rectLine.width = 1; 29 | rectLine.x -= fullRect.height * 0.5f; 30 | 31 | rectLine.x -= fullRect.height - 2; 32 | rectLine.height = IsLastChild(transform) ? fullRect.height * 0.5f : fullRect.height; 33 | EditorGUI.DrawRect(rectLine, EditorToolboxSettings.instance.lineColor); 34 | transform = transform.parent; 35 | rectLine.height = fullRect.height; 36 | 37 | while(transform) 38 | { 39 | rectLine.x -= fullRect.height - 2; 40 | if(transform.parent && !IsLastChild(transform)) EditorGUI.DrawRect(rectLine, EditorToolboxSettings.instance.lineColor); 41 | transform = transform.parent; 42 | } 43 | } 44 | } 45 | 46 | private static bool IsLastChild(Transform t) => t.parent && t.GetSiblingIndex() == t.parent.childCount-1; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Editor/Shaders/AttributeViewer-geometory.hlsl: -------------------------------------------------------------------------------- 1 | struct appdata 2 | { 3 | float4 positionOS : POSITION; 4 | float3 normalOS : NORMAL; 5 | float4 tangentOS : TANGENT; 6 | UNITY_VERTEX_INPUT_INSTANCE_ID 7 | }; 8 | 9 | struct v2g 10 | { 11 | float4 rootCS : TEXCOORD0; 12 | float4 endCS : TEXCOORD1; 13 | float4 orthCS : TEXCOORD2; 14 | UNITY_VERTEX_OUTPUT_STEREO 15 | }; 16 | 17 | struct g2f 18 | { 19 | float4 vertex : SV_POSITION; 20 | UNITY_VERTEX_OUTPUT_STEREO 21 | }; 22 | 23 | uint _AVOutputMode; 24 | 25 | v2g vert(appdata v) 26 | { 27 | v2g o; 28 | UNITY_SETUP_INSTANCE_ID(v); 29 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 30 | 31 | const float length = 0.02; 32 | o.rootCS = UnityObjectToClipPos(v.positionOS); 33 | 34 | if(_AVOutputMode == 27) o.endCS = o.rootCS + mul(UNITY_MATRIX_VP, float4(UnityObjectToWorldDir(v.tangentOS.xyz) * length, 0)); 35 | else o.endCS = o.rootCS + mul(UNITY_MATRIX_VP, float4(UnityObjectToWorldNormal(v.normalOS) * length, 0)); 36 | 37 | float2 n = normalize(o.endCS.xy / o.endCS.w - o.rootCS.xy / o.rootCS.w); 38 | o.orthCS = float4( 39 | -n.y / _ScreenParams.x, 40 | n.x / _ScreenParams.y, 41 | 0, 42 | 0 43 | ); 44 | 45 | return o; 46 | } 47 | 48 | [maxvertexcount(12)] 49 | void geom(triangle v2g input[3], inout TriangleStream outStream) 50 | { 51 | if(_AVOutputMode != 24 && _AVOutputMode != 27) return; 52 | g2f o; 53 | UNITY_TRANSFER_INSTANCE_ID(input[0], o); 54 | 55 | [unroll] 56 | for(int i = 0; i < 3; i++) 57 | { 58 | o.vertex = input[i].rootCS - input[i].orthCS * input[i].rootCS.w; 59 | outStream.Append(o); 60 | o.vertex = input[i].endCS - input[i].orthCS * input[i].endCS.w; 61 | outStream.Append(o); 62 | o.vertex = input[i].rootCS + input[i].orthCS * input[i].rootCS.w; 63 | outStream.Append(o); 64 | o.vertex = input[i].endCS + input[i].orthCS * input[i].endCS.w; 65 | outStream.Append(o); 66 | outStream.RestartStrip(); 67 | } 68 | } 69 | 70 | float4 frag() : SV_Target 71 | { 72 | return float4(0.05,0.15,0.7,1); 73 | } -------------------------------------------------------------------------------- /Editor/Shaders/KeywordInitializer.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/_lil/KeywordInitializer" 2 | { 3 | SubShader 4 | { 5 | CGINCLUDE 6 | #pragma require geometry 7 | #pragma require tessellation tessHW 8 | #pragma vertex vert 9 | #pragma hull hull 10 | #pragma domain domain 11 | #pragma geometry geom 12 | #pragma fragment frag 13 | #pragma multi_compile_instancing 14 | 15 | struct str 16 | { 17 | float a : TEXCOORD0; 18 | }; 19 | 20 | struct factors { 21 | float edge[3] : SV_TessFactor; 22 | float inside : SV_InsideTessFactor; 23 | }; 24 | 25 | factors hullConst(){ return (factors)0; } 26 | 27 | void vert(){} 28 | 29 | void frag(){} 30 | 31 | [domain("tri")] 32 | [partitioning("integer")] 33 | [outputtopology("triangle_cw")] 34 | [patchconstantfunc("hullConst")] 35 | [outputcontrolpoints(3)] 36 | void hull(InputPatch input){} 37 | 38 | [domain("tri")] 39 | void domain(factors hsConst){} 40 | 41 | [maxvertexcount(3)] 42 | void geom(triangle str input[3], inout TriangleStream outStream){} 43 | ENDCG 44 | 45 | Pass 46 | { 47 | Tags {"LightMode" = "ForwardBase"} 48 | CGPROGRAM 49 | #pragma multi_compile_fog 50 | #pragma multi_compile_fwdbase 51 | ENDCG 52 | } 53 | 54 | Pass 55 | { 56 | Tags {"LightMode" = "ForwardAdd"} 57 | CGPROGRAM 58 | #pragma multi_compile_fog 59 | #pragma multi_compile_fwdadd_fullshadows 60 | ENDCG 61 | } 62 | 63 | Pass 64 | { 65 | Name "SHADOW_CASTER" 66 | Tags {"LightMode" = "ShadowCaster"} 67 | CGPROGRAM 68 | #pragma multi_compile_shadowcaster 69 | ENDCG 70 | } 71 | 72 | Pass 73 | { 74 | Tags {"LightMode" = "Meta"} 75 | CGPROGRAM 76 | #pragma shader_feature EDITOR_VISUALIZATION 77 | ENDCG 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /Editor/PlayModeSaver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | namespace jp.lilxyzw.editortoolbox 7 | { 8 | [Docs( 9 | "Save changes in PlayMode", 10 | "Values changed in PlayMode can be maintained even after exiting PlayMode. Click the hamburger menu in the upper right corner of each component and select `Save changes in PlayMode` to save the changes to that component." 11 | )] 12 | public static class PlayModeSaver 13 | { 14 | private static Dictionary changes = new(); 15 | 16 | [InitializeOnLoadMethod] 17 | private static void Init() 18 | { 19 | EditorApplication.playModeStateChanged -= Apply; 20 | EditorApplication.playModeStateChanged += Apply; 21 | } 22 | 23 | [MenuItem("CONTEXT/Object/Save changes in PlayMode")] 24 | private static void SaveAfterPlayMode(MenuCommand command) 25 | { 26 | var json = EditorJsonUtility.ToJson(command.context); 27 | var id = command.context.GetInstanceID(); 28 | changes[id] = (json, command.context is Component co ? co.gameObject.GetInstanceID() : null, command.context.GetType()); 29 | } 30 | 31 | [MenuItem("CONTEXT/Object/Save changes in PlayMode", true)] 32 | private static bool SaveAfterPlayMode() => EditorApplication.isPlaying || EditorApplication.isPaused; 33 | 34 | private static void Apply(PlayModeStateChange state) 35 | { 36 | if(state != PlayModeStateChange.EnteredEditMode || changes.Count == 0) return; 37 | foreach(var kv in changes) 38 | { 39 | var obj = EditorUtility.InstanceIDToObject(kv.Key); 40 | 41 | // PlayModeで追加されたコンポーネントの場合は追加処理 42 | if(!obj && kv.Value.instanceID != null && EditorUtility.InstanceIDToObject((int)kv.Value.instanceID) is GameObject go && go) 43 | { 44 | obj = Undo.AddComponent(go, kv.Value.type); 45 | } 46 | 47 | if(obj) ObjectUtils.FromJsonOverwrite(kv.Value.json, obj); 48 | } 49 | changes.Clear(); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/ProjectLine.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace jp.lilxyzw.editortoolbox 6 | { 7 | [Tooltip("Displays lines that represent the hierarchy of files.")] 8 | internal class ProjectLine : IProjectExtensionComponent 9 | { 10 | public int Priority => -1700; 11 | private static Rect lastRect = new(); 12 | 13 | public void OnGUI(ref Rect currentRect, string guid, string path, string name, string extension, Rect fullRect) 14 | { 15 | if(ProjectExtension.isIconGUI) return; 16 | if(lastRect.y > fullRect.y) lastRect = new(); 17 | if(lastRect.x > 16) 18 | { 19 | //var transform = gameObject.transform; 20 | var isFolder = Directory.Exists(path) && Directory.GetFiles(path).Length > 0; 21 | 22 | // 横線 23 | var rectHorizLine = lastRect; 24 | rectHorizLine.height = 1; 25 | rectHorizLine.x -= lastRect.height * 0.5f; 26 | rectHorizLine.x -= lastRect.height - 2; 27 | rectHorizLine.width = isFolder ? lastRect.height * 1.0f : lastRect.height * 1.2f; 28 | rectHorizLine.y += lastRect.height * 0.5f; 29 | EditorGUI.DrawRect(rectHorizLine, EditorToolboxSettings.instance.lineColor); 30 | 31 | // 縦線 32 | var rectLine = lastRect; 33 | rectLine.width = 1; 34 | rectLine.x -= lastRect.height * 0.5f; 35 | 36 | rectLine.x -= lastRect.height - 2; 37 | rectLine.height = IsLastChild(fullRect) ? lastRect.height * 0.5f : lastRect.height; 38 | EditorGUI.DrawRect(rectLine, EditorToolboxSettings.instance.lineColor); 39 | rectLine.height = lastRect.height; 40 | 41 | while(rectLine.x > 16) 42 | { 43 | rectLine.x -= lastRect.height - 2; 44 | EditorGUI.DrawRect(rectLine, EditorToolboxSettings.instance.lineColor); 45 | } 46 | } 47 | lastRect = fullRect; 48 | } 49 | 50 | private static bool IsLastChild(Rect fullRect) => lastRect.x > fullRect.x; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Editor/Utils/SubAssetCleaner.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | namespace jp.lilxyzw.editortoolbox 7 | { 8 | internal static class SubAssetCleaner 9 | { 10 | internal static HashSet RemoveUnusedSubAssets(IEnumerable objs) 11 | { 12 | var cleanedAssets = new HashSet(); 13 | foreach(var obj in objs) 14 | { 15 | if(RemoveUnusedSubAssets(obj, false)) cleanedAssets.Add(obj); 16 | } 17 | if(cleanedAssets.Count > 0) AssetDatabase.SaveAssets(); 18 | return cleanedAssets; 19 | } 20 | 21 | internal static bool RemoveUnusedSubAssets(Object obj, bool shouldSave = true) 22 | { 23 | bool isCleaned = false; 24 | var path = AssetDatabase.GetAssetPath(obj); 25 | while(true) 26 | { 27 | var assets = AssetDatabase.LoadAllAssetsAtPath(path).Where(asset => asset); 28 | var usedAssetsTemp = new HashSet(); 29 | foreach(var asset in assets) 30 | { 31 | var so = new SerializedObject(asset); 32 | var prop = so.GetIterator(); 33 | while(prop.Next(true)) 34 | { 35 | if(prop.propertyType == SerializedPropertyType.ObjectReference && prop.objectReferenceValue) 36 | { 37 | usedAssetsTemp.Add(prop.objectReferenceValue); 38 | } 39 | } 40 | } 41 | bool shouldContinue = false; 42 | foreach(var asset in assets.Where(asset => !usedAssetsTemp.Contains(asset))) 43 | { 44 | Debug.Log($"[lilEditorToolbox] Remove from {obj.name}: {asset.name}"); 45 | AssetDatabase.RemoveObjectFromAsset(asset); 46 | shouldContinue = true; 47 | } 48 | if(!shouldContinue) break; 49 | isCleaned = true; 50 | } 51 | if(shouldSave) AssetDatabase.SaveAssets(); 52 | return isCleaned; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/ChildrenDrawer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | namespace jp.lilxyzw.editortoolbox 7 | { 8 | [Tooltip("Displays the child components of an object.")] 9 | internal class ChildrenDrawer : IHierarchyExtensionComponent 10 | { 11 | private const int ICON_SIZE_CHILD = 8; 12 | private static readonly Dictionary iconsMap = new(); 13 | 14 | public int Priority => 1200; 15 | 16 | [InitializeOnLoadMethod] private static void Initialize() => 17 | ObjectChangeEvents.changesPublished += (ref ObjectChangeEventStream stream) => iconsMap.Clear(); 18 | 19 | public void OnGUI(ref Rect currentRect, GameObject gameObject, int instanceID, Rect fullRect) 20 | { 21 | if(!iconsMap.TryGetValue(gameObject, out var icons)) 22 | { 23 | var components = gameObject.GetComponentsInChildren(true); 24 | icons.Item1 = components 25 | .Where(c => c && c is not Transform && c.gameObject != gameObject) 26 | .GroupBy(c => c.GetType()) 27 | .OrderBy(c => c.Key.FullName) 28 | .Select(c => AssetPreview.GetMiniThumbnail(c.First())) 29 | .Distinct().ToArray(); 30 | icons.Item2 = components.Any(c => !c); 31 | iconsMap[gameObject] = icons; 32 | } 33 | 34 | if(icons.Item1.Length > 0) 35 | { 36 | currentRect.x -= ICON_SIZE_CHILD * icons.Item1.Length; 37 | currentRect.width = ICON_SIZE_CHILD; 38 | var xmin = currentRect.x; 39 | 40 | foreach(var icon in icons.Item1) 41 | { 42 | GUI.Box(currentRect, icon, GUIStyle.none); 43 | currentRect.x += ICON_SIZE_CHILD; 44 | } 45 | 46 | currentRect.x = xmin; 47 | } 48 | 49 | if(icons.Item2) 50 | { 51 | currentRect.x -= ICON_SIZE_CHILD; 52 | currentRect.width = ICON_SIZE_CHILD; 53 | GUI.Box(currentRect, HierarchyExtension.MissingScriptIcon(), GUIStyle.none); 54 | } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Editor/Inspector/LocalizedComponentEditor.cs: -------------------------------------------------------------------------------- 1 | using jp.lilxyzw.editortoolbox.runtime; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace jp.lilxyzw.editortoolbox 6 | { 7 | [CustomEditor(typeof(EditorOnlyBehaviour), true)] [CanEditMultipleObjects] 8 | internal class LocalizedComponentEditor : Editor 9 | { 10 | public override void OnInspectorGUI() 11 | { 12 | serializedObject.UpdateIfRequiredOrScript(); 13 | var iter = serializedObject.GetIterator(); 14 | iter.NextVisible(true); 15 | while(iter.NextVisible(false)) L10n.PropertyField(iter); 16 | serializedObject.ApplyModifiedProperties(); 17 | } 18 | } 19 | 20 | [CustomPropertyDrawer(typeof(DirectElements), true)] 21 | internal class DirectElementsDrawer : PropertyDrawer 22 | { 23 | public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) 24 | { 25 | using var end = property.GetEndProperty(); 26 | property.NextVisible(true); 27 | bool isObjectArray = property.isArray && property.arrayElementType.StartsWith("PPtr"); 28 | 29 | position.height = EditorGUI.GetPropertyHeight(property); 30 | L10n.PropertyField(position, property); 31 | position.yMin = position.yMax + EditorGUIUtility.standardVerticalSpacing; 32 | 33 | while(property.NextVisible(false) && !SerializedProperty.EqualContents(property, end)) 34 | { 35 | position.height = EditorGUI.GetPropertyHeight(property); 36 | L10n.PropertyField(position, property); 37 | position.yMin = position.yMax + EditorGUIUtility.standardVerticalSpacing; 38 | } 39 | } 40 | 41 | public override float GetPropertyHeight(SerializedProperty property, GUIContent label) 42 | { 43 | using var end = property.GetEndProperty(); 44 | using var iterator = property.Copy(); 45 | iterator.NextVisible(true); 46 | float height = EditorGUI.GetPropertyHeight(iterator); 47 | while(iterator.NextVisible(false) && !SerializedProperty.EqualContents(iterator, end)) 48 | { 49 | height += EditorGUI.GetPropertyHeight(iterator) + EditorGUIUtility.standardVerticalSpacing; 50 | } 51 | return height; 52 | } 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /Editor/Shaders/StencilChecker.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/_lil/StencilChecker" 2 | { 3 | HLSLINCLUDE 4 | #pragma vertex vert 5 | #pragma fragment frag 6 | #include "UnityCG.cginc" 7 | struct appdata 8 | { 9 | float4 vertex : POSITION; 10 | UNITY_VERTEX_INPUT_INSTANCE_ID 11 | }; 12 | 13 | struct v2f 14 | { 15 | float4 vertex : SV_POSITION; 16 | UNITY_VERTEX_OUTPUT_STEREO 17 | }; 18 | 19 | v2f vert(appdata v) 20 | { 21 | v2f o; 22 | UNITY_SETUP_INSTANCE_ID(v); 23 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 24 | o.vertex = float4(v.vertex.xy * float2(-2,2), 1, 1); 25 | return o; 26 | } 27 | 28 | #define FRAG(r,g,b) float4 frag() : SV_Target { return float4( GammaToLinearSpace(float3(r,g,b)/7.0), 1 ); } 29 | ENDHLSL 30 | 31 | SubShader 32 | { 33 | Tags { "RenderType"="Overlay" "Queue"="Overlay" "IgnoreProjector"="True" "VRCFallback"="Hidden" } 34 | Cull Off 35 | ZWrite Off 36 | Blend Zero Zero, Zero One 37 | Pass{ HLSLPROGRAM FRAG(0,0,0) ENDHLSL } 38 | 39 | Stencil { Comp Equal } 40 | Blend One One, Zero One 41 | 42 | Stencil { ReadMask 7 } 43 | Pass{ Stencil{ Ref 1 } HLSLPROGRAM FRAG(0,0,1) ENDHLSL } 44 | Pass{ Stencil{ Ref 2 } HLSLPROGRAM FRAG(0,0,2) ENDHLSL } 45 | Pass{ Stencil{ Ref 3 } HLSLPROGRAM FRAG(0,0,3) ENDHLSL } 46 | Pass{ Stencil{ Ref 4 } HLSLPROGRAM FRAG(0,0,4) ENDHLSL } 47 | Pass{ Stencil{ Ref 5 } HLSLPROGRAM FRAG(0,0,5) ENDHLSL } 48 | Pass{ Stencil{ Ref 6 } HLSLPROGRAM FRAG(0,0,6) ENDHLSL } 49 | Pass{ Stencil{ Ref 7 } HLSLPROGRAM FRAG(0,0,7) ENDHLSL } 50 | 51 | Stencil { ReadMask 56 } 52 | Pass{ Stencil{ Ref 8 } HLSLPROGRAM FRAG(0,1,0) ENDHLSL } 53 | Pass{ Stencil{ Ref 16 } HLSLPROGRAM FRAG(0,2,0) ENDHLSL } 54 | Pass{ Stencil{ Ref 24 } HLSLPROGRAM FRAG(0,3,0) ENDHLSL } 55 | Pass{ Stencil{ Ref 32 } HLSLPROGRAM FRAG(0,4,0) ENDHLSL } 56 | Pass{ Stencil{ Ref 40 } HLSLPROGRAM FRAG(0,5,0) ENDHLSL } 57 | Pass{ Stencil{ Ref 48 } HLSLPROGRAM FRAG(0,6,0) ENDHLSL } 58 | Pass{ Stencil{ Ref 56 } HLSLPROGRAM FRAG(0,7,0) ENDHLSL } 59 | 60 | Stencil { ReadMask 192 } 61 | Pass{ Stencil{ Ref 64 } HLSLPROGRAM FRAG(1,0,0) ENDHLSL } 62 | Pass{ Stencil{ Ref 128 } HLSLPROGRAM FRAG(2,0,0) ENDHLSL } 63 | Pass{ Stencil{ Ref 192 } HLSLPROGRAM FRAG(3,0,0) ENDHLSL } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/LayerAndTag.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace jp.lilxyzw.editortoolbox 5 | { 6 | [Tooltip("Displays the layer and tag of an object.")] 7 | internal class LayerAndTag : IHierarchyExtensionComponent 8 | { 9 | private static GUIStyle m_styleMiniText; 10 | private static GUIStyle StyleMiniText => m_styleMiniText != null ? m_styleMiniText : m_styleMiniText = new GUIStyle(EditorStyles.label){fontSize = (int)(EditorStyles.label.fontSize*0.75f)}; 11 | private static GUIStyle m_styleSemiMiniText; 12 | private static GUIStyle StyleSemiMiniText => m_styleSemiMiniText != null ? m_styleSemiMiniText : m_styleSemiMiniText = new GUIStyle(EditorStyles.label){fontSize = (int)(EditorStyles.label.fontSize*0.85f)}; 13 | 14 | public int Priority => 200; 15 | 16 | public void OnGUI(ref Rect currentRect, GameObject gameObject, int instanceID, Rect fullRect) 17 | { 18 | var layer = new GUIContent(LayerMask.LayerToName(gameObject.layer)); 19 | var tag = new GUIContent(gameObject.tag); 20 | if (EditorToolboxSettings.instance.hierarchyLayerAndTagSideBySide) 21 | { 22 | var width = 128f; 23 | currentRect.x -= width; 24 | currentRect.width = width; 25 | var rectMini = currentRect; 26 | rectMini.width = currentRect.width * 0.5f; 27 | 28 | GUI.enabled = gameObject.layer != 0; 29 | GUI.Label(rectMini, layer, StyleSemiMiniText); 30 | rectMini.x += rectMini.width; 31 | 32 | GUI.enabled = gameObject.tag != "Untagged"; 33 | GUI.Label(rectMini, tag, StyleSemiMiniText); 34 | GUI.enabled = true; 35 | } 36 | else 37 | { 38 | var width = 64f; 39 | //var width = EditorStyles.miniLabel.CalcSize(layer).x; 40 | currentRect.x -= width; 41 | currentRect.width = width; 42 | var rectMini = currentRect; 43 | rectMini.height = currentRect.height*0.6f; 44 | 45 | GUI.enabled = gameObject.layer != 0; 46 | GUI.Label(rectMini, layer, StyleMiniText); 47 | rectMini.y += currentRect.height*0.5f; 48 | 49 | GUI.enabled = gameObject.tag != "Untagged"; 50 | GUI.Label(rectMini, tag, StyleMiniText); 51 | GUI.enabled = true; 52 | 53 | currentRect.x -= 8; 54 | } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Editor/ProjectExtension/Components/OverlayFileInFolder.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.IO; 3 | using System.Linq; 4 | using UnityEditor; 5 | using UnityEngine; 6 | 7 | namespace jp.lilxyzw.editortoolbox 8 | { 9 | [Tooltip("Overlays the folder icon with the files inside.")] 10 | internal class OverlayFileInFolder : IProjectExtensionComponent 11 | { 12 | public int Priority => -1550; 13 | private static Dictionary icons = new(); 14 | private static Material material; 15 | 16 | private static Texture MakeIcon(Texture tex) 17 | { 18 | if(!material) 19 | { 20 | material = new Material(Shader.Find("Hidden/_lil/OutlineMaker")); 21 | material.SetColor("_OutlineColor", EditorGUIUtility.isProSkin ? new Color(0.2f,0.2f,0.2f) : new Color(0.75f,0.75f,0.75f)); 22 | material.SetFloat("_OutlineWidth", 4); 23 | } 24 | return GraphicUtils.ProcessTexture(material, tex); 25 | } 26 | 27 | public void OnGUI(ref Rect currentRect, string guid, string path, string name, string extension, Rect fullRect) 28 | { 29 | if(!Directory.Exists(path)) return; 30 | if(!icons.TryGetValue(path, out var icon)) 31 | { 32 | icons[path] = null; 33 | var files = Directory.GetFiles(path); 34 | if(files.Length == 0) return; 35 | 36 | var groups = files.GroupBy(f => Path.GetExtension(f)).Where(g => !string.IsNullOrEmpty(g.Key) && g.Key != ".meta").OrderByDescending(g => g.Count()); 37 | if(groups.Count() == 0) return; 38 | var assetPath = groups.First().First(); 39 | icon = AssetDatabase.GetCachedIcon(assetPath); 40 | if(icon) icon = MakeIcon(MakeIcon(icon)); 41 | icons[path] = icon; 42 | } 43 | 44 | if(!icon) return; 45 | var rect = fullRect; 46 | var size = Mathf.Min(rect.width, rect.height); 47 | rect.width = size; 48 | rect.height = size; 49 | if(ProjectExtension.isIconGUI) 50 | { 51 | rect.xMin += size * 0.5f; 52 | rect.yMin += size * 0.5f; 53 | rect.x -= size * 0.05f; 54 | rect.y -= size * 0.1f; 55 | } 56 | else 57 | { 58 | rect.xMin += size * 0.25f; 59 | rect.yMin += size * 0.25f; 60 | rect.x += 2; 61 | } 62 | 63 | GUI.DrawTexture(rect, icon); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Editor/Shaders/StencilChecker.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &3690080317821455742 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 5346827762015376178} 12 | - component: {fileID: 5428240229445897427} 13 | - component: {fileID: 5801696468216531731} 14 | m_Layer: 0 15 | m_Name: StencilChecker 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!4 &5346827762015376178 22 | Transform: 23 | m_ObjectHideFlags: 0 24 | m_CorrespondingSourceObject: {fileID: 0} 25 | m_PrefabInstance: {fileID: 0} 26 | m_PrefabAsset: {fileID: 0} 27 | m_GameObject: {fileID: 3690080317821455742} 28 | serializedVersion: 2 29 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 30 | m_LocalPosition: {x: 0, y: 0, z: 0} 31 | m_LocalScale: {x: 1, y: 1, z: 1} 32 | m_ConstrainProportionsScale: 0 33 | m_Children: [] 34 | m_Father: {fileID: 0} 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 36 | --- !u!33 &5428240229445897427 37 | MeshFilter: 38 | m_ObjectHideFlags: 0 39 | m_CorrespondingSourceObject: {fileID: 0} 40 | m_PrefabInstance: {fileID: 0} 41 | m_PrefabAsset: {fileID: 0} 42 | m_GameObject: {fileID: 3690080317821455742} 43 | m_Mesh: {fileID: 4300000, guid: 3ea9f96c2df18f345be26e4eaed41a93, type: 2} 44 | --- !u!23 &5801696468216531731 45 | MeshRenderer: 46 | m_ObjectHideFlags: 0 47 | m_CorrespondingSourceObject: {fileID: 0} 48 | m_PrefabInstance: {fileID: 0} 49 | m_PrefabAsset: {fileID: 0} 50 | m_GameObject: {fileID: 3690080317821455742} 51 | m_Enabled: 1 52 | m_CastShadows: 0 53 | m_ReceiveShadows: 0 54 | m_DynamicOccludee: 0 55 | m_StaticShadowCaster: 0 56 | m_MotionVectors: 0 57 | m_LightProbeUsage: 0 58 | m_ReflectionProbeUsage: 0 59 | m_RayTracingMode: 2 60 | m_RayTraceProcedural: 0 61 | m_RenderingLayerMask: 1 62 | m_RendererPriority: 0 63 | m_Materials: 64 | - {fileID: 2100000, guid: 0434717cc94776441854e09df57feea3, type: 2} 65 | m_StaticBatchInfo: 66 | firstSubMesh: 0 67 | subMeshCount: 0 68 | m_StaticBatchRoot: {fileID: 0} 69 | m_ProbeAnchor: {fileID: 0} 70 | m_LightProbeVolumeOverride: {fileID: 0} 71 | m_ScaleInLightmap: 1 72 | m_ReceiveGI: 1 73 | m_PreserveUVs: 0 74 | m_IgnoreNormalsForChartDetection: 0 75 | m_ImportantGI: 0 76 | m_StitchLightmapSeams: 1 77 | m_SelectedEditorRenderState: 3 78 | m_MinimumChartSize: 4 79 | m_AutoUVMaxDistance: 0.5 80 | m_AutoUVMaxAngle: 89 81 | m_LightmapParameters: {fileID: 0} 82 | m_SortingLayerID: 0 83 | m_SortingLayer: 0 84 | m_SortingOrder: 0 85 | m_AdditionalVertexStreams: {fileID: 0} 86 | -------------------------------------------------------------------------------- /Editor/AnimatorControllerEditorPatch/StateNodePatch.cs: -------------------------------------------------------------------------------- 1 | #if LIL_HARMONY 2 | using HarmonyLib; 3 | using System; 4 | using System.Reflection; 5 | using UnityEngine; 6 | using static jp.lilxyzw.editortoolbox.AnimatorControllerEditorPatch; 7 | 8 | namespace jp.lilxyzw.editortoolbox 9 | { 10 | [HarmonyPatch] 11 | internal class StateNodePatch 12 | { 13 | private static MethodInfo T_MakeTransitionCallback = T_StateNode.GetMethod("MakeTransitionCallback", BindingFlags.Instance | BindingFlags.NonPublic); 14 | 15 | [HarmonyTargetMethod] 16 | private static MethodBase TargetMethod() => AccessTools.Method(T_StateNode, "NodeUI"); 17 | 18 | [HarmonyPrefix] 19 | private static void Prefix(object __instance) => DoubleClickDetector.Invoke(T_MakeTransitionCallback, __instance, EditorToolboxSettings.instance.makeTransitionWithDoubleClick); 20 | } 21 | 22 | [HarmonyPatch] 23 | internal class AnyStateNodePatch 24 | { 25 | private static MethodInfo T_MakeTransitionCallback = T_AnyStateNode.GetMethod("MakeTransitionCallback", BindingFlags.Instance | BindingFlags.NonPublic); 26 | 27 | [HarmonyTargetMethod] 28 | private static MethodBase TargetMethod() => AccessTools.Method(T_AnyStateNode, "NodeUI"); 29 | 30 | [HarmonyPrefix] 31 | private static void Prefix(object __instance) => DoubleClickDetector.Invoke(T_MakeTransitionCallback, __instance, EditorToolboxSettings.instance.makeTransitionWithDoubleClick); 32 | } 33 | 34 | [HarmonyPatch] 35 | internal class EntryNodePatch 36 | { 37 | private static MethodInfo T_MakeTransitionCallback = T_EntryNode.GetMethod("MakeTransitionCallback", BindingFlags.Instance | BindingFlags.NonPublic); 38 | 39 | [HarmonyTargetMethod] 40 | private static MethodBase TargetMethod() => AccessTools.Method(T_EntryNode, "NodeUI"); 41 | 42 | [HarmonyPrefix] 43 | private static void Prefix(object __instance) => DoubleClickDetector.Invoke(T_MakeTransitionCallback, __instance, EditorToolboxSettings.instance.makeTransitionWithDoubleClick); 44 | } 45 | 46 | internal class DoubleClickDetector 47 | { 48 | private static DateTime lastClickTime = DateTime.MinValue; 49 | private static bool IsDoubleClicking() 50 | { 51 | var e = Event.current; 52 | if (e.type != EventType.MouseDown || e.button != 0) return false; 53 | var isDoubleClicking = lastClickTime.AddMilliseconds(250) > DateTime.Now; 54 | lastClickTime = DateTime.Now; 55 | return isDoubleClicking; 56 | } 57 | 58 | public static void Invoke(MethodInfo methodInfo, object instance, bool needToDo) 59 | { 60 | if (needToDo && IsDoubleClicking()) methodInfo.Invoke(instance, null); 61 | } 62 | } 63 | } 64 | #endif 65 | -------------------------------------------------------------------------------- /Editor/Shaders/OutlineMaker.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/_lil/OutlineMaker" 2 | { 3 | Properties 4 | { 5 | _MainTex ("Texture", 2D) = "white" {} 6 | _OutlineColor ("Color", Color) = (1,1,1,1) 7 | _OutlineWidth ("Width", Float) = 2 8 | } 9 | SubShader 10 | { 11 | Pass 12 | { 13 | CGPROGRAM 14 | #pragma vertex vert 15 | #pragma fragment frag 16 | 17 | #include "UnityCG.cginc" 18 | 19 | Texture2D _MainTex; 20 | float4 _OutlineColor; 21 | float _OutlineWidth; 22 | SamplerState sampler_linear_clamp; 23 | 24 | struct appdata 25 | { 26 | float4 vertex : POSITION; 27 | float2 uv : TEXCOORD0; 28 | }; 29 | 30 | struct v2f 31 | { 32 | float4 vertex : SV_POSITION; 33 | float2 uv : TEXCOORD0; 34 | }; 35 | 36 | v2f vert(appdata v) 37 | { 38 | v2f o; 39 | o.vertex = UnityObjectToClipPos(v.vertex); 40 | o.uv = v.uv; 41 | return o; 42 | } 43 | 44 | float4 ClampSample(Texture2D tex, float2 uv) 45 | { 46 | float4 col = tex.Sample(sampler_linear_clamp, uv); 47 | if(uv.x != saturate(uv.x) || uv.y != saturate(uv.y)) col.a = 0; 48 | return col; 49 | } 50 | 51 | float4 frag(v2f i) : SV_Target 52 | { 53 | float2 uv = lerp(i.uv, 0.5, -0.02*_OutlineWidth); 54 | float outline = 0; 55 | outline += ClampSample(_MainTex, uv).a; 56 | outline += ClampSample(_MainTex, uv + float2(-0.01, 0.00)*_OutlineWidth).a; 57 | outline += ClampSample(_MainTex, uv + float2( 0.01, 0.00)*_OutlineWidth).a; 58 | outline += ClampSample(_MainTex, uv + float2( 0.00,-0.01)*_OutlineWidth).a; 59 | outline += ClampSample(_MainTex, uv + float2( 0.00, 0.01)*_OutlineWidth).a; 60 | outline += ClampSample(_MainTex, uv + float2(-0.007,-0.007)*_OutlineWidth).a; 61 | outline += ClampSample(_MainTex, uv + float2(-0.007, 0.007)*_OutlineWidth).a; 62 | outline += ClampSample(_MainTex, uv + float2( 0.007,-0.007)*_OutlineWidth).a; 63 | outline += ClampSample(_MainTex, uv + float2( 0.007, 0.007)*_OutlineWidth).a; 64 | outline = saturate(outline); 65 | float4 col = _OutlineColor; 66 | col.a = outline; 67 | 68 | float4 tex = ClampSample(_MainTex, uv); 69 | col.rgb = lerp(col.rgb, tex.rgb, tex.a); 70 | return col; 71 | } 72 | ENDCG 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /Editor/SceneToolbar.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEditor.Overlays; 3 | using UnityEditor; 4 | using UnityEditor.Toolbars; 5 | using UnityEngine; 6 | using UnityEngine.UIElements; 7 | using UnityEditor.UIElements; 8 | 9 | namespace jp.lilxyzw.editortoolbox 10 | { 11 | [Overlay( 12 | typeof(SceneView), 13 | ID, 14 | "lilEditorToolbox", 15 | true, 16 | defaultDisplay = true, 17 | defaultDockZone = DockZone.TopToolbar, 18 | defaultLayout = Layout.HorizontalToolbar 19 | )] 20 | internal class SceneToolbar : ToolbarOverlay 21 | { 22 | internal const string ID = "jp.lilxyzw.editortoolbox.SceneToolbar"; 23 | SceneToolbar() : base(MSAAButton.ID){} 24 | } 25 | 26 | [EditorToolbarElement(ID, typeof(SceneView))] 27 | internal class MSAAButton : ToolbarToggle 28 | { 29 | internal const string ID = "jp.lilxyzw.editortoolbox.MSAAButton"; 30 | private static readonly Dictionary prevRTs = new(); 31 | private static readonly HashSet buttons = new(); 32 | 33 | [InitializeOnLoadMethod] 34 | private static void InitializeOnLoad() 35 | { 36 | SceneView.duringSceneGui += UpdateMSAA; 37 | } 38 | 39 | MSAAButton() 40 | { 41 | style.fontSize = 10; 42 | style.unityFontStyleAndWeight = FontStyle.Bold; 43 | text = "MSAA"; 44 | value = EditorToolboxSettings.instance.enableMSAA; 45 | this.RegisterValueChangedCallback(e => { 46 | EditorToolboxSettings.instance.enableMSAA = e.newValue; 47 | foreach(var button in buttons) button.value = e.newValue; 48 | EditorToolboxSettings.Save(); 49 | }); 50 | buttons.Add(this); 51 | } 52 | 53 | private static void UpdateMSAA(SceneView sceneView) 54 | { 55 | if(EditorToolboxSettings.instance.enableMSAA) 56 | { 57 | var rt = sceneView.camera.targetTexture; 58 | if(!rt) return; 59 | prevRTs.TryGetValue(sceneView, out var rtPrev); 60 | if(rt == rtPrev) return; 61 | 62 | rt.Release(); 63 | rt.antiAliasing = QualitySettings.antiAliasing; 64 | rt.Create(); 65 | prevRTs[sceneView] = rt; 66 | } 67 | else 68 | { 69 | var rt = sceneView.camera.targetTexture; 70 | if(!rt || !prevRTs.TryGetValue(sceneView, out var rtPrev)) return; 71 | if(rt == rtPrev) 72 | { 73 | rt.Release(); 74 | rt.antiAliasing = 1; 75 | rt.Create(); 76 | } 77 | prevRTs.Remove(sceneView); 78 | } 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /Editor/DocsGenerator/DocsGeneratorMenu.DocsIndex.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace jp.lilxyzw.editortoolbox 7 | { 8 | internal static partial class DocsGeneratorMenu 9 | { 10 | private static void BuildDocsIndex(string root, string code, Func loc) 11 | { 12 | var sb = new StringBuilder(); 13 | sb.AppendLine($"# {loc("Documents")}"); 14 | sb.AppendLine(); 15 | sb.AppendLine(loc("This is the documentation page for lilEditorToolbox.")); 16 | sb.AppendLine(); 17 | sb.AppendLine($"
"); 18 | sb.AppendLine($"
    "); 19 | 20 | // 設定は先に表示 21 | { 22 | var title = File.ReadLines(root+"/docs/Settings.md").First().Substring(2); 23 | sb.AppendLine($"
  • {title}
  • "); 24 | } 25 | 26 | // 通常のクラス 27 | foreach(var file in Directory.GetFiles(root+"/docs", "*.md", SearchOption.TopDirectoryOnly)) 28 | { 29 | if(file.EndsWith("index.md") || file.EndsWith("Settings.md")) continue; 30 | var title = File.ReadLines(file).First().Substring(2); 31 | sb.AppendLine($"
  • {title}
  • "); 32 | } 33 | 34 | // EditorWindow 35 | sb.AppendLine($"
  • {loc("EditorWindow")}

    "); 36 | sb.AppendLine($"
      "); 37 | foreach(var file in Directory.GetFiles(root+"/docs/EditorWindow", "*.md", SearchOption.TopDirectoryOnly)) 38 | { 39 | if(file.EndsWith("index.md")) continue; 40 | var title = File.ReadLines(file).First().Substring(2); 41 | sb.AppendLine($"
    • {title}
    • "); 42 | } 43 | sb.AppendLine($"
    "); 44 | sb.AppendLine($"
  • "); 45 | 46 | // Components 47 | sb.AppendLine($"
  • {loc("Components")}

    "); 48 | sb.AppendLine($"
      "); 49 | foreach(var file in Directory.GetFiles(root+"/docs/Components", "*.md", SearchOption.TopDirectoryOnly)) 50 | { 51 | if(file.EndsWith("index.md")) continue; 52 | var title = File.ReadLines(file).First().Substring(2); 53 | sb.AppendLine($"
    • {title}
    • "); 54 | } 55 | sb.AppendLine($"
    "); 56 | sb.AppendLine($"
  • "); 57 | 58 | sb.AppendLine($"
"); 59 | sb.AppendLine($"
"); 60 | 61 | WriteText($"{root}/docs/index.md", sb.ToString()); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Editor/FolderOpener.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using UnityEditor; 3 | using UnityEditorInternal; 4 | using UnityEngine; 5 | 6 | namespace jp.lilxyzw.editortoolbox 7 | { 8 | [Docs( 9 | "Tool to open Unity-related folders", 10 | "You can open folders used by Unity with one click. You can easily open folders that you may want to check occasionally, such as the location of configuration files or the location of unity packages on the asset store." 11 | )] 12 | [DocsMenuLocation(Common.MENU_HEAD + "Folder Opener")] 13 | internal class FolderOpener : EditorWindow 14 | { 15 | public Vector2 scrollPos; 16 | 17 | [MenuItem(Common.MENU_HEAD + "Folder Opener")] 18 | static void Init() => GetWindow(typeof(FolderOpener)).Show(); 19 | private static GUIContent icon; 20 | 21 | void OnGUI() 22 | { 23 | icon ??= EditorGUIUtility.IconContent("Folder Icon"); 24 | 25 | EditorGUILayout.LabelField("EditorApplication", EditorStyles.boldLabel); 26 | PathField(EditorApplication.applicationPath); 27 | PathField(EditorApplication.applicationContentsPath); 28 | 29 | EditorGUILayout.Space(); 30 | EditorGUILayout.LabelField("Application", EditorStyles.boldLabel); 31 | PathField(Application.dataPath); 32 | PathField(Application.consoleLogPath); 33 | PathField(Application.persistentDataPath); 34 | PathField(Application.streamingAssetsPath); 35 | PathField(Application.temporaryCachePath); 36 | 37 | EditorGUILayout.Space(); 38 | EditorGUILayout.LabelField("InternalEditorUtility", EditorStyles.boldLabel); 39 | PathField(InternalEditorUtility.unityPreferencesFolder); 40 | PathField(InternalEditorUtility.GetCrashReportFolder()); 41 | PathField(InternalEditorUtility.GetEditorAssemblyPath()); 42 | PathField(InternalEditorUtility.GetEngineAssemblyPath()); 43 | PathField(InternalEditorUtility.GetEngineCoreModuleAssemblyPath()); 44 | PathField(InternalEditorUtility.GetAssetsFolder()); 45 | PathField(InternalEditorUtility.GetEditorFolder()); 46 | 47 | EditorGUILayout.Space(); 48 | EditorGUILayout.LabelField("Other", EditorStyles.boldLabel); 49 | PathField(InternalEditorUtility.unityPreferencesFolder + "/../../"); 50 | } 51 | 52 | private static void PathField(string path) 53 | { 54 | var rect = EditorGUILayout.GetControlRect(); 55 | var rectMax = rect.xMax; 56 | rect.width = 20; 57 | if(GUI.Button(rect, icon, EditorStyles.label)) 58 | { 59 | var open = path; 60 | if(File.Exists(path)) open = Path.GetDirectoryName(path); 61 | System.Diagnostics.Process.Start(open); 62 | } 63 | 64 | rect.xMin = rect.xMax; 65 | rect.xMax = rectMax; 66 | EditorGUI.SelectableLabel(rect, path); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Editor/ImportExtension/AssetOverwriter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.IO; 3 | using System.Linq; 4 | using UnityEditor; 5 | using UnityEngine; 6 | 7 | namespace jp.lilxyzw.editortoolbox 8 | { 9 | internal class AssetOverwriter : AssetPostprocessor 10 | { 11 | private static HashSet filesToRemove = new HashSet(); 12 | 13 | void OnPreprocessAsset() 14 | { 15 | // metaファイルがあればreturn 16 | if(!assetImporter.importSettingsMissing) return; 17 | 18 | // D&D前後でファイル名が一致している場合はreturn 19 | var name = Path.GetFileNameWithoutExtension(assetPath); 20 | if(DragAndDrop.paths.Length == 0 || DragAndDrop.paths.Any(p => name == Path.GetFileName(p))) return; 21 | 22 | // ホントは先頭で判断したいけどエラーになる 23 | if(!EditorToolboxSettings.instance.dragAndDropOverwrite) return; 24 | 25 | // ファイル名が" 数字"で終わっていなければreturn 26 | var count = name.Split(" ").Last(); 27 | if(!uint.TryParse(count, out _)) return; 28 | 29 | // 上書き先のファイルが存在しなければreturn 30 | var original = Path.GetDirectoryName(assetPath) + Path.DirectorySeparatorChar + name.Substring(0, name.Length - count.Length - 1) + Path.GetExtension(assetPath); 31 | if(!File.Exists(original)) return; 32 | 33 | File.Copy(assetPath, original, true); 34 | filesToRemove.Add(assetPath); 35 | Debug.Log($"Overwrite {original}"); 36 | 37 | // ダミーのファイルを作って高速化 38 | // ファイル削除だとエラーになる 39 | if(assetImporter is TextureImporter) WriteAndCopyTime(assetPath, new Texture2D(1,1).EncodeToPNG()); // 拡張子はおそらく関係ないのでpng固定 40 | if(assetPath.EndsWith(".obj", System.StringComparison.OrdinalIgnoreCase)) WriteAndCopyTime(assetPath, new byte[]{}); 41 | if(assetPath.EndsWith(".fbx", System.StringComparison.OrdinalIgnoreCase)) WriteAndCopyTime(assetPath, "; FBX 7.7.0 project file"); 42 | } 43 | 44 | private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths, bool didDomainReload) 45 | { 46 | if(filesToRemove.Count == 0) return; 47 | foreach(var file in filesToRemove) AssetDatabase.DeleteAsset(file); 48 | filesToRemove.Clear(); 49 | } 50 | 51 | private static void WriteAndCopyTime(string path, string value) 52 | { 53 | var fi = new FileInfo(path); 54 | var timeC = fi.CreationTime; 55 | var timeW = fi.LastWriteTime; 56 | File.WriteAllText(path, value); 57 | new FileInfo(path){CreationTime = timeC, LastWriteTime = timeW}; 58 | } 59 | 60 | private static void WriteAndCopyTime(string path, byte[] value) 61 | { 62 | var fi = new FileInfo(path); 63 | var timeC = fi.CreationTime; 64 | var timeW = fi.LastWriteTime; 65 | File.WriteAllBytes(path, value); 66 | new FileInfo(path){CreationTime = timeC, LastWriteTime = timeW}; 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Editor/Shaders/TexturePacker.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/_lil/TexturePacker" 2 | { 3 | Properties 4 | { 5 | _TextureR ("Texture", 2D) = "white" {} 6 | _TextureG ("Texture", 2D) = "white" {} 7 | _TextureB ("Texture", 2D) = "white" {} 8 | _TextureA ("Texture", 2D) = "white" {} 9 | _BlendR ("Color", Vector) = (0,0,0,0) 10 | _BlendG ("Color", Vector) = (0,0,0,0) 11 | _BlendB ("Color", Vector) = (0,0,0,0) 12 | _BlendA ("Color", Vector) = (0,0,0,0) 13 | _IgnoreTexture ("Color", Vector) = (1,1,1,1) 14 | _Invert ("Color", Vector) = (0,0,0,0) 15 | _DefaultR ("Float", Float) = 1 16 | _DefaultG ("Float", Float) = 1 17 | _DefaultB ("Float", Float) = 1 18 | _DefaultA ("Float", Float) = 1 19 | _TextureSize ("Vector", Vector) = (1,1,0,0) 20 | } 21 | SubShader 22 | { 23 | Pass 24 | { 25 | CGPROGRAM 26 | #pragma vertex vert 27 | #pragma fragment frag 28 | 29 | #include "UnityCG.cginc" 30 | 31 | Texture2D _TextureR; 32 | Texture2D _TextureG; 33 | Texture2D _TextureB; 34 | Texture2D _TextureA; 35 | float4 _TextureR_ST; 36 | float4 _TextureG_ST; 37 | float4 _TextureB_ST; 38 | float4 _TextureA_ST; 39 | float4 _BlendR; 40 | float4 _BlendG; 41 | float4 _BlendB; 42 | float4 _BlendA; 43 | float4 _IgnoreTexture; 44 | float4 _Invert; 45 | float4 _TextureSize; 46 | float _DefaultR; 47 | float _DefaultG; 48 | float _DefaultB; 49 | float _DefaultA; 50 | SamplerState sampler_linear_clamp; 51 | 52 | struct appdata 53 | { 54 | float4 vertex : POSITION; 55 | float2 uv : TEXCOORD0; 56 | }; 57 | 58 | struct v2f 59 | { 60 | float4 vertex : SV_POSITION; 61 | float2 uv : TEXCOORD0; 62 | }; 63 | 64 | v2f vert(appdata v) 65 | { 66 | v2f o; 67 | o.vertex = UnityObjectToClipPos(v.vertex); 68 | o.uv = v.uv; 69 | return o; 70 | } 71 | 72 | float4 frag(v2f i) : SV_Target 73 | { 74 | float4 col; 75 | col.r = dot(_TextureR.Sample(sampler_linear_clamp, i.uv * _TextureR_ST.xy + _TextureR_ST.zw), _BlendR); 76 | col.g = dot(_TextureG.Sample(sampler_linear_clamp, i.uv * _TextureG_ST.xy + _TextureG_ST.zw), _BlendG); 77 | col.b = dot(_TextureB.Sample(sampler_linear_clamp, i.uv * _TextureB_ST.xy + _TextureB_ST.zw), _BlendB); 78 | col.a = dot(_TextureA.Sample(sampler_linear_clamp, i.uv * _TextureA_ST.xy + _TextureA_ST.zw), _BlendA); 79 | 80 | col = lerp(col, 1-col, _Invert); 81 | col = lerp(col, float4(_DefaultR,_DefaultG,_DefaultB,_DefaultA), _IgnoreTexture); 82 | //if(!IsGammaSpace()) col.rgb = LinearToGammaSpace(col.rgb); 83 | return col; 84 | } 85 | ENDCG 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/HierarchyExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using UnityEditor; 6 | using UnityEngine; 7 | 8 | namespace jp.lilxyzw.editortoolbox 9 | { 10 | internal class HierarchyExtension 11 | { 12 | private static readonly Color32 missingScriptIconColor = new Color32(255,0,255,255); 13 | private const int ICON_SIZE = 16; 14 | internal static Texture2D m_missingScriptIcon; 15 | internal static Texture2D MissingScriptIcon() 16 | { 17 | if(m_missingScriptIcon) return m_missingScriptIcon; 18 | return m_missingScriptIcon = GenerateTexture(missingScriptIconColor,ICON_SIZE,ICON_SIZE); 19 | } 20 | private static List hierarchyExtensionComponents; 21 | 22 | [InitializeOnLoadMethod] private static void Initialize() 23 | { 24 | EditorApplication.hierarchyWindowItemOnGUI -= OnGUI; 25 | EditorApplication.hierarchyWindowItemOnGUI += OnGUI; 26 | EditorToolboxSettingsEditor.update -= Resolve; 27 | EditorToolboxSettingsEditor.update += Resolve; 28 | } 29 | 30 | internal static readonly Type[] types = AppDomain.CurrentDomain.GetAssemblies() 31 | .SelectMany(a => a.GetCustomAttributes(typeof(ExportsHierarchyExtensionComponent), false)) 32 | .SelectMany(export => ((ExportsHierarchyExtensionComponent)export).Types).ToArray(); 33 | 34 | internal static readonly (string[] key, string fullname)[] names = types.Select(t => (new[]{Common.ToDisplayName(t.Name), t.GetCustomAttribute()?.tooltip}, t.FullName)).ToArray(); 35 | internal static string[][] GetNameAndTooltips() => names.Select(n => n.key).ToArray(); 36 | 37 | private static void Resolve() 38 | { 39 | hierarchyExtensionComponents = new List(); 40 | hierarchyExtensionComponents.AddRange(types.Where(t => EditorToolboxSettings.instance.hierarchyComponents.Contains(t.FullName)).Select(t => (IHierarchyExtensionComponent)Activator.CreateInstance(t)).OrderBy(c => c.Priority)); 41 | } 42 | 43 | // GUI 44 | private static void OnGUI(int instanceID, Rect selectionRect) 45 | { 46 | var go = EditorUtility.InstanceIDToObject(instanceID) as GameObject; 47 | if(!go) return; 48 | 49 | var rectOrigin = selectionRect; 50 | selectionRect.x = selectionRect.xMax; 51 | 52 | if(hierarchyExtensionComponents == null) Resolve(); 53 | 54 | var mix = EditorGUI.showMixedValue; 55 | EditorGUI.showMixedValue = false; 56 | foreach(var c in hierarchyExtensionComponents) c.OnGUI(ref selectionRect, go, instanceID, rectOrigin); 57 | EditorGUI.showMixedValue = mix; 58 | } 59 | 60 | private static Texture2D GenerateTexture(Color32 color, int width, int height) 61 | { 62 | var tex = new Texture2D(width,height,TextureFormat.RGBA32,false); 63 | tex.SetPixels32(Enumerable.Repeat(color,width*height).ToArray()); 64 | tex.Apply(); 65 | return tex; 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Editor/Shaders/AttributeViewer-main.hlsl: -------------------------------------------------------------------------------- 1 | struct appdata 2 | { 3 | float4 positionOS : POSITION; 4 | float4 uv0 : TEXCOORD0; 5 | float4 uv1 : TEXCOORD1; 6 | float4 uv2 : TEXCOORD2; 7 | float4 uv3 : TEXCOORD3; 8 | float4 uv4 : TEXCOORD4; 9 | float4 uv5 : TEXCOORD5; 10 | float4 uv6 : TEXCOORD6; 11 | float4 uv7 : TEXCOORD7; 12 | float4 color : COLOR; 13 | float3 normalOS : NORMAL; 14 | float4 tangentOS : TANGENT; 15 | uint vertexID : SV_VertexID; 16 | UNITY_VERTEX_INPUT_INSTANCE_ID 17 | }; 18 | 19 | struct v2f 20 | { 21 | float2 uv : TEXCOORD0; 22 | float4 color : TEXCOORD1; 23 | float4 vertex : SV_POSITION; 24 | UNITY_VERTEX_OUTPUT_STEREO 25 | }; 26 | 27 | sampler2D _MainTex; 28 | uint _AVOutputMode; 29 | float4 _MainTex_ST; 30 | 31 | v2f vert(appdata v) 32 | { 33 | v2f o; 34 | UNITY_SETUP_INSTANCE_ID(v); 35 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 36 | o.vertex = UnityObjectToClipPos(v.positionOS); 37 | o.color = float4(0,0,0,1); 38 | o.uv.xy = v.uv0.xy; 39 | switch(_AVOutputMode) 40 | { 41 | case 0: o.color.rg = v.uv0.xy; break; 42 | case 1: o.color.rg = v.uv0.zw; break; 43 | case 2: o.color.rg = v.uv1.xy; break; 44 | case 3: o.color.rg = v.uv1.zw; break; 45 | case 4: o.color.rg = v.uv2.xy; break; 46 | case 5: o.color.rg = v.uv2.zw; break; 47 | case 6: o.color.rg = v.uv3.xy; break; 48 | case 7: o.color.rg = v.uv3.zw; break; 49 | case 8: o.color.rg = v.uv4.xy; break; 50 | case 9: o.color.rg = v.uv4.zw; break; 51 | case 10: o.color.rg = v.uv5.xy; break; 52 | case 11: o.color.rg = v.uv5.zw; break; 53 | case 12: o.color.rg = v.uv6.xy; break; 54 | case 13: o.color.rg = v.uv6.zw; break; 55 | case 14: o.color.rg = v.uv7.xy; break; 56 | case 15: o.color.rg = v.uv7.zw; break; 57 | case 16: o.color.rgb = v.positionOS.xyz * 0.5 + 0.5; break; 58 | case 17: o.color.rgb = v.color.rgb; break; 59 | case 18: o.color.r = v.color.r; break; 60 | case 19: o.color.g = v.color.g; break; 61 | case 20: o.color.b = v.color.b; break; 62 | case 21: o.color.rgb = v.color.a; break; 63 | case 22: o.color.rgb = v.normalOS.xyz * 0.5 + 0.5; break; 64 | case 23: o.color.rgb = UnityObjectToWorldNormal(v.normalOS.xyz) * 0.5 + 0.5; break; 65 | case 24: o.color.a = 0; break; 66 | case 25: o.color.rgb = v.tangentOS.xyz * 0.5 + 0.5; break; 67 | case 26: o.color.rgb = UnityObjectToWorldDir(v.tangentOS.xyz) * 0.5 + 0.5; break; 68 | case 27: o.color.a = 0; break; 69 | case 28: o.color.rgb = v.tangentOS.w; break; 70 | case 29: o.color.rgb = v.vertexID / 100000.0; break; 71 | case 30: o.color.a = 0; break; 72 | default: o.color.a = 0; break; 73 | } 74 | return o; 75 | } 76 | 77 | float4 frag(v2f i, bool isFront : SV_IsFrontFace) : SV_Target 78 | { 79 | float4 col = tex2D(_MainTex, i.uv.xy * _MainTex_ST.xy + _MainTex_ST.zw); 80 | col.rgb = lerp(col.rgb, i.color.rgb, i.color.a); 81 | if(_AVOutputMode == 30) col.rgb = lerp(col.rgb, isFront ? float3(0,0,1) : float3(1,0,0), 0.9); 82 | return col; 83 | } 84 | -------------------------------------------------------------------------------- /Editor/ToolbarExtension/ToolbarExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using UnityEditor; 6 | using UnityEngine; 7 | using UnityEngine.UIElements; 8 | 9 | namespace jp.lilxyzw.editortoolbox 10 | { 11 | internal static class ToolbarExtension 12 | { 13 | private static VisualElement rootVisualElement; 14 | private static VisualElement leftElement; 15 | private static VisualElement rightElement; 16 | private static readonly HashSet addedElements = new(); 17 | 18 | private static List toolbarExtensionComponents; 19 | 20 | internal static readonly Type[] types = AppDomain.CurrentDomain.GetAssemblies() 21 | .SelectMany(a => a.GetCustomAttributes(typeof(ExportsToolbarExtensionComponent), false)) 22 | .SelectMany(export => ((ExportsToolbarExtensionComponent)export).Types).ToArray(); 23 | 24 | internal static readonly (string[] key, string fullname)[] names = types.Select(t => (new[]{Common.ToDisplayName(t.Name), t.GetCustomAttribute()?.tooltip}, t.FullName)).ToArray(); 25 | internal static string[][] GetNameAndTooltips() => names.Select(n => n.key).ToArray(); 26 | 27 | private static void Resolve() 28 | { 29 | toolbarExtensionComponents = new List(); 30 | toolbarExtensionComponents.AddRange(types.Where(t => EditorToolboxSettings.instance.toolbarComponents.Contains(t.FullName)).Select(t => (IToolbarExtensionComponent)Activator.CreateInstance(t)).OrderBy(c => c.Priority)); 31 | 32 | foreach(var element in addedElements) 33 | { 34 | if(leftElement.Contains(element)) leftElement.Remove(element); 35 | if(rightElement.Contains(element)) rightElement.Remove(element); 36 | } 37 | addedElements.Clear(); 38 | 39 | foreach(var c in toolbarExtensionComponents) 40 | { 41 | if(c.InLeftSide) AddToLeft(c.GetRootElement()); 42 | else AddToRight(c.GetRootElement()); 43 | } 44 | } 45 | 46 | private static void AddToLeft(VisualElement element) 47 | { 48 | leftElement.Add(element); 49 | addedElements.Add(element); 50 | } 51 | 52 | private static void AddToRight(VisualElement element) 53 | { 54 | rightElement.Add(element); 55 | addedElements.Add(element); 56 | } 57 | 58 | [InitializeOnLoadMethod] 59 | private static void Init() 60 | { 61 | EditorApplication.update -= GetVisualElements; 62 | EditorApplication.update += GetVisualElements; 63 | EditorToolboxSettingsEditor.update += Resolve; 64 | EditorToolboxSettingsEditor.update += Resolve; 65 | } 66 | 67 | private static void GetVisualElements() 68 | { 69 | rootVisualElement = ToolbarWrap.get.m_Root; 70 | if(rootVisualElement == null) return; 71 | leftElement = rootVisualElement.Q("ToolbarZoneLeftAlign"); 72 | rightElement = rootVisualElement.Q("ToolbarZoneRightAlign"); 73 | if(toolbarExtensionComponents == null) Resolve(); 74 | EditorApplication.update -= GetVisualElements; 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Editor/TabInspector.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using UnityEditor; 4 | using UnityEditor.Search; 5 | using UnityEngine.UIElements; 6 | using Object = UnityEngine.Object; 7 | 8 | namespace jp.lilxyzw.editortoolbox 9 | { 10 | [Docs( 11 | "Extended Inspector", 12 | "This allows you to treat the Inspector like a browser tab. This is an Inspector that is fixed to one object, so the display content does not change even if you select another object. This window is not opened from the menu bar, but from the + icon on the toolbar at the top of Unity. If you do not have the + icon, you can add it by turning on the `Add Inspector Tab Button` in the Toolbar Extensions of Preferences." 13 | )] 14 | internal class TabInspector : EditorWindow 15 | { 16 | public List targets; 17 | public InspectorWindowWrap inspector; 18 | 19 | [DocsField] private static readonly string[] L_NORMAL = {"Normal", "This is a regular Inspector."}; 20 | [DocsField] private static readonly string[] L_DEBUG = {"Debug", "Inspector for debugging. Normally, you do not need to use it."}; 21 | [DocsField] private static readonly string[] L_DEVELOPER = {"Developer", "This is a special Inspector that can only be seen in developer mode."}; 22 | 23 | //[MenuItem("Assets/Open in new Inspector", false, 15)] 24 | internal static void Init() 25 | { 26 | if(!Selection.activeObject) return; 27 | var window = CreateWindow(Selection.activeObject.name, new[]{InspectorWindowWrap.type}); 28 | window.titleContent.image = AssetPreview.GetMiniThumbnail(Selection.activeObject); 29 | } 30 | 31 | private void CreateGUI() 32 | { 33 | rootVisualElement.Clear(); 34 | targets ??= Selection.objects.ToList(); 35 | 36 | var header = new VisualElement(); 37 | header.style.flexDirection = FlexDirection.Row; 38 | 39 | // Target 40 | var objfield = new ObjectField{value = targets[0]}; 41 | objfield.style.flexGrow = 1; 42 | header.Add(objfield); 43 | 44 | // Mode Button 45 | var buttonNormal = new Button{text = L10n.L(L_NORMAL[0]), tooltip = L10n.L(L_NORMAL[1])}; 46 | buttonNormal.clicked += () => inspector.SetNormal(); 47 | header.Add(buttonNormal); 48 | var buttonDebug = new Button{text = L10n.L(L_DEBUG[0]), tooltip = L10n.L(L_DEBUG[1])}; 49 | buttonDebug.clicked += () => inspector.SetDebug(); 50 | header.Add(buttonDebug); 51 | var buttonInternal = new Button{text = L10n.L(L_DEVELOPER[0]), tooltip = L10n.L(L_DEVELOPER[1])}; 52 | buttonInternal.clicked += () => inspector.SetDebugInternal(); 53 | header.Add(buttonInternal); 54 | 55 | // Close Button 56 | var button = new Button{text = "☓", tooltip = L10n.L("Close this tab.")}; 57 | button.clicked += () => Close(); 58 | header.Add(button); 59 | 60 | // Inspector 61 | inspector = new InspectorWindowWrap(CreateInstance(InspectorWindowWrap.type)); 62 | inspector.SetObjectsLocked(targets); 63 | inspector.w.rootVisualElement.style.flexGrow = 1; 64 | 65 | rootVisualElement.Add(header); 66 | rootVisualElement.Add(inspector.w.rootVisualElement); 67 | } 68 | 69 | private void Update() => inspector.Update(); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Editor/Wraps/AnimatorControllerToolWrap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | using UnityEditor; 5 | using UnityEditor.Animations; 6 | using Object = UnityEngine.Object; 7 | 8 | namespace jp.lilxyzw.editortoolbox 9 | { 10 | internal class AnimatorControllerToolWrap : WrapBase 11 | { 12 | private static readonly Assembly A_Graphs = Assembly.Load("UnityEditor.Graphs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"); 13 | public static readonly Type type = A_Graphs.GetType("UnityEditor.Graphs.AnimatorControllerTool"); 14 | private static readonly (Delegate g, Delegate s) FI_animatorController = GetPropertyIns(type, "animatorController", typeof(AnimatorController)); 15 | private static readonly (Delegate g, Delegate s) FI_selectedLayerIndex = GetPropertyIns(type, "selectedLayerIndex", typeof(int)); 16 | private static readonly (Delegate g, Delegate s) FI_m_BreadCrumbs = GetFieldIns(type, "m_BreadCrumbs", typeof(List<>).MakeGenericType(BreadCrumbElementWrap.type)); 17 | private static readonly MethodInfo MI_UpdateStateMachineView = type.GetMethod("UpdateStateMachineView", BindingFlags.Instance | BindingFlags.NonPublic); 18 | 19 | public EditorWindow w; 20 | public AnimatorControllerToolWrap(object instance) => w = instance as EditorWindow; 21 | public AnimatorController animatorController 22 | { 23 | get => (AnimatorController)FI_animatorController.g.DynamicInvoke(w); 24 | set => FI_animatorController.s.DynamicInvoke(w, value); 25 | } 26 | public int selectedLayerIndex 27 | { 28 | get => (int)FI_selectedLayerIndex.g.DynamicInvoke(w); 29 | set => FI_selectedLayerIndex.s.DynamicInvoke(w, value); 30 | } 31 | public object m_BreadCrumbs 32 | { 33 | get => FI_m_BreadCrumbs.g.DynamicInvoke(w); 34 | set => FI_m_BreadCrumbs.s.DynamicInvoke(w, value); 35 | } 36 | public void SetBreadCrumbs(params Object[] objs) 37 | { 38 | var list = Activator.CreateInstance(typeof(List<>).MakeGenericType(BreadCrumbElementWrap.type)); 39 | var add = list.GetType().GetMethod("Add"); 40 | foreach (var o in objs) add.Invoke(list, new object[] { new BreadCrumbElementWrap(o).instance }); 41 | m_BreadCrumbs = list; 42 | MI_UpdateStateMachineView.Invoke(w, null); 43 | } 44 | } 45 | 46 | internal class BreadCrumbElementWrap : WrapBase 47 | { 48 | private static readonly Assembly A_Graphs = Assembly.Load("UnityEditor.Graphs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"); 49 | public static readonly Type type = A_Graphs.GetType("UnityEditor.Graphs.AnimatorControllerTool").GetNestedType("BreadCrumbElement", BindingFlags.NonPublic); 50 | private static readonly (Delegate g, Delegate s) FI_m_Target = GetFieldIns(type, "m_Target", typeof(Object)); 51 | private static readonly ConstructorInfo CI = type.GetConstructor(new[] { typeof(Object) }); 52 | public object instance; 53 | public BreadCrumbElementWrap(object instance) => this.instance = instance; 54 | public BreadCrumbElementWrap(Object instance) => this.instance = CI.Invoke(new object[] { instance }); 55 | 56 | public Object m_Target 57 | { 58 | get => (Object)FI_m_Target.g.DynamicInvoke(instance); 59 | set => FI_m_Target.s.DynamicInvoke(instance, value); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Editor/HierarchyExtension/Components/ComponentsDrawer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | namespace jp.lilxyzw.editortoolbox 7 | { 8 | [Tooltip("Displays the object's components. You can turn components on or off by clicking their icons.")] 9 | internal class ComponentsDrawer : IHierarchyExtensionComponent 10 | { 11 | private const int ICON_SIZE = 16; 12 | 13 | public int Priority => 1100; 14 | 15 | public void OnGUI(ref Rect currentRect, GameObject gameObject, int instanceID, Rect fullRect) 16 | { 17 | var components = gameObject.GetComponents().Where(c => c is not Transform).ToArray(); 18 | if(components.Length > 0) 19 | { 20 | var iconCount = components.Length; 21 | bool isTooMany = currentRect.x - ICON_SIZE * iconCount < fullRect.x + 100; 22 | if(isTooMany) 23 | { 24 | int count = (int)((currentRect.x - fullRect.x - 100) / ICON_SIZE)-1; 25 | if(count < 0) count = 0; 26 | if(count > iconCount) count = iconCount; 27 | Array.Resize(ref components, count); 28 | iconCount = count + 1; 29 | } 30 | currentRect.x -= ICON_SIZE * iconCount; 31 | currentRect.width = ICON_SIZE; 32 | var xmin = currentRect.x; 33 | 34 | foreach(var component in components) 35 | { 36 | switch(component) 37 | { 38 | case Renderer c: GUI.enabled = c.enabled; break; 39 | case Behaviour c: GUI.enabled = c.enabled; break; 40 | case Collider c: GUI.enabled = c.enabled; break; 41 | } 42 | if(component) GUI.Box(currentRect, AssetPreview.GetMiniThumbnail(component), GUIStyle.none); 43 | else GUI.Box(currentRect, HierarchyExtension.MissingScriptIcon(), GUIStyle.none); 44 | GUI.enabled = true; 45 | 46 | if((component is Renderer || component is Behaviour || component is Collider) && CheckMouseDown(currentRect)) 47 | { 48 | using var so = new SerializedObject(component); 49 | using var m_Enabled = so.FindProperty("m_Enabled"); 50 | m_Enabled.boolValue = !m_Enabled.boolValue; 51 | so.ApplyModifiedProperties(); 52 | } 53 | 54 | currentRect.x += ICON_SIZE; 55 | } 56 | 57 | if(isTooMany) 58 | { 59 | EditorGUI.LabelField(currentRect, "..."); 60 | currentRect.x += ICON_SIZE; 61 | } 62 | 63 | currentRect.x = xmin - 8; 64 | } 65 | } 66 | 67 | private bool CheckMouseDown(Rect rect) 68 | { 69 | var e = Event.current; 70 | if(!rect.Contains(e.mousePosition) || EditorToolboxSettings.instance.hierarchyMouseButton == MouseButton.None) return false; 71 | EditorGUI.DrawRect(rect, new Color(1,1,1,0.5f)); 72 | if(e.type != EventType.MouseDown) return false; 73 | 74 | if( 75 | EditorToolboxSettings.instance.hierarchyMouseButton.HasFlag(MouseButton.Left) && e.button == 0 || 76 | EditorToolboxSettings.instance.hierarchyMouseButton.HasFlag(MouseButton.Right) && e.button == 1 || 77 | EditorToolboxSettings.instance.hierarchyMouseButton.HasFlag(MouseButton.Middle) && e.button == 2 78 | ) 79 | { 80 | e.Use(); 81 | return true; 82 | } 83 | return false; 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /Editor/AnimatorControllerEditorPatch/AnimatorControllerEditorMenu.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using UnityEditor; 3 | using UnityEditor.Animations; 4 | using UnityEngine; 5 | 6 | namespace jp.lilxyzw.editortoolbox 7 | { 8 | [Docs( 9 | "AnimatorController related extension menus", 10 | "These are some additional menus related to the AnimatorController.", 11 | "", 12 | "## Tools/lilEditorToolbox/Cleanup Animator Controller", 13 | "", 14 | "Detect and remove unnecessary sub-assets contained in AnimatorController.", 15 | "", 16 | "## Copy and paste menu for StateMachineBehavior", 17 | "", 18 | "StateMachineBehaviour can be copied and pasted just like a component.", 19 | "", 20 | "## Assets/Create/BlendTree", 21 | "", 22 | "Allows you to create BlendTree like any other asset." 23 | )] 24 | internal class AnimatorControllerEditorMenu 25 | { 26 | [MenuItem(Common.MENU_HEAD + "Cleanup Animator Controller")] 27 | private static void CleanupAnimatorController() 28 | { 29 | SubAssetCleaner.RemoveUnusedSubAssets(Selection.objects.Where(o => o is AnimatorController)); 30 | } 31 | 32 | private static StateMachineBehaviour originalBehaviour; 33 | 34 | [MenuItem("CONTEXT/StateMachineBehaviour/Copy")] 35 | private static void CopyStateMachineBehaviour(MenuCommand command) 36 | { 37 | originalBehaviour = command.context as StateMachineBehaviour; 38 | } 39 | 40 | [MenuItem("CONTEXT/StateMachineBehaviour/Paste Behaviour As New")] 41 | private static void PasteStateMachineBehaviour(MenuCommand command) 42 | { 43 | var window = EditorWindow.focusedWindow; 44 | if (window.GetType() != InspectorWindowWrap.type) return; 45 | var inspector = new InspectorWindowWrap(window); 46 | var targets = inspector.GetInspectedObjects(); 47 | foreach (var target in targets) 48 | { 49 | if (target is AnimatorState state) 50 | { 51 | var copy = Object.Instantiate(originalBehaviour); 52 | copy.name = originalBehaviour.name; 53 | copy.hideFlags = originalBehaviour.hideFlags; 54 | AssetDatabase.AddObjectToAsset(copy, state); 55 | using var so = new SerializedObject(state); 56 | using var m_StateMachineBehaviours = so.FindProperty("m_StateMachineBehaviours"); 57 | m_StateMachineBehaviours.arraySize++; 58 | using var element = m_StateMachineBehaviours.GetArrayElementAtIndex(m_StateMachineBehaviours.arraySize - 1); 59 | element.objectReferenceValue = copy; 60 | so.ApplyModifiedProperties(); 61 | } 62 | } 63 | } 64 | 65 | [MenuItem("CONTEXT/StateMachineBehaviour/Paste Behaviour Values")] 66 | private static void PasteStateMachineBehaviourValues(MenuCommand command) 67 | { 68 | var behaviour = command.context as StateMachineBehaviour; 69 | ObjectUtils.CopyProperties(originalBehaviour, behaviour); 70 | } 71 | 72 | [MenuItem("CONTEXT/StateMachineBehaviour/Paste Behaviour As New", true)] 73 | private static bool PasteStateMachineBehaviour() => originalBehaviour; 74 | 75 | [MenuItem("CONTEXT/StateMachineBehaviour/Paste Behaviour Values", true)] 76 | private static bool PasteStateMachineBehaviourValues() => originalBehaviour; 77 | 78 | #if !LIL_MODULAR_AVATAR 79 | [MenuItem("Assets/Create/BlendTree", false, 411)] 80 | private static void CreateBlendTree() 81 | { 82 | ProjectWindowUtil.CreateAsset(new BlendTree(), "New BlendTree.asset"); 83 | } 84 | #endif 85 | } 86 | } 87 | --------------------------------------------------------------------------------