├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── config.yml └── release.yml ├── .gitignore ├── Editor.Extras.meta ├── Editor.Extras ├── Drawers.meta ├── Drawers │ ├── BuiltinDrawerBase.cs │ ├── BuiltinDrawerBase.cs.meta │ ├── BuiltinDrawers.cs │ ├── BuiltinDrawers.cs.meta │ ├── ButtonDrawer.cs │ ├── ButtonDrawer.cs.meta │ ├── CustomBuiltInDrawer.cs │ ├── CustomBuiltInDrawer.cs.meta │ ├── DisplayAsStringDrawer.cs │ ├── DisplayAsStringDrawer.cs.meta │ ├── DropdownDrawer.cs │ ├── DropdownDrawer.cs.meta │ ├── EnumToggleButtonsDrawer.cs │ ├── EnumToggleButtonsDrawer.cs.meta │ ├── GUIColorDrawer.cs │ ├── GUIColorDrawer.cs.meta │ ├── IndentDrawer.cs │ ├── IndentDrawer.cs.meta │ ├── InlineEditorDrawer.cs │ ├── InlineEditorDrawer.cs.meta │ ├── LabelWidthDrawer.cs │ ├── LabelWidthDrawer.cs.meta │ ├── ObjectReferenceDrawer.cs │ ├── ObjectReferenceDrawer.cs.meta │ ├── OnValueChangedDrawer.cs │ ├── OnValueChangedDrawer.cs.meta │ ├── PropertySpaceDrawer.cs │ ├── PropertySpaceDrawer.cs.meta │ ├── SceneDrawer.cs │ ├── SceneDrawer.cs.meta │ ├── ShowDrawerChainDrawer.cs │ ├── ShowDrawerChainDrawer.cs.meta │ ├── TableListDrawer.cs │ ├── TableListDrawer.cs.meta │ ├── TitleDrawer.cs │ ├── TitleDrawer.cs.meta │ ├── UnitDrawer.cs │ └── UnitDrawer.cs.meta ├── GroupDrawers.meta ├── GroupDrawers │ ├── TriBoxGroupDrawer.cs │ ├── TriBoxGroupDrawer.cs.meta │ ├── TriFoldoutGroupDrawer.cs │ ├── TriFoldoutGroupDrawer.cs.meta │ ├── TriHorizontalGroupDrawer.cs │ ├── TriHorizontalGroupDrawer.cs.meta │ ├── TriTabGroupDrawer.cs │ ├── TriTabGroupDrawer.cs.meta │ ├── TriToggleGroupDrawer.cs │ ├── TriToggleGroupDrawer.cs.meta │ ├── TriVerticalGroupDrawer.cs │ └── TriVerticalGroupDrawer.cs.meta ├── Processors.meta ├── Processors │ ├── DisableIfProcessor.cs │ ├── DisableIfProcessor.cs.meta │ ├── DisableInEditModeProcessor.cs │ ├── DisableInEditModeProcessor.cs.meta │ ├── DisableInPlayModeProcessor.cs │ ├── DisableInPlayModeProcessor.cs.meta │ ├── HIdeInEditModeProcessor.cs │ ├── HIdeInEditModeProcessor.cs.meta │ ├── HideIfProcessor.cs │ ├── HideIfProcessor.cs.meta │ ├── HideInPlayModeProcessor.cs │ └── HideInPlayModeProcessor.cs.meta ├── TriInspector.Editor.Extras.asmdef ├── TriInspector.Editor.Extras.asmdef.meta ├── Validators.meta └── Validators │ ├── AssetsOnlyValidator.cs │ ├── AssetsOnlyValidator.cs.meta │ ├── DropdownValidator.cs │ ├── DropdownValidator.cs.meta │ ├── InfoBoxValidator.cs │ ├── InfoBoxValidator.cs.meta │ ├── MissingReferenceValidator.cs │ ├── MissingReferenceValidator.cs.meta │ ├── RequiredValidator.cs │ ├── RequiredValidator.cs.meta │ ├── SceneObjectsOnlyValidator.cs │ ├── SceneObjectsOnlyValidator.cs.meta │ ├── SceneValidator.cs │ ├── SceneValidator.cs.meta │ ├── TypeMismatchValidator.cs │ ├── TypeMismatchValidator.cs.meta │ ├── ValidateInputValidator.cs │ └── ValidateInputValidator.cs.meta ├── Editor.Integrations.meta ├── Editor.Integrations ├── Odin.meta └── Odin │ ├── OdinFieldDrawer.cs │ ├── OdinFieldDrawer.cs.meta │ ├── OdinFieldValidator.cs │ ├── OdinFieldValidator.cs.meta │ ├── OdinObjectDrawer.cs │ ├── OdinObjectDrawer.cs.meta │ ├── OdinObjectValidator.cs │ ├── OdinObjectValidator.cs.meta │ ├── TriInspector.Editor.Integrations.Odin.asmdef │ ├── TriInspector.Editor.Integrations.Odin.asmdef.meta │ ├── TriOdinExtensions.cs │ ├── TriOdinExtensions.cs.meta │ ├── TriOdinUtility.cs │ ├── TriOdinUtility.cs.meta │ ├── TriPropertyTreeForOdin.cs │ └── TriPropertyTreeForOdin.cs.meta ├── Editor.Samples.meta ├── Editor.Samples ├── Buttons.meta ├── Buttons │ ├── Buttons_ButtonSample.cs │ ├── Buttons_ButtonSample.cs.meta │ ├── Buttons_EnumToggleButtonsSample.cs │ └── Buttons_EnumToggleButtonsSample.cs.meta ├── Collections.meta ├── Collections │ ├── Collections_ListDrawerSettingsSample.cs │ ├── Collections_ListDrawerSettingsSample.cs.meta │ ├── Collections_TableListSample.cs │ └── Collections_TableListSample.cs.meta ├── Conditionals.meta ├── Conditionals │ ├── Conditionals_DisableIfSample.cs │ ├── Conditionals_DisableIfSample.cs.meta │ ├── Conditionals_DisableInEditMode.cs │ ├── Conditionals_DisableInEditMode.cs.meta │ ├── Conditionals_DisableInPlayMode.cs │ ├── Conditionals_DisableInPlayMode.cs.meta │ ├── Conditionals_EnableIfSample.cs │ ├── Conditionals_EnableIfSample.cs.meta │ ├── Conditionals_EnableInEditMode.cs │ ├── Conditionals_EnableInEditMode.cs.meta │ ├── Conditionals_EnableInPlayMode.cs │ ├── Conditionals_EnableInPlayMode.cs.meta │ ├── Conditionals_HideIfSample.cs │ ├── Conditionals_HideIfSample.cs.meta │ ├── Conditionals_HideInEditMode.cs │ ├── Conditionals_HideInEditMode.cs.meta │ ├── Conditionals_HideInPlayMode.cs │ ├── Conditionals_HideInPlayMode.cs.meta │ ├── Conditionals_ShowIfSample.cs │ ├── Conditionals_ShowIfSample.cs.meta │ ├── Conditionals_ShowInEditMode.cs │ ├── Conditionals_ShowInEditMode.cs.meta │ ├── Conditionals_ShowInPlayMode.cs │ └── Conditionals_ShowInPlayMode.cs.meta ├── Debug.meta ├── Debug │ ├── Debug_ShowDrawerChainSample.cs │ └── Debug_ShowDrawerChainSample.cs.meta ├── Decorators.meta ├── Decorators │ ├── Decorators_DisplayAsStringSample.cs │ ├── Decorators_DisplayAsStringSample.cs.meta │ ├── Decorators_DropdownSample.cs │ ├── Decorators_DropdownSample.cs.meta │ ├── Decorators_InlineEditorSample.cs │ ├── Decorators_InlineEditorSample.cs.meta │ ├── Decorators_SceneSample.cs │ ├── Decorators_SceneSample.cs.meta │ ├── Decorators_UnitSample.cs │ └── Decorators_UnitSample.cs.meta ├── Groups.meta ├── Groups │ ├── Groups_BoxGroup_BasicSample.cs │ ├── Groups_BoxGroup_BasicSample.cs.meta │ ├── Groups_BoxGroup_StackedSample.cs │ ├── Groups_BoxGroup_StackedSample.cs.meta │ ├── Groups_FoldoutGroupSample.cs │ ├── Groups_FoldoutGroupSample.cs.meta │ ├── Groups_GroupsSample.cs │ ├── Groups_GroupsSample.cs.meta │ ├── Groups_HorizontalGroupSample.cs │ ├── Groups_HorizontalGroupSample.cs.meta │ ├── Groups_TabGroupSample.cs │ ├── Groups_TabGroupSample.cs.meta │ ├── Groups_ToggleGroupSample.cs │ ├── Groups_ToggleGroupSample.cs.meta │ ├── Groups_VerticalGroupSample.cs │ └── Groups_VerticalGroupSample.cs.meta ├── Misc.meta ├── Misc │ ├── Misc_HideReferencePickerSample.cs │ ├── Misc_HideReferencePickerSample.cs.meta │ ├── Misc_OnValueChangedSample.cs │ ├── Misc_OnValueChangedSample.cs.meta │ ├── Misc_PropertyOrderSample.cs │ ├── Misc_PropertyOrderSample.cs.meta │ ├── Misc_ReadOnlySample.cs │ ├── Misc_ReadOnlySample.cs.meta │ ├── Misc_ShowInInspectorSample.cs │ └── Misc_ShowInInspectorSample.cs.meta ├── SampleWindowStyles.cs ├── SampleWindowStyles.cs.meta ├── Styling.meta ├── Styling │ ├── Styling_GUIColorSample.cs │ ├── Styling_GUIColorSample.cs.meta │ ├── Styling_HideLabelSample.cs │ ├── Styling_HideLabelSample.cs.meta │ ├── Styling_IndentSample.cs │ ├── Styling_IndentSample.cs.meta │ ├── Styling_InlinePropertySample.cs │ ├── Styling_InlinePropertySample.cs.meta │ ├── Styling_LabelTextSample.cs │ ├── Styling_LabelTextSample.cs.meta │ ├── Styling_LabelWidthSample.cs │ ├── Styling_LabelWidthSample.cs.meta │ ├── Styling_PropertySpaceSample.cs │ ├── Styling_PropertySpaceSample.cs.meta │ ├── Styling_PropertyTooltipSample.cs │ ├── Styling_PropertyTooltipSample.cs.meta │ ├── Styling_TextArea.cs │ ├── Styling_TextArea.cs.meta │ ├── Styling_TitleSample.cs │ └── Styling_TitleSample.cs.meta ├── TriInspector.Editor.Samples.asmdef ├── TriInspector.Editor.Samples.asmdef.meta ├── TriSamplesWindow.cs ├── TriSamplesWindow.cs.meta ├── Validators.meta └── Validators │ ├── Validators_AssetsOnlySample.cs │ ├── Validators_AssetsOnlySample.cs.meta │ ├── Validators_InfoBoxSample.cs │ ├── Validators_InfoBoxSample.cs.meta │ ├── Validators_RequiredSample.cs │ ├── Validators_RequiredSample.cs.meta │ ├── Validators_SceneObjectsOnlySample.cs │ ├── Validators_SceneObjectsOnlySample.cs.meta │ ├── Validators_ValidateInputSample.cs │ └── Validators_ValidateInputSample.cs.meta ├── Editor.meta ├── Editor ├── AssemblyInfo.cs ├── AssemblyInfo.cs.meta ├── Attributes.cs ├── Attributes.cs.meta ├── Editors.meta ├── Editors │ ├── TriEditor.cs │ ├── TriEditor.cs.meta │ ├── TriEditorCore.cs │ ├── TriEditorCore.cs.meta │ ├── TriMonoBehaviourEditor.cs │ ├── TriMonoBehaviourEditor.cs.meta │ ├── TriScriptableObjectEditor.cs │ ├── TriScriptableObjectEditor.cs.meta │ ├── TriScriptedImporterEditor.cs │ ├── TriScriptedImporterEditor.cs.meta │ ├── TriSettingsProvider.cs │ └── TriSettingsProvider.cs.meta ├── Elements.meta ├── Elements │ ├── InlineEditorElement.cs │ ├── InlineEditorElement.cs.meta │ ├── TriBoxGroupElement.cs │ ├── TriBoxGroupElement.cs.meta │ ├── TriBuiltInPropertyElement.cs │ ├── TriBuiltInPropertyElement.cs.meta │ ├── TriDropdownElement.cs │ ├── TriDropdownElement.cs.meta │ ├── TriFoldoutElement.cs │ ├── TriFoldoutElement.cs.meta │ ├── TriHeaderGroupBaseElement.cs │ ├── TriHeaderGroupBaseElement.cs.meta │ ├── TriHorizontalGroupElement.cs │ ├── TriHorizontalGroupElement.cs.meta │ ├── TriInfoBoxElement.cs │ ├── TriInfoBoxElement.cs.meta │ ├── TriInlineGenericElement.cs │ ├── TriInlineGenericElement.cs.meta │ ├── TriLabelElement.cs │ ├── TriLabelElement.cs.meta │ ├── TriListElement.cs │ ├── TriListElement.cs.meta │ ├── TriMultiEditNotSupportedElement.cs │ ├── TriMultiEditNotSupportedElement.cs.meta │ ├── TriNoDrawerElement.cs │ ├── TriNoDrawerElement.cs.meta │ ├── TriPropertyCollectionBaseElement.cs │ ├── TriPropertyCollectionBaseElement.cs.meta │ ├── TriPropertyElement.cs │ ├── TriPropertyElement.cs.meta │ ├── TriReferenceElement.cs │ ├── TriReferenceElement.cs.meta │ ├── TriTabGroupElement.cs │ ├── TriTabGroupElement.cs.meta │ ├── TriUiToolkitPropertyElemenet.cs │ ├── TriUiToolkitPropertyElemenet.cs.meta │ ├── TriVerticalGroupElement.cs │ └── TriVerticalGroupElement.cs.meta ├── Resolvers.meta ├── Resolvers │ ├── ActionResolver.cs │ ├── ActionResolver.cs.meta │ ├── DropdownValuesResolver.cs │ ├── DropdownValuesResolver.cs.meta │ ├── ErrorActionResolver.cs │ ├── ErrorActionResolver.cs.meta │ ├── ErrorValueResolver.cs │ ├── ErrorValueResolver.cs.meta │ ├── InstanceActionResolver.cs │ ├── InstanceActionResolver.cs.meta │ ├── InstanceFieldValueResolver.cs │ ├── InstanceFieldValueResolver.cs.meta │ ├── InstanceMethodValueResolver.cs │ ├── InstanceMethodValueResolver.cs.meta │ ├── InstancePropertyValueResolver.cs │ ├── InstancePropertyValueResolver.cs.meta │ ├── StaticFieldValueResolver.cs │ ├── StaticFieldValueResolver.cs.meta │ ├── StaticMethodValueResolver.cs │ ├── StaticMethodValueResolver.cs.meta │ ├── StaticPropertyValueResolver.cs │ ├── StaticPropertyValueResolver.cs.meta │ ├── ValueResolver.cs │ └── ValueResolver.cs.meta ├── Resources.meta ├── Resources │ ├── TriInspector_Box_Bg.png │ ├── TriInspector_Box_Bg.png.meta │ ├── TriInspector_Box_Bg_Dark.png │ ├── TriInspector_Box_Bg_Dark.png.meta │ ├── TriInspector_Content_Bg.png │ ├── TriInspector_Content_Bg.png.meta │ ├── TriInspector_Content_Bg_Dark.png │ └── TriInspector_Content_Bg_Dark.png.meta ├── TriAttributeDrawer.cs ├── TriAttributeDrawer.cs.meta ├── TriCustomDrawer.cs ├── TriCustomDrawer.cs.meta ├── TriDrawerOrder.cs ├── TriDrawerOrder.cs.meta ├── TriEditorStyles.cs ├── TriEditorStyles.cs.meta ├── TriElement.cs ├── TriElement.cs.meta ├── TriGroupDrawer.cs ├── TriGroupDrawer.cs.meta ├── TriInspector.Editor.asmdef ├── TriInspector.Editor.asmdef.meta ├── TriProperty.cs ├── TriProperty.cs.meta ├── TriPropertyDefinition.cs ├── TriPropertyDefinition.cs.meta ├── TriPropertyDisableProcessor.cs ├── TriPropertyDisableProcessor.cs.meta ├── TriPropertyExtension.cs ├── TriPropertyExtension.cs.meta ├── TriPropertyHideProcessor.cs ├── TriPropertyHideProcessor.cs.meta ├── TriPropertyOverrideContext.cs ├── TriPropertyOverrideContext.cs.meta ├── TriPropertyTree.cs ├── TriPropertyTree.cs.meta ├── TriPropertyTreeForSerializedObject.cs ├── TriPropertyTreeForSerializedObject.cs.meta ├── TriTypeDefinition.cs ├── TriTypeDefinition.cs.meta ├── TriTypeProcessor.cs ├── TriTypeProcessor.cs.meta ├── TriValidator.cs ├── TriValidator.cs.meta ├── TriValue.cs ├── TriValue.cs.meta ├── TriValueDrawer.cs ├── TriValueDrawer.cs.meta ├── TypeProcessors.meta ├── TypeProcessors │ ├── TriGroupNextTypeProcessor.cs │ ├── TriGroupNextTypeProcessor.cs.meta │ ├── TriRectOffsetTypeProcessor.cs │ ├── TriRectOffsetTypeProcessor.cs.meta │ ├── TriRegisterButtonsTypeProcessor.cs │ ├── TriRegisterButtonsTypeProcessor.cs.meta │ ├── TriRegisterShownByTriFieldsTypeProcessor.cs │ ├── TriRegisterShownByTriFieldsTypeProcessor.cs.meta │ ├── TriRegisterShownByTriPropertiesTypeProcessor.cs │ ├── TriRegisterShownByTriPropertiesTypeProcessor.cs.meta │ ├── TriRegisterUnitySerializedFieldsTypeProcessor.cs │ ├── TriRegisterUnitySerializedFieldsTypeProcessor.cs.meta │ ├── TriSortPropertiesTypeProcessor.cs │ └── TriSortPropertiesTypeProcessor.cs.meta ├── Utilities.meta ├── Utilities │ ├── TriAttributeUtilities.cs │ ├── TriAttributeUtilities.cs.meta │ ├── TriDrawersUtilities.cs │ ├── TriDrawersUtilities.cs.meta │ ├── TriEditorGUI.cs │ ├── TriEditorGUI.cs.meta │ ├── TriEqualityComparer.cs │ ├── TriEqualityComparer.cs.meta │ ├── TriGuiHelper.cs │ ├── TriGuiHelper.cs.meta │ ├── TriManagedReferenceGui.cs │ ├── TriManagedReferenceGui.cs.meta │ ├── TriReflectionUtilities.cs │ ├── TriReflectionUtilities.cs.meta │ ├── TriTypeUtilities.cs │ ├── TriTypeUtilities.cs.meta │ ├── TriUnityInspectorUtilities.cs │ ├── TriUnityInspectorUtilities.cs.meta │ ├── TriUnitySerializationUtilities.cs │ └── TriUnitySerializationUtilities.cs.meta ├── ValidatorsDrawer.cs └── ValidatorsDrawer.cs.meta ├── LICENSE.md ├── LICENSE.md.meta ├── README.md ├── README.md.meta ├── Runtime.meta ├── Runtime ├── Attributes.meta ├── Attributes │ ├── Buttons.meta │ ├── Buttons │ │ ├── ButtonAttribute.cs │ │ ├── ButtonAttribute.cs.meta │ │ ├── EnumToggleButtonsAttribute.cs │ │ └── EnumToggleButtonsAttribute.cs.meta │ ├── Collections.meta │ ├── Collections │ │ ├── ListDrawerSettings.cs │ │ ├── ListDrawerSettings.cs.meta │ │ ├── TableListAttribute.cs │ │ └── TableListAttribute.cs.meta │ ├── Conditionals.meta │ ├── Conditionals │ │ ├── DisableIfAttribute.cs │ │ ├── DisableIfAttribute.cs.meta │ │ ├── DisableInEditModeAttribute.cs │ │ ├── DisableInEditModeAttribute.cs.meta │ │ ├── DisableInPlayModeAttribute.cs │ │ ├── DisableInPlayModeAttribute.cs.meta │ │ ├── EnableIfAttribute.cs │ │ ├── EnableIfAttribute.cs.meta │ │ ├── EnableInEditModeAttribute.cs │ │ ├── EnableInEditModeAttribute.cs.meta │ │ ├── EnableInPlayModeAttribute.cs │ │ ├── EnableInPlayModeAttribute.cs.meta │ │ ├── HideIfAttribute.cs │ │ ├── HideIfAttribute.cs.meta │ │ ├── HideInEditModeAttribute.cs │ │ ├── HideInEditModeAttribute.cs.meta │ │ ├── HideInPlayModeAttribute.cs │ │ ├── HideInPlayModeAttribute.cs.meta │ │ ├── ShowIfAttribute.cs │ │ ├── ShowIfAttribute.cs.meta │ │ ├── ShowInEditModeAttribute.cs │ │ ├── ShowInEditModeAttribute.cs.meta │ │ ├── ShowInPlayModeAttribute.cs │ │ └── ShowInPlayModeAttribute.cs.meta │ ├── Debug.meta │ ├── Debug │ │ ├── ShowDrawerChainAttribute.cs │ │ └── ShowDrawerChainAttribute.cs.meta │ ├── Decorators.meta │ ├── Decorators │ │ ├── DisplayAsStringAttribute.cs │ │ ├── DisplayAsStringAttribute.cs.meta │ │ ├── DropdownAttribute.cs │ │ ├── DropdownAttribute.cs.meta │ │ ├── InlineEditorAttribute.cs │ │ ├── InlineEditorAttribute.cs.meta │ │ ├── SceneAttribute.cs │ │ ├── SceneAttribute.cs.meta │ │ ├── UnitAttribute.cs │ │ └── UnitAttribute.cs.meta │ ├── Groups.meta │ ├── Groups │ │ ├── DeclareBoxGroupAttribute.cs │ │ ├── DeclareBoxGroupAttribute.cs.meta │ │ ├── DeclareFoldoutGroupAttribute.cs │ │ ├── DeclareFoldoutGroupAttribute.cs.meta │ │ ├── DeclareGroupBaseAttribute.cs │ │ ├── DeclareGroupBaseAttribute.cs.meta │ │ ├── DeclareHorizontalGroupAttribute.cs │ │ ├── DeclareHorizontalGroupAttribute.cs.meta │ │ ├── DeclareTabGroupAttribute.cs │ │ ├── DeclareTabGroupAttribute.cs.meta │ │ ├── DeclareToggleGroupAttribute.cs │ │ ├── DeclareToggleGroupAttribute.cs.meta │ │ ├── DeclareVerticalGroupAttribute.cs │ │ ├── DeclareVerticalGroupAttribute.cs.meta │ │ ├── GroupAttribute.cs │ │ ├── GroupAttribute.cs.meta │ │ ├── GroupNextAttribute.cs │ │ ├── GroupNextAttribute.cs.meta │ │ ├── TabAttribute.cs │ │ └── TabAttribute.cs.meta │ ├── Misc.meta │ ├── Misc │ │ ├── HideMonoScriptAttribute.cs │ │ ├── HideMonoScriptAttribute.cs.meta │ │ ├── HideReferencePickerAttribute.cs │ │ ├── HideReferencePickerAttribute.cs.meta │ │ ├── OnValueChangedAttribute.cs │ │ ├── OnValueChangedAttribute.cs.meta │ │ ├── PropertyOrderAttribute.cs │ │ ├── PropertyOrderAttribute.cs.meta │ │ ├── ReadOnlyAttribute.cs │ │ ├── ReadOnlyAttribute.cs.meta │ │ ├── ShowInInspector.cs │ │ └── ShowInInspector.cs.meta │ ├── Others.meta │ ├── Others │ │ ├── DrawWithTriInspectorAttribute.cs │ │ ├── DrawWithTriInspectorAttribute.cs.meta │ │ ├── DrawWithUnityAttribute.cs │ │ └── DrawWithUnityAttribute.cs.meta │ ├── Styling.meta │ ├── Styling │ │ ├── GUIColorAttribute.cs │ │ ├── GUIColorAttribute.cs.meta │ │ ├── HideLabelAttribute.cs │ │ ├── HideLabelAttribute.cs.meta │ │ ├── IndentAttribute.cs │ │ ├── IndentAttribute.cs.meta │ │ ├── InlinePropertyAttribute.cs │ │ ├── InlinePropertyAttribute.cs.meta │ │ ├── LabelTextAttribute.cs │ │ ├── LabelTextAttribute.cs.meta │ │ ├── LabelWidthAttribute.cs │ │ ├── LabelWidthAttribute.cs.meta │ │ ├── PropertySpaceAttribute.cs │ │ ├── PropertySpaceAttribute.cs.meta │ │ ├── PropertyTooltipAttribute.cs │ │ ├── PropertyTooltipAttribute.cs.meta │ │ ├── TitleAttribute.cs │ │ └── TitleAttribute.cs.meta │ ├── Validators.meta │ └── Validators │ │ ├── AssetsOnlyAttribute.cs │ │ ├── AssetsOnlyAttribute.cs.meta │ │ ├── InfoBoxAttribute.cs │ │ ├── InfoBoxAttribute.cs.meta │ │ ├── RequiredAttribute.cs │ │ ├── RequiredAttribute.cs.meta │ │ ├── SceneObjectsOnlyAttribute.cs │ │ ├── SceneObjectsOnlyAttribute.cs.meta │ │ ├── ValidateInputAttribute.cs │ │ └── ValidateInputAttribute.cs.meta ├── ButtonSizes.cs ├── ButtonSizes.cs.meta ├── InlineEditorModes.cs ├── InlineEditorModes.cs.meta ├── TriDropdownList.cs ├── TriDropdownList.cs.meta ├── TriInspector.asmdef ├── TriInspector.asmdef.meta ├── TriValidationResult.cs └── TriValidationResult.cs.meta ├── Unity.InternalAPIEditorBridge.012.meta ├── Unity.InternalAPIEditorBridge.012 ├── AdvancedDropdownProxy.cs ├── AdvancedDropdownProxy.cs.meta ├── AssemblyInfo.cs ├── AssemblyInfo.cs.meta ├── EditorGUIUtilityProxy.cs ├── EditorGUIUtilityProxy.cs.meta ├── EditorProxy.cs ├── EditorProxy.cs.meta ├── GUIClipProxy.cs ├── GUIClipProxy.cs.meta ├── InternalEditorUtilityProxy.cs ├── InternalEditorUtilityProxy.cs.meta ├── ReorderableListProxy.cs ├── ReorderableListProxy.cs.meta ├── ScriptAttributeUtilityProxy.cs ├── ScriptAttributeUtilityProxy.cs.meta ├── Unity.InternalAPIEditorBridge.013.asmref └── Unity.InternalAPIEditorBridge.013.asmref.meta ├── package.json └── package.json.meta /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | 12 | 13 | **Expected behavior** 14 | 15 | 16 | **Code Sample** 17 | 18 | ```csharp 19 | // 20 | ``` 21 | 22 | **Screenshots** 23 | 24 | 25 | **Desktop:** 26 | **Unity version:** 27 | **Tri Inspector version:** 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Feature request or Idea 4 | url: https://github.com/codewriter-packages/Tri-Inspector/discussions/categories/ideas 5 | about: Suggest an idea for this project. 6 | - name: Question 7 | url: https://github.com/codewriter-packages/Tri-Inspector/discussions/categories/q-a 8 | about: Please ask and answer questions here. 9 | -------------------------------------------------------------------------------- /.github/release.yml: -------------------------------------------------------------------------------- 1 | # .github/release.yml 2 | 3 | changelog: 4 | categories: 5 | - title: Breaking Changes 6 | labels: 7 | - breaking-change 8 | - title: Features 9 | labels: 10 | - enhancement 11 | - title: Fixes 12 | labels: 13 | - bug 14 | - title: Changes 15 | labels: 16 | - "*" 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.*~ 2 | *.db 3 | *.sln 4 | *.userprefs 5 | *.csproj 6 | *.pidb 7 | *.unityproj 8 | *.apk 9 | *.stackdump 10 | /Library 11 | /obj 12 | /Temp 13 | /Build* 14 | /Logs/ 15 | /AssetBundles 16 | /Logs/ 17 | .vs 18 | .vscode 19 | .idea 20 | .gradle 21 | *_LEGACY 22 | *.DotSettings.user 23 | /Assets/Plugins/Editor/JetBrains* 24 | /Assets/LEGACY* 25 | /Assets/TextMesh Pro* 26 | /Assets/Plugins/Sirenix* -------------------------------------------------------------------------------- /Editor.Extras.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7f4b4fc58f88d3459559029b269259e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor.Extras/Drawers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62b6b24478bb48c4acc0f072f2687607 3 | timeCreated: 1639376870 -------------------------------------------------------------------------------- /Editor.Extras/Drawers/BuiltinDrawerBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1099ac0317654a238e210dec14c7ea89 3 | timeCreated: 1641570232 -------------------------------------------------------------------------------- /Editor.Extras/Drawers/BuiltinDrawers.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7795a3fa9734e729f1567c86c4926c5 3 | timeCreated: 1639317854 -------------------------------------------------------------------------------- /Editor.Extras/Drawers/ButtonDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 72993eec72494727a60c1ddf2f29abab 3 | timeCreated: 1642527717 -------------------------------------------------------------------------------- /Editor.Extras/Drawers/CustomBuiltInDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 01398997ba14482caf7fd7c566774973 3 | timeCreated: 1670393704 -------------------------------------------------------------------------------- /Editor.Extras/Drawers/DisplayAsStringDrawer.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Drawers; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | [assembly: RegisterTriAttributeDrawer(typeof(DisplayAsStringDrawer), TriDrawerOrder.Decorator, ApplyOnArrayElement = true)] 7 | 8 | namespace TriInspector.Drawers 9 | { 10 | public class DisplayAsStringDrawer : TriAttributeDrawer 11 | { 12 | public override float GetHeight(float width, TriProperty property, TriElement next) 13 | { 14 | return EditorGUIUtility.singleLineHeight; 15 | } 16 | 17 | public override void OnGUI(Rect position, TriProperty property, TriElement next) 18 | { 19 | var value = property.Value; 20 | var text = value != null ? value.ToString() : "Null"; 21 | 22 | var controlId = GUIUtility.GetControlID(FocusType.Passive); 23 | position = EditorGUI.PrefixLabel(position, controlId, property.DisplayNameContent); 24 | GUI.Label(position, text); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Editor.Extras/Drawers/DisplayAsStringDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 094b0ef0486f4f2faf35dba6da11e6b9 3 | timeCreated: 1678604678 -------------------------------------------------------------------------------- /Editor.Extras/Drawers/DropdownDrawer.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Drawers; 3 | using TriInspector.Elements; 4 | using TriInspector.Resolvers; 5 | 6 | [assembly: RegisterTriAttributeDrawer(typeof(DropdownDrawer<>), TriDrawerOrder.Decorator)] 7 | 8 | namespace TriInspector.Drawers 9 | { 10 | public class DropdownDrawer : TriAttributeDrawer 11 | { 12 | private DropdownValuesResolver _valuesResolver; 13 | 14 | public override TriExtensionInitializationResult Initialize(TriPropertyDefinition propertyDefinition) 15 | { 16 | _valuesResolver = DropdownValuesResolver.Resolve(propertyDefinition, Attribute.Values); 17 | 18 | if (_valuesResolver.TryGetErrorString(out var error)) 19 | { 20 | return error; 21 | } 22 | 23 | return TriExtensionInitializationResult.Ok; 24 | } 25 | 26 | public override TriElement CreateElement(TriProperty property, TriElement next) 27 | { 28 | return new TriDropdownElement(property, _valuesResolver.GetDropdownItems); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /Editor.Extras/Drawers/DropdownDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 355fb8aedd1f4aca846a8bbf96558a5d 3 | timeCreated: 1656941791 -------------------------------------------------------------------------------- /Editor.Extras/Drawers/EnumToggleButtonsDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f78353120e744dead6caed9c9891e25 3 | timeCreated: 1653817544 -------------------------------------------------------------------------------- /Editor.Extras/Drawers/GUIColorDrawer.cs: -------------------------------------------------------------------------------- 1 | using JetBrains.Annotations; 2 | using TriInspector; 3 | using TriInspector.Drawers; 4 | using TriInspector.Resolvers; 5 | using UnityEngine; 6 | 7 | [assembly: RegisterTriAttributeDrawer(typeof(GUIColorDrawer), TriDrawerOrder.Decorator)] 8 | 9 | namespace TriInspector.Drawers 10 | { 11 | public class GUIColorDrawer : TriAttributeDrawer 12 | { 13 | [CanBeNull] private ValueResolver _colorResolver; 14 | 15 | public override TriExtensionInitializationResult Initialize(TriPropertyDefinition propertyDefinition) 16 | { 17 | if (!string.IsNullOrEmpty(Attribute.GetColor)) 18 | { 19 | _colorResolver = ValueResolver.Resolve(propertyDefinition, Attribute.GetColor); 20 | } 21 | 22 | if (_colorResolver != null && _colorResolver.TryGetErrorString(out var error)) 23 | { 24 | return error; 25 | } 26 | 27 | return TriExtensionInitializationResult.Ok; 28 | } 29 | 30 | public override void OnGUI(Rect position, TriProperty property, TriElement next) 31 | { 32 | var oldColor = GUI.color; 33 | var newColor = _colorResolver?.GetValue(property, Color.white) ?? Attribute.Color; 34 | 35 | GUI.color = newColor; 36 | GUI.contentColor = newColor; 37 | 38 | next.OnGUI(position); 39 | 40 | GUI.color = oldColor; 41 | GUI.contentColor = oldColor; 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /Editor.Extras/Drawers/GUIColorDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e34331cbcd3451cb18c9cc11c43f7b3 3 | timeCreated: 1638943578 -------------------------------------------------------------------------------- /Editor.Extras/Drawers/IndentDrawer.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Drawers; 3 | using TriInspector.Utilities; 4 | using UnityEngine; 5 | 6 | [assembly: RegisterTriAttributeDrawer(typeof(IndentDrawer), TriDrawerOrder.Decorator)] 7 | 8 | namespace TriInspector.Drawers 9 | { 10 | public class IndentDrawer : TriAttributeDrawer 11 | { 12 | public override void OnGUI(Rect position, TriProperty property, TriElement next) 13 | { 14 | using (var indentedRectScope = TriGuiHelper.PushIndentedRect(position, Attribute.Indent)) 15 | { 16 | next.OnGUI(indentedRectScope.IndentedRect); 17 | } 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Editor.Extras/Drawers/IndentDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 53bdb27623d2437a9af368e1342d9176 3 | timeCreated: 1638947263 -------------------------------------------------------------------------------- /Editor.Extras/Drawers/InlineEditorDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 088c34bc4fc448b4aac18ed9bf4f9bc6 3 | timeCreated: 1641657562 -------------------------------------------------------------------------------- /Editor.Extras/Drawers/LabelWidthDrawer.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Drawers; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | [assembly: RegisterTriAttributeDrawer(typeof(LabelWidthDrawer), TriDrawerOrder.Decorator)] 7 | 8 | namespace TriInspector.Drawers 9 | { 10 | public class LabelWidthDrawer : TriAttributeDrawer 11 | { 12 | public override void OnGUI(Rect position, TriProperty property, TriElement next) 13 | { 14 | var oldLabelWidth = EditorGUIUtility.labelWidth; 15 | 16 | EditorGUIUtility.labelWidth = Attribute.Width; 17 | next.OnGUI(position); 18 | EditorGUIUtility.labelWidth = oldLabelWidth; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Editor.Extras/Drawers/LabelWidthDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7bb028f84224ec5817b1c807ca5db86 3 | timeCreated: 1638948103 -------------------------------------------------------------------------------- /Editor.Extras/Drawers/ObjectReferenceDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95268b41deb942b8882969bf23911eaf 3 | timeCreated: 1641571162 -------------------------------------------------------------------------------- /Editor.Extras/Drawers/OnValueChangedDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 16bb69c0bfa84c69b1cd04863fdd1570 3 | timeCreated: 1654159943 -------------------------------------------------------------------------------- /Editor.Extras/Drawers/PropertySpaceDrawer.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Drawers; 3 | using UnityEngine; 4 | 5 | [assembly: RegisterTriAttributeDrawer(typeof(PropertySpaceDrawer), TriDrawerOrder.Inspector)] 6 | 7 | namespace TriInspector.Drawers 8 | { 9 | public class PropertySpaceDrawer : TriAttributeDrawer 10 | { 11 | public override float GetHeight(float width, TriProperty property, TriElement next) 12 | { 13 | var totalSpace = Attribute.SpaceBefore + Attribute.SpaceAfter; 14 | 15 | return next.GetHeight(width) + totalSpace; 16 | } 17 | 18 | public override void OnGUI(Rect position, TriProperty property, TriElement next) 19 | { 20 | var contentPosition = new Rect(position) 21 | { 22 | yMin = position.yMin + Attribute.SpaceBefore, 23 | yMax = position.yMax - Attribute.SpaceAfter, 24 | }; 25 | 26 | next.OnGUI(contentPosition); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /Editor.Extras/Drawers/PropertySpaceDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d703a4146e75487aa57e22f375b04c32 3 | timeCreated: 1638942558 -------------------------------------------------------------------------------- /Editor.Extras/Drawers/SceneDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 47b6083a040749429c1f3371f0413847 3 | timeCreated: 1657956568 -------------------------------------------------------------------------------- /Editor.Extras/Drawers/ShowDrawerChainDrawer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Text; 3 | using TriInspector; 4 | using TriInspector.Drawers; 5 | using TriInspector.Elements; 6 | 7 | [assembly: RegisterTriAttributeDrawer(typeof(ShowDrawerChainDrawer), TriDrawerOrder.System)] 8 | 9 | namespace TriInspector.Drawers 10 | { 11 | public class ShowDrawerChainDrawer : TriAttributeDrawer 12 | { 13 | public override TriElement CreateElement(TriProperty property, TriElement next) 14 | { 15 | return new TriDrawerChainInfoElement(property.AllDrawers, next); 16 | } 17 | } 18 | 19 | public class TriDrawerChainInfoElement : TriElement 20 | { 21 | public TriDrawerChainInfoElement(IReadOnlyList drawers, TriElement next) 22 | { 23 | var info = new StringBuilder(); 24 | 25 | info.Append("Drawer Chain:"); 26 | 27 | for (var i = 0; i < drawers.Count; i++) 28 | { 29 | var drawer = drawers[i]; 30 | info.AppendLine(); 31 | info.Append(i).Append(": ").Append(drawer.GetType().Name); 32 | } 33 | 34 | AddChild(new TriInfoBoxElement(info.ToString())); 35 | AddChild(next); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /Editor.Extras/Drawers/ShowDrawerChainDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d473213c669247e48e0059471d0b6d2c 3 | timeCreated: 1639215046 -------------------------------------------------------------------------------- /Editor.Extras/Drawers/TableListDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 08ffdef4b26f43f5bb964ff72b883cdd 3 | timeCreated: 1642780682 -------------------------------------------------------------------------------- /Editor.Extras/Drawers/TitleDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2ad25a9f98e94ba1aafe184b7fed387d 3 | timeCreated: 1638944499 -------------------------------------------------------------------------------- /Editor.Extras/Drawers/UnitDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5f0656fafab761b439d7d5e089113f53 -------------------------------------------------------------------------------- /Editor.Extras/GroupDrawers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f1f781f159fb4215882cf59a6c4cbfa4 3 | timeCreated: 1639417598 -------------------------------------------------------------------------------- /Editor.Extras/GroupDrawers/TriBoxGroupDrawer.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Elements; 3 | using TriInspector.GroupDrawers; 4 | 5 | [assembly: RegisterTriGroupDrawer(typeof(TriBoxGroupDrawer))] 6 | 7 | namespace TriInspector.GroupDrawers 8 | { 9 | public class TriBoxGroupDrawer : TriGroupDrawer 10 | { 11 | public override TriPropertyCollectionBaseElement CreateElement(DeclareBoxGroupAttribute attribute) 12 | { 13 | return new TriBoxGroupElement(new TriBoxGroupElement.Props 14 | { 15 | title = attribute.Title, 16 | titleMode = attribute.HideTitle 17 | ? TriBoxGroupElement.TitleMode.Hidden 18 | : TriBoxGroupElement.TitleMode.Normal, 19 | hideIfChildrenInvisible = true, 20 | }); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Editor.Extras/GroupDrawers/TriBoxGroupDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 735d0d9ee1cc4692ac11013b95983551 3 | timeCreated: 1639417619 -------------------------------------------------------------------------------- /Editor.Extras/GroupDrawers/TriFoldoutGroupDrawer.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Elements; 3 | using TriInspector.GroupDrawers; 4 | 5 | [assembly: RegisterTriGroupDrawer(typeof(TriFoldoutGroupDrawer))] 6 | 7 | namespace TriInspector.GroupDrawers 8 | { 9 | public class TriFoldoutGroupDrawer : TriGroupDrawer 10 | { 11 | public override TriPropertyCollectionBaseElement CreateElement(DeclareFoldoutGroupAttribute attribute) 12 | { 13 | return new TriBoxGroupElement(new TriBoxGroupElement.Props 14 | { 15 | title = attribute.Title, 16 | titleMode = TriBoxGroupElement.TitleMode.Foldout, 17 | expandedByDefault = attribute.Expanded, 18 | hideIfChildrenInvisible = true, 19 | }); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /Editor.Extras/GroupDrawers/TriFoldoutGroupDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ebf8a67d451c4932a7502f7f220cc938 3 | timeCreated: 1668331607 -------------------------------------------------------------------------------- /Editor.Extras/GroupDrawers/TriHorizontalGroupDrawer.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Elements; 3 | using TriInspector.GroupDrawers; 4 | using UnityEngine; 5 | 6 | [assembly: RegisterTriGroupDrawer(typeof(TriHorizontalGroupDrawer))] 7 | 8 | namespace TriInspector.GroupDrawers 9 | { 10 | public class TriHorizontalGroupDrawer : TriGroupDrawer 11 | { 12 | public override TriPropertyCollectionBaseElement CreateElement(DeclareHorizontalGroupAttribute attribute) 13 | { 14 | return new TriHorizontalGroupElement(attribute.Sizes); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Editor.Extras/GroupDrawers/TriHorizontalGroupDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 866eb8cc0f46446b8ceb1b2cb78b344c 3 | timeCreated: 1640871674 -------------------------------------------------------------------------------- /Editor.Extras/GroupDrawers/TriTabGroupDrawer.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Elements; 3 | using TriInspector.GroupDrawers; 4 | 5 | [assembly: RegisterTriGroupDrawer(typeof(TriTabGroupDrawer))] 6 | 7 | namespace TriInspector.GroupDrawers 8 | { 9 | public class TriTabGroupDrawer : TriGroupDrawer 10 | { 11 | public override TriPropertyCollectionBaseElement CreateElement(DeclareTabGroupAttribute attribute) 12 | { 13 | return new TriTabGroupElement(); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Editor.Extras/GroupDrawers/TriTabGroupDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d4f714ffdae47c79edb698ab906daea 3 | timeCreated: 1642758980 -------------------------------------------------------------------------------- /Editor.Extras/GroupDrawers/TriToggleGroupDrawer.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Elements; 3 | using TriInspector.GroupDrawers; 4 | 5 | [assembly: RegisterTriGroupDrawer(typeof(TriToggleGroupDrawer))] 6 | 7 | namespace TriInspector.GroupDrawers 8 | { 9 | public class TriToggleGroupDrawer : TriGroupDrawer 10 | { 11 | public override TriPropertyCollectionBaseElement CreateElement(DeclareToggleGroupAttribute attribute) 12 | { 13 | return new TriBoxGroupElement(new TriBoxGroupElement.Props 14 | { 15 | title = attribute.Title, 16 | titleMode = TriBoxGroupElement.TitleMode.Toggle, 17 | expandedByDefault = attribute.Collapsible, 18 | hideIfChildrenInvisible = true, 19 | }); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /Editor.Extras/GroupDrawers/TriToggleGroupDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cfcf76d363a541e39de3654d978a39ac 3 | timeCreated: 1680888338 -------------------------------------------------------------------------------- /Editor.Extras/GroupDrawers/TriVerticalGroupDrawer.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Elements; 3 | using TriInspector.GroupDrawers; 4 | 5 | [assembly: RegisterTriGroupDrawer(typeof(TriVerticalGroupDrawer))] 6 | 7 | namespace TriInspector.GroupDrawers 8 | { 9 | public class TriVerticalGroupDrawer : TriGroupDrawer 10 | { 11 | public override TriPropertyCollectionBaseElement CreateElement(DeclareVerticalGroupAttribute attribute) 12 | { 13 | return new TriVerticalGroupElement(); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Editor.Extras/GroupDrawers/TriVerticalGroupDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 20ea0129773b41ea8a2f43a18da811f4 3 | timeCreated: 1643558679 -------------------------------------------------------------------------------- /Editor.Extras/Processors.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3746e0c31b82450b804ea460d753f4fa 3 | timeCreated: 1641384540 -------------------------------------------------------------------------------- /Editor.Extras/Processors/DisableIfProcessor.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Processors; 3 | using TriInspector.Resolvers; 4 | 5 | [assembly: RegisterTriPropertyDisableProcessor(typeof(DisableIfProcessor))] 6 | 7 | namespace TriInspector.Processors 8 | { 9 | public class DisableIfProcessor : TriPropertyDisableProcessor 10 | { 11 | private ValueResolver _conditionResolver; 12 | 13 | public override TriExtensionInitializationResult Initialize(TriPropertyDefinition propertyDefinition) 14 | { 15 | base.Initialize(propertyDefinition); 16 | 17 | _conditionResolver = ValueResolver.Resolve(propertyDefinition, Attribute.Condition); 18 | if (_conditionResolver.TryGetErrorString(out var error)) 19 | { 20 | return error; 21 | } 22 | 23 | return TriExtensionInitializationResult.Ok; 24 | } 25 | 26 | public sealed override bool IsDisabled(TriProperty property) 27 | { 28 | var val = _conditionResolver.GetValue(property); 29 | var equal = val?.Equals(Attribute.Value) ?? Attribute.Value == null; 30 | return equal != Attribute.Inverse; 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Editor.Extras/Processors/DisableIfProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d369bf6c40b447ae95d39125ed769582 3 | timeCreated: 1652289896 -------------------------------------------------------------------------------- /Editor.Extras/Processors/DisableInEditModeProcessor.cs: -------------------------------------------------------------------------------- 1 | using TriInspector.Processors; 2 | using TriInspector; 3 | using UnityEngine; 4 | 5 | [assembly: RegisterTriPropertyDisableProcessor(typeof(DisableInEditModeProcessor))] 6 | 7 | namespace TriInspector.Processors 8 | { 9 | public class DisableInEditModeProcessor : TriPropertyDisableProcessor 10 | { 11 | public override bool IsDisabled(TriProperty property) 12 | { 13 | return Application.isPlaying == Attribute.Inverse; 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Editor.Extras/Processors/DisableInEditModeProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 25cd746f35a64f10805d0983690a10f1 3 | timeCreated: 1642586603 -------------------------------------------------------------------------------- /Editor.Extras/Processors/DisableInPlayModeProcessor.cs: -------------------------------------------------------------------------------- 1 | using TriInspector.Processors; 2 | using TriInspector; 3 | using UnityEngine; 4 | 5 | [assembly: RegisterTriPropertyDisableProcessor(typeof(DisableInPlayModeProcessor))] 6 | 7 | namespace TriInspector.Processors 8 | { 9 | public class DisableInPlayModeProcessor : TriPropertyDisableProcessor 10 | { 11 | public override bool IsDisabled(TriProperty property) 12 | { 13 | return Application.isPlaying != Attribute.Inverse; 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Editor.Extras/Processors/DisableInPlayModeProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 397dcddedf9a4f91931e5bdc40c668aa 3 | timeCreated: 1641385800 -------------------------------------------------------------------------------- /Editor.Extras/Processors/HIdeInEditModeProcessor.cs: -------------------------------------------------------------------------------- 1 | using TriInspector.Processors; 2 | using TriInspector; 3 | using UnityEngine; 4 | 5 | [assembly: RegisterTriPropertyHideProcessor(typeof(HideInEditModeProcessor))] 6 | 7 | namespace TriInspector.Processors 8 | { 9 | public class HideInEditModeProcessor : TriPropertyHideProcessor 10 | { 11 | public override bool IsHidden(TriProperty property) 12 | { 13 | return Application.isPlaying == Attribute.Inverse; 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Editor.Extras/Processors/HIdeInEditModeProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d8995c5efd94e069afca842fc79aab6 3 | timeCreated: 1642586621 -------------------------------------------------------------------------------- /Editor.Extras/Processors/HideIfProcessor.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Processors; 3 | using TriInspector.Resolvers; 4 | 5 | [assembly: RegisterTriPropertyHideProcessor(typeof(HideIfProcessor))] 6 | 7 | namespace TriInspector.Processors 8 | { 9 | public class HideIfProcessor : TriPropertyHideProcessor 10 | { 11 | private ValueResolver _conditionResolver; 12 | 13 | public override TriExtensionInitializationResult Initialize(TriPropertyDefinition propertyDefinition) 14 | { 15 | base.Initialize(propertyDefinition); 16 | 17 | _conditionResolver = ValueResolver.Resolve(propertyDefinition, Attribute.Condition); 18 | 19 | if (_conditionResolver.TryGetErrorString(out var error)) 20 | { 21 | return error; 22 | } 23 | 24 | return TriExtensionInitializationResult.Ok; 25 | } 26 | 27 | public sealed override bool IsHidden(TriProperty property) 28 | { 29 | var val = _conditionResolver.GetValue(property); 30 | var equal = val?.Equals(Attribute.Value) ?? Attribute.Value == null; 31 | return equal != Attribute.Inverse; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /Editor.Extras/Processors/HideIfProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 141d6b9341384ad58f40cd214c6be095 3 | timeCreated: 1652289316 -------------------------------------------------------------------------------- /Editor.Extras/Processors/HideInPlayModeProcessor.cs: -------------------------------------------------------------------------------- 1 | using TriInspector.Processors; 2 | using TriInspector; 3 | using UnityEngine; 4 | 5 | [assembly: RegisterTriPropertyHideProcessor(typeof(HideInPlayModeProcessor))] 6 | 7 | namespace TriInspector.Processors 8 | { 9 | public class HideInPlayModeProcessor : TriPropertyHideProcessor 10 | { 11 | public override bool IsHidden(TriProperty property) 12 | { 13 | return Application.isPlaying != Attribute.Inverse; 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Editor.Extras/Processors/HideInPlayModeProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99642f3dada346b48762044cabacc69e 3 | timeCreated: 1641384551 -------------------------------------------------------------------------------- /Editor.Extras/TriInspector.Editor.Extras.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TriInspector.Editor.Extras", 3 | "rootNamespace": "", 4 | "references": [ 5 | "TriInspector", 6 | "TriInspector.Editor", 7 | "Unity.InternalAPIEditorBridge.013" 8 | ], 9 | "includePlatforms": [ 10 | "Editor" 11 | ], 12 | "excludePlatforms": [], 13 | "allowUnsafeCode": false, 14 | "overrideReferences": true, 15 | "precompiledReferences": [], 16 | "autoReferenced": false, 17 | "defineConstraints": [], 18 | "versionDefines": [], 19 | "noEngineReferences": false 20 | } -------------------------------------------------------------------------------- /Editor.Extras/TriInspector.Editor.Extras.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7be4600869ec09d4ca9a37d1dbfbf1a2 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor.Extras/Validators.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e710031376614be5903f943dc4c4d07f 3 | timeCreated: 1642261774 -------------------------------------------------------------------------------- /Editor.Extras/Validators/AssetsOnlyValidator.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Validators; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | [assembly: RegisterTriAttributeValidator(typeof(AssetsOnlyValidator))] 7 | 8 | namespace TriInspector.Validators 9 | { 10 | public class AssetsOnlyValidator : TriAttributeValidator 11 | { 12 | public override TriExtensionInitializationResult Initialize(TriPropertyDefinition propertyDefinition) 13 | { 14 | if (!typeof(Object).IsAssignableFrom(propertyDefinition.FieldType)) 15 | { 16 | return "AssetsOnly attribute can be used only on Object fields"; 17 | } 18 | 19 | return TriExtensionInitializationResult.Ok; 20 | } 21 | 22 | public override TriValidationResult Validate(TriProperty property) 23 | { 24 | var obj = property.TryGetSerializedProperty(out var serializedProperty) 25 | ? serializedProperty.objectReferenceValue 26 | : (Object) property.Value; 27 | 28 | if (obj == null || AssetDatabase.Contains(obj)) 29 | { 30 | return TriValidationResult.Valid; 31 | } 32 | 33 | return TriValidationResult.Error($"{obj} is not as asset."); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /Editor.Extras/Validators/AssetsOnlyValidator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 55b05031f9974136865973d335d322e0 3 | timeCreated: 1654861744 -------------------------------------------------------------------------------- /Editor.Extras/Validators/DropdownValidator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22bd6d63410f4a7ba8564e185844ddbf 3 | timeCreated: 1680714123 -------------------------------------------------------------------------------- /Editor.Extras/Validators/InfoBoxValidator.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Resolvers; 3 | using TriInspector.Validators; 4 | 5 | [assembly: RegisterTriAttributeValidator(typeof(InfoBoxValidator))] 6 | 7 | namespace TriInspector.Validators 8 | { 9 | public class InfoBoxValidator : TriAttributeValidator 10 | { 11 | private ValueResolver _resolver; 12 | private ValueResolver _visibleIfResolver; 13 | 14 | public override TriExtensionInitializationResult Initialize(TriPropertyDefinition propertyDefinition) 15 | { 16 | _resolver = ValueResolver.ResolveString(propertyDefinition, Attribute.Text); 17 | _visibleIfResolver = Attribute.VisibleIf != null 18 | ? ValueResolver.Resolve(propertyDefinition, Attribute.VisibleIf) 19 | : null; 20 | 21 | if (ValueResolver.TryGetErrorString(_resolver, _visibleIfResolver, out var error)) 22 | { 23 | return error; 24 | } 25 | 26 | return TriExtensionInitializationResult.Ok; 27 | } 28 | 29 | public override TriValidationResult Validate(TriProperty property) 30 | { 31 | if (_visibleIfResolver != null && !_visibleIfResolver.GetValue(property)) 32 | { 33 | return TriValidationResult.Valid; 34 | } 35 | 36 | var message = _resolver.GetValue(property, ""); 37 | return new TriValidationResult(false, message, Attribute.MessageType); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /Editor.Extras/Validators/InfoBoxValidator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d6a852249c1149edbbc1bd0e997726ad 3 | timeCreated: 1652968861 -------------------------------------------------------------------------------- /Editor.Extras/Validators/MissingReferenceValidator.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Validators; 3 | using UnityEditor; 4 | 5 | [assembly: RegisterTriValueValidator(typeof(MissingReferenceValidator))] 6 | 7 | namespace TriInspector.Validators 8 | { 9 | public class MissingReferenceValidator : TriValueValidator 10 | { 11 | public override TriValidationResult Validate(TriValue propertyValue) 12 | { 13 | if (propertyValue.Property.TryGetSerializedProperty(out var serializedProperty) && 14 | serializedProperty.propertyType == SerializedPropertyType.ObjectReference && 15 | serializedProperty.objectReferenceValue == null && 16 | serializedProperty.objectReferenceInstanceIDValue != 0) 17 | { 18 | return TriValidationResult.Warning($"{GetName(propertyValue.Property)} is missing"); 19 | } 20 | 21 | return TriValidationResult.Valid; 22 | } 23 | 24 | private static string GetName(TriProperty property) 25 | { 26 | var name = property.DisplayName; 27 | if (string.IsNullOrEmpty(name)) 28 | { 29 | name = property.RawName; 30 | } 31 | 32 | return name; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Editor.Extras/Validators/MissingReferenceValidator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e6349ecb04a34792bd193b53f6cc0ca3 3 | timeCreated: 1642263604 -------------------------------------------------------------------------------- /Editor.Extras/Validators/RequiredValidator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 58b713b3023343c3b571cd1b3fa7fdab 3 | timeCreated: 1642261781 -------------------------------------------------------------------------------- /Editor.Extras/Validators/SceneObjectsOnlyValidator.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Validators; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | [assembly: RegisterTriAttributeValidator(typeof(SceneObjectsOnlyValidator))] 7 | 8 | namespace TriInspector.Validators 9 | { 10 | public class SceneObjectsOnlyValidator : TriAttributeValidator 11 | { 12 | public override TriExtensionInitializationResult Initialize(TriPropertyDefinition propertyDefinition) 13 | { 14 | if (!typeof(Object).IsAssignableFrom(propertyDefinition.FieldType)) 15 | { 16 | return "AssetsOnly attribute can be used only on Object fields"; 17 | } 18 | 19 | return TriExtensionInitializationResult.Ok; 20 | } 21 | 22 | public override TriValidationResult Validate(TriProperty property) 23 | { 24 | var obj = property.TryGetSerializedProperty(out var serializedProperty) 25 | ? serializedProperty.objectReferenceValue 26 | : (Object) property.Value; 27 | 28 | if (obj == null || !AssetDatabase.Contains(obj)) 29 | { 30 | return TriValidationResult.Valid; 31 | } 32 | 33 | return TriValidationResult.Error($"{obj} cannot be an asset."); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /Editor.Extras/Validators/SceneObjectsOnlyValidator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98948bb92a504f87abeda6e500dc22b2 3 | timeCreated: 1657621306 -------------------------------------------------------------------------------- /Editor.Extras/Validators/SceneValidator.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Validators; 3 | using UnityEditor; 4 | 5 | [assembly: RegisterTriAttributeValidator(typeof(SceneValidator), ApplyOnArrayElement = true)] 6 | 7 | namespace TriInspector.Validators 8 | { 9 | public class SceneValidator : TriAttributeValidator 10 | { 11 | public override TriValidationResult Validate(TriProperty property) 12 | { 13 | if (property.FieldType == typeof(string)) 14 | { 15 | var value = (string) property.Value; 16 | 17 | if (AssetDatabase.LoadAssetAtPath(value) == null) 18 | { 19 | return TriValidationResult.Error($"{value} not a valid scene"); 20 | } 21 | 22 | foreach (var scene in EditorBuildSettings.scenes) 23 | { 24 | if (!property.Comparer.Equals(value, scene.path)) 25 | { 26 | continue; 27 | } 28 | 29 | if (!scene.enabled) 30 | { 31 | return TriValidationResult.Error($"{value} disabled in build settings"); 32 | } 33 | 34 | return TriValidationResult.Valid; 35 | } 36 | 37 | return TriValidationResult.Error($"{value} not added to build settings"); 38 | } 39 | 40 | return TriValidationResult.Valid; 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /Editor.Extras/Validators/SceneValidator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 568b3c97e76048dd8a005d101b86a8e4 3 | timeCreated: 1657958255 -------------------------------------------------------------------------------- /Editor.Extras/Validators/TypeMismatchValidator.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Validators; 3 | using UnityEditor; 4 | 5 | [assembly: RegisterTriValueValidator(typeof(TypeMismatchValidator<>))] 6 | 7 | namespace TriInspector.Validators 8 | { 9 | public class TypeMismatchValidator : TriValueValidator 10 | where T : UnityEngine.Object 11 | { 12 | public override TriValidationResult Validate(TriValue propertyValue) 13 | { 14 | if (propertyValue.Property.TryGetSerializedProperty(out var serializedProperty) && 15 | serializedProperty.propertyType == SerializedPropertyType.ObjectReference && 16 | serializedProperty.objectReferenceValue != null && 17 | (serializedProperty.objectReferenceValue is T) == false) 18 | { 19 | var displayName = propertyValue.Property.DisplayName; 20 | var actual = serializedProperty.objectReferenceValue.GetType().Name; 21 | var expected = propertyValue.Property.FieldType.Name; 22 | var msg = $"{displayName} does not match the type: actual = {actual}, expected = {expected}"; 23 | return TriValidationResult.Warning(msg); 24 | } 25 | 26 | return TriValidationResult.Valid; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /Editor.Extras/Validators/TypeMismatchValidator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 510766d9f1764aae8c21d517ebb2c392 3 | timeCreated: 1652079793 -------------------------------------------------------------------------------- /Editor.Extras/Validators/ValidateInputValidator.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using TriInspector.Resolvers; 3 | using TriInspector.Validators; 4 | 5 | [assembly: RegisterTriAttributeValidator(typeof(ValidateInputValidator))] 6 | 7 | namespace TriInspector.Validators 8 | { 9 | public class ValidateInputValidator : TriAttributeValidator 10 | { 11 | private ValueResolver _resolver; 12 | 13 | public override TriExtensionInitializationResult Initialize(TriPropertyDefinition propertyDefinition) 14 | { 15 | base.Initialize(propertyDefinition); 16 | 17 | _resolver = ValueResolver.Resolve(propertyDefinition, Attribute.Method); 18 | 19 | if (_resolver.TryGetErrorString(out var error)) 20 | { 21 | return error; 22 | } 23 | 24 | return TriExtensionInitializationResult.Ok; 25 | } 26 | 27 | public override TriValidationResult Validate(TriProperty property) 28 | { 29 | if (_resolver.TryGetErrorString(out var error)) 30 | { 31 | return TriValidationResult.Error(error); 32 | } 33 | 34 | return _resolver.GetValue(property); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /Editor.Extras/Validators/ValidateInputValidator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae1b5ddc1e804ada8a15b6f1501674e0 3 | timeCreated: 1651936935 -------------------------------------------------------------------------------- /Editor.Integrations.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e6b289af1e2447f40a294b9fd063474a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor.Integrations/Odin.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f456555c4d04a27a1ee0166c06cf796 3 | timeCreated: 1652773355 -------------------------------------------------------------------------------- /Editor.Integrations/Odin/OdinFieldDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ee9c37a0a21643c2a7037a7a159b4355 3 | timeCreated: 1652773581 -------------------------------------------------------------------------------- /Editor.Integrations/Odin/OdinFieldValidator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 50b3a32d5da945fbbdf9a981a9de5f86 3 | timeCreated: 1653119957 -------------------------------------------------------------------------------- /Editor.Integrations/Odin/OdinObjectDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6a211e55ec804aa4b8554563e98d9b04 3 | timeCreated: 1653129453 -------------------------------------------------------------------------------- /Editor.Integrations/Odin/OdinObjectValidator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbb0d53e419644038a32323fb3083fb3 3 | timeCreated: 1653123315 -------------------------------------------------------------------------------- /Editor.Integrations/Odin/TriInspector.Editor.Integrations.Odin.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TriInspector.Editor.Integrations.Odin", 3 | "rootNamespace": "", 4 | "references": [ 5 | "TriInspector", 6 | "TriInspector.Editor" 7 | ], 8 | "includePlatforms": [ 9 | "Editor" 10 | ], 11 | "excludePlatforms": [], 12 | "allowUnsafeCode": false, 13 | "overrideReferences": true, 14 | "precompiledReferences": [ 15 | "Sirenix.OdinInspector.Editor.dll", 16 | "Sirenix.Utilities.Editor.dll", 17 | "Sirenix.Utilities.dll" 18 | ], 19 | "autoReferenced": false, 20 | "defineConstraints": [ 21 | "ODIN_INSPECTOR" 22 | ], 23 | "versionDefines": [], 24 | "noEngineReferences": false 25 | } -------------------------------------------------------------------------------- /Editor.Integrations/Odin/TriInspector.Editor.Integrations.Odin.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 90456d836f7b85c45a469d1f5ee611b1 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor.Integrations/Odin/TriOdinExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c13b27eaa04b477db49de9a0582608b5 3 | timeCreated: 1653124004 -------------------------------------------------------------------------------- /Editor.Integrations/Odin/TriOdinUtility.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | using Sirenix.Utilities; 5 | using UnityEditor; 6 | 7 | namespace TriInspector.Editor.Integrations.Odin 8 | { 9 | public static class TriOdinUtility 10 | { 11 | private static readonly Dictionary TriDrawnAssemblies = new Dictionary(); 12 | private static HashSet _triDrawnTypes; 13 | 14 | public static bool IsDrawnByTri(Type type) 15 | { 16 | if (_triDrawnTypes == null) 17 | { 18 | var list = TypeCache.GetTypesWithAttribute(); 19 | var array = new Type[list.Count]; 20 | list.CopyTo(array, 0); 21 | _triDrawnTypes = new HashSet(array); 22 | } 23 | 24 | if (_triDrawnTypes.Contains(type)) 25 | { 26 | return true; 27 | } 28 | 29 | var asm = type.Assembly; 30 | if (TriDrawnAssemblies.TryGetValue(asm, out var assemblyDrawnByTri)) 31 | { 32 | return assemblyDrawnByTri; 33 | } 34 | 35 | assemblyDrawnByTri = asm.IsDefined(false); 36 | TriDrawnAssemblies[asm] = assemblyDrawnByTri; 37 | return assemblyDrawnByTri; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /Editor.Integrations/Odin/TriOdinUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2be8b6a4b4d44c19156b0f1c1d40fc6 3 | timeCreated: 1661688784 -------------------------------------------------------------------------------- /Editor.Integrations/Odin/TriPropertyTreeForOdin.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d883d32fb4d94844b172e3a08edbf2b4 3 | timeCreated: 1652774822 -------------------------------------------------------------------------------- /Editor.Samples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0e88f221fc25564eb4caf4d374bab5b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor.Samples/Buttons.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1068a85eb61646efb6cffc2680cf0be3 3 | timeCreated: 1656857100 -------------------------------------------------------------------------------- /Editor.Samples/Buttons/Buttons_ButtonSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Buttons_ButtonSample : ScriptableObject 5 | { 6 | [Button("Click me!")] 7 | private void DoButton() 8 | { 9 | Debug.Log("Button clicked!"); 10 | } 11 | 12 | [Button(ButtonSizes.Large)] 13 | private void DoButtonWithParameters(Vector3 vec, string str = "default value") 14 | { 15 | Debug.Log($"Button with parameters: {vec} {str}"); 16 | } 17 | } -------------------------------------------------------------------------------- /Editor.Samples/Buttons/Buttons_ButtonSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cfc765523b0944faa880f75c257dc865 3 | timeCreated: 1656857108 -------------------------------------------------------------------------------- /Editor.Samples/Buttons/Buttons_EnumToggleButtonsSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using TriInspector; 3 | using UnityEngine; 4 | 5 | public class Buttons_EnumToggleButtonsSample : ScriptableObject 6 | { 7 | [EnumToggleButtons] public SomeEnum someEnum; 8 | [EnumToggleButtons] public SomeFlags someFlags; 9 | 10 | public enum SomeEnum 11 | { 12 | One, 13 | Two, 14 | Three 15 | } 16 | 17 | [Flags] public enum SomeFlags 18 | { 19 | A = 1 << 0, 20 | B = 1 << 1, 21 | C = 1 << 2, 22 | AB = A | B, 23 | BC = B | C, 24 | } 25 | } -------------------------------------------------------------------------------- /Editor.Samples/Buttons/Buttons_EnumToggleButtonsSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a5287edf013a41608e8082a8766f1f1a 3 | timeCreated: 1656857128 -------------------------------------------------------------------------------- /Editor.Samples/Collections.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f188dac8f6fb4d7cb4251a6d0a3469a9 3 | timeCreated: 1656855659 -------------------------------------------------------------------------------- /Editor.Samples/Collections/Collections_ListDrawerSettingsSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using TriInspector; 4 | using UnityEngine; 5 | 6 | public class Collections_ListDrawerSettingsSample : ScriptableObject 7 | { 8 | [ListDrawerSettings(Draggable = true, 9 | HideAddButton = false, 10 | HideRemoveButton = false, 11 | AlwaysExpanded = false)] 12 | public List list; 13 | 14 | [ListDrawerSettings(Draggable = false, AlwaysExpanded = true)] 15 | public Vector3[] vectors; 16 | 17 | [ListDrawerSettings(ShowElementLabels = true)] 18 | public MyStruct[] namedStructs = new MyStruct[] 19 | { 20 | new MyStruct {name = "First", value = 1}, 21 | new MyStruct {name = "Second", value = 2,}, 22 | }; 23 | 24 | [Serializable] 25 | public struct MyStruct 26 | { 27 | public string name; 28 | public int value; 29 | } 30 | } -------------------------------------------------------------------------------- /Editor.Samples/Collections/Collections_ListDrawerSettingsSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a00395c39c074032849fd8ac4b9dd3b8 3 | timeCreated: 1656856967 -------------------------------------------------------------------------------- /Editor.Samples/Collections/Collections_TableListSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using TriInspector; 4 | using UnityEngine; 5 | 6 | public class Collections_TableListSample : ScriptableObject 7 | { 8 | [TableList(Draggable = true, 9 | HideAddButton = false, 10 | HideRemoveButton = false, 11 | AlwaysExpanded = false)] 12 | public List table; 13 | 14 | [Serializable] 15 | public class TableItem 16 | { 17 | [Required] 18 | public Texture icon; 19 | 20 | public string description; 21 | 22 | [Group("Combined"), LabelWidth(16)] 23 | public string A, B, C; 24 | 25 | [Button, Group("Actions")] 26 | public void Test1() 27 | { 28 | } 29 | 30 | [Button, Group("Actions")] 31 | public void Test2() 32 | { 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Editor.Samples/Collections/Collections_TableListSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75e67511762f4ce8bb50e9a5edbd0a1a 3 | timeCreated: 1656855664 -------------------------------------------------------------------------------- /Editor.Samples/Conditionals.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 25430c3d53e5452496a9480ebfc66910 3 | timeCreated: 1656857004 -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_DisableIfSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Conditionals_DisableIfSample : ScriptableObject 5 | { 6 | public bool visible; 7 | 8 | [DisableIf(nameof(visible))] 9 | public float val; 10 | } -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_DisableIfSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: be63fdfd5bfc446eb40431b63ad4a582 3 | timeCreated: 1656857086 -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_DisableInEditMode.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Conditionals_DisableInEditMode : ScriptableObject 5 | { 6 | [DisableInEditMode] 7 | public float val; 8 | } -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_DisableInEditMode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d4329a716d424b0babfe5e9c046950f6 3 | timeCreated: 1659515326 -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_DisableInPlayMode.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Conditionals_DisableInPlayMode : ScriptableObject 5 | { 6 | [DisableInPlayMode] 7 | public float val; 8 | } -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_DisableInPlayMode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f04bc8a7e7574f5dafc3e02fc5917e5e 3 | timeCreated: 1659515316 -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_EnableIfSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Conditionals_EnableIfSample : ScriptableObject 5 | { 6 | public bool visible; 7 | 8 | [EnableIf(nameof(visible))] 9 | public float val; 10 | } -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_EnableIfSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b29947c09fc4b7fa1c4c6061eb945f2 3 | timeCreated: 1656857082 -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_EnableInEditMode.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Conditionals_EnableInEditMode : ScriptableObject 5 | { 6 | [EnableInEditMode] 7 | public float val; 8 | } -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_EnableInEditMode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eceba01bbe72411eaeb6ba5a6dd6bdbd 3 | timeCreated: 1659515330 -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_EnableInPlayMode.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Conditionals_EnableInPlayMode : ScriptableObject 5 | { 6 | [EnableInPlayMode] 7 | public float val; 8 | } -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_EnableInPlayMode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b640777fb3e4eb8819741d07b11aa39 3 | timeCreated: 1659515322 -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_HideIfSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Conditionals_HideIfSample : ScriptableObject 5 | { 6 | public bool visible; 7 | 8 | [HideIf(nameof(visible))] 9 | public float val; 10 | } -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_HideIfSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2544a3528997409eb700ca65f1be0147 3 | timeCreated: 1656857076 -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_HideInEditMode.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Conditionals_HideInEditMode : ScriptableObject 5 | { 6 | [HideInEditMode] 7 | public float val; 8 | } -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_HideInEditMode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d2c0afeededf47bcaaebbc3e2d39aed3 3 | timeCreated: 1659515490 -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_HideInPlayMode.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Conditionals_HideInPlayMode : ScriptableObject 5 | { 6 | [HideInPlayMode] 7 | public float val; 8 | } -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_HideInPlayMode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea1cf8b4405a4d309866c2b8cc2225cd 3 | timeCreated: 1659515499 -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_ShowIfSample.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using TriInspector; 3 | using UnityEngine; 4 | 5 | public class Conditionals_ShowIfSample : ScriptableObject 6 | { 7 | public Material material; 8 | public bool toggle; 9 | public SomeEnum someEnum; 10 | 11 | [ShowIf(nameof(material), null)] 12 | public Vector3 showWhenMaterialIsNull; 13 | 14 | [ShowIf(nameof(toggle))] 15 | public List showWhenToggleIsTrue; 16 | 17 | [ShowIf(nameof(toggle), false)] 18 | public Vector3 showWhenToggleIsFalse; 19 | 20 | [ShowIf(nameof(someEnum), SomeEnum.Two)] 21 | public Vector3 showWhenSomeEnumIsTwo; 22 | 23 | public enum SomeEnum { One, Two, Three } 24 | } -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_ShowIfSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 327bc8430b4746e0860a9017e86853d6 3 | timeCreated: 1656857013 -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_ShowInEditMode.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Conditionals_ShowInEditMode : ScriptableObject 5 | { 6 | [ShowInEditMode] 7 | public float val; 8 | } -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_ShowInEditMode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab794f598d3940be927f3ecea8464097 3 | timeCreated: 1659515495 -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_ShowInPlayMode.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Conditionals_ShowInPlayMode : ScriptableObject 5 | { 6 | [ShowInPlayMode] 7 | public float val; 8 | } -------------------------------------------------------------------------------- /Editor.Samples/Conditionals/Conditionals_ShowInPlayMode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4021d03b1ac443de8a283a15a2cc16ac 3 | timeCreated: 1659515502 -------------------------------------------------------------------------------- /Editor.Samples/Debug.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3220f412f1a347aca8175b14166b0664 3 | timeCreated: 1656857161 -------------------------------------------------------------------------------- /Editor.Samples/Debug/Debug_ShowDrawerChainSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Debug_ShowDrawerChainSample : ScriptableObject 5 | { 6 | [ShowDrawerChain] 7 | [Indent] 8 | [PropertySpace] 9 | [Title("Custom Title")] 10 | [GUIColor(1.0f, 0.8f, 0.8f)] 11 | public Vector3 vec; 12 | } -------------------------------------------------------------------------------- /Editor.Samples/Debug/Debug_ShowDrawerChainSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 740fa4ad939943b2878ae3059062ba9e 3 | timeCreated: 1656857166 -------------------------------------------------------------------------------- /Editor.Samples/Decorators.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3a78924b3514722b6a7e06f0c77121d 3 | timeCreated: 1656933680 -------------------------------------------------------------------------------- /Editor.Samples/Decorators/Decorators_DisplayAsStringSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Decorators_DisplayAsStringSample : ScriptableObject 5 | { 6 | [DisplayAsString] 7 | public string hello = "world"; 8 | 9 | [DisplayAsString, HideLabel] 10 | public Texture2D texture; 11 | } -------------------------------------------------------------------------------- /Editor.Samples/Decorators/Decorators_DisplayAsStringSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3ff60d6a7a349a799f3d80feca9df86 3 | timeCreated: 1678604982 -------------------------------------------------------------------------------- /Editor.Samples/Decorators/Decorators_DropdownSample.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using TriInspector; 3 | using UnityEngine; 4 | 5 | public class Decorators_DropdownSample : ScriptableObject 6 | { 7 | [Dropdown(nameof(_intValues))] 8 | public int intValue = 1; 9 | 10 | [Dropdown(nameof(GetStringValues))] 11 | public string stringValue; 12 | 13 | [Dropdown(nameof(GetVectorValues))] 14 | public Vector3 vectorValue; 15 | 16 | private int[] _intValues = {1, 2, 3, 4, 5,}; 17 | 18 | private IEnumerable GetStringValues() 19 | { 20 | yield return "One"; 21 | yield return "Two"; 22 | yield return "Three"; 23 | } 24 | 25 | private IEnumerable> GetVectorValues() 26 | { 27 | return new TriDropdownList 28 | { 29 | {"Zero", Vector3.zero}, 30 | {"One/Forward", Vector3.forward}, 31 | {"One/Backward", Vector3.back}, 32 | {"One/Left", Vector3.left}, 33 | {"One/Right", Vector3.right}, 34 | }; 35 | } 36 | } -------------------------------------------------------------------------------- /Editor.Samples/Decorators/Decorators_DropdownSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69374eab3b684d3babd15136620a9862 3 | timeCreated: 1656933689 -------------------------------------------------------------------------------- /Editor.Samples/Decorators/Decorators_InlineEditorSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Decorators_InlineEditorSample : ScriptableObject 5 | { 6 | [InlineEditor] 7 | public Material mat; 8 | } -------------------------------------------------------------------------------- /Editor.Samples/Decorators/Decorators_InlineEditorSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 151f5ace94624b5b9fa4b4ee34b5e41f 3 | timeCreated: 1656856914 -------------------------------------------------------------------------------- /Editor.Samples/Decorators/Decorators_SceneSample.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using TriInspector; 3 | using UnityEngine; 4 | 5 | public class Decorators_SceneSample : ScriptableObject 6 | { 7 | [Scene] public string scene; 8 | 9 | [Scene] public List scenes; 10 | } -------------------------------------------------------------------------------- /Editor.Samples/Decorators/Decorators_SceneSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: befd41ef61aa410d91f626034c225f90 3 | timeCreated: 1657959467 -------------------------------------------------------------------------------- /Editor.Samples/Decorators/Decorators_UnitSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3aebbc243cbb5bb4b9c6a724ff4e3777 -------------------------------------------------------------------------------- /Editor.Samples/Groups.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1198759fd8a454ea350699846604c21 3 | timeCreated: 1656857197 -------------------------------------------------------------------------------- /Editor.Samples/Groups/Groups_BoxGroup_BasicSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using TriInspector; 3 | using UnityEngine; 4 | 5 | [DeclareBoxGroup("box", HideTitle = true)] 6 | [DeclareBoxGroup("named_box", Title = "My Box")] 7 | [DeclareBoxGroup("boxed_struct", Title = "Boxed Struct")] 8 | public class Groups_BoxGroup_BasicSample : ScriptableObject 9 | { 10 | [Group("box")] public int a; 11 | [Group("box")] public float b; 12 | 13 | [Group("named_box")] public string c; 14 | [Group("named_box")] public bool d; 15 | 16 | [Group("boxed_struct"), InlineProperty, HideLabel] 17 | public MyStruct boxedStruct; 18 | 19 | public MyStruct defaultStruct; 20 | 21 | [Serializable] 22 | public struct MyStruct 23 | { 24 | public int a; 25 | public float b; 26 | } 27 | } -------------------------------------------------------------------------------- /Editor.Samples/Groups/Groups_BoxGroup_BasicSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eea1c001db0049e5bc1868f3c91eacb7 3 | timeCreated: 1657108609 -------------------------------------------------------------------------------- /Editor.Samples/Groups/Groups_BoxGroup_StackedSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | [DeclareBoxGroup("box", Title = "Box")] 5 | [DeclareHorizontalGroup("box/horizontal")] 6 | [DeclareBoxGroup("box/horizontal/one", Title = "One")] 7 | [DeclareBoxGroup("box/horizontal/two", Title = "Two")] 8 | [DeclareBoxGroup("box/three", Title = "Three")] 9 | public class Groups_BoxGroup_StackedSample : ScriptableObject 10 | { 11 | [Button(ButtonSizes.Large), Group("box/horizontal/one")] 12 | public void ButtonA() 13 | { 14 | } 15 | 16 | [Button(ButtonSizes.Large), Group("box/horizontal/two")] 17 | public void ButtonB() 18 | { 19 | } 20 | 21 | [Button, Group("box/three")] 22 | public void ButtonC() 23 | { 24 | } 25 | 26 | [Button, Group("box/three")] 27 | public void ButtonD() 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Editor.Samples/Groups/Groups_BoxGroup_StackedSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 838802e04ba64305ab3e7417c6ceb07d 3 | timeCreated: 1657109226 -------------------------------------------------------------------------------- /Editor.Samples/Groups/Groups_FoldoutGroupSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using TriInspector; 3 | using UnityEngine; 4 | 5 | [DeclareFoldoutGroup("My Foldout", Expanded = true)] 6 | [DeclareFoldoutGroup("boxed_foldout_struct", Title = "Foldout Struct")] 7 | public class Groups_FoldoutGroupSample : ScriptableObject 8 | { 9 | [Group("My Foldout")] public string c; 10 | [Group("My Foldout")] public bool d; 11 | 12 | [Group("boxed_foldout_struct"), InlineProperty, HideLabel] 13 | public MyStruct boxedStruct; 14 | 15 | public MyStruct defaultStruct; 16 | 17 | [Serializable] 18 | public struct MyStruct 19 | { 20 | public int a; 21 | public float b; 22 | } 23 | } -------------------------------------------------------------------------------- /Editor.Samples/Groups/Groups_FoldoutGroupSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7ecaf18207d4b9aac1a800f751f04f4 3 | timeCreated: 1668335006 -------------------------------------------------------------------------------- /Editor.Samples/Groups/Groups_GroupsSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | [DeclareHorizontalGroup("header")] 5 | [DeclareBoxGroup("header/left", Title = "My Left Box")] 6 | [DeclareVerticalGroup("header/right")] 7 | [DeclareBoxGroup("header/right/top", Title = "My Right Box")] 8 | [DeclareTabGroup("header/right/tabs")] 9 | [DeclareBoxGroup("body", HideTitle = true)] 10 | public class Groups_GroupsSample : ScriptableObject 11 | { 12 | [Group("header/left")] public bool prop1; 13 | [Group("header/left")] public int prop2; 14 | [Group("header/left")] public string prop3; 15 | [Group("header/left")] public Vector3 prop4; 16 | 17 | [Group("header/right/top")] public string rightProp; 18 | 19 | [Group("body")] public string body1; 20 | [Group("body")] public string body2; 21 | 22 | [Group("header/right/tabs"), Tab("One")] 23 | public float tabOne; 24 | 25 | [Group("header/right/tabs"), Tab("Two")] 26 | public float tabTwo; 27 | 28 | [Group("header/right/tabs"), Tab("Three")] 29 | public float tabThree; 30 | 31 | [Group("header/right"), Button("Click me!")] 32 | public void MyButton() 33 | { 34 | } 35 | } -------------------------------------------------------------------------------- /Editor.Samples/Groups/Groups_GroupsSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89326426f95d4de489da63baf6efc988 3 | timeCreated: 1656857201 -------------------------------------------------------------------------------- /Editor.Samples/Groups/Groups_HorizontalGroupSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | [DeclareHorizontalGroup("vars")] 5 | [DeclareHorizontalGroup("buttons")] 6 | public class Groups_HorizontalGroupSample : ScriptableObject 7 | { 8 | [Group("vars")] public int a; 9 | [Group("vars")] public int b; 10 | [Group("vars")] public int c; 11 | 12 | [Button, Group("buttons")] 13 | public void ButtonA() 14 | { 15 | } 16 | 17 | [Button, Group("buttons")] 18 | public void ButtonB() 19 | { 20 | } 21 | } -------------------------------------------------------------------------------- /Editor.Samples/Groups/Groups_HorizontalGroupSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b982c8073024742b2844a04d499072f 3 | timeCreated: 1657108615 -------------------------------------------------------------------------------- /Editor.Samples/Groups/Groups_TabGroupSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | [DeclareTabGroup("tabs")] 5 | public class Groups_TabGroupSample : ScriptableObject 6 | { 7 | [Group("tabs"), Tab("One")] public int a; 8 | [Group("tabs"), Tab("One")] public float b; 9 | [Group("tabs"), Tab("Two")] public bool c; 10 | [Group("tabs"), Tab("Two")] public Bounds d; 11 | [Group("tabs"), Tab("Three")] public Vector3 e; 12 | [Group("tabs"), Tab("Three")] public Rect f; 13 | } -------------------------------------------------------------------------------- /Editor.Samples/Groups/Groups_TabGroupSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2b39374faa39477385012ffd55381046 3 | timeCreated: 1657108624 -------------------------------------------------------------------------------- /Editor.Samples/Groups/Groups_ToggleGroupSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using TriInspector; 3 | using UnityEngine; 4 | 5 | [DeclareToggleGroup("My Toggle")] 6 | [DeclareToggleGroup("My Non Collapsible Toggle", Collapsible = false)] 7 | [DeclareToggleGroup("boxed_toggle_struct", Title = "Toggle Struct")] 8 | public class Groups_ToggleGroupSample : ScriptableObject 9 | { 10 | [Group("My Toggle")] public bool aEnabled = true; 11 | [Group("My Toggle")] public string b; 12 | [Group("My Toggle")] public bool c; 13 | 14 | [Group("My Non Collapsible Toggle")] public bool dEnabled; 15 | [Group("My Non Collapsible Toggle")] public bool e; 16 | [Group("My Non Collapsible Toggle")] public Vector3 f; 17 | 18 | [Group("boxed_toggle_struct"), InlineProperty, HideLabel] 19 | public MyStruct boxedStruct; 20 | 21 | public MyStruct defaultStruct; 22 | 23 | [Serializable] 24 | public struct MyStruct 25 | { 26 | public bool enabled; 27 | public int a; 28 | public float b; 29 | } 30 | } -------------------------------------------------------------------------------- /Editor.Samples/Groups/Groups_ToggleGroupSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f1bae35e64ea4dec9c6ec1818dc21b6a 3 | timeCreated: 1680963694 -------------------------------------------------------------------------------- /Editor.Samples/Groups/Groups_VerticalGroupSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | [DeclareHorizontalGroup("horizontal")] 5 | [DeclareVerticalGroup("horizontal/vars")] 6 | [DeclareVerticalGroup("horizontal/buttons")] 7 | public class Groups_VerticalGroupSample : ScriptableObject 8 | { 9 | [Group("horizontal/vars")] public float a; 10 | [Group("horizontal/vars")] public float b; 11 | 12 | [Button, Group("horizontal/buttons")] 13 | public void ButtonA() 14 | { 15 | } 16 | 17 | [Button, Group("horizontal/buttons")] 18 | public void ButtonB() 19 | { 20 | } 21 | } -------------------------------------------------------------------------------- /Editor.Samples/Groups/Groups_VerticalGroupSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b48fa07a7f348ff968e8eb65e9921b1 3 | timeCreated: 1657108619 -------------------------------------------------------------------------------- /Editor.Samples/Misc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 93e5166924a248f582d65708efbddf0a 3 | timeCreated: 1656852588 -------------------------------------------------------------------------------- /Editor.Samples/Misc/Misc_HideReferencePickerSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e6127def8bae4f8e835f3f8f6af4c117 3 | timeCreated: 1659516166 -------------------------------------------------------------------------------- /Editor.Samples/Misc/Misc_OnValueChangedSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Misc_OnValueChangedSample : ScriptableObject 5 | { 6 | [OnValueChanged(nameof(OnMaterialChanged))] 7 | public Material mat; 8 | 9 | private void OnMaterialChanged() 10 | { 11 | Debug.Log("Material changed!"); 12 | } 13 | } -------------------------------------------------------------------------------- /Editor.Samples/Misc/Misc_OnValueChangedSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7068787aa2c749b992eab640bba2d436 3 | timeCreated: 1656856619 -------------------------------------------------------------------------------- /Editor.Samples/Misc/Misc_PropertyOrderSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Misc_PropertyOrderSample : ScriptableObject 5 | { 6 | public float first; 7 | 8 | [PropertyOrder(0)] 9 | public float second; 10 | } -------------------------------------------------------------------------------- /Editor.Samples/Misc/Misc_PropertyOrderSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c14c7b55b1374730833ca86db22fb4fe 3 | timeCreated: 1656856254 -------------------------------------------------------------------------------- /Editor.Samples/Misc/Misc_ReadOnlySample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Misc_ReadOnlySample : ScriptableObject 5 | { 6 | [ReadOnly] 7 | public Vector3 vec; 8 | } -------------------------------------------------------------------------------- /Editor.Samples/Misc/Misc_ReadOnlySample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8188742392614449bf6c0ff330488ea0 3 | timeCreated: 1656856352 -------------------------------------------------------------------------------- /Editor.Samples/Misc/Misc_ShowInInspectorSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Misc_ShowInInspectorSample : ScriptableObject 5 | { 6 | private float _field; 7 | 8 | [ShowInInspector] 9 | private bool _myToggle; 10 | 11 | [ShowInInspector] 12 | public float ReadOnlyProperty => _field; 13 | 14 | [ShowInInspector] 15 | public float EditableProperty 16 | { 17 | get => _field; 18 | set => _field = value; 19 | } 20 | } -------------------------------------------------------------------------------- /Editor.Samples/Misc/Misc_ShowInInspectorSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e605b771ea2468da31945707d0fb76a 3 | timeCreated: 1656848081 -------------------------------------------------------------------------------- /Editor.Samples/SampleWindowStyles.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace TriInspector.Editor.Samples 5 | { 6 | internal static class SampleWindowStyles 7 | { 8 | public static readonly GUIStyle Padding; 9 | public static readonly GUIStyle BoxWithPadding; 10 | public static readonly GUIStyle HeaderDisplayNameLabel; 11 | 12 | static SampleWindowStyles() 13 | { 14 | Padding = new GUIStyle(GUI.skin.label) 15 | { 16 | padding = new RectOffset(5, 5, 5, 5), 17 | }; 18 | 19 | BoxWithPadding = new GUIStyle(TriEditorStyles.Box) 20 | { 21 | padding = new RectOffset(5, 5, 5, 5), 22 | }; 23 | 24 | HeaderDisplayNameLabel = new GUIStyle(EditorStyles.largeLabel) 25 | { 26 | fontStyle = FontStyle.Bold, 27 | fontSize = 17, 28 | margin = new RectOffset(5, 5, 5, 0), 29 | }; 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Editor.Samples/SampleWindowStyles.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ddb081b7f73a4b58aca6d24aaefbc50e 3 | timeCreated: 1656858907 -------------------------------------------------------------------------------- /Editor.Samples/Styling.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da4c8e005b7646358db1c3c4811a1865 3 | timeCreated: 1656856718 -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_GUIColorSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Styling_GUIColorSample : ScriptableObject 5 | { 6 | [GUIColor(0.8f, 1.0f, 0.6f)] 7 | public Vector3 vec; 8 | 9 | [GUIColor("0000FF")] 10 | [Button] 11 | public void BlueButton() 12 | { 13 | } 14 | 15 | [GUIColor("cyan")] 16 | [Button] 17 | public void CyanButton() 18 | { 19 | } 20 | 21 | [GUIColor("$GetGreenColor")] 22 | [Button] 23 | public void GreenButton() 24 | { 25 | } 26 | 27 | [GUIColor(255, 75, 75)] 28 | [Button] 29 | public void RedButton() 30 | { 31 | } 32 | 33 | [GUIColor("$GetColor")] 34 | [Button(ButtonSizes.Large)] 35 | public void ColoredButton() 36 | { 37 | } 38 | 39 | private Color GetGreenColor => Color.green; 40 | 41 | private Color GetColor 42 | { 43 | get 44 | { 45 | var time = (float) UnityEditor.EditorApplication.timeSinceStartup; 46 | var hue = time * 0.225f % 1f; 47 | var color = Color.HSVToRGB(hue, 1f, 1f); 48 | return color; 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_GUIColorSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f99fc38989d4471da97400b0a2a812ff 3 | timeCreated: 1656856827 -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_HideLabelSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Styling_HideLabelSample : ScriptableObject 5 | { 6 | [Title("Wide Vector")] 7 | [HideLabel] 8 | public Vector3 vector; 9 | 10 | [Title("Wide String")] 11 | [HideLabel] 12 | public string str; 13 | } -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_HideLabelSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f39878f7ed574f7898bf55caf8d8e607 3 | timeCreated: 1656856749 -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_IndentSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Styling_IndentSample : ScriptableObject 5 | { 6 | [Title("Custom Indent")] 7 | [Indent] 8 | public int a; 9 | 10 | [Indent(2)] 11 | public int b; 12 | 13 | [Indent(3)] 14 | public int c; 15 | 16 | [Indent(4)] 17 | public int d; 18 | } -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_IndentSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f33bec5e9334e10949fbf94ae0a21f5 3 | timeCreated: 1656856846 -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_InlinePropertySample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using TriInspector; 3 | using UnityEngine; 4 | 5 | public class Styling_InlinePropertySample : ScriptableObject 6 | { 7 | public MinMax rangeFoldout; 8 | 9 | [InlineProperty(LabelWidth = 40)] 10 | public MinMax rangeInline; 11 | 12 | [Serializable] 13 | public class MinMax 14 | { 15 | public int min; 16 | public int max; 17 | } 18 | } -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_InlinePropertySample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0ee1888cb6649ceafe31245787ac0e5 3 | timeCreated: 1656856939 -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_LabelTextSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using TriInspector; 3 | using UnityEngine; 4 | 5 | public class Styling_LabelTextSample : ScriptableObject 6 | { 7 | [LabelText("Custom Label")] 8 | public int val; 9 | 10 | [LabelText("$" + nameof(DynamicLabel))] 11 | public Vector3 vec; 12 | 13 | public string DynamicLabel => DateTime.Now.ToShortTimeString(); 14 | } -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_LabelTextSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d6fabaf62504cf682d96b5245e4a3f5 3 | timeCreated: 1656856777 -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_LabelWidthSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Styling_LabelWidthSample : ScriptableObject 5 | { 6 | public int defaultWidth; 7 | 8 | [LabelWidth(40)] 9 | public int thin; 10 | 11 | [LabelWidth(300)] 12 | public int customInspectorVeryLongPropertyName; 13 | } -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_LabelWidthSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 114e6af58ba440469f9a80c8094944f3 3 | timeCreated: 1656856804 -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_PropertySpaceSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Styling_PropertySpaceSample : ScriptableObject 5 | { 6 | [Space, PropertyOrder(0)] 7 | public Vector3 vecField; 8 | 9 | [ShowInInspector, PropertyOrder(1)] 10 | [PropertySpace(SpaceBefore = 10, SpaceAfter = 30)] 11 | public Rect RectProperty { get; set; } 12 | 13 | [PropertyOrder(2)] 14 | public bool b; 15 | } -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_PropertySpaceSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ba5d5c0bd824ccc8cdfb279d18821c3 3 | timeCreated: 1656856868 -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_PropertyTooltipSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using TriInspector; 3 | using UnityEngine; 4 | 5 | public class Styling_PropertyTooltipSample : ScriptableObject 6 | { 7 | [PropertyTooltip("This is tooltip")] 8 | public Rect rect; 9 | 10 | [PropertyTooltip("$" + nameof(DynamicTooltip))] 11 | public Vector3 vec; 12 | 13 | public string DynamicTooltip => DateTime.Now.ToShortTimeString(); 14 | } -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_PropertyTooltipSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 866d0af24dd1465798f6fc588a18f0ac 3 | timeCreated: 1656856888 -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_TextArea.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class Styling_TextArea : ScriptableObject 4 | { 5 | public string simpleText; 6 | 7 | [TextArea(10, 15)] 8 | public string textArea; 9 | } -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_TextArea.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 902c15a04330446fb0a38fb0d5282470 3 | timeCreated: 1657887155 -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_TitleSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using TriInspector; 3 | using UnityEngine; 4 | 5 | public class Styling_TitleSample : ScriptableObject 6 | { 7 | [Title("My Title")] 8 | public string val; 9 | 10 | [Title("$" + nameof(_myTitleField))] 11 | public Rect rect; 12 | 13 | [Title("$" + nameof(MyTitleProperty))] 14 | public Vector3 vec; 15 | 16 | [Title("Button Title")] 17 | [Button] 18 | public void MyButton() 19 | { 20 | } 21 | 22 | private string _myTitleField = "Serialized Title"; 23 | 24 | private string MyTitleProperty => DateTime.Now.ToLongTimeString(); 25 | } -------------------------------------------------------------------------------- /Editor.Samples/Styling/Styling_TitleSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e54656b5b8ed48f2affb7d716661cddd 3 | timeCreated: 1656856725 -------------------------------------------------------------------------------- /Editor.Samples/TriInspector.Editor.Samples.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TriInspector.Editor.Samples", 3 | "references": [ 4 | "TriInspector", 5 | "TriInspector.Editor" 6 | ], 7 | "includePlatforms": [ 8 | "Editor" 9 | ], 10 | "excludePlatforms": [], 11 | "allowUnsafeCode": false, 12 | "overrideReferences": true, 13 | "precompiledReferences": [], 14 | "autoReferenced": false, 15 | "defineConstraints": [], 16 | "versionDefines": [], 17 | "noEngineReferences": false 18 | } -------------------------------------------------------------------------------- /Editor.Samples/TriInspector.Editor.Samples.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6fd3d95cbfe66d744a1e3a709d4c510d 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor.Samples/TriSamplesWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8a36cdbb8bee439f988a44ff424593bb 3 | timeCreated: 1656847262 -------------------------------------------------------------------------------- /Editor.Samples/Validators.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7160cc0e3bd4f1a8cb43ea3c2b00c7f 3 | timeCreated: 1656856456 -------------------------------------------------------------------------------- /Editor.Samples/Validators/Validators_AssetsOnlySample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Validators_AssetsOnlySample : ScriptableObject 5 | { 6 | [AssetsOnly] 7 | public GameObject obj; 8 | } -------------------------------------------------------------------------------- /Editor.Samples/Validators/Validators_AssetsOnlySample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 374fcd38854b483a83cdde8ef3c1faba 3 | timeCreated: 1656856695 -------------------------------------------------------------------------------- /Editor.Samples/Validators/Validators_InfoBoxSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using TriInspector; 3 | using UnityEngine; 4 | 5 | public class Validators_InfoBoxSample : ScriptableObject 6 | { 7 | [Title("InfoBox Message Types")] 8 | [InfoBox("Default info box")] 9 | public int a; 10 | 11 | [InfoBox("None info box", TriMessageType.None)] 12 | public int b; 13 | 14 | [InfoBox("Warning info box", TriMessageType.Warning)] 15 | public int c; 16 | 17 | [InfoBox("Error info box", TriMessageType.Error)] 18 | public int d; 19 | 20 | [InfoBox("$" + nameof(DynamicInfo), visibleIf: nameof(VisibleInEditMode))] 21 | public Vector3 vec; 22 | 23 | private string DynamicInfo => "Dynamic info box: " + DateTime.Now.ToLongTimeString(); 24 | 25 | private bool VisibleInEditMode => !Application.isPlaying; 26 | } -------------------------------------------------------------------------------- /Editor.Samples/Validators/Validators_InfoBoxSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86a17b90790548718bdb5d26c8a83c95 3 | timeCreated: 1656856674 -------------------------------------------------------------------------------- /Editor.Samples/Validators/Validators_RequiredSample.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using TriInspector; 3 | using UnityEngine; 4 | 5 | public class Validators_RequiredSample : ScriptableObject 6 | { 7 | [Required(FixAction = nameof(FixMaterial), FixActionName = "Find in Resources")] 8 | public Material material; 9 | 10 | private void FixMaterial() 11 | { 12 | material = Resources.FindObjectsOfTypeAll().FirstOrDefault(); 13 | } 14 | } -------------------------------------------------------------------------------- /Editor.Samples/Validators/Validators_RequiredSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26503f30077744908a680c7464ee7991 3 | timeCreated: 1656856504 -------------------------------------------------------------------------------- /Editor.Samples/Validators/Validators_SceneObjectsOnlySample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Validators_SceneObjectsOnlySample : ScriptableObject 5 | { 6 | [SceneObjectsOnly] 7 | public GameObject obj; 8 | } -------------------------------------------------------------------------------- /Editor.Samples/Validators/Validators_SceneObjectsOnlySample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7bd709dcdda44927b14c8a77ffebf843 3 | timeCreated: 1657621668 -------------------------------------------------------------------------------- /Editor.Samples/Validators/Validators_ValidateInputSample.cs: -------------------------------------------------------------------------------- 1 | using TriInspector; 2 | using UnityEngine; 3 | 4 | public class Validators_ValidateInputSample : ScriptableObject 5 | { 6 | [ValidateInput(nameof(ValidateTexture))] 7 | public Texture tex; 8 | 9 | [ValidateInput(nameof(ValidateNumber))] 10 | public int number; 11 | 12 | private TriValidationResult ValidateTexture() 13 | { 14 | if (tex == null) return TriValidationResult.Error("Tex is null"); 15 | if (!tex.isReadable) return TriValidationResult.Warning("Tex must be readable"); 16 | return TriValidationResult.Valid; 17 | } 18 | 19 | private TriValidationResult ValidateNumber() 20 | { 21 | if (number == 1) 22 | { 23 | return TriValidationResult.Valid; 24 | } 25 | 26 | return TriValidationResult.Error("Number must be equal 1") 27 | .WithFix(() => number = 1, "Set to 1"); 28 | } 29 | } -------------------------------------------------------------------------------- /Editor.Samples/Validators/Validators_ValidateInputSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75ac78d47ba34b6380df278a3e641e87 3 | timeCreated: 1656856540 -------------------------------------------------------------------------------- /Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 992bfd855a98c4f45b7f93c37256f4ce 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly: InternalsVisibleTo("TriInspector.Editor.Extras")] 4 | [assembly: InternalsVisibleTo("TriInspector.Editor.Samples")] 5 | [assembly: InternalsVisibleTo("TriInspector.Editor.Integrations.Odin")] -------------------------------------------------------------------------------- /Editor/AssemblyInfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31eceb5f41944fc5a4afccb7697d3e61 3 | timeCreated: 1652775741 -------------------------------------------------------------------------------- /Editor/Attributes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83289a1468a54453b62573925bc0635a 3 | timeCreated: 1639581370 -------------------------------------------------------------------------------- /Editor/Editors.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d685f31e94904c5d9319405aa8b775f9 3 | timeCreated: 1638856449 -------------------------------------------------------------------------------- /Editor/Editors/TriEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine.UIElements; 3 | 4 | namespace TriInspector.Editors 5 | { 6 | public abstract class TriEditor : Editor 7 | { 8 | private TriEditorCore _core; 9 | 10 | protected virtual void OnEnable() 11 | { 12 | _core = new TriEditorCore(this); 13 | } 14 | 15 | protected virtual void OnDisable() 16 | { 17 | _core.Dispose(); 18 | } 19 | 20 | 21 | public override void OnInspectorGUI() 22 | { 23 | _core.OnInspectorGUI(); 24 | } 25 | 26 | public override VisualElement CreateInspectorGUI() 27 | { 28 | return _core.CreateVisualElement(); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /Editor/Editors/TriEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7985f723508b7434183568ca5c8436bd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Editors/TriEditorCore.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7bd33877ecd42dc878e2b28f0a9f581 3 | timeCreated: 1694856077 -------------------------------------------------------------------------------- /Editor/Editors/TriMonoBehaviourEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace TriInspector.Editors 5 | { 6 | [CanEditMultipleObjects] 7 | [CustomEditor(typeof(MonoBehaviour), editorForChildClasses: true, isFallback = true)] 8 | internal sealed class TriMonoBehaviourEditor : TriEditor 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /Editor/Editors/TriMonoBehaviourEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ebc893dd0ca44a789a00c03f7a71dc56 3 | timeCreated: 1683784191 -------------------------------------------------------------------------------- /Editor/Editors/TriScriptableObjectEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace TriInspector.Editors 5 | { 6 | [CanEditMultipleObjects] 7 | [CustomEditor(typeof(ScriptableObject), editorForChildClasses: true, isFallback = true)] 8 | internal sealed class TriScriptableObjectEditor : TriEditor 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /Editor/Editors/TriScriptableObjectEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5fe6a72a9e734fcc8ab5f29cd13c9d53 3 | timeCreated: 1683784197 -------------------------------------------------------------------------------- /Editor/Editors/TriScriptedImporterEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 421d7c27350d45308b6a91b76560bb50 3 | timeCreated: 1683784201 -------------------------------------------------------------------------------- /Editor/Editors/TriSettingsProvider.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | 3 | namespace TriInspector.Editors 4 | { 5 | public class TriSettingsProvider : SettingsProvider 6 | { 7 | private class Styles 8 | { 9 | } 10 | 11 | public TriSettingsProvider() 12 | : base("Project/Tri Inspector", SettingsScope.Project) 13 | { 14 | } 15 | 16 | public override void OnGUI(string searchContext) 17 | { 18 | EditorGUI.BeginDisabledGroup(EditorApplication.isCompiling); 19 | 20 | base.OnGUI(searchContext); 21 | 22 | EditorGUI.EndDisabledGroup(); 23 | } 24 | 25 | [SettingsProvider] 26 | public static SettingsProvider CreateTriInspectorSettingsProvider() 27 | { 28 | var provider = new TriSettingsProvider 29 | { 30 | keywords = GetSearchKeywordsFromGUIContentProperties(), 31 | }; 32 | 33 | return provider; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /Editor/Editors/TriSettingsProvider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e21ace13982a498283f60e3271c86551 3 | timeCreated: 1651644353 -------------------------------------------------------------------------------- /Editor/Elements.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99d0fe2f9d1c4cb88cf46ba5813c091f 3 | timeCreated: 1638772919 -------------------------------------------------------------------------------- /Editor/Elements/InlineEditorElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e5abb7004e824b6d87bae69c80c8df1d 3 | timeCreated: 1641802293 -------------------------------------------------------------------------------- /Editor/Elements/TriBoxGroupElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7a787b7a5e844a2a12192a9d52984b0 3 | timeCreated: 1641802243 -------------------------------------------------------------------------------- /Editor/Elements/TriBuiltInPropertyElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb76597978d84d19a27f6e8596e1a4bf 3 | timeCreated: 1638774260 -------------------------------------------------------------------------------- /Editor/Elements/TriDropdownElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0bfe47c1836e47c48920fb74982c89cb 3 | timeCreated: 1657812638 -------------------------------------------------------------------------------- /Editor/Elements/TriFoldoutElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 90b64b1805694cf8999a0380d4ca70b6 3 | timeCreated: 1638772042 -------------------------------------------------------------------------------- /Editor/Elements/TriHeaderGroupBaseElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7406688f5ef349a3ae0acee7ea9ec935 3 | timeCreated: 1642760804 -------------------------------------------------------------------------------- /Editor/Elements/TriHorizontalGroupElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e609cf56a7e242d8b9cb5813178a7e69 3 | timeCreated: 1642259149 -------------------------------------------------------------------------------- /Editor/Elements/TriInfoBoxElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f64a66d501c34a808686c834530dd9a9 3 | timeCreated: 1638860979 -------------------------------------------------------------------------------- /Editor/Elements/TriInlineGenericElement.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using TriInspector.Utilities; 3 | using UnityEditor; 4 | using UnityEngine; 5 | 6 | namespace TriInspector.Elements 7 | { 8 | internal class TriInlineGenericElement : TriPropertyCollectionBaseElement 9 | { 10 | private readonly Props _props; 11 | private readonly TriProperty _property; 12 | 13 | [Serializable] 14 | public struct Props 15 | { 16 | public bool drawPrefixLabel; 17 | public float labelWidth; 18 | } 19 | 20 | public TriInlineGenericElement(TriProperty property, Props props = default) 21 | { 22 | _property = property; 23 | _props = props; 24 | 25 | DeclareGroups(property.ValueType); 26 | 27 | foreach (var childProperty in property.ChildrenProperties) 28 | { 29 | AddProperty(childProperty); 30 | } 31 | } 32 | 33 | public override void OnGUI(Rect position) 34 | { 35 | if (_props.drawPrefixLabel) 36 | { 37 | var controlId = GUIUtility.GetControlID(FocusType.Passive); 38 | position = EditorGUI.PrefixLabel(position, controlId, _property.DisplayNameContent); 39 | } 40 | 41 | using (TriGuiHelper.PushLabelWidth(_props.labelWidth)) 42 | { 43 | base.OnGUI(position); 44 | } 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /Editor/Elements/TriInlineGenericElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a5124d0a8d93488a858723d80fe69e69 3 | timeCreated: 1638788657 -------------------------------------------------------------------------------- /Editor/Elements/TriLabelElement.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace TriInspector.Elements 4 | { 5 | public class TriLabelElement : TriElement 6 | { 7 | private readonly GUIContent _label; 8 | 9 | public TriLabelElement(string label, string tooltip = "") 10 | { 11 | _label = new GUIContent(label, tooltip); 12 | } 13 | 14 | public TriLabelElement(GUIContent label) 15 | { 16 | _label = label; 17 | } 18 | 19 | public override float GetHeight(float width) 20 | { 21 | return GUI.skin.label.CalcHeight(_label, width); 22 | } 23 | 24 | public override void OnGUI(Rect position) 25 | { 26 | GUI.Label(position, _label); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /Editor/Elements/TriLabelElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a193f4236257483a8d5a10f0025b3d4f 3 | timeCreated: 1638771650 -------------------------------------------------------------------------------- /Editor/Elements/TriListElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c9ed87465ed54b039d11e455c4aa3efc 3 | timeCreated: 1638776402 -------------------------------------------------------------------------------- /Editor/Elements/TriMultiEditNotSupportedElement.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace TriInspector.Elements 5 | { 6 | public class TriMultiEditNotSupportedElement : TriElement 7 | { 8 | private readonly TriProperty _property; 9 | private readonly GUIContent _message; 10 | 11 | public TriMultiEditNotSupportedElement(TriProperty property) 12 | { 13 | _property = property; 14 | _message = new GUIContent("Multi edit not supported"); 15 | } 16 | 17 | public override float GetHeight(float width) 18 | { 19 | return EditorGUIUtility.singleLineHeight; 20 | } 21 | 22 | public override void OnGUI(Rect position) 23 | { 24 | EditorGUI.LabelField(position, _property.DisplayNameContent, _message); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Editor/Elements/TriMultiEditNotSupportedElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 575bf0dafd7f459fb09451ec5a83c427 3 | timeCreated: 1641382168 -------------------------------------------------------------------------------- /Editor/Elements/TriNoDrawerElement.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace TriInspector.Elements 5 | { 6 | public class TriNoDrawerElement : TriElement 7 | { 8 | private readonly GUIContent _message; 9 | private readonly TriProperty _property; 10 | 11 | public TriNoDrawerElement(TriProperty property) 12 | { 13 | _property = property; 14 | _message = new GUIContent($"No drawer for {property.FieldType}"); 15 | } 16 | 17 | public override float GetHeight(float width) 18 | { 19 | return EditorGUIUtility.singleLineHeight; 20 | } 21 | 22 | public override void OnGUI(Rect position) 23 | { 24 | EditorGUI.LabelField(position, _property.DisplayNameContent, _message); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Editor/Elements/TriNoDrawerElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e6cc0cc1449a4af4b8d435b87ef20378 3 | timeCreated: 1639319113 -------------------------------------------------------------------------------- /Editor/Elements/TriPropertyCollectionBaseElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1373b681c88a425c943ea5e6d149a217 3 | timeCreated: 1639412705 -------------------------------------------------------------------------------- /Editor/Elements/TriPropertyElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f57a61ef6fe34b51939950c6b9597f88 3 | timeCreated: 1638776439 -------------------------------------------------------------------------------- /Editor/Elements/TriReferenceElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7dd13898e07a45afacca03cc86c0e24c 3 | timeCreated: 1638789498 -------------------------------------------------------------------------------- /Editor/Elements/TriTabGroupElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: deb5a57d2d0a4476a3e396a49b9f44da 3 | timeCreated: 1642759023 -------------------------------------------------------------------------------- /Editor/Elements/TriUiToolkitPropertyElemenet.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 535ce5f65f424a8c9e83943eda845fc6 3 | timeCreated: 1690621289 -------------------------------------------------------------------------------- /Editor/Elements/TriVerticalGroupElement.cs: -------------------------------------------------------------------------------- 1 | namespace TriInspector.Elements 2 | { 3 | public class TriVerticalGroupElement : TriPropertyCollectionBaseElement 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /Editor/Elements/TriVerticalGroupElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec0e2c38af6f4830b3eca87e63c3248c 3 | timeCreated: 1643558785 -------------------------------------------------------------------------------- /Editor/Resolvers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca8a2709dde94e318cb5cfdc801d9045 3 | timeCreated: 1652095622 -------------------------------------------------------------------------------- /Editor/Resolvers/ActionResolver.cs: -------------------------------------------------------------------------------- 1 | using JetBrains.Annotations; 2 | 3 | namespace TriInspector.Resolvers 4 | { 5 | public abstract class ActionResolver 6 | { 7 | public static ActionResolver Resolve(TriPropertyDefinition propertyDefinition, string method) 8 | { 9 | if (InstanceActionResolver.TryResolve(propertyDefinition, method, out var iar)) 10 | { 11 | return iar; 12 | } 13 | 14 | return new ErrorActionResolver(propertyDefinition, method); 15 | } 16 | 17 | [PublicAPI] 18 | public abstract bool TryGetErrorString(out string error); 19 | 20 | [PublicAPI] 21 | public abstract void InvokeForTarget(TriProperty property, int targetIndex); 22 | 23 | [PublicAPI] 24 | public void InvokeForAllTargets(TriProperty property) 25 | { 26 | for (var targetIndex = 0; targetIndex < property.PropertyTree.TargetsCount; targetIndex++) 27 | { 28 | InvokeForTarget(property, targetIndex); 29 | } 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Editor/Resolvers/ActionResolver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 188152364708438db80df00df894ae87 3 | timeCreated: 1652265564 -------------------------------------------------------------------------------- /Editor/Resolvers/DropdownValuesResolver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 16fa8c4711a44bdea6facb3bc68822d9 3 | timeCreated: 1680713564 -------------------------------------------------------------------------------- /Editor/Resolvers/ErrorActionResolver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace TriInspector.Resolvers 5 | { 6 | internal sealed class ErrorActionResolver : ActionResolver 7 | { 8 | private readonly string _method; 9 | 10 | public ErrorActionResolver(TriPropertyDefinition propertyDefinition, string method) 11 | { 12 | _method = method; 13 | } 14 | 15 | public override bool TryGetErrorString(out string error) 16 | { 17 | error = $"Method '{_method}' not exists or has wrong signature"; 18 | return true; 19 | } 20 | 21 | public override void InvokeForTarget(TriProperty property, int targetIndex) 22 | { 23 | Debug.LogException(new InvalidOperationException("Method not exists")); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /Editor/Resolvers/ErrorActionResolver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52fddb0e965c4a8e82a2956d2f6ba53b 3 | timeCreated: 1652265995 -------------------------------------------------------------------------------- /Editor/Resolvers/ErrorValueResolver.cs: -------------------------------------------------------------------------------- 1 | namespace TriInspector.Resolvers 2 | { 3 | internal class ErrorValueResolver : ValueResolver 4 | { 5 | private readonly string _expression; 6 | 7 | public ErrorValueResolver(TriPropertyDefinition propertyDefinition, string expression) 8 | { 9 | _expression = expression; 10 | } 11 | 12 | public override bool TryGetErrorString(out string error) 13 | { 14 | error = $"Method '{_expression}' not exists or has wrong signature"; 15 | return true; 16 | } 17 | 18 | public override T GetValue(TriProperty property, T defaultValue = default) 19 | { 20 | return defaultValue; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Editor/Resolvers/ErrorValueResolver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3b804d7029c42c0b5f5a692281dacbf 3 | timeCreated: 1652096547 -------------------------------------------------------------------------------- /Editor/Resolvers/InstanceActionResolver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 737737f290e8433e9f160970cf996e4c 3 | timeCreated: 1652266150 -------------------------------------------------------------------------------- /Editor/Resolvers/InstanceFieldValueResolver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c19d3705b8f4c9caf951d60efa47acf 3 | timeCreated: 1652287302 -------------------------------------------------------------------------------- /Editor/Resolvers/InstanceMethodValueResolver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cee79123a0e84d5d9795ea92ed1b6d9e 3 | timeCreated: 1652097174 -------------------------------------------------------------------------------- /Editor/Resolvers/InstancePropertyValueResolver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 53c22267d5cf488c86afabea3d4613b0 3 | timeCreated: 1652287280 -------------------------------------------------------------------------------- /Editor/Resolvers/StaticFieldValueResolver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc82b93a5bf949958553418b396127ec 3 | timeCreated: 1657955836 -------------------------------------------------------------------------------- /Editor/Resolvers/StaticMethodValueResolver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 96c731e2cdce45da8ee4be44ce6674ea 3 | timeCreated: 1657954360 -------------------------------------------------------------------------------- /Editor/Resolvers/StaticPropertyValueResolver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8cbab37d02e54764a8b1ae73eac12d8a 3 | timeCreated: 1657955361 -------------------------------------------------------------------------------- /Editor/Resolvers/ValueResolver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 467299addfb7498fbb7e7f0e449c4364 3 | timeCreated: 1652095635 -------------------------------------------------------------------------------- /Editor/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d8d4d0876dcc071428509b59e2f78e29 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/Resources/TriInspector_Box_Bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewriter-packages/Tri-Inspector/1921fb03fe903a64f9244106f3152c41404c2fc5/Editor/Resources/TriInspector_Box_Bg.png -------------------------------------------------------------------------------- /Editor/Resources/TriInspector_Box_Bg_Dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewriter-packages/Tri-Inspector/1921fb03fe903a64f9244106f3152c41404c2fc5/Editor/Resources/TriInspector_Box_Bg_Dark.png -------------------------------------------------------------------------------- /Editor/Resources/TriInspector_Content_Bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewriter-packages/Tri-Inspector/1921fb03fe903a64f9244106f3152c41404c2fc5/Editor/Resources/TriInspector_Content_Bg.png -------------------------------------------------------------------------------- /Editor/Resources/TriInspector_Content_Bg_Dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewriter-packages/Tri-Inspector/1921fb03fe903a64f9244106f3152c41404c2fc5/Editor/Resources/TriInspector_Content_Bg_Dark.png -------------------------------------------------------------------------------- /Editor/TriAttributeDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31f59a1db97a4d389263665aaf9bccf1 3 | timeCreated: 1639381350 -------------------------------------------------------------------------------- /Editor/TriCustomDrawer.cs: -------------------------------------------------------------------------------- 1 | namespace TriInspector 2 | { 3 | public abstract class TriCustomDrawer : TriPropertyExtension 4 | { 5 | internal int Order { get; set; } 6 | 7 | public abstract TriElement CreateElementInternal(TriProperty property, TriElement next); 8 | } 9 | } -------------------------------------------------------------------------------- /Editor/TriCustomDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 896bcecdfc7048de8375841799d14ecc 3 | timeCreated: 1638885450 -------------------------------------------------------------------------------- /Editor/TriDrawerOrder.cs: -------------------------------------------------------------------------------- 1 | namespace TriInspector 2 | { 3 | public static class TriDrawerOrder 4 | { 5 | public const int System = -9999; 6 | public const int Inspector = -2000; 7 | public const int Validator = -1500; 8 | public const int Decorator = -1000; 9 | public const int Drawer = 0; 10 | public const int Fallback = 9999; 11 | } 12 | } -------------------------------------------------------------------------------- /Editor/TriDrawerOrder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2db5b837fe8643de8e5be9eaee10f509 3 | timeCreated: 1639384181 -------------------------------------------------------------------------------- /Editor/TriEditorStyles.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f23eb6fd2f644a0a718543287192636 3 | timeCreated: 1639462144 -------------------------------------------------------------------------------- /Editor/TriElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 543813bc0e9e4045904a35ef56ea6abe 3 | timeCreated: 1638771508 -------------------------------------------------------------------------------- /Editor/TriGroupDrawer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JetBrains.Annotations; 3 | using TriInspector.Elements; 4 | 5 | namespace TriInspector 6 | { 7 | public abstract class TriGroupDrawer 8 | { 9 | public abstract TriPropertyCollectionBaseElement CreateElementInternal(Attribute attribute); 10 | } 11 | 12 | public abstract class TriGroupDrawer : TriGroupDrawer 13 | where TAttribute : Attribute 14 | { 15 | public sealed override TriPropertyCollectionBaseElement CreateElementInternal(Attribute attribute) 16 | { 17 | return CreateElement((TAttribute) attribute); 18 | } 19 | 20 | [PublicAPI] 21 | public abstract TriPropertyCollectionBaseElement CreateElement(TAttribute attribute); 22 | } 23 | } -------------------------------------------------------------------------------- /Editor/TriGroupDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7337ea7305e4a5681ff404a041dc93e 3 | timeCreated: 1639417787 -------------------------------------------------------------------------------- /Editor/TriInspector.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TriInspector.Editor", 3 | "rootNamespace": "", 4 | "references": [ 5 | "TriInspector", 6 | "Unity.InternalAPIEditorBridge.013" 7 | ], 8 | "includePlatforms": [ 9 | "Editor" 10 | ], 11 | "excludePlatforms": [], 12 | "allowUnsafeCode": false, 13 | "overrideReferences": true, 14 | "precompiledReferences": [], 15 | "autoReferenced": true, 16 | "defineConstraints": [], 17 | "versionDefines": [], 18 | "noEngineReferences": false 19 | } -------------------------------------------------------------------------------- /Editor/TriInspector.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e851236b9ac2b9b4eaaa99506366edea 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/TriProperty.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4db12eccd9e84863a9b3b445ce3ac85e 3 | timeCreated: 1638862848 -------------------------------------------------------------------------------- /Editor/TriPropertyDefinition.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4feaa123e82e4c93846c94ebd3af253e 3 | timeCreated: 1638873323 -------------------------------------------------------------------------------- /Editor/TriPropertyDisableProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JetBrains.Annotations; 3 | 4 | namespace TriInspector 5 | { 6 | public abstract class TriPropertyDisableProcessor : TriPropertyExtension 7 | { 8 | internal Attribute RawAttribute { get; set; } 9 | 10 | [PublicAPI] 11 | public abstract bool IsDisabled(TriProperty property); 12 | } 13 | 14 | public abstract class TriPropertyDisableProcessor : TriPropertyDisableProcessor 15 | where TAttribute : Attribute 16 | { 17 | [PublicAPI] 18 | public TAttribute Attribute => (TAttribute) RawAttribute; 19 | } 20 | } -------------------------------------------------------------------------------- /Editor/TriPropertyDisableProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c01ea19c766412ba28df648a968abba 3 | timeCreated: 1641385496 -------------------------------------------------------------------------------- /Editor/TriPropertyExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4da7122af7f84f1e8c0f2986e064e161 3 | timeCreated: 1654255038 -------------------------------------------------------------------------------- /Editor/TriPropertyHideProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JetBrains.Annotations; 3 | 4 | namespace TriInspector 5 | { 6 | public abstract class TriPropertyHideProcessor : TriPropertyExtension 7 | { 8 | internal Attribute RawAttribute { get; set; } 9 | 10 | [PublicAPI] 11 | public abstract bool IsHidden(TriProperty property); 12 | } 13 | 14 | public abstract class TriPropertyHideProcessor : TriPropertyHideProcessor 15 | where TAttribute : Attribute 16 | { 17 | [PublicAPI] 18 | public TAttribute Attribute => (TAttribute) RawAttribute; 19 | } 20 | } -------------------------------------------------------------------------------- /Editor/TriPropertyHideProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: de11bb184a7d4c7f9c6a4f2a75756278 3 | timeCreated: 1641384283 -------------------------------------------------------------------------------- /Editor/TriPropertyOverrideContext.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 009410b38db449a1a47369c87a015b0d 3 | timeCreated: 1643555608 -------------------------------------------------------------------------------- /Editor/TriPropertyTree.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9bb1d443163b4a26908eb26ba297c1d6 3 | timeCreated: 1653126491 -------------------------------------------------------------------------------- /Editor/TriPropertyTreeForSerializedObject.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 468b264c3e164c0681760c3d98451466 3 | timeCreated: 1638857169 -------------------------------------------------------------------------------- /Editor/TriTypeDefinition.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using TriInspector.Utilities; 4 | 5 | namespace TriInspector 6 | { 7 | public class TriTypeDefinition 8 | { 9 | private static readonly Dictionary Cache = 10 | new Dictionary(); 11 | 12 | private TriTypeDefinition(IReadOnlyList properties) 13 | { 14 | Properties = properties; 15 | } 16 | 17 | public IReadOnlyList Properties { get; } 18 | 19 | public static TriTypeDefinition GetCached(Type type) 20 | { 21 | if (Cache.TryGetValue(type, out var definition)) 22 | { 23 | return definition; 24 | } 25 | 26 | var processors = TriDrawersUtilities.AllTypeProcessors; 27 | var properties = new List(); 28 | 29 | foreach (var processor in processors) 30 | { 31 | processor.ProcessType(type, properties); 32 | } 33 | 34 | return Cache[type] = new TriTypeDefinition(properties); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /Editor/TriTypeDefinition.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 034ca4c8b571472fb71db422a48cfe07 3 | timeCreated: 1638870763 -------------------------------------------------------------------------------- /Editor/TriTypeProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace TriInspector 5 | { 6 | public abstract class TriTypeProcessor 7 | { 8 | public abstract void ProcessType(Type type, List properties); 9 | } 10 | } -------------------------------------------------------------------------------- /Editor/TriTypeProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a7c26cf735e465d8373066f830cf5c4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/TriValidator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JetBrains.Annotations; 3 | 4 | namespace TriInspector 5 | { 6 | public abstract class TriValidator : TriPropertyExtension 7 | { 8 | [PublicAPI] 9 | public abstract TriValidationResult Validate(TriProperty property); 10 | } 11 | 12 | public abstract class TriAttributeValidator : TriValidator 13 | { 14 | internal Attribute RawAttribute { get; set; } 15 | } 16 | 17 | public abstract class TriAttributeValidator : TriAttributeValidator 18 | where TAttribute : Attribute 19 | { 20 | [PublicAPI] 21 | public TAttribute Attribute => (TAttribute) RawAttribute; 22 | } 23 | 24 | public abstract class TriValueValidator : TriValidator 25 | { 26 | } 27 | 28 | public abstract class TriValueValidator : TriValueValidator 29 | { 30 | public sealed override TriValidationResult Validate(TriProperty property) 31 | { 32 | return Validate(new TriValue(property)); 33 | } 34 | 35 | [PublicAPI] 36 | public abstract TriValidationResult Validate(TriValue propertyValue); 37 | } 38 | } -------------------------------------------------------------------------------- /Editor/TriValidator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b90ba6bdef614e9aa246f371506ea113 3 | timeCreated: 1642260754 -------------------------------------------------------------------------------- /Editor/TriValue.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using JetBrains.Annotations; 3 | 4 | namespace TriInspector 5 | { 6 | public struct TriValue 7 | { 8 | internal TriValue(TriProperty property) 9 | { 10 | Property = property; 11 | } 12 | 13 | public TriProperty Property { get; } 14 | 15 | [Obsolete("Use SmartValue instead", true)] 16 | public T Value 17 | { 18 | get => (T) Property.Value; 19 | set => Property.SetValue(value); 20 | } 21 | 22 | [PublicAPI] 23 | public T SmartValue 24 | { 25 | get => (T) Property.Value; 26 | set 27 | { 28 | if (Property.Comparer.Equals(Property.Value, value)) 29 | { 30 | return; 31 | } 32 | 33 | Property.SetValue(value); 34 | } 35 | } 36 | 37 | [PublicAPI] 38 | public void SetValue(T value) 39 | { 40 | Property.SetValue(value); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /Editor/TriValue.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a925dd69982048009ab567f0b75ec326 3 | timeCreated: 1639381003 -------------------------------------------------------------------------------- /Editor/TriValueDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dfd7988d91ca4f879f888735018e9116 3 | timeCreated: 1639381337 -------------------------------------------------------------------------------- /Editor/TypeProcessors.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52aec2fc04054420970349733f05237b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/TypeProcessors/TriGroupNextTypeProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef78c1a907f144a4bedc9cf2433d2526 3 | timeCreated: 1660802896 -------------------------------------------------------------------------------- /Editor/TypeProcessors/TriRectOffsetTypeProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | using TriInspector; 5 | using TriInspector.TypeProcessors; 6 | using UnityEngine; 7 | 8 | [assembly: RegisterTriTypeProcessor(typeof(TriRectOffsetTypeProcessor), 1)] 9 | 10 | namespace TriInspector.TypeProcessors 11 | { 12 | public class TriRectOffsetTypeProcessor : TriTypeProcessor 13 | { 14 | private static readonly string[] DrawnProperties = new[] 15 | { 16 | "left", 17 | "right", 18 | "top", 19 | "bottom", 20 | }; 21 | 22 | public override void ProcessType(Type type, List properties) 23 | { 24 | if (type != typeof(RectOffset)) 25 | { 26 | return; 27 | } 28 | 29 | for (var i = 0; i < DrawnProperties.Length; i++) 30 | { 31 | var propertyName = DrawnProperties[i]; 32 | var propertyInfo = type.GetProperty(propertyName, BindingFlags.Instance | BindingFlags.Public); 33 | var propertyDef = TriPropertyDefinition.CreateForPropertyInfo(i, propertyInfo); 34 | 35 | properties.Add(propertyDef); 36 | } 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /Editor/TypeProcessors/TriRectOffsetTypeProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83fc30fabc614cb7a2501332802a2094 3 | timeCreated: 1676534091 -------------------------------------------------------------------------------- /Editor/TypeProcessors/TriRegisterButtonsTypeProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using TriInspector; 6 | using TriInspector.TypeProcessors; 7 | using TriInspector.Utilities; 8 | 9 | [assembly: RegisterTriTypeProcessor(typeof(TriRegisterButtonsTypeProcessor), 3)] 10 | 11 | namespace TriInspector.TypeProcessors 12 | { 13 | public class TriRegisterButtonsTypeProcessor : TriTypeProcessor 14 | { 15 | public override void ProcessType(Type type, List properties) 16 | { 17 | const int methodsOffset = 20001; 18 | 19 | properties.AddRange(TriReflectionUtilities 20 | .GetAllInstanceMethodsInDeclarationOrder(type) 21 | .Where(IsSerialized) 22 | .Select((it, ind) => TriPropertyDefinition.CreateForMethodInfo(ind + methodsOffset, it))); 23 | } 24 | 25 | private static bool IsSerialized(MethodInfo methodInfo) 26 | { 27 | return methodInfo.GetCustomAttribute(false) != null; 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /Editor/TypeProcessors/TriRegisterButtonsTypeProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abe3b6771e754b2da1b3d226784ad02e 3 | timeCreated: 1660755911 -------------------------------------------------------------------------------- /Editor/TypeProcessors/TriRegisterShownByTriFieldsTypeProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using TriInspector; 6 | using TriInspector.TypeProcessors; 7 | using TriInspector.Utilities; 8 | 9 | [assembly: RegisterTriTypeProcessor(typeof(TriRegisterShownByTriFieldsTypeProcessor), 1)] 10 | 11 | namespace TriInspector.TypeProcessors 12 | { 13 | public class TriRegisterShownByTriFieldsTypeProcessor : TriTypeProcessor 14 | { 15 | public override void ProcessType(Type type, List properties) 16 | { 17 | const int fieldsOffset = 5001; 18 | 19 | properties.AddRange(TriReflectionUtilities 20 | .GetAllInstanceFieldsInDeclarationOrder(type) 21 | .Where(IsSerialized) 22 | .Select((it, ind) => TriPropertyDefinition.CreateForFieldInfo(ind + fieldsOffset, it))); 23 | } 24 | 25 | private static bool IsSerialized(FieldInfo fieldInfo) 26 | { 27 | return fieldInfo.GetCustomAttribute(false) != null && 28 | TriUnitySerializationUtilities.IsSerializableByUnity(fieldInfo) == false; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /Editor/TypeProcessors/TriRegisterShownByTriFieldsTypeProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d5a485127f534bee963f620f86287c34 3 | timeCreated: 1670601276 -------------------------------------------------------------------------------- /Editor/TypeProcessors/TriRegisterShownByTriPropertiesTypeProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using TriInspector; 6 | using TriInspector.TypeProcessors; 7 | using TriInspector.Utilities; 8 | 9 | [assembly: RegisterTriTypeProcessor(typeof(TriRegisterShownByTriPropertiesTypeProcessor), 1)] 10 | 11 | namespace TriInspector.TypeProcessors 12 | { 13 | public class TriRegisterShownByTriPropertiesTypeProcessor : TriTypeProcessor 14 | { 15 | public override void ProcessType(Type type, List properties) 16 | { 17 | const int propertiesOffset = 10001; 18 | 19 | properties.AddRange(TriReflectionUtilities 20 | .GetAllInstancePropertiesInDeclarationOrder(type) 21 | .Where(IsSerialized) 22 | .Select((it, ind) => TriPropertyDefinition.CreateForPropertyInfo(ind + propertiesOffset, it))); 23 | } 24 | 25 | private static bool IsSerialized(PropertyInfo propertyInfo) 26 | { 27 | return propertyInfo.GetCustomAttribute(false) != null; 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /Editor/TypeProcessors/TriRegisterShownByTriPropertiesTypeProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c57e9a6e1c4e46558fb3c43ffb404a57 3 | timeCreated: 1660755901 -------------------------------------------------------------------------------- /Editor/TypeProcessors/TriRegisterUnitySerializedFieldsTypeProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using TriInspector; 6 | using TriInspector.TypeProcessors; 7 | using TriInspector.Utilities; 8 | 9 | [assembly: RegisterTriTypeProcessor(typeof(TriRegisterUnitySerializedFieldsTypeProcessor), 0)] 10 | 11 | namespace TriInspector.TypeProcessors 12 | { 13 | public class TriRegisterUnitySerializedFieldsTypeProcessor : TriTypeProcessor 14 | { 15 | public override void ProcessType(Type type, List properties) 16 | { 17 | const int fieldsOffset = 1; 18 | 19 | properties.AddRange(TriReflectionUtilities 20 | .GetAllInstanceFieldsInDeclarationOrder(type) 21 | .Where(IsSerialized) 22 | .Select((it, ind) => TriPropertyDefinition.CreateForFieldInfo(ind + fieldsOffset, it))); 23 | } 24 | 25 | private static bool IsSerialized(FieldInfo fieldInfo) 26 | { 27 | return TriUnitySerializationUtilities.IsSerializableByUnity(fieldInfo); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /Editor/TypeProcessors/TriRegisterUnitySerializedFieldsTypeProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5a19f117ac85440cb8896b8b90a9f17a 3 | timeCreated: 1660755421 -------------------------------------------------------------------------------- /Editor/TypeProcessors/TriSortPropertiesTypeProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using TriInspector; 4 | using TriInspector.TypeProcessors; 5 | using TriInspector.Utilities; 6 | 7 | [assembly: RegisterTriTypeProcessor(typeof(TriSortPropertiesTypeProcessor), 10000)] 8 | 9 | namespace TriInspector.TypeProcessors 10 | { 11 | public class TriSortPropertiesTypeProcessor : TriTypeProcessor 12 | { 13 | public override void ProcessType(Type type, List properties) 14 | { 15 | foreach (var propertyDefinition in properties) 16 | { 17 | if (propertyDefinition.Attributes.TryGet(out PropertyOrderAttribute orderAttribute)) 18 | { 19 | propertyDefinition.Order = orderAttribute.Order; 20 | } 21 | } 22 | 23 | properties.Sort(PropertyOrderComparer.Instance); 24 | } 25 | 26 | private class PropertyOrderComparer : IComparer 27 | { 28 | public static readonly PropertyOrderComparer Instance = new PropertyOrderComparer(); 29 | 30 | public int Compare(TriPropertyDefinition x, TriPropertyDefinition y) 31 | { 32 | return x.Order.CompareTo(y.Order); 33 | } 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /Editor/TypeProcessors/TriSortPropertiesTypeProcessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 900dee18b5e245198d1891d10d0a954b 3 | timeCreated: 1660756062 -------------------------------------------------------------------------------- /Editor/Utilities.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52ef049660d64f2f9b2966acfb8d3447 3 | timeCreated: 1638773133 -------------------------------------------------------------------------------- /Editor/Utilities/TriAttributeUtilities.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace TriInspector.Utilities 5 | { 6 | internal static class TriAttributeUtilities 7 | { 8 | public static bool TryGet(this IReadOnlyList attributes, out T it) 9 | where T : Attribute 10 | { 11 | foreach (var attribute in attributes) 12 | { 13 | if (attribute is T typeAttribute) 14 | { 15 | it = typeAttribute; 16 | return true; 17 | } 18 | } 19 | 20 | it = null; 21 | return false; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Editor/Utilities/TriAttributeUtilities.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff3eb732102046b0b36e76f9d17cab4e 3 | timeCreated: 1638876778 -------------------------------------------------------------------------------- /Editor/Utilities/TriDrawersUtilities.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fbb9d9e8efd64dedb3b04ab3f90317f7 3 | timeCreated: 1638886023 -------------------------------------------------------------------------------- /Editor/Utilities/TriEditorGUI.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace TriInspector.Utilities 5 | { 6 | public static class TriEditorGUI 7 | { 8 | public static void Foldout(Rect rect, TriProperty property) 9 | { 10 | var content = property.DisplayNameContent; 11 | if (property.TryGetSerializedProperty(out var serializedProperty)) 12 | { 13 | EditorGUI.BeginProperty(rect, content, serializedProperty); 14 | property.IsExpanded = EditorGUI.Foldout(rect, property.IsExpanded, content, true); 15 | EditorGUI.EndProperty(); 16 | } 17 | else 18 | { 19 | property.IsExpanded = EditorGUI.Foldout(rect, property.IsExpanded, content, true); 20 | } 21 | } 22 | 23 | public static void DrawBox(Rect position, GUIStyle style, 24 | bool isHover = false, bool isActive = false, bool on = false, bool hasKeyboardFocus = false) 25 | { 26 | if (Event.current.type == EventType.Repaint) 27 | { 28 | style.Draw(position, GUIContent.none, isHover, isActive, on, hasKeyboardFocus); 29 | } 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Editor/Utilities/TriEditorGUI.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 59bc827ebe19464ea936ff5cf8ae1b7f 3 | timeCreated: 1638864333 -------------------------------------------------------------------------------- /Editor/Utilities/TriEqualityComparer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Reflection; 5 | 6 | namespace TriInspector.Utilities 7 | { 8 | public static class TriEqualityComparer 9 | { 10 | private static readonly Dictionary Cache = new Dictionary(); 11 | 12 | public static IEqualityComparer Of(Type type) 13 | { 14 | if (!Cache.TryGetValue(type, out var comparer)) 15 | { 16 | Cache[type] = comparer = CreateDefaultEqualityComparer(type); 17 | } 18 | 19 | return comparer; 20 | } 21 | 22 | private static IEqualityComparer CreateDefaultEqualityComparer(Type type) 23 | { 24 | var comparerType = typeof(EqualityComparer<>).MakeGenericType(type); 25 | var comparerProperty = comparerType.GetProperty("Default", BindingFlags.Static | BindingFlags.Public); 26 | var comparer = (IEqualityComparer) comparerProperty?.GetValue(null); 27 | 28 | if (comparer == null) 29 | { 30 | throw new InvalidOperationException($"Failed to create default comparer for type {type}"); 31 | } 32 | 33 | return comparer; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /Editor/Utilities/TriEqualityComparer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 47b9c566490541bcbfcf7fc93bf7bdea 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Utilities/TriGuiHelper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 787c857ae9a64fdbb01e6ced9309a09e 3 | timeCreated: 1639377094 -------------------------------------------------------------------------------- /Editor/Utilities/TriManagedReferenceGui.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d625706e14d8480a9ab71980d1eb1e48 3 | timeCreated: 1638804204 -------------------------------------------------------------------------------- /Editor/Utilities/TriReflectionUtilities.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e3f587ee2e04832bc8cd5cfcd937f32 3 | timeCreated: 1638857968 -------------------------------------------------------------------------------- /Editor/Utilities/TriTypeUtilities.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace TriInspector.Utilities 5 | { 6 | public static class TriTypeUtilities 7 | { 8 | private static readonly Dictionary TypeNiceNames = new Dictionary(); 9 | 10 | public static string GetTypeNiceName(Type type) 11 | { 12 | if (TypeNiceNames.TryGetValue(type, out var niceName)) 13 | { 14 | return niceName; 15 | } 16 | 17 | niceName = type.Name; 18 | 19 | while (type.DeclaringType != null) 20 | { 21 | niceName = type.DeclaringType.Name + "." + niceName; 22 | 23 | type = type.DeclaringType; 24 | } 25 | 26 | TypeNiceNames[type] = niceName; 27 | 28 | return niceName; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /Editor/Utilities/TriTypeUtilities.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd64ca1178f24265a0eea33c5dfbb3c9 3 | timeCreated: 1690816481 -------------------------------------------------------------------------------- /Editor/Utilities/TriUnityInspectorUtilities.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 239f16a6fc1543b8b131493585c954b3 3 | timeCreated: 1668183919 -------------------------------------------------------------------------------- /Editor/Utilities/TriUnitySerializationUtilities.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eadfe6520116444e8da02fcd54916d85 3 | timeCreated: 1639381952 -------------------------------------------------------------------------------- /Editor/ValidatorsDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70da4f7e93ab42ffa7b39c465d2d33e1 3 | timeCreated: 1652969657 -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 CodeWriter Packages 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSE.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7077b48033ae0e44af31aa925e93052 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f5e7f2fadfcf2548b6f36adbf88364c 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2e0eb7988fa380c4c90c94d3ba0a282f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Attributes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2898ff4f810f468ab3ad610520d4305a 3 | timeCreated: 1638868804 -------------------------------------------------------------------------------- /Runtime/Attributes/Buttons.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d926895c0efd4684294bc8e617055b89 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Attributes/Buttons/ButtonAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Method)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class ButtonAttribute : Attribute 9 | { 10 | public ButtonAttribute() 11 | { 12 | } 13 | 14 | public ButtonAttribute(string name) 15 | { 16 | Name = name; 17 | } 18 | 19 | public ButtonAttribute(ButtonSizes buttonSize, string name = null) 20 | { 21 | ButtonSize = (int) buttonSize; 22 | Name = name; 23 | } 24 | 25 | public string Name { get; set; } 26 | public int ButtonSize { get; } 27 | } 28 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Buttons/ButtonAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e51add3a0ba64dc0b53c1e249277055f 3 | timeCreated: 1642526402 -------------------------------------------------------------------------------- /Runtime/Attributes/Buttons/EnumToggleButtonsAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage((AttributeTargets.Field | AttributeTargets.Property))] 7 | [Conditional("UNITY_EDITOR")] 8 | public class EnumToggleButtonsAttribute : Attribute 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Buttons/EnumToggleButtonsAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 59ef9c0c92d344d3936b2f13088dca00 3 | timeCreated: 1653817332 -------------------------------------------------------------------------------- /Runtime/Attributes/Collections.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4722d1c3e6e4d6b4287daa6ef2163d62 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Attributes/Collections/ListDrawerSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class ListDrawerSettingsAttribute : Attribute 9 | { 10 | public bool Draggable { get; set; } = true; 11 | public bool HideAddButton { get; set; } 12 | public bool HideRemoveButton { get; set; } 13 | public bool AlwaysExpanded { get; set; } 14 | public bool ShowElementLabels { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Collections/ListDrawerSettings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d58dcfa9a4df4af09d44c31a6f74ab26 3 | timeCreated: 1642779136 -------------------------------------------------------------------------------- /Runtime/Attributes/Collections/TableListAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class TableListAttribute : ListDrawerSettingsAttribute 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Collections/TableListAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 45cc7574c4ae44c8946865f3fa2e6ea9 3 | timeCreated: 1642780172 -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dfa44d3fa5d79704f8e1a189b7ee8414 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/DisableIfAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = true)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class DisableIfAttribute : Attribute 9 | { 10 | public DisableIfAttribute(string condition) : this(condition, true) 11 | { 12 | } 13 | 14 | public DisableIfAttribute(string condition, object value) 15 | { 16 | Condition = condition; 17 | Value = value; 18 | } 19 | 20 | public string Condition { get; } 21 | public object Value { get; } 22 | 23 | public bool Inverse { get; protected set; } 24 | } 25 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/DisableIfAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ec1214049344873acae8035eb78b75f 3 | timeCreated: 1652288568 -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/DisableInEditModeAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class DisableInEditModeAttribute : Attribute 9 | { 10 | public bool Inverse { get; protected set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/DisableInEditModeAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d54c241ae2494cb690bf538785a746e6 3 | timeCreated: 1642586566 -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/DisableInPlayModeAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class DisableInPlayModeAttribute : Attribute 9 | { 10 | public bool Inverse { get; protected set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/DisableInPlayModeAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe853178832f4dde824c372a06a22ae0 3 | timeCreated: 1641385956 -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/EnableIfAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = true)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class EnableIfAttribute : DisableIfAttribute 9 | { 10 | public EnableIfAttribute(string condition) : this(condition, true) 11 | { 12 | } 13 | 14 | public EnableIfAttribute(string condition, object value) : base(condition, value) 15 | { 16 | Inverse = true; 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/EnableIfAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41fe52005b34402693769f8acc64b54a 3 | timeCreated: 1652288564 -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/EnableInEditModeAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class EnableInEditModeAttribute : DisableInEditModeAttribute 9 | { 10 | public EnableInEditModeAttribute() 11 | { 12 | Inverse = true; 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/EnableInEditModeAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd4e31bd9809431fb5f23d078c28f5ee 3 | timeCreated: 1642586583 -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/EnableInPlayModeAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class EnableInPlayModeAttribute : DisableInPlayModeAttribute 9 | { 10 | public EnableInPlayModeAttribute() 11 | { 12 | Inverse = true; 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/EnableInPlayModeAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9dc8b9775fe6475f8d9df0fe00e15c25 3 | timeCreated: 1641385940 -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/HideIfAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = true)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class HideIfAttribute : Attribute 9 | { 10 | public HideIfAttribute(string condition) : this(condition, true) 11 | { 12 | } 13 | 14 | public HideIfAttribute(string condition, object value) 15 | { 16 | Condition = condition; 17 | Value = value; 18 | } 19 | 20 | public string Condition { get; } 21 | public object Value { get; } 22 | 23 | public bool Inverse { get; protected set; } 24 | } 25 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/HideIfAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86a795a37ba54419bf857f6044fd6b3e 3 | timeCreated: 1652288556 -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/HideInEditModeAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class HideInEditModeAttribute : Attribute 9 | { 10 | public bool Inverse { get; protected set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/HideInEditModeAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e2cd1bf1d1734eb69b9d93d8c5641a64 3 | timeCreated: 1642586553 -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/HideInPlayModeAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class HideInPlayModeAttribute : Attribute 9 | { 10 | public bool Inverse { get; protected set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/HideInPlayModeAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6686c4df436342e8a75b5ace13a2c590 3 | timeCreated: 1641385927 -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/ShowIfAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = true)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class ShowIfAttribute : HideIfAttribute 9 | { 10 | public ShowIfAttribute(string condition) : this(condition, true) 11 | { 12 | } 13 | 14 | public ShowIfAttribute(string condition, object value) : base(condition, value) 15 | { 16 | Inverse = true; 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/ShowIfAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ff7bd77f2bd4e06be3d07c0f80355d8 3 | timeCreated: 1652288560 -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/ShowInEditModeAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class ShowInEditModeAttribute : HideInEditModeAttribute 9 | { 10 | public ShowInEditModeAttribute() 11 | { 12 | Inverse = true; 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/ShowInEditModeAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 21be4e082bd244a6bb7f856c10c7650d 3 | timeCreated: 1642586541 -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/ShowInPlayModeAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class ShowInPlayModeAttribute : HideInPlayModeAttribute 9 | { 10 | public ShowInPlayModeAttribute() 11 | { 12 | Inverse = true; 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Conditionals/ShowInPlayModeAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1129642ac27240c8844f2865f1d38e92 3 | timeCreated: 1641384123 -------------------------------------------------------------------------------- /Runtime/Attributes/Debug.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 28f7eec7a37cb344d9b9e10211a23e54 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Attributes/Debug/ShowDrawerChainAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class ShowDrawerChainAttribute : Attribute 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Debug/ShowDrawerChainAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a2856c1dc9ed40ffbe250bf652baf8bb 3 | timeCreated: 1638949439 -------------------------------------------------------------------------------- /Runtime/Attributes/Decorators.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db28281c07f63414dadb42524ad8a533 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Attributes/Decorators/DisplayAsStringAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage((AttributeTargets.Field | AttributeTargets.Property))] 7 | [Conditional("UNITY_EDITOR")] 8 | public class DisplayAsStringAttribute : Attribute 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Decorators/DisplayAsStringAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ebe54f4dd6f747df9d376712f4aa9c93 3 | timeCreated: 1678604646 -------------------------------------------------------------------------------- /Runtime/Attributes/Decorators/DropdownAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class DropdownAttribute : Attribute 9 | { 10 | public string Values { get; } 11 | 12 | public TriMessageType ValidationMessageType { get; set; } = TriMessageType.Error; 13 | 14 | public DropdownAttribute(string values) 15 | { 16 | Values = values; 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Decorators/DropdownAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 715d2fca9b1e4330be5d88eddbbdd801 3 | timeCreated: 1656933469 -------------------------------------------------------------------------------- /Runtime/Attributes/Decorators/InlineEditorAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | 7 | AttributeTargets.Class | AttributeTargets.Struct)] 8 | [Conditional("UNITY_EDITOR")] 9 | public class InlineEditorAttribute : Attribute 10 | { 11 | public InlineEditorModes Mode { get; set; } = InlineEditorModes.GUIOnly; 12 | 13 | public float PreviewHeight { get; set; } = 50; 14 | 15 | public InlineEditorAttribute() 16 | { 17 | } 18 | 19 | public InlineEditorAttribute(InlineEditorModes mode) 20 | { 21 | Mode = mode; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Decorators/InlineEditorAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d09104644014c71b3b0c3b472b743a5 3 | timeCreated: 1641657539 -------------------------------------------------------------------------------- /Runtime/Attributes/Decorators/SceneAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class SceneAttribute : Attribute 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Decorators/SceneAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aec7c3bafdd64bc9b74b132631a1bcab 3 | timeCreated: 1657956550 -------------------------------------------------------------------------------- /Runtime/Attributes/Decorators/UnitAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 19933b91324daa14282d84d0991f36f3 -------------------------------------------------------------------------------- /Runtime/Attributes/Groups.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ae8131a7ef8646499ccd4880b458e8f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/DeclareBoxGroupAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class DeclareBoxGroupAttribute : DeclareGroupBaseAttribute 9 | { 10 | public DeclareBoxGroupAttribute(string path) : base(path) 11 | { 12 | Title = path; 13 | } 14 | 15 | public string Title { get; set; } 16 | public bool HideTitle { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/DeclareBoxGroupAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b8ef8105f574de2b66a434ad3318390 3 | timeCreated: 1639417269 -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/DeclareFoldoutGroupAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class DeclareFoldoutGroupAttribute : DeclareGroupBaseAttribute 9 | { 10 | public DeclareFoldoutGroupAttribute(string path) : base(path) 11 | { 12 | Title = path; 13 | } 14 | 15 | public string Title { get; set; } 16 | public bool Expanded { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/DeclareFoldoutGroupAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f930db0458a4705940c19a0df585478 3 | timeCreated: 1668331532 -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/DeclareGroupBaseAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TriInspector 4 | { 5 | public abstract class DeclareGroupBaseAttribute : Attribute 6 | { 7 | protected DeclareGroupBaseAttribute(string path) 8 | { 9 | Path = path ?? "None"; 10 | } 11 | 12 | public string Path { get; } 13 | } 14 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/DeclareGroupBaseAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 29196c90aab84065a58211f71c9e280e 3 | timeCreated: 1639419849 -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/DeclareHorizontalGroupAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class DeclareHorizontalGroupAttribute : DeclareGroupBaseAttribute 9 | { 10 | public DeclareHorizontalGroupAttribute(string path) : base(path) 11 | { 12 | } 13 | 14 | public float[] Sizes { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/DeclareHorizontalGroupAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b5d0fa1c34e46bbb34e0ceb78a1e999 3 | timeCreated: 1640871509 -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/DeclareTabGroupAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class DeclareTabGroupAttribute : DeclareGroupBaseAttribute 9 | { 10 | public DeclareTabGroupAttribute(string path) : base(path) 11 | { 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/DeclareTabGroupAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 951a8c6083fe40a69430e6f53d5ba7a0 3 | timeCreated: 1642758819 -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/DeclareToggleGroupAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class DeclareToggleGroupAttribute : DeclareGroupBaseAttribute 9 | { 10 | public DeclareToggleGroupAttribute(string path) : base(path) 11 | { 12 | Title = path; 13 | } 14 | 15 | public string Title { get; set; } 16 | public bool Collapsible { get; set; } = true; 17 | } 18 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/DeclareToggleGroupAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f93204143e294161afc85d1c6a3c6d16 3 | timeCreated: 1680887538 -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/DeclareVerticalGroupAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = true)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class DeclareVerticalGroupAttribute : DeclareGroupBaseAttribute 9 | { 10 | public DeclareVerticalGroupAttribute(string path) : base(path) 11 | { 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/DeclareVerticalGroupAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f62994cb4c86471aba39b9a0e79ae93a 3 | timeCreated: 1643558654 -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/GroupAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class GroupAttribute : Attribute 9 | { 10 | public GroupAttribute(string path) 11 | { 12 | Path = path; 13 | } 14 | 15 | public string Path { get; } 16 | } 17 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/GroupAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 34f746736a9e4b8db6093924652cf405 3 | timeCreated: 1639412551 -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/GroupNextAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using JetBrains.Annotations; 4 | 5 | namespace TriInspector 6 | { 7 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)] 8 | [Conditional("UNITY_EDITOR")] 9 | public class GroupNextAttribute : Attribute 10 | { 11 | public GroupNextAttribute(string path) 12 | { 13 | Path = path; 14 | } 15 | 16 | [CanBeNull] public string Path { get; } 17 | } 18 | 19 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)] 20 | [Conditional("UNITY_EDITOR")] 21 | public class UnGroupNextAttribute : GroupNextAttribute 22 | { 23 | public UnGroupNextAttribute() : base(null) 24 | { 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/GroupNextAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb210ae77e66474e92cb101f18052072 3 | timeCreated: 1660802441 -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/TabAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class TabAttribute : Attribute 9 | { 10 | public TabAttribute(string tab) 11 | { 12 | TabName = tab; 13 | } 14 | 15 | public string TabName { get; } 16 | } 17 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Groups/TabAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 19d2d001ee784250be738bb1a51a0fc6 3 | timeCreated: 1642758885 -------------------------------------------------------------------------------- /Runtime/Attributes/Misc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f6f72e0322b8a44f8844eca72864efe 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Attributes/Misc/HideMonoScriptAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage((AttributeTargets.Class | AttributeTargets.Struct))] 7 | [Conditional("UNITY_EDITOR")] 8 | public class HideMonoScriptAttribute : Attribute 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Misc/HideMonoScriptAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 306721f92da846b5aac744073764a4e2 3 | timeCreated: 1673714382 -------------------------------------------------------------------------------- /Runtime/Attributes/Misc/HideReferencePickerAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TriInspector 4 | { 5 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 6 | public class HideReferencePickerAttribute : Attribute 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Misc/HideReferencePickerAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d8c607fff5fe44e29891720c2daf2d6e 3 | timeCreated: 1659516082 -------------------------------------------------------------------------------- /Runtime/Attributes/Misc/OnValueChangedAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class OnValueChangedAttribute : Attribute 9 | { 10 | public OnValueChangedAttribute(string method) 11 | { 12 | Method = method; 13 | } 14 | 15 | public string Method { get; } 16 | } 17 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Misc/OnValueChangedAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae1fa081898a4d13b8612da57bc9a349 3 | timeCreated: 1652265504 -------------------------------------------------------------------------------- /Runtime/Attributes/Misc/PropertyOrderAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class PropertyOrderAttribute : Attribute 9 | { 10 | public int Order { get; } 11 | 12 | public PropertyOrderAttribute(int order) 13 | { 14 | Order = order; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Misc/PropertyOrderAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e6de09475a1c44b38ce070f556f5f44d 3 | timeCreated: 1638941803 -------------------------------------------------------------------------------- /Runtime/Attributes/Misc/ReadOnlyAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | 7 | AttributeTargets.Class | AttributeTargets.Struct)] 8 | [Conditional("UNITY_EDITOR")] 9 | public class ReadOnlyAttribute : Attribute 10 | { 11 | } 12 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Misc/ReadOnlyAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07201e1119294874acfd8417ba34199e 3 | timeCreated: 1638885262 -------------------------------------------------------------------------------- /Runtime/Attributes/Misc/ShowInInspector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class ShowInInspectorAttribute : Attribute 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Misc/ShowInInspector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4d9e5878061041bfa097dda3756bc478 3 | timeCreated: 1639243448 -------------------------------------------------------------------------------- /Runtime/Attributes/Others.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a3fe37e4c950ca4e829bcf7176fe8ef 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Attributes/Others/DrawWithTriInspectorAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class DrawWithTriInspectorAttribute : Attribute 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Others/DrawWithTriInspectorAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33460afbb365415a9ff9d9379f0cec59 3 | timeCreated: 1652773384 -------------------------------------------------------------------------------- /Runtime/Attributes/Others/DrawWithUnityAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class DrawWithUnityAttribute : Attribute 9 | { 10 | public bool WithUiToolkit { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Others/DrawWithUnityAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 72a4f37291e74452877df4701818e180 3 | timeCreated: 1668181199 -------------------------------------------------------------------------------- /Runtime/Attributes/Styling.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 392202a2d0b29b44ab8ee66374768f1a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Attributes/Styling/GUIColorAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using UnityEngine; 4 | 5 | namespace TriInspector 6 | { 7 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method | 8 | AttributeTargets.Class | AttributeTargets.Struct)] 9 | [Conditional("UNITY_EDITOR")] 10 | public class GUIColorAttribute : Attribute 11 | { 12 | public Color Color { get; } 13 | public string GetColor { get; } 14 | 15 | public GUIColorAttribute(float r, float g, float b, float a = 1f) 16 | { 17 | Color = new Color(r, g, b, a); 18 | } 19 | 20 | public GUIColorAttribute(byte r, byte g, byte b, byte a = byte.MaxValue) 21 | { 22 | Color = new Color32(r, g, b, a); 23 | } 24 | 25 | public GUIColorAttribute(string value) 26 | { 27 | if (value.StartsWith("$")) 28 | { 29 | GetColor = value; 30 | 31 | return; 32 | } 33 | 34 | if (ColorUtility.TryParseHtmlString(value, out var color)) 35 | { 36 | } 37 | else if (ColorUtility.TryParseHtmlString($"#{value}", out color)) 38 | { 39 | } 40 | else 41 | { 42 | color = Color.white; 43 | } 44 | 45 | Color = color; 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Styling/GUIColorAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9a20bec5b2a495e9a4035e1585ebfda 3 | timeCreated: 1638943497 -------------------------------------------------------------------------------- /Runtime/Attributes/Styling/HideLabelAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class HideLabelAttribute : Attribute 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Styling/HideLabelAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 16ab42968e5c4f86ab9a607cb983508f 3 | timeCreated: 1638868812 -------------------------------------------------------------------------------- /Runtime/Attributes/Styling/IndentAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class IndentAttribute : Attribute 9 | { 10 | public int Indent { get; } 11 | 12 | public IndentAttribute() : this(1) 13 | { 14 | } 15 | 16 | public IndentAttribute(int indent) 17 | { 18 | Indent = indent; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Styling/IndentAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0f021bed86024c529a5a265fea051a9f 3 | timeCreated: 1638947073 -------------------------------------------------------------------------------- /Runtime/Attributes/Styling/InlinePropertyAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | 7 | AttributeTargets.Class | AttributeTargets.Struct)] 8 | [Conditional("UNITY_EDITOR")] 9 | public class InlinePropertyAttribute : Attribute 10 | { 11 | public float LabelWidth { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Styling/InlinePropertyAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e788cb72a55a4a69a703dd857b408ace 3 | timeCreated: 1638947526 -------------------------------------------------------------------------------- /Runtime/Attributes/Styling/LabelTextAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class LabelTextAttribute : Attribute 9 | { 10 | public string Text { get; } 11 | 12 | public LabelTextAttribute(string text) 13 | { 14 | Text = text; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Styling/LabelTextAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7dff14e608f492abd5a4e4c26d4fb5a 3 | timeCreated: 1638876608 -------------------------------------------------------------------------------- /Runtime/Attributes/Styling/LabelWidthAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class LabelWidthAttribute : Attribute 9 | { 10 | public float Width { get; } 11 | 12 | public LabelWidthAttribute(float width) 13 | { 14 | Width = width; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Styling/LabelWidthAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb503940335041fd804649c32f07ab14 3 | timeCreated: 1638948051 -------------------------------------------------------------------------------- /Runtime/Attributes/Styling/PropertySpaceAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method | 7 | AttributeTargets.Class | AttributeTargets.Struct)] 8 | [Conditional("UNITY_EDITOR")] 9 | public class PropertySpaceAttribute : Attribute 10 | { 11 | public float SpaceBefore { get; set; } 12 | public float SpaceAfter { get; set; } 13 | 14 | public PropertySpaceAttribute() 15 | { 16 | SpaceBefore = 7; 17 | } 18 | 19 | public PropertySpaceAttribute(float spaceBefore = 0, float spaceAfter = 0) 20 | { 21 | SpaceBefore = spaceBefore; 22 | SpaceAfter = spaceAfter; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Styling/PropertySpaceAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27a1f5f498a04cc0b7ffedc2d2e6a8ff 3 | timeCreated: 1638942425 -------------------------------------------------------------------------------- /Runtime/Attributes/Styling/PropertyTooltipAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class PropertyTooltipAttribute : Attribute 9 | { 10 | public string Tooltip { get; } 11 | 12 | public PropertyTooltipAttribute(string tooltip) 13 | { 14 | Tooltip = tooltip; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Styling/PropertyTooltipAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8086d3692f24b48b221ddf74c77bad6 3 | timeCreated: 1638948288 -------------------------------------------------------------------------------- /Runtime/Attributes/Styling/TitleAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class TitleAttribute : Attribute 9 | { 10 | public string Title { get; } 11 | public bool HorizontalLine { get; set; } = true; 12 | 13 | public TitleAttribute(string title) 14 | { 15 | Title = title; 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Styling/TitleAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 03c62d6e9c5c4b55bd2bf199b9745d95 3 | timeCreated: 1638944189 -------------------------------------------------------------------------------- /Runtime/Attributes/Validators.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07da3bd982d5a3041a95afe84ff69aa4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/Attributes/Validators/AssetsOnlyAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage((AttributeTargets.Field | AttributeTargets.Property))] 7 | [Conditional("UNITY_EDITOR")] 8 | public class AssetsOnlyAttribute : Attribute 9 | { 10 | 11 | } 12 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Validators/AssetsOnlyAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b922aaf25df46a99d356711f341dc06 3 | timeCreated: 1654861722 -------------------------------------------------------------------------------- /Runtime/Attributes/Validators/InfoBoxAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = true)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class InfoBoxAttribute : Attribute 9 | { 10 | public string Text { get; } 11 | public TriMessageType MessageType { get; } 12 | public string VisibleIf { get; } 13 | 14 | public InfoBoxAttribute(string text, TriMessageType messageType = TriMessageType.Info, string visibleIf = null) 15 | { 16 | Text = text; 17 | MessageType = messageType; 18 | VisibleIf = visibleIf; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Validators/InfoBoxAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 573a31308ca14b5381aa18ffbff0afe2 3 | timeCreated: 1652897457 -------------------------------------------------------------------------------- /Runtime/Attributes/Validators/RequiredAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TriInspector 4 | { 5 | [AttributeUsage((AttributeTargets.Field | AttributeTargets.Property))] 6 | public class RequiredAttribute : Attribute 7 | { 8 | public string Message { get; set; } 9 | 10 | public string FixAction { get; set; } 11 | public string FixActionName { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Validators/RequiredAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d886b45ac8b1474db5cdfd07c859e616 3 | timeCreated: 1642261718 -------------------------------------------------------------------------------- /Runtime/Attributes/Validators/SceneObjectsOnlyAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage((AttributeTargets.Field | AttributeTargets.Property))] 7 | [Conditional("UNITY_EDITOR")] 8 | public class SceneObjectsOnlyAttribute : Attribute 9 | { 10 | } 11 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Validators/SceneObjectsOnlyAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 908b02bc0b5d4cdd88e952625ce0cbc7 3 | timeCreated: 1657621281 -------------------------------------------------------------------------------- /Runtime/Attributes/Validators/ValidateInputAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace TriInspector 5 | { 6 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 7 | [Conditional("UNITY_EDITOR")] 8 | public class ValidateInputAttribute : Attribute 9 | { 10 | public string Method { get; } 11 | 12 | public ValidateInputAttribute(string method) 13 | { 14 | Method = method; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Runtime/Attributes/Validators/ValidateInputAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0bcc52b28f694396ab43601214283428 3 | timeCreated: 1651936866 -------------------------------------------------------------------------------- /Runtime/ButtonSizes.cs: -------------------------------------------------------------------------------- 1 | namespace TriInspector 2 | { 3 | public enum ButtonSizes 4 | { 5 | Small = 0, 6 | Medium = 22, 7 | Large = 32, 8 | Gigantic = 62, 9 | } 10 | } -------------------------------------------------------------------------------- /Runtime/ButtonSizes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7580fa208fd4eb695fa8b9f9ca0c4d7 3 | timeCreated: 1654532890 -------------------------------------------------------------------------------- /Runtime/InlineEditorModes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TriInspector 4 | { 5 | [Flags] 6 | public enum InlineEditorModes 7 | { 8 | GUIOnly = 1 << 0, 9 | Header = 1 << 1, 10 | Preview = 1 << 2, 11 | 12 | GUIAndPreview = GUIOnly | Preview, 13 | GUIAndHeader = GUIOnly | Header, 14 | FullEditor = GUIOnly | Header | Preview, 15 | } 16 | } -------------------------------------------------------------------------------- /Runtime/InlineEditorModes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f798a09b97da4ed09b5b962c0dbdba0e 3 | timeCreated: 1712392526 -------------------------------------------------------------------------------- /Runtime/TriDropdownList.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace TriInspector 4 | { 5 | public class TriDropdownList : List> 6 | { 7 | public void Add(string text, T value) 8 | { 9 | Add(new TriDropdownItem {Text = text, Value = value,}); 10 | } 11 | } 12 | 13 | public interface ITriDropdownItem 14 | { 15 | string Text { get; } 16 | object Value { get; } 17 | } 18 | 19 | public struct TriDropdownItem : ITriDropdownItem 20 | { 21 | public string Text { get; set; } 22 | public object Value { get; set; } 23 | } 24 | 25 | public struct TriDropdownItem : ITriDropdownItem 26 | { 27 | public string Text; 28 | public T Value; 29 | 30 | string ITriDropdownItem.Text => Text; 31 | object ITriDropdownItem.Value => Value; 32 | } 33 | } -------------------------------------------------------------------------------- /Runtime/TriDropdownList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdeda5f861ce4f359c0a25554ffe70bf 3 | timeCreated: 1656937692 -------------------------------------------------------------------------------- /Runtime/TriInspector.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TriInspector", 3 | "rootNamespace": "", 4 | "references": [], 5 | "includePlatforms": [], 6 | "excludePlatforms": [], 7 | "allowUnsafeCode": false, 8 | "overrideReferences": true, 9 | "precompiledReferences": [], 10 | "autoReferenced": true, 11 | "defineConstraints": [], 12 | "versionDefines": [], 13 | "noEngineReferences": false 14 | } -------------------------------------------------------------------------------- /Runtime/TriInspector.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 324caed91501a9c47a04ebfd87b68794 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Runtime/TriValidationResult.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 428f8881a0d34edf8148591af6f9a0e7 3 | timeCreated: 1642525992 -------------------------------------------------------------------------------- /Unity.InternalAPIEditorBridge.012.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17812d8658d186345af6f2e6bbc1c31b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity.InternalAPIEditorBridge.012/AdvancedDropdownProxy.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor.IMGUI.Controls; 2 | 3 | namespace TriInspectorUnityInternalBridge 4 | { 5 | internal class AdvancedDropdownProxy 6 | { 7 | public static void SetShowHeader(AdvancedDropdown dropdown, bool showHeader) 8 | { 9 | dropdown.m_WindowInstance.showHeader = showHeader; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Unity.InternalAPIEditorBridge.012/AdvancedDropdownProxy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fbe08837c89a44e29ea221ffeadb811d 3 | timeCreated: 1652084409 -------------------------------------------------------------------------------- /Unity.InternalAPIEditorBridge.012/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly: InternalsVisibleTo("TriInspector.Editor")] 4 | [assembly: InternalsVisibleTo("TriInspector.Editor.Extras")] -------------------------------------------------------------------------------- /Unity.InternalAPIEditorBridge.012/AssemblyInfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ceaac34ef4d54edea2f5bd49bc1145a5 3 | timeCreated: 1652008241 -------------------------------------------------------------------------------- /Unity.InternalAPIEditorBridge.012/EditorGUIUtilityProxy.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace TriInspectorUnityInternalBridge 5 | { 6 | internal static class EditorGUIUtilityProxy 7 | { 8 | public static Texture2D GetHelpIcon(MessageType type) 9 | { 10 | return EditorGUIUtility.GetHelpIcon(type); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Unity.InternalAPIEditorBridge.012/EditorGUIUtilityProxy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c34c0be768944a3ad89255c85434802 3 | timeCreated: 1641381655 -------------------------------------------------------------------------------- /Unity.InternalAPIEditorBridge.012/EditorProxy.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | 3 | namespace TriInspectorUnityInternalBridge 4 | { 5 | internal static class EditorProxy 6 | { 7 | public static void DoDrawDefaultInspector(SerializedObject obj) 8 | { 9 | Editor.DoDrawDefaultInspector(obj); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Unity.InternalAPIEditorBridge.012/EditorProxy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 993f9dfd66614ba68fcf95c0e7e098e3 3 | timeCreated: 1683783433 -------------------------------------------------------------------------------- /Unity.InternalAPIEditorBridge.012/GUIClipProxy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEditor; 3 | using UnityEngine; 4 | 5 | namespace TriInspectorUnityInternalBridge 6 | { 7 | internal static class GUIClipProxy 8 | { 9 | private static Func _guiClipUnClipVector2; 10 | 11 | [InitializeOnLoadMethod] 12 | private static void Setup() 13 | { 14 | var imGuiModuleAssembly = typeof(GUI).Assembly; 15 | var guiClipType = imGuiModuleAssembly.GetType("UnityEngine.GUIClip", throwOnError: true); 16 | 17 | _guiClipUnClipVector2 = (Func) Delegate.CreateDelegate(typeof(Func), 18 | guiClipType.GetMethod("Unclip", new[] {typeof(Vector2)})); 19 | } 20 | 21 | public static Vector2 UnClip(Vector2 pos) 22 | { 23 | return _guiClipUnClipVector2.Invoke(pos); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /Unity.InternalAPIEditorBridge.012/GUIClipProxy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e573403f6f844648ab1dc4013c8c4856 3 | timeCreated: 1690734495 -------------------------------------------------------------------------------- /Unity.InternalAPIEditorBridge.012/InternalEditorUtilityProxy.cs: -------------------------------------------------------------------------------- 1 | using UnityEditorInternal; 2 | 3 | namespace TriInspectorUnityInternalBridge 4 | { 5 | internal static class InternalEditorUtilityProxy 6 | { 7 | public static bool GetIsInspectorExpanded(UnityEngine.Object obj) 8 | { 9 | return InternalEditorUtility.GetIsInspectorExpanded(obj); 10 | } 11 | 12 | public static void SetIsInspectorExpanded(UnityEngine.Object obj, bool isExpanded) 13 | { 14 | InternalEditorUtility.SetIsInspectorExpanded(obj, isExpanded); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Unity.InternalAPIEditorBridge.012/InternalEditorUtilityProxy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c25961327a574e9399f5ebc2d9a929ea 3 | timeCreated: 1642757678 -------------------------------------------------------------------------------- /Unity.InternalAPIEditorBridge.012/ReorderableListProxy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: acf8923868a81dd41825ea3ce86c0455 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Unity.InternalAPIEditorBridge.012/ScriptAttributeUtilityProxy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d3310787ea648a18e32a0da39a292c2 3 | timeCreated: 1638773139 -------------------------------------------------------------------------------- /Unity.InternalAPIEditorBridge.012/Unity.InternalAPIEditorBridge.013.asmref: -------------------------------------------------------------------------------- 1 | { 2 | "reference": "Unity.InternalAPIEditorBridge.013" 3 | } -------------------------------------------------------------------------------- /Unity.InternalAPIEditorBridge.012/Unity.InternalAPIEditorBridge.013.asmref.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 851ff4ad6c3a00b48bd5281de6b2f060 3 | AssemblyDefinitionReferenceImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.codewriter.triinspector", 3 | "displayName": "Tri Inspector", 4 | "description": "Advanced inspector attributes for Unity", 5 | "version": "1.14.1", 6 | "unity": "2020.3", 7 | "author": "CodeWriter (https://github.com/orgs/codewriter-packages)", 8 | "homepage": "https://github.com/codewriter-packages/Tri-Inspector#readme", 9 | "dependencies": { 10 | "com.unity.localization": "1.0.0" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 14114efa999fca2429a33e86c159f70b 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | --------------------------------------------------------------------------------