├── Documentation~ ├── store │ ├── image │ │ ├── large.png │ │ ├── large.xcf │ │ ├── small.png │ │ ├── small.xcf │ │ ├── medium.png │ │ ├── medium.xcf │ │ ├── large.xcf.meta │ │ ├── medium.xcf.meta │ │ ├── small.xcf.meta │ │ ├── large.png.meta │ │ ├── small.png.meta │ │ └── medium.png.meta │ ├── Screenshot_1.png │ ├── Screenshot_2.png │ ├── Screenshot_3.png │ ├── image.meta │ ├── readme.txt.meta │ ├── readme.txt │ ├── Screenshot_1.png.meta │ ├── Screenshot_2.png.meta │ └── Screenshot_3.png.meta ├── mdsrc │ ├── one-line-overview.png │ ├── root-array-example.png │ ├── weight-attribute-example.png │ ├── width-attribute-example.png │ ├── fixed-length-array-example.png │ ├── one-line-attribute-example.png │ ├── expandable-attribute-example.png │ ├── hide-label-attribute-example.png │ ├── highlight-attribute-example.png │ ├── separator-attribute-example.png │ ├── hide-buttons-attribute-example.png │ ├── one-line-property-drawer-example.png │ ├── one-line-overview.png.meta │ ├── root-array-example.png.meta │ ├── fixed-length-array-example.png.meta │ ├── one-line-attribute-example.png.meta │ ├── weight-attribute-example.png.meta │ ├── width-attribute-example.png.meta │ ├── expandable-attribute-example.png.meta │ ├── hide-buttons-attribute-example.png.meta │ ├── hide-label-attribute-example.png.meta │ ├── highlight-attribute-example.png.meta │ ├── separator-attribute-example.png.meta │ └── one-line-property-drawer-example.png.meta ├── README.md.meta ├── mdsrc.meta └── store.meta ├── Samples~ ├── .sample.json ├── Examples.meta ├── Scripts.meta ├── OneLine.Examples.asmdef.meta ├── Scripts │ ├── Details.meta │ ├── Overview.meta │ ├── Details │ │ ├── Nested.meta │ │ ├── onelinedrawerexampleeditor.cs │ │ ├── HideLabelExample.cs.meta │ │ ├── HighlightExample.cs.meta │ │ ├── OneLineExample.cs.meta │ │ ├── RootArrayExample.cs.meta │ │ ├── SeparatorExample.cs.meta │ │ ├── WeightExample.cs.meta │ │ ├── WidthExample.cs.meta │ │ ├── ArrayOfArraysExample.cs.meta │ │ ├── FixedLengthExample.cs.meta │ │ ├── HideButtonsExample.cs.meta │ │ ├── NestedArrayExample.cs.meta │ │ ├── OneLineDrawerExample.cs.meta │ │ ├── Nested │ │ │ ├── NestedArrayExample.cs.meta │ │ │ ├── NestedSimpleExample.cs.meta │ │ │ ├── NestedArrayExample.cs │ │ │ └── NestedSimpleExample.cs │ │ ├── onelinedrawerexampleeditor.cs.meta │ │ ├── CustomPropertyDrawerExample.cs.meta │ │ ├── ExpandableExample.cs.meta │ │ ├── NestedArrayExample.cs │ │ ├── ArrayOfArraysExample.cs │ │ ├── FixedLengthExample.cs │ │ ├── HideButtonsExample.cs │ │ ├── HideLabelExample.cs │ │ ├── SeparatorExample.cs │ │ ├── ExpandableExample.cs │ │ ├── HighlightExample.cs │ │ ├── WeightExample.cs │ │ ├── WidthExample.cs │ │ ├── OneLineDrawerExample.cs │ │ ├── OneLineExample.cs │ │ └── RootArrayExample.cs │ └── Overview │ │ ├── Overview.cs.meta │ │ ├── ComplexExample.cs.meta │ │ ├── StandartTypesOverview.cs.meta │ │ ├── StandartTypesOverview.cs │ │ └── ComplexExample.cs ├── Overview │ ├── Overview.asset.meta │ ├── ComplexExample.asset.meta │ ├── Standart Types Overview.asset.meta │ └── Standart Types Overview.asset ├── Details.meta ├── Overview.meta ├── Details │ ├── Nested.meta │ ├── Nested │ │ ├── Nested Example.asset.meta │ │ ├── Nested Array Example.asset.meta │ │ ├── Nested Example.asset │ │ └── Nested Array Example.asset │ ├── Weight Example.asset.meta │ ├── Width Example.asset.meta │ ├── Fixed Length Example.asset.meta │ ├── Hide Buttons Example.asset.meta │ ├── Hide Label Example.asset.meta │ ├── Highlight Example.asset.meta │ ├── Nested Array Example.asset.meta │ ├── One Line Example.asset.meta │ ├── Root Array Example.asset.meta │ ├── Separator Example.asset.meta │ ├── Array Of Arrays Example.asset.meta │ ├── One Line Drawer Example.asset.meta │ ├── Custom Property Drawer Example.asset.meta │ ├── Expandable Example.asset.meta │ ├── Weight Example.asset │ ├── Nested Array Example.asset │ ├── Width Example.asset │ ├── Highlight Example.asset │ ├── Fixed Length Example.asset │ ├── Separator Example.asset │ ├── Hide Label Example.asset │ ├── Hide Buttons Example.asset │ ├── Array Of Arrays Example.asset │ ├── Expandable Example.asset │ ├── Root Array Example.asset │ ├── Custom Property Drawer Example.asset │ ├── One Line Example.asset │ └── One Line Drawer Example.asset └── OneLine.Examples.asmdef ├── LICENSE.meta ├── README.md.meta ├── package.json.meta ├── .github └── ISSUE_TEMPLATE │ ├── custom.md │ └── bug_report.md ├── Editor.meta ├── Runtime.meta ├── Tests.meta ├── Editor ├── Scripts.meta ├── OneLine.Editor.asmdef.meta ├── Scripts │ ├── Utils.meta │ ├── Drawers.meta │ ├── Slices.meta │ ├── Drawers │ │ ├── Array.meta │ │ ├── CustomDrawer.meta │ │ ├── Decorators.meta │ │ ├── Directory.meta │ │ ├── Drawer.cs.meta │ │ ├── CustomDrawer.cs.meta │ │ ├── ComplexFieldDrawer.cs.meta │ │ ├── SimpleFieldDrawer.cs.meta │ │ ├── Array │ │ │ ├── FixedArrayDrawer.cs.meta │ │ │ ├── ArrayButtonsDrawer.cs.meta │ │ │ ├── DynamicArrayDrawer.cs.meta │ │ │ ├── FixedArrayDrawer.cs │ │ │ ├── ArrayButtonsDrawer.cs │ │ │ └── DynamicArrayDrawer.cs │ │ ├── Decorators │ │ │ ├── HeaderDrawer.cs.meta │ │ │ ├── SpaceDrawer.cs.meta │ │ │ ├── HighlightDrawer.cs.meta │ │ │ ├── SeparatorDrawer.cs.meta │ │ │ ├── TooltipDrawer.cs.meta │ │ │ ├── SpaceDrawer.cs │ │ │ ├── TooltipDrawer.cs │ │ │ ├── HighlightDrawer.cs │ │ │ ├── SeparatorDrawer.cs │ │ │ └── HeaderDrawer.cs │ │ ├── CustomDrawer │ │ │ ├── TypeForDrawing.cs.meta │ │ │ ├── CustomPropertyDrawers.cs.meta │ │ │ ├── CustomPropertyTypesCache.cs.meta │ │ │ ├── TypeForDrawing.cs │ │ │ └── CustomPropertyTypesCache.cs │ │ ├── Directory │ │ │ ├── DirectoryDrawer.cs.meta │ │ │ ├── RootDirectoryDrawer.cs.meta │ │ │ ├── DirectoryDrawer.cs │ │ │ └── RootDirectoryDrawer.cs │ │ ├── Drawer.cs │ │ ├── CustomDrawer.cs │ │ └── SimpleFieldDrawer.cs │ ├── Settings │ │ ├── Tools.meta │ │ ├── Primitives.meta │ │ ├── Tools │ │ │ ├── PreprocessorDirectives.meta │ │ │ ├── SettingsMenu.cs.meta │ │ │ └── PreprocessorDirectives │ │ │ │ ├── PreprocessorDirectives.cs.meta │ │ │ │ └── PreprocessorDirectives.cs │ │ ├── ISettings.cs.meta │ │ ├── GlobalSettingsLayer.cs.meta │ │ ├── LocalSettingsLayer.cs.meta │ │ ├── Primitives │ │ │ └── TernaryBoolean.cs.meta │ │ ├── Settings.cs.meta │ │ ├── SettingsEditor.cs.meta │ │ ├── DefaultSettingsLayer.cs.meta │ │ ├── ISettings.cs │ │ ├── DefaultSettingsLayer.cs │ │ ├── GlobalSettingsLayer.cs │ │ ├── Settings.cs │ │ └── LocalSettingsLayer.cs │ ├── Settings.meta │ ├── Slices │ │ ├── Drawable.cs.meta │ │ ├── Slice.cs.meta │ │ ├── Slices.cs.meta │ │ ├── SlicesCache.cs.meta │ │ ├── Slice.cs │ │ ├── Drawable.cs │ │ ├── SlicesCache.cs │ │ └── Slices.cs │ ├── Utils │ │ ├── GuiUtil.cs.meta │ │ ├── ArraysSizeObserver.cs.meta │ │ ├── IEnumerableExtension.cs.meta │ │ ├── NullableObjectExtension.cs.meta │ │ ├── CustomPropertyDrawerExtension.cs.meta │ │ ├── SerializedPropertyExtension.cs.meta │ │ ├── SerializedPropertyReflectionExtension.cs.meta │ │ ├── NullableObjectExtension.cs │ │ ├── ArraysSizeObserver.cs │ │ ├── GuiUtil.cs │ │ ├── CustomPropertyDrawerExtension.cs │ │ ├── IEnumerableExtension.cs │ │ └── SerializedPropertyExtension.cs │ ├── OneLinePropertyDrawer.cs.meta │ ├── SeparatorAttributeDrawer.cs.meta │ ├── ExpandableAttributeDrawer.cs.meta │ └── SeparatorAttributeDrawer.cs └── OneLine.Editor.asmdef ├── Tests ├── Editor.meta └── Editor │ ├── OneLine.Tests.Editor.asmdef.meta │ ├── ScriptableObjects │ ├── Tests.meta │ ├── Benchmark.meta │ ├── Tests │ │ ├── Slices Test.asset.meta │ │ ├── Extended Class Test.asset.meta │ │ ├── Extended Generic Test.asset.meta │ │ ├── Extended Class Test.asset │ │ ├── Extended Generic Test.asset │ │ └── Slices Test.asset │ └── Benchmark │ │ ├── Array Benchmark.asset.meta │ │ └── Separate Fields Benchmark.asset.meta │ ├── Scripts.meta │ ├── ScriptableObjects.meta │ ├── Scripts │ ├── SlicesTest.cs.meta │ ├── ArrayBenchmark.cs.meta │ ├── ExtendedClassTest.cs.meta │ ├── ExtendedGenericTest.cs.meta │ ├── SeparateFieldsBenchmark.cs.meta │ ├── ExtendedClassTest.cs │ ├── ExtendedGenericTest.cs │ ├── ArrayBenchmark.cs │ └── SlicesTest.cs │ └── OneLine.Tests.Editor.asmdef ├── Runtime ├── Scripts.meta ├── OneLine.Runtime.asmdef.meta ├── Scripts │ ├── Attributes.meta │ └── Attributes │ │ ├── WidthAttribute.cs.meta │ │ ├── HideLabelAttribute.cs.meta │ │ ├── HighlightAttribute.cs.meta │ │ ├── OneLineAttribute.cs.meta │ │ ├── SeparatorAttribute.cs.meta │ │ ├── WeightAttribute.cs.meta │ │ ├── ArrayLengthAttribute.cs.meta │ │ ├── HideButtonsAttribute.cs.meta │ │ ├── ExpandableAttribute.cs.meta │ │ ├── HideButtonsAttribute.cs │ │ ├── HideLabelAttribute.cs │ │ ├── ArrayLengthAttribute.cs │ │ ├── WeightAttribute.cs │ │ ├── SeparatorAttribute.cs │ │ ├── ExpandableAttribute.cs │ │ ├── WidthAttribute.cs │ │ ├── HighlightAttribute.cs │ │ └── OneLineAttribute.cs └── OneLine.Runtime.asmdef ├── .gitignore ├── package.json └── LICENSE /Documentation~/store/image/large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/store/image/large.png -------------------------------------------------------------------------------- /Documentation~/store/image/large.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/store/image/large.xcf -------------------------------------------------------------------------------- /Documentation~/store/image/small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/store/image/small.png -------------------------------------------------------------------------------- /Documentation~/store/image/small.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/store/image/small.xcf -------------------------------------------------------------------------------- /Documentation~/store/Screenshot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/store/Screenshot_1.png -------------------------------------------------------------------------------- /Documentation~/store/Screenshot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/store/Screenshot_2.png -------------------------------------------------------------------------------- /Documentation~/store/Screenshot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/store/Screenshot_3.png -------------------------------------------------------------------------------- /Documentation~/store/image/medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/store/image/medium.png -------------------------------------------------------------------------------- /Documentation~/store/image/medium.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/store/image/medium.xcf -------------------------------------------------------------------------------- /Samples~/.sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "displayName": "OneLine Examples", 3 | "description": "A series of examples for using OneLine." 4 | } 5 | -------------------------------------------------------------------------------- /Documentation~/mdsrc/one-line-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/mdsrc/one-line-overview.png -------------------------------------------------------------------------------- /Documentation~/mdsrc/root-array-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/mdsrc/root-array-example.png -------------------------------------------------------------------------------- /Documentation~/mdsrc/weight-attribute-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/mdsrc/weight-attribute-example.png -------------------------------------------------------------------------------- /Documentation~/mdsrc/width-attribute-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/mdsrc/width-attribute-example.png -------------------------------------------------------------------------------- /Documentation~/mdsrc/fixed-length-array-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/mdsrc/fixed-length-array-example.png -------------------------------------------------------------------------------- /Documentation~/mdsrc/one-line-attribute-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/mdsrc/one-line-attribute-example.png -------------------------------------------------------------------------------- /Documentation~/mdsrc/expandable-attribute-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/mdsrc/expandable-attribute-example.png -------------------------------------------------------------------------------- /Documentation~/mdsrc/hide-label-attribute-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/mdsrc/hide-label-attribute-example.png -------------------------------------------------------------------------------- /Documentation~/mdsrc/highlight-attribute-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/mdsrc/highlight-attribute-example.png -------------------------------------------------------------------------------- /Documentation~/mdsrc/separator-attribute-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/mdsrc/separator-attribute-example.png -------------------------------------------------------------------------------- /Documentation~/mdsrc/hide-buttons-attribute-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/mdsrc/hide-buttons-attribute-example.png -------------------------------------------------------------------------------- /Documentation~/mdsrc/one-line-property-drawer-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slavniyteo/one-line/HEAD/Documentation~/mdsrc/one-line-property-drawer-example.png -------------------------------------------------------------------------------- /LICENSE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9ecb66ba966f94488698a217490eb05 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 841deb346baf48a48b0f460827454073 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7329acdd5b21d584e819c6e836d77a76 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /Documentation~/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aa217be9a2cf6e84da60e75510b299ac 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f58682cb3da7df4284b3a8d60793d72 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f4493fa359c506444b6df1c2b9f61fd1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a928de9757cb0634d9ba6db35b97baa5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d153746e721058540970f0063db2b89b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Tests/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18331577b08576c419f133c5a8606c27 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Documentation~/store/image/large.xcf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbb6dbe2bec3f1d43b14d1b737c66f82 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation~/store/image/medium.xcf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e5c73ff2c09e72148ad6388eebb96989 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation~/store/image/small.xcf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e7197ab649d2bc499b82d78f2f94b14 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Editor/OneLine.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48490628f29f5a745823c646508b1c74 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Runtime/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 799dba8b838644c4bbcec5dac9c854fb 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/Examples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 227cc262bfa7e98458f7db7966722b63 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38732258e34560844b1552948dc3bc4e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Documentation~/mdsrc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a7ab0c37a19c9f4a81977f918a06e1e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Documentation~/store.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 782733325ea03ee4abe2f8bcf811b2e6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/OneLine.Runtime.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a0017bf928d9644fa38a04cabefce63 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples~/OneLine.Examples.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 740c1318bc7cda042a9150bb69e65ad6 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1554b7bb4927d245b7eb5f81b560aae 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Documentation~/store/image.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 293de10c2cd74624c91d523ad0610516 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/Scripts/Overview.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 736a82cffd1d77848838f02810de447c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Tests/Editor/OneLine.Tests.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d4d7d265acbdee74a87d7e2e91793f27 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation~/store/readme.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ad9b36e962b4140d9880bae2d5d13a73 3 | timeCreated: 1504170581 4 | licenseType: Free 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Tests/Editor/ScriptableObjects/Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2202049d1e79b904cbd4e1ef254be894 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/Overview/Overview.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 927bd3f5a155a0d4c8e5b74aac59ca17 3 | timeCreated: 1488716210 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Tests/Editor/ScriptableObjects/Benchmark.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d40b79192d9018247a22d4c0b74d9f5d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Editor/Scripts/Utils.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8acaaa10c6ad49df851f449e37c18a8 3 | folderAsset: yes 4 | timeCreated: 1501755717 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Details.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1a97518b9d0f7b44ea17c71335b631df 3 | folderAsset: yes 4 | timeCreated: 1504284067 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Overview.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95d65fd48dcfdfc459a5d26968c9d7d0 3 | folderAsset: yes 4 | timeCreated: 1504800449 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Tests/Editor/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da4f2edb52b6940528bfc2973ca691f1 3 | folderAsset: yes 4 | timeCreated: 1519709227 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cbc82e6d67d444d4fa11421108e37521 3 | folderAsset: yes 4 | timeCreated: 1501755717 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/Scripts/Slices.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d95fa33b435304212a85e1960ddf1ccc 3 | folderAsset: yes 4 | timeCreated: 1506080140 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Details/Nested.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 29f3192fd441d4ae0a78de196283013d 3 | folderAsset: yes 4 | timeCreated: 1516609946 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Array.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7ae48746f346f4be9974f21e4d505a6b 3 | folderAsset: yes 4 | timeCreated: 1501755717 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/Scripts/Settings/Tools.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7ccb86d0aaf5547d98b12595a4f89d4a 3 | folderAsset: yes 4 | timeCreated: 1537432939 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Runtime/Scripts/Attributes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4dc34427bbd1f4064bea79c76ae80876 3 | folderAsset: yes 4 | timeCreated: 1501755717 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Details/Nested/Nested Example.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd6f8c28bbc9e4906a912b5fb9ef778c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Tests/Editor/ScriptableObjects.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e6a51d5df26004c33becc61b115b1066 3 | folderAsset: yes 4 | timeCreated: 1519709211 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/CustomDrawer.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e787fdc3b6cb74e769ff6a529876ac80 3 | folderAsset: yes 4 | timeCreated: 1519642615 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Decorators.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 96d94709f0ff1463f8044713fc5914ee 3 | folderAsset: yes 4 | timeCreated: 1505125836 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Directory.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 659edb1a5e6154990aad56af45f26a6b 3 | folderAsset: yes 4 | timeCreated: 1501755717 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Editor/Scripts/Settings/Primitives.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a5551c10160b0404eaf32ebf44a65e9d 3 | folderAsset: yes 4 | timeCreated: 1537432904 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Details/Nested/Nested Array Example.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 016f01599c97342019f26de70f1b8b9a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/Nested.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7a715c11ee294f888a61cb444639df6 3 | folderAsset: yes 4 | timeCreated: 1516610312 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/onelinedrawerexampleeditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using OneLine; 3 | 4 | namespace OneLine.Examples { 5 | [CustomPropertyDrawer(typeof(OneLineDrawerExample.RootField))] 6 | public class OneLineDrawerExampleEditor : OneLinePropertyDrawer { 7 | } 8 | } -------------------------------------------------------------------------------- /Editor/Scripts/Settings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7fd808f560cccf4d8d6bbf2590b92ce 3 | folderAsset: yes 4 | timeCreated: 1536834795 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Editor/Scripts/Settings/Tools/PreprocessorDirectives.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2e0a70d1097ce4c5d80fcf5886992ba8 3 | folderAsset: yes 4 | timeCreated: 1537512847 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Details/Weight Example.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8198a4a34979fd4aa0c41130d2fea24 3 | timeCreated: 1504284615 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Details/Width Example.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 202cb7671df2f554a929b00f0875e22b 3 | timeCreated: 1504284779 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Overview/ComplexExample.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3bb3003da687f42739df7b2c913f2067 3 | timeCreated: 1517654649 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Details/Fixed Length Example.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ad39df9e0034f64586048299a096e3f 3 | timeCreated: 1504287025 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Details/Hide Buttons Example.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0df178ca029ae364b82ce0eef0ea8926 3 | timeCreated: 1504286933 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Details/Hide Label Example.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0b70440c8883544e8f0c7f33e29f9ab 3 | timeCreated: 1504285635 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Details/Highlight Example.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 10585dfd19b607848a91aef0ea7a9dc5 3 | timeCreated: 1504286128 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Details/Nested Array Example.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6bd1387be078d499da85e3167632fb22 3 | timeCreated: 1516609172 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Details/One Line Example.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c61d2287252804040a9e20d14012f3f9 3 | timeCreated: 1504284290 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Details/Root Array Example.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 67da17f631f59d345b92c41818e73988 3 | timeCreated: 1504286766 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Details/Separator Example.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e8d6287860e477646a451966eb309ea5 3 | timeCreated: 1504287098 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Details/Array Of Arrays Example.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b400c28408c5849ac9bc621c53d5f931 3 | timeCreated: 1516609126 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Details/One Line Drawer Example.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b9357df3962586e47848aa3adf7bee14 3 | timeCreated: 1504287515 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Overview/Standart Types Overview.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7305ad72bea75c841b951df841467165 3 | timeCreated: 1504801664 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Details/Custom Property Drawer Example.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4da82b0dc13594f77941459b270cafac 3 | timeCreated: 1519373945 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Tests/Editor/ScriptableObjects/Tests/Slices Test.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b9b9680013e1b4c048eeeea404a9bc28 3 | timeCreated: 1506077252 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Tests/Editor/ScriptableObjects/Benchmark/Array Benchmark.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00b45fcb3b1974e85aba2df2d3cea55c 3 | timeCreated: 1506578895 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Tests/Editor/ScriptableObjects/Tests/Extended Class Test.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 96b404ab3d4bd4a8ba870d2b099aa109 3 | timeCreated: 1512279530 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Samples~/Details/Expandable Example.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d25754d71f8f7a64eafeb38d30cd6f94 3 | timeCreated: 1519701075 4 | licenseType: Free 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 11400000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Tests/Editor/ScriptableObjects/Tests/Extended Generic Test.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 90395489b6c0d4d2e9584ad1a990c07b 3 | timeCreated: 1512279154 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Tests/Editor/ScriptableObjects/Benchmark/Separate Fields Benchmark.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a949ff82ad0d445b97d003caa5f545f 3 | timeCreated: 1519709372 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 11400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Tests/Editor/Scripts/SlicesTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9efc419f62b6a4a439b260bf0eb0a0e5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Tests/Editor/Scripts/ArrayBenchmark.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 32277f55e69c547a19c4089e3d0316d1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Tests/Editor/Scripts/ExtendedClassTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e196a61c3e5034c94921d1b26869e3dd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Tests/Editor/Scripts/ExtendedGenericTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d65983c199b645638dd9c65586c26aa 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Tests/Editor/Scripts/SeparateFieldsBenchmark.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 652cefb73657e411a874f57349d8b993 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Drawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: be37473976a4c433ba2df513276a74b9 3 | timeCreated: 1501755719 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Slices/Drawable.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a6f03820cf7aa4e28addef34676ac915 3 | timeCreated: 1536066484 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Slices/Slice.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0eb7c46b98d034280bfe1b581ea7f0ac 3 | timeCreated: 1506080155 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Slices/Slices.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b134d0f0e22964a56b6409c85b519058 3 | timeCreated: 1506080160 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Utils/GuiUtil.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 13b72c9cbc7f645f0947469183189d7e 3 | timeCreated: 1503482758 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/CustomDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d1ee88b303e24ffb816f96790be4236 3 | timeCreated: 1519366925 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/OneLinePropertyDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6a4bba06e2df940c5a7c4d380fb8ae13 3 | timeCreated: 1501755719 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Settings/ISettings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec5df8116aa3b4ccfadc7d139b094cf8 3 | timeCreated: 1537433109 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Slices/SlicesCache.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce05210143cb64566a1af1272774d202 3 | timeCreated: 1506407594 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Scripts/Overview/Overview.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f743bd85725f81045b030d3601214577 3 | timeCreated: 1488715612 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/ComplexFieldDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2dbdcdbc9de324e49acca2198b29fe14 3 | timeCreated: 1504833676 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/SimpleFieldDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f976d845cd5ad4717b0e5c60d8c8fc59 3 | timeCreated: 1501755719 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/SeparatorAttributeDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df79ac961551a7c41a5fc06fc3d95654 3 | timeCreated: 1502601365 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Utils/ArraysSizeObserver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a87f1443eea30444db8dbab0326668eb 3 | timeCreated: 1508235401 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Utils/IEnumerableExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 09265367c8e964c39aab80c8a626488c 3 | timeCreated: 1506319981 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Runtime/Scripts/Attributes/WidthAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abe9b91c6dba749e1975a73703dcbb8f 3 | timeCreated: 1501755719 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/HideLabelExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 802479876e01a794a852d79e6de1e279 3 | timeCreated: 1504284275 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/HighlightExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e774d9b45b94902418f10969eda29a4f 3 | timeCreated: 1504284275 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/OneLineExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 20b1af4fb3548584f991e7399c18934c 3 | timeCreated: 1504284275 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/RootArrayExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 264b97e1d7c8e054b9ad88f6545fd705 3 | timeCreated: 1504284275 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/SeparatorExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89ced065fe5817a4d8f465bdb77a4a9f 3 | timeCreated: 1504284275 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/WeightExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a2c9e2fe1d546114781a6a8a361b52d8 3 | timeCreated: 1504284275 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/WidthExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31857a9f7779c6647b8c9fe564a1ecd6 3 | timeCreated: 1504284275 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Scripts/Overview/ComplexExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e94d73f5f4a1f45a78ab8735d6640480 3 | timeCreated: 1517654092 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Array/FixedArrayDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f39d384eb239c4e98a272856e428069e 3 | timeCreated: 1501755719 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Decorators/HeaderDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 987bb2bfe949b4d8e94798045bd532aa 3 | timeCreated: 1506425888 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Decorators/SpaceDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02e03cae7536646f9b9b97d3fafdaafe 3 | timeCreated: 1506412202 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Settings/GlobalSettingsLayer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 09e5c6340e65041cb9d3784ec1cfc812 3 | timeCreated: 1537446709 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Settings/LocalSettingsLayer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d04ec000596c416ea87b4ba9e43c93d 3 | timeCreated: 1537433168 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Settings/Tools/SettingsMenu.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb478dd5cabac4c5c935691ff8cbfe07 3 | timeCreated: 1537432939 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Utils/NullableObjectExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 047d683f40dc64380bb19831fced7e75 3 | timeCreated: 1505297665 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Runtime/Scripts/Attributes/HideLabelAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7cea7020a302c4c13a1a9e5e3ac063e1 3 | timeCreated: 1501755719 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Runtime/Scripts/Attributes/HighlightAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 79863a5ba064b43668607fee1d47ed7e 3 | timeCreated: 1501755719 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Runtime/Scripts/Attributes/OneLineAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5140d9cf88dc4466a50efd8609f3555 3 | timeCreated: 1501755719 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Runtime/Scripts/Attributes/SeparatorAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a57533f03ab9f342a88b66401266618 3 | timeCreated: 1502599272 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Runtime/Scripts/Attributes/WeightAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e3a494d882a4344088999cf2445ff541 3 | timeCreated: 1501755719 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/ArrayOfArraysExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 313cacd4753f94e15a9ed93fdef1b7e8 3 | timeCreated: 1516609107 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/FixedLengthExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 67c875bd69248af4aa52f69249dd6cdd 3 | timeCreated: 1504284275 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/HideButtonsExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e8a62bb7c14df124da6abafb39d9d360 3 | timeCreated: 1504284275 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/NestedArrayExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 736697a28f2a94131a06105a2a0967a4 3 | timeCreated: 1516609107 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/OneLineDrawerExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d587304b6c4ecaa47877eb62e0b4540b 3 | timeCreated: 1504284275 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Array/ArrayButtonsDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 280875bd039f84796a21a1af56d9bcfa 3 | timeCreated: 1501755719 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Array/DynamicArrayDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbb9f45900db4463eb463d48be56b3d8 3 | timeCreated: 1501755719 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/CustomDrawer/TypeForDrawing.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c9196356e41a84398866f3eedbd5939c 3 | timeCreated: 1519643676 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Decorators/HighlightDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1cc6f4487c8604e31b01262d17cb10da 3 | timeCreated: 1536065382 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Decorators/SeparatorDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 21f836c3ddcb44de9be0b16dd94e9f1d 3 | timeCreated: 1506087180 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Decorators/TooltipDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 180465c44793e417da2f84d8e8ea9f1c 3 | timeCreated: 1536065382 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Directory/DirectoryDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 94d136e4be4cb437592ad9c6649d3745 3 | timeCreated: 1501755719 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Settings/Primitives/TernaryBoolean.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6e630cbbc0a834c9bb7fffd6c5ea8ad7 3 | timeCreated: 1537434959 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Utils/CustomPropertyDrawerExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4239879189a0f45f3976bb7af8ff8517 3 | timeCreated: 1519376740 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Utils/SerializedPropertyExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dcc7cb0b565564cedbd338eb658ded47 3 | timeCreated: 1501755719 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Runtime/Scripts/Attributes/ArrayLengthAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c307cdad3bd14892a3731bc547018d0 3 | timeCreated: 1501755719 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Runtime/Scripts/Attributes/HideButtonsAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ffb0a301056148c19668720a9b50c00 3 | timeCreated: 1501755719 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/Nested/NestedArrayExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f67f5f416841e4f3c8c47c2a625f93ab 3 | timeCreated: 1516610313 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/Nested/NestedSimpleExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a3f622692a5b4a2591f53e468b12ec2 3 | timeCreated: 1516610313 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/onelinedrawerexampleeditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 300175e3aea9018419661831c2b7555f 3 | timeCreated: 1504284275 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Scripts/Overview/StandartTypesOverview.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cf8e04f773e79294a8deb45b168dd913 3 | timeCreated: 1504800731 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Directory/RootDirectoryDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8301ba59853c841eaabd30498b0a52e0 3 | timeCreated: 1501755719 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/CustomPropertyDrawerExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df9cda7dbd5e943a38c44d0a82e6cd6e 3 | timeCreated: 1519373913 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/CustomDrawer/CustomPropertyDrawers.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7cd5dde33b637412d8ff201b64170bc3 3 | timeCreated: 1519642615 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/CustomDrawer/CustomPropertyTypesCache.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 66622806d64cd4dc3bd6e529b5e316d4 3 | timeCreated: 1519643676 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Settings/Settings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc7365797ec216e488c1c630d3d218b4 3 | timeCreated: 1536834830 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Editor/Scripts/Utils/SerializedPropertyReflectionExtension.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb69d6a04ccb943acb4e475cad22e13d 3 | timeCreated: 1519366691 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Editor/Scripts/Settings/SettingsEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f17eb00e3f34a0546b67d9471304c68a 3 | timeCreated: 1536834811 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Editor/Scripts/ExpandableAttributeDrawer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4728b810ff5bf6a408a75de124bebce7 3 | timeCreated: 1519700791 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Editor/Scripts/Settings/DefaultSettingsLayer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68461cdbd774127409669cadcdd868a6 3 | timeCreated: 1537409480 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/ExpandableExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed76c6a36e72f9645a906dcae6446ceb 3 | timeCreated: 1519701058 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Editor/Scripts/Settings/Tools/PreprocessorDirectives/PreprocessorDirectives.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4feb7e67fd5ce4ea381b7d73e88acc39 3 | timeCreated: 1537512847 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Runtime/Scripts/Attributes/ExpandableAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 14332b58dbcbf6a408ac7dce06dd9bba 3 | timeCreated: 1519700791 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Runtime/OneLine.Runtime.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "st.one-line.Runtime", 3 | "references": [ 4 | "st.rect-ex.Runtime" 5 | ], 6 | "optionalUnityReferences": [], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [] 14 | } -------------------------------------------------------------------------------- /Editor/Scripts/Settings/ISettings.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace OneLine.Settings { 3 | public interface ISettings { 4 | TernaryBoolean Enabled { get; } 5 | TernaryBoolean DrawVerticalSeparator { get; } 6 | TernaryBoolean DrawHorizontalSeparator { get; } 7 | TernaryBoolean Expandable { get; } 8 | TernaryBoolean CustomDrawer { get; } 9 | 10 | TernaryBoolean CacheOptimization { get; } 11 | } 12 | } -------------------------------------------------------------------------------- /Samples~/OneLine.Examples.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "OneLine.Examples", 3 | "references": [ 4 | "st.one-line.Editor", 5 | "st.one-line.Runtime" 6 | ], 7 | "includePlatforms": [ 8 | "Editor" 9 | ], 10 | "excludePlatforms": [], 11 | "allowUnsafeCode": false, 12 | "overrideReferences": false, 13 | "precompiledReferences": [], 14 | "autoReferenced": false, 15 | "defineConstraints": [], 16 | "versionDefines": [] 17 | } -------------------------------------------------------------------------------- /Editor/OneLine.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "st.one-line.Editor", 3 | "references": [ 4 | "st.rect-ex.Runtime", 5 | "st.one-line.Runtime" 6 | ], 7 | "optionalUnityReferences": [], 8 | "includePlatforms": [ 9 | "Editor" 10 | ], 11 | "excludePlatforms": [], 12 | "allowUnsafeCode": false, 13 | "overrideReferences": false, 14 | "precompiledReferences": [], 15 | "autoReferenced": true, 16 | "defineConstraints": [] 17 | } -------------------------------------------------------------------------------- /Samples~/Scripts/Details/NestedArrayExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using OneLine; 4 | 5 | namespace OneLine.Examples { 6 | [CreateAssetMenu(menuName = "OneLine/NestedArrayExample")] 7 | public class NestedArrayExample : ScriptableObject { 8 | [SerializeField, OneLine] 9 | private NestedArray nestedArray; 10 | 11 | [Serializable] 12 | public class NestedArray { 13 | [SerializeField] 14 | private string[] array; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Samples~/Scripts/Details/ArrayOfArraysExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using OneLine; 4 | 5 | namespace OneLine.Examples { 6 | [CreateAssetMenu(menuName = "OneLine/ArrayOfArraysExample")] 7 | public class ArrayOfArraysExample : ScriptableObject { 8 | [SerializeField, OneLine] 9 | private NestedArray[] nestedArray; 10 | 11 | [Serializable] 12 | public class NestedArray { 13 | [SerializeField, Width(50)] 14 | private string[] array; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /Temp 2 | /Library 3 | /*.csproj 4 | /*.sln 5 | /.vscode/settings.json 6 | /ProjectSettings/ProjectVersion.txt 7 | /obj/ 8 | /out/ 9 | /Assets/scene.unity* 10 | /Assets/VSCode* 11 | /.vscode/ 12 | 13 | /.idea/ 14 | /Assets/Plugins.meta 15 | /Assets/Plugins/Editor.meta 16 | /Assets/Plugins/Editor/JetBrains.meta 17 | /Assets/Plugins/Editor/JetBrains/ 18 | 19 | /Assets/Editor.meta 20 | /Assets/Editor/Resources.meta 21 | /Assets/Editor/Resources/OneLine.meta 22 | /Assets/Editor/Resources/OneLine/ 23 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Decorators/SpaceDrawer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | using UnityEditor; 5 | using UnityEngine; 6 | 7 | namespace OneLine { 8 | internal class SpaceDrawer { 9 | 10 | public void Draw(SerializedProperty property, Slices slices){ 11 | property.GetCustomAttribute() 12 | .IfPresent(x => slices.Add(new SliceImpl(0, x.height, rect => {}))); 13 | } 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Runtime/Scripts/Attributes/HideButtonsAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OneLine { 4 | 5 | /// 6 | ///Hides buttons "+" and "-" of array. 7 | ///Available only on NESTED FIELDS. Has no effect on ROOT FIELD. 8 | ///You can change length of this array by context-menu commands. 9 | /// 10 | [AttributeUsage(validOn: AttributeTargets.Field, AllowMultiple = false, Inherited = false)] 11 | public class HideButtonsAttribute : Attribute { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Tests/Editor/OneLine.Tests.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "OneLine.Tests.Editor", 3 | "references": [ 4 | "st.one-line.Runtime", 5 | "st.one-line.Editor", 6 | "st.rect-ex.Runtime" 7 | ], 8 | "includePlatforms": [ 9 | "Editor" 10 | ], 11 | "excludePlatforms": [], 12 | "allowUnsafeCode": false, 13 | "overrideReferences": false, 14 | "precompiledReferences": [], 15 | "autoReferenced": false, 16 | "defineConstraints": [], 17 | "versionDefines": [] 18 | } -------------------------------------------------------------------------------- /Samples~/Scripts/Details/FixedLengthExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using OneLine; 4 | 5 | namespace OneLine.Examples { 6 | [CreateAssetMenu(menuName = "OneLine/FixedLengthExample")] 7 | public class FixedLengthExample : ScriptableObject { 8 | [SerializeField, OneLine] 9 | private ImmutableLengthArray arrayWithImmutableLength; 10 | 11 | [Serializable] 12 | public class ImmutableLengthArray { 13 | [SerializeField, ArrayLength(7)] 14 | private string[] array; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Runtime/Scripts/Attributes/HideLabelAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OneLine { 4 | /// 5 | ///Hides prefix label of ROOT FIELD. Has no effect on NESTED FIELDS. 6 | ///Useful for expanding available space in line. 7 | ///Applied to root array hides label of elements ("Element 1", "Element 2" etc) 8 | /// 9 | [AttributeUsageAttribute(validOn: AttributeTargets.Field, AllowMultiple = false, Inherited = false)] 10 | public class HideLabelAttribute : Attribute { 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Samples~/Details/Weight Example.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: a2c9e2fe1d546114781a6a8a361b52d8, type: 3} 12 | m_Name: Weight Example 13 | m_EditorClassIdentifier: 14 | root: 15 | first: 3 16 | second: 2 17 | third: 1 18 | forth: 19 | first: 100 20 | -------------------------------------------------------------------------------- /Tests/Editor/Scripts/ExtendedClassTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using OneLine; 4 | using System.Collections.Generic; 5 | 6 | [CreateAssetMenu(menuName = "OneLine/ExtendedClassTest")] 7 | public class ExtendedClassTest : ScriptableObject { 8 | 9 | [SerializeField] 10 | private NestedClass root; 11 | 12 | [Serializable] 13 | public abstract class BaseClass { 14 | [OneLine] 15 | public List list; 16 | } 17 | 18 | [Serializable] 19 | public class NestedClass : BaseClass { 20 | } 21 | } -------------------------------------------------------------------------------- /Samples~/Details/Nested Array Example.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 736697a28f2a94131a06105a2a0967a4, type: 3} 12 | m_Name: Nested Array Example 13 | m_EditorClassIdentifier: 14 | nestedArray: 15 | array: 16 | - 1 17 | - 2 18 | - 3 19 | - 4 20 | - 5 21 | -------------------------------------------------------------------------------- /Tests/Editor/Scripts/ExtendedGenericTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using OneLine; 4 | using System.Collections.Generic; 5 | 6 | [CreateAssetMenu(menuName = "OneLine/ExtendedGenericTest")] 7 | public class ExtendedGenericTest : ScriptableObject { 8 | 9 | [SerializeField] 10 | private ChildClass root; 11 | 12 | [Serializable] 13 | public abstract class BaseClass { 14 | [OneLine] 15 | public List list; 16 | } 17 | 18 | [Serializable] 19 | public class ChildClass : BaseClass { 20 | } 21 | } -------------------------------------------------------------------------------- /Samples~/Details/Width Example.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 31857a9f7779c6647b8c9fe564a1ecd6, type: 3} 12 | m_Name: Width Example 13 | m_EditorClassIdentifier: 14 | root: 15 | first: 75 16 | second: 0 17 | third: width = 2 && weight = 25 18 | forth: 19 | first: 10000000 20 | -------------------------------------------------------------------------------- /Samples~/Details/Highlight Example.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: e774d9b45b94902418f10969eda29a4f, type: 3} 12 | m_Name: Highlight Example 13 | m_EditorClassIdentifier: 14 | rootField: A am red 15 | nestedFields: 16 | first: Green 17 | second: Blue 18 | third: No matter 19 | fourth: Yellow 20 | -------------------------------------------------------------------------------- /Samples~/Details/Fixed Length Example.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 67c875bd69248af4aa52f69249dd6cdd, type: 3} 12 | m_Name: Fixed Length Example 13 | m_EditorClassIdentifier: 14 | arrayWithImmutableLength: 15 | array: 16 | - 1 17 | - 2 18 | - 3 19 | - 4 20 | - 5 21 | - 6 22 | - 7 23 | -------------------------------------------------------------------------------- /Samples~/Details/Separator Example.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 89ced065fe5817a4d8f465bdb77a4a9f, type: 3} 12 | m_Name: Separator Example 13 | m_EditorClassIdentifier: 14 | first: 15 | first: First field 16 | second: Second field 17 | second: 18 | first: First field 19 | second: Second field 20 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/HideButtonsExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using OneLine; 4 | 5 | namespace OneLine.Examples { 6 | [CreateAssetMenu(menuName = "OneLine/HideButtonsExample")] 7 | public class HideButtonsExample : ScriptableObject { 8 | [SerializeField, OneLine] 9 | private ArrayHidesButtons arrayWithElements; 10 | [SerializeField, OneLine] 11 | private ArrayHidesButtons zeroLengthArray; 12 | 13 | [Serializable] 14 | public class ArrayHidesButtons { 15 | [SerializeField, HideButtons] 16 | private string[] array; 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Samples~/Details/Hide Label Example.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 802479876e01a794a852d79e6de1e279, type: 3} 12 | m_Name: Hide Label Example 13 | m_EditorClassIdentifier: 14 | thisSelfDocumentedFieldNameWillNotBeShownInTheInspector: 15 | first: Wow! So many space here! 16 | second: And here! 17 | third: And here! 18 | -------------------------------------------------------------------------------- /Runtime/Scripts/Attributes/ArrayLengthAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OneLine { 4 | /// 5 | ///Sets array size to fixed value length. 6 | ///Marked array misses buttons "+" and "-" and context menu. 7 | /// 8 | [AttributeUsage(validOn: AttributeTargets.Field, AllowMultiple = false, Inherited = false)] 9 | public class ArrayLengthAttribute : Attribute { 10 | private int length; 11 | 12 | public ArrayLengthAttribute(int lenth) { 13 | this.length = lenth; 14 | } 15 | 16 | public int Length { get { return length; } } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Samples~/Details/Hide Buttons Example.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: e8a62bb7c14df124da6abafb39d9d360, type: 3} 13 | m_Name: Hide Buttons Example 14 | m_EditorClassIdentifier: 15 | arrayWithElements: 16 | array: 17 | - First 18 | - Second 19 | - Third 20 | zeroLengthArray: 21 | array: [] 22 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Decorators/TooltipDrawer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | using UnityEditor; 5 | using UnityEngine; 6 | 7 | namespace OneLine { 8 | internal class TooltipDrawer { 9 | 10 | public void Draw(SerializedProperty property, Slices slices){ 11 | var attribute = property.GetCustomAttribute(); 12 | if (attribute == null) return; 13 | 14 | var slice = new DrawableImpl(rect => EditorGUI.LabelField(rect, new GUIContent("", attribute.tooltip))); 15 | slices.AddAfter(slice); 16 | } 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Decorators/HighlightDrawer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | using UnityEditor; 5 | using UnityEngine; 6 | using RectEx; 7 | 8 | namespace OneLine { 9 | internal class HighlightDrawer { 10 | 11 | public void Draw(SerializedProperty property, Slices slices){ 12 | var attribute = property.GetCustomAttribute(); 13 | if (attribute == null) return; 14 | 15 | var slice = new DrawableImpl(rect => GuiUtil.DrawRect(rect.Extend(1), attribute.Color)); 16 | slices.AddBefore(slice); 17 | } 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/HideLabelExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using OneLine; 4 | 5 | namespace OneLine.Examples { 6 | [CreateAssetMenu(menuName = "OneLine/HideLabelExample")] 7 | public class HideLabelExample : ScriptableObject { 8 | [SerializeField, OneLine, HideLabel] 9 | private ThreeFields thisSelfDocumentedFieldNameWillNotBeShownInTheInspector; 10 | 11 | [Serializable] 12 | public class ThreeFields { 13 | [SerializeField] 14 | private string first; 15 | [SerializeField] 16 | private string second; 17 | [SerializeField] 18 | private string third; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Samples~/Scripts/Details/SeparatorExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using OneLine; 4 | 5 | namespace OneLine.Examples { 6 | [CreateAssetMenu(menuName = "OneLine/SeparatorExample")] 7 | public class SeparatorExample : ScriptableObject { 8 | [SerializeField, OneLine] 9 | private TwoFields first; 10 | 11 | [Space] 12 | [SerializeField, Separator("[ Separator separates ]"), OneLine] 13 | private TwoFields second; 14 | 15 | [Serializable] 16 | public class TwoFields { 17 | [SerializeField] 18 | private string first; 19 | [SerializeField] 20 | private string second; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Tests/Editor/ScriptableObjects/Tests/Extended Class Test.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: e196a61c3e5034c94921d1b26869e3dd, type: 3} 13 | m_Name: Extended Class Test 14 | m_EditorClassIdentifier: 15 | root: 16 | list: 17 | - {x: 0, y: 0} 18 | - {x: 0, y: 0} 19 | - {x: 0, y: 0} 20 | - {x: 0, y: 0} 21 | - {x: 0, y: 0} 22 | -------------------------------------------------------------------------------- /Tests/Editor/ScriptableObjects/Tests/Extended Generic Test.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 2d65983c199b645638dd9c65586c26aa, type: 3} 13 | m_Name: Extended Generic Test 14 | m_EditorClassIdentifier: 15 | root: 16 | list: 17 | - {x: 0, y: 0} 18 | - {x: 0, y: 0} 19 | - {x: 0, y: 0} 20 | - {x: 0, y: 0} 21 | - {x: 0, y: 0} 22 | -------------------------------------------------------------------------------- /Tests/Editor/Scripts/ArrayBenchmark.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace OneLine.Examples { 6 | [CreateAssetMenu(menuName = "OneLine/Benchmarks/Array")] 7 | public class ArrayBenchmark : ScriptableObject { 8 | 9 | [OneLine, HideLabel] 10 | public PureClasses[] pure; 11 | 12 | [Serializable] 13 | public class PureClasses { 14 | public int integerField; 15 | public long longField; 16 | public float floatField; 17 | [Range(0,1)] 18 | public double doubleField; 19 | public bool booleanField; 20 | public string stringField; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Samples~/Details/Array Of Arrays Example.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 313cacd4753f94e15a9ed93fdef1b7e8, type: 3} 12 | m_Name: Array Of Arrays Example 13 | m_EditorClassIdentifier: 14 | nestedArray: 15 | - array: 16 | - 1 17 | - 2 18 | - 3 19 | - 4 20 | - array: 21 | - 1 22 | - 2 23 | - 3 24 | - array: 25 | - 1 26 | - 2 27 | - 3 28 | - 4 29 | - 5 30 | -------------------------------------------------------------------------------- /Samples~/Details/Nested/Nested Example.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 2a3f622692a5b4a2591f53e468b12ec2, type: 3} 13 | m_Name: Nested Example 14 | m_EditorClassIdentifier: 15 | root: 16 | first: 17 | parent: 18 | nested: 19 | first: 20 | second: 21 | third: 0 22 | forth: 0 23 | second: 0 24 | third: 0 25 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/ExpandableExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using OneLine; 4 | 5 | namespace OneLine.Examples { 6 | [CreateAssetMenu(menuName = "OneLine/ExpandableExample")] 7 | public class ExpandableExample : ScriptableObject { 8 | 9 | [SerializeField, Expandable] 10 | private UnityEngine.Object withoutOneLine; 11 | 12 | [SerializeField, OneLine] 13 | private TwoFields withOneLine; 14 | 15 | [Serializable] 16 | public class TwoFields { 17 | [SerializeField, ReadOnlyExpandable] 18 | private ScriptableObject first; 19 | [SerializeField, Expandable] 20 | private UnityEngine.Object second; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Samples~/Details/Nested/Nested Array Example.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: f67f5f416841e4f3c8c47c2a625f93ab, type: 3} 12 | m_Name: Nested Array Example 13 | m_EditorClassIdentifier: 14 | root: 15 | first: 16 | parent: 17 | nested: 18 | first: first 19 | second: 20 | - arr 1 21 | - arr 2 22 | third: 1 23 | forth: 1 24 | second: 0 25 | third: 0 26 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "st.one-line", 3 | "displayName": "OneLine", 4 | "version": "0.5.1", 5 | "unity": "2017.1", 6 | "description": "Draw any object in the inspector into a single line.", 7 | "keywords": [ 8 | "editor", 9 | "unity", 10 | "inspector" 11 | ], 12 | "author": { 13 | "name": "Slavniyteo" 14 | }, 15 | "dependencies": { 16 | "st.rect-ex": "0.2.1" 17 | }, 18 | "samples": [ 19 | { 20 | "displayName": "OneLine Examples", 21 | "description": "Overview and details examples.", 22 | "path": "Samples~" 23 | } 24 | ], 25 | "repository": { 26 | "type": "git", 27 | "url": "https://github.com/d4160/one-line.git" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Samples~/Details/Expandable Example.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: ed76c6a36e72f9645a906dcae6446ceb, type: 3} 13 | m_Name: Expandable Example 14 | m_EditorClassIdentifier: 15 | withoutOneLine: {fileID: 0} 16 | withOneLine: 17 | first: {fileID: 11400000, guid: 61dfc0e0dba647c4bb9e2bc67fce3027, type: 2} 18 | second: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} 19 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Drawer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using UnityEditor; 6 | using UnityEngine; 7 | using RectEx; 8 | 9 | namespace OneLine { 10 | internal abstract class Drawer { 11 | 12 | protected SpaceDrawer space = new SpaceDrawer(); 13 | protected SeparatorDrawer separator = new SeparatorDrawer(); 14 | protected HeaderDrawer header = new HeaderDrawer(); 15 | protected HighlightDrawer highlight = new HighlightDrawer(); 16 | protected TooltipDrawer tooltip = new TooltipDrawer(); 17 | 18 | public abstract void AddSlices(SerializedProperty property, Slices slices); 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /.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: slavniyteo 7 | 8 | --- 9 | 10 | **General Info** 11 | OS: 12 | Unity Version: 13 | OneLine Version: 14 | OneLine Installation: Assert Store / Unity Package Manager / Manual Copy 15 | RectEx Version: # only if changed manually 16 | 17 | --- 18 | 19 | **Describe the bug** 20 | A clear and concise description of what the bug is. 21 | 22 | **Code Example** 23 | If applicable, add code example to help explain your problem. 24 | 25 | **Screenshots** 26 | If applicable, add screenshots to help explain your problem. 27 | 28 | **Additional context** 29 | Add any other context about the problem here. 30 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Directory/DirectoryDrawer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | using UnityEditor; 5 | using UnityEngine; 6 | 7 | namespace OneLine { 8 | internal class DirectoryDrawer : ComplexFieldDrawer { 9 | 10 | public DirectoryDrawer(DrawerProvider getDrawer) : base(getDrawer) { 11 | } 12 | 13 | protected override IEnumerable GetChildren(SerializedProperty property){ 14 | return property.GetChildren(); 15 | } 16 | 17 | public override void AddSlices(SerializedProperty property, Slices slices){ 18 | highlight.Draw(property, slices); 19 | base.AddSlices(property, slices); 20 | } 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Tests/Editor/ScriptableObjects/Tests/Slices Test.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 9efc419f62b6a4a439b260bf0eb0a0e5, type: 3} 13 | m_Name: Slices Test 14 | m_EditorClassIdentifier: 15 | root: 16 | first: 17 | first: 18 | second: 19 | second: 20 | array: 21 | - 22 | - 23 | third: 24 | root2: 25 | first: 26 | first: 27 | second: 28 | second: 29 | array: [] 30 | third: 31 | -------------------------------------------------------------------------------- /Runtime/Scripts/Attributes/WeightAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OneLine { 4 | /// 5 | ///Defines weight of marked field in the line. 6 | ///Available only on SIMPLE NESTED FIELDS. Has no effect on ROOT FIELD. 7 | ///Fields without [WeightAttribute] has default weight = 1. 8 | ///Applied to nested arrays defines weight of each element. 9 | /// 10 | [AttributeUsageAttribute(validOn: AttributeTargets.Field, AllowMultiple = true, Inherited = false)] 11 | public class WeightAttribute : Attribute { 12 | private float weight; 13 | 14 | public WeightAttribute(float weight) { 15 | this.weight = weight; 16 | } 17 | 18 | public float Weight { get { return weight; } } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/HighlightExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using OneLine; 4 | 5 | namespace OneLine.Examples { 6 | [CreateAssetMenu(menuName = "OneLine/HighlightExample")] 7 | public class HighlightExample : ScriptableObject { 8 | [SerializeField, OneLine, Highlight] 9 | private string rootField; 10 | [SerializeField, OneLine] 11 | private HighlightedFields nestedFields; 12 | 13 | [Serializable] 14 | public class HighlightedFields { 15 | [SerializeField, Highlight(0, 1, 0)] 16 | private string first; 17 | [SerializeField, Highlight(0, 0, 1)] 18 | private string second; 19 | [SerializeField] 20 | private string third; 21 | [SerializeField, Highlight(1, 1, 0)] 22 | private string fourth; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Samples~/Details/Root Array Example.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 264b97e1d7c8e054b9ad88f6545fd705, type: 3} 12 | m_Name: Root Array Example 13 | m_EditorClassIdentifier: 14 | rootArray: 15 | - first: (1,1) 16 | second: (1,2) 17 | third: (1,3) 18 | - first: (2,1) 19 | second: (2,2) 20 | third: (2,3) 21 | singleNestedArray: 22 | array: 23 | - First 24 | - Second 25 | - Third 26 | - Forth 27 | twoNestedArrays: 28 | first: 01000000020000000300000004000000 29 | second: 30 | - First 31 | - Second 32 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/WeightExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using OneLine; 4 | 5 | namespace OneLine.Examples { 6 | [CreateAssetMenu(menuName = "OneLine/WeightExample")] 7 | public class WeightExample : ScriptableObject { 8 | [SerializeField, OneLine] 9 | private RootField root; 10 | 11 | [Serializable] 12 | public class RootField { 13 | [SerializeField, Weight(3)] 14 | private int first; 15 | [SerializeField, Weight(2)] 16 | private int second; 17 | [SerializeField] // by default weight == 1 18 | private int third; 19 | [SerializeField, Weight(10)] 20 | private NestedField forth; 21 | } 22 | 23 | [Serializable] 24 | public class NestedField { 25 | [SerializeField] 26 | private int first; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /Editor/Scripts/Slices/Slice.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEditor; 5 | 6 | namespace OneLine { 7 | internal interface Slice : Drawable { 8 | float Weight {get;} 9 | float Width {get;} 10 | } 11 | internal class SliceImpl : DrawableImpl, Slice { 12 | 13 | public virtual float Weight { get; private set; } 14 | public virtual float Width { get; private set; } 15 | 16 | private string header; 17 | 18 | protected SliceImpl() : base() { 19 | 20 | } 21 | 22 | public SliceImpl(float weight, float width, Action draw) 23 | : this(weight, width, draw, null){ 24 | } 25 | 26 | public SliceImpl(float weight, float width, Action draw, Action drawHeader) 27 | : base(draw, drawHeader) { 28 | Weight = weight; 29 | Width = width; 30 | } 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /Runtime/Scripts/Attributes/SeparatorAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace OneLine { 5 | /// 6 | ///Draws horizontal or vertical separator 7 | /// 8 | [AttributeUsage(validOn: AttributeTargets.Field, AllowMultiple = true, Inherited = false)] 9 | public class SeparatorAttribute : PropertyAttribute { 10 | 11 | public SeparatorAttribute() { 12 | Text = ""; 13 | Thickness = 2; 14 | } 15 | 16 | public SeparatorAttribute(string text) : this() { 17 | Text = text; 18 | } 19 | 20 | public SeparatorAttribute(string text, int thickness) : this(text){ 21 | Thickness = thickness; 22 | } 23 | 24 | public string Text { get; set; } 25 | public int Thickness { get; set; } 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/WidthExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using OneLine; 4 | 5 | namespace OneLine.Examples { 6 | [CreateAssetMenu(menuName = "OneLine/WidthExample")] 7 | public class WidthExample : ScriptableObject { 8 | [SerializeField, OneLine] 9 | private RootField root; 10 | 11 | [Serializable] 12 | public class RootField { 13 | [SerializeField, Width(70)] 14 | private string first; 15 | [SerializeField] // by default width = 0 16 | private string second; 17 | [SerializeField, Weight(2), Width(25)] 18 | private string third; 19 | [SerializeField, Width(10000000)] 20 | private NestedField forth; 21 | } 22 | 23 | [Serializable] 24 | public class NestedField { 25 | [SerializeField] 26 | private string first; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /Runtime/Scripts/Attributes/ExpandableAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace OneLine { 5 | /// 6 | /// Foolows object reference and draw it in the popup 7 | /// 8 | [AttributeUsage(validOn: AttributeTargets.Field, AllowMultiple = true, Inherited = false)] 9 | public class ExpandableAttribute : PropertyAttribute { 10 | 11 | public bool ReadOnly { get; private set; } 12 | 13 | public ExpandableAttribute(bool readOnly = false) { 14 | ReadOnly = readOnly; 15 | } 16 | 17 | } 18 | 19 | [AttributeUsage(validOn: AttributeTargets.Field, AllowMultiple = true, Inherited = false)] 20 | public class ReadOnlyExpandableAttribute : ExpandableAttribute { 21 | 22 | public ReadOnlyExpandableAttribute() :base(true) { 23 | } 24 | 25 | } 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Editor/Scripts/Utils/NullableObjectExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using UnityEditor; 6 | using UnityEngine; 7 | 8 | namespace OneLine { 9 | public static class NullableObjectExtension { 10 | public static R IfPresent (this T obj, Func a) where T:class { 11 | if (obj != null){ 12 | return a(obj); 13 | } 14 | else { 15 | return default(R); 16 | } 17 | } 18 | 19 | public static void IfPresent (this T obj, Action a) where T:class { 20 | if (obj != null){ 21 | a(obj); 22 | } 23 | } 24 | 25 | public static T OrElse (this T obj, T defaultValue) where T:class { 26 | return obj != null ? obj : defaultValue; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Runtime/Scripts/Attributes/WidthAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OneLine { 4 | /// 5 | ///Defines additive fixed width (in GUI units) on marked field in the line. 6 | ///By default sets weight of field to 0. 7 | ///Available only on SIMPLE NESTED FIELDS. Has no effect on ROOT FIELD. 8 | ///If field is marked by [WidthAttribute] and [WeightAttribute], it will get both effects additively. 9 | ///Applied to nested arrays defines width of each element. 10 | /// 11 | [AttributeUsageAttribute(validOn: AttributeTargets.Field, AllowMultiple = true, Inherited = false)] 12 | public class WidthAttribute : WeightAttribute { 13 | private float width; 14 | 15 | public WidthAttribute(float width) : base(0) { 16 | this.width = width; 17 | } 18 | 19 | public float Width { get { return width; } } 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Editor/Scripts/Slices/Drawable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEditor; 5 | 6 | namespace OneLine { 7 | internal interface Drawable { 8 | void Draw(Rect rect); 9 | void DrawHeader(Rect rect); 10 | } 11 | 12 | internal class DrawableImpl : Drawable { 13 | 14 | private Action draw; 15 | private Action drawHeader; 16 | 17 | protected DrawableImpl() {} 18 | 19 | public DrawableImpl(Action draw) 20 | : this(draw, null) { 21 | 22 | } 23 | 24 | public DrawableImpl(Action draw, Action drawHeader) { 25 | this.draw = draw; 26 | this.drawHeader = drawHeader; 27 | } 28 | 29 | public virtual void Draw(Rect rect){ 30 | if (draw != null){ 31 | draw(rect); 32 | } 33 | } 34 | 35 | public virtual void DrawHeader(Rect rect){ 36 | if (drawHeader != null) { 37 | drawHeader(rect); 38 | } 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /Runtime/Scripts/Attributes/HighlightAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace OneLine { 5 | /// 6 | ///Highlights field by rgb color with values in range[0..1] (red by default) 7 | ///Available anywhere (ROOT or NESTED FIELDS). 8 | ///If ROOT FIELD is highlighted its label prefix is highlighted too. 9 | /// 10 | [AttributeUsageAttribute(validOn: AttributeTargets.Field, AllowMultiple = false, Inherited = false)] 11 | public class HighlightAttribute : Attribute { 12 | public Color color; 13 | 14 | public HighlightAttribute() { 15 | color = new Color(1, 0, 0, 0.6f); 16 | } 17 | 18 | public HighlightAttribute(float red, float green, float blue, float alpha = 0.6f) { 19 | color = new Color(red, green, blue, alpha); 20 | } 21 | 22 | public Color Color { get { return color; } } 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/OneLineDrawerExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using OneLine; 4 | 5 | namespace OneLine.Examples { 6 | [CreateAssetMenu(menuName = "OneLine/OneLineDrawerExample")] 7 | public class OneLineDrawerExample : ScriptableObject { 8 | 9 | [SerializeField] 10 | private RootField root; 11 | [Space] 12 | [SerializeField, HideLabel] 13 | private RootField[] rootArray; 14 | 15 | [Serializable] 16 | public class RootField { 17 | [SerializeField] 18 | private string first; 19 | [SerializeField] 20 | private Color second; 21 | [SerializeField] 22 | private NestedField third; 23 | } 24 | 25 | [Serializable] 26 | public class NestedField { 27 | [SerializeField, Tooltip("This tooltip is very useful")] 28 | private bool first; 29 | [SerializeField] 30 | private Vector2 second; 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Samples~/Scripts/Details/OneLineExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using OneLine; 4 | 5 | namespace OneLine.Examples { 6 | [CreateAssetMenu(menuName = "OneLine/OneLineExample")] 7 | public class OneLineExample : ScriptableObject { 8 | 9 | [SerializeField, OneLine] 10 | private RootField root; 11 | [Space] 12 | [SerializeField, OneLine, HideLabel] 13 | private RootField[] rootArray; 14 | 15 | [Serializable] 16 | public class RootField { 17 | [SerializeField] 18 | private string first; 19 | [SerializeField] 20 | private Color second; 21 | [SerializeField] 22 | private NestedField third; 23 | } 24 | 25 | [Serializable] 26 | public class NestedField { 27 | [SerializeField, Tooltip("This tooltip is very useful")] 28 | private bool first; 29 | [SerializeField] 30 | private Vector2 second; 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Editor/Scripts/Settings/DefaultSettingsLayer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | namespace OneLine.Settings { 7 | public class DefaultSettingsLayer : ISettings { 8 | public TernaryBoolean Enabled { 9 | get { return TernaryBoolean.TRUE; } 10 | } 11 | 12 | public TernaryBoolean DrawVerticalSeparator { 13 | get { return TernaryBoolean.TRUE; } 14 | } 15 | 16 | public TernaryBoolean DrawHorizontalSeparator { 17 | get { return TernaryBoolean.TRUE; } 18 | } 19 | 20 | public TernaryBoolean Expandable { 21 | get { return TernaryBoolean.TRUE; } 22 | } 23 | 24 | public TernaryBoolean CustomDrawer { 25 | get { return TernaryBoolean.TRUE; } 26 | } 27 | 28 | public TernaryBoolean CacheOptimization { 29 | get { return TernaryBoolean.TRUE; } 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Decorators/SeparatorDrawer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | using UnityEditor; 5 | using UnityEngine; 6 | 7 | namespace OneLine { 8 | internal class SeparatorDrawer { 9 | private const float width = 8; 10 | private const float lineWidth = 2; 11 | 12 | public void Draw(SerializedProperty property, Slices slices){ 13 | #if ! ONE_LINE_VERTICAL_SEPARATOR_DISABLE 14 | Slice slice; 15 | if (property.IsArrayElement()){ 16 | slice = new SliceImpl(0, width, DrawInternal); 17 | } 18 | else { 19 | slice = new SliceImpl(0, width, DrawInternal, DrawInternal); 20 | } 21 | slices.Add(slice); 22 | #endif 23 | } 24 | 25 | 26 | public void DrawInternal (Rect rect){ 27 | rect.x += (rect.width - lineWidth) / 2; 28 | rect.width = lineWidth; 29 | GuiUtil.DrawRect(rect, GuiUtil.GrayColor); 30 | } 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/CustomDrawer/TypeForDrawing.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Reflection; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using UnityEditor; 7 | using UnityEngine; 8 | using System.Text.RegularExpressions; 9 | 10 | namespace OneLine { 11 | internal class TypeForDrawing { 12 | private Type Type {get; set;} 13 | private bool UseForChildren {get; set;} 14 | public Type DrawerType {get; private set;} 15 | 16 | public TypeForDrawing(CustomPropertyDrawer attribute, Type drawerType) { 17 | Type = attribute.GetTargetType(); 18 | UseForChildren = attribute.IsForChildren(); 19 | 20 | DrawerType = drawerType; 21 | } 22 | 23 | public bool IsMatch(Type target){ 24 | if (target == null) return false; 25 | 26 | if (UseForChildren){ 27 | return Type == target || target.IsSubclassOf(Type); 28 | } 29 | else { 30 | return Type == target; 31 | } 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 slavniyteo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Decorators/HeaderDrawer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | using UnityEditor; 5 | using UnityEngine; 6 | 7 | namespace OneLine { 8 | internal class HeaderDrawer { 9 | 10 | private GUIStyle tableHeaderStyle; 11 | 12 | public HeaderDrawer() { 13 | tableHeaderStyle = new GUIStyle(EditorStyles.boldLabel); 14 | tableHeaderStyle.alignment = TextAnchor.MiddleCenter; 15 | tableHeaderStyle.normal.textColor = GuiUtil.GrayColor; 16 | } 17 | 18 | public void Draw(SerializedProperty property, Slices slices){ 19 | slices.AddBefore(new DrawableImpl(null, rect => DrawHeaderInternal(rect, property.displayName))); 20 | } 21 | 22 | private void DrawHeaderInternal (Rect rect, string header){ 23 | int fittedWidth = (int) Math.Round(rect.width / 6); //units for one litera 24 | header = header.Substring(0, Math.Min(header.Length, fittedWidth)); 25 | 26 | EditorGUI.LabelField(rect, new GUIContent(header, header), tableHeaderStyle); 27 | } 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Samples~/Details/Custom Property Drawer Example.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: df9cda7dbd5e943a38c44d0a82e6cd6e, type: 3} 13 | m_Name: Custom Property Drawer Example 14 | m_EditorClassIdentifier: 15 | directDrawer: 16 | parent: 17 | first: Default drawer 18 | child: 19 | first: Default drawer 20 | second: Default drawer 21 | attributeDrawer: 22 | parent: 23 | first: Default drawer 24 | child: 25 | first: Default drawer 26 | directWithoutChildren: 27 | parent: 28 | first: Default drawer 29 | child: 30 | first: Default drawer 31 | attributeWithoutChildren: 32 | pureRange: 31 33 | parent: 34 | first: Default drawer 35 | child: 36 | first: Default drawer 37 | builtInAttributes: 38 | first: 25.1 39 | second: 40 | third: 27 41 | -------------------------------------------------------------------------------- /Samples~/Scripts/Details/RootArrayExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using OneLine; 4 | 5 | namespace OneLine.Examples { 6 | [CreateAssetMenu(menuName = "OneLine/RootArrayExample")] 7 | public class RootArrayExample : ScriptableObject { 8 | [SerializeField, OneLine] 9 | private RootField[] rootArray; 10 | [Space] 11 | [SerializeField, OneLine] 12 | private SingleArray singleNestedArray; 13 | [SerializeField, OneLine] 14 | private TwoArrays twoNestedArrays; 15 | 16 | [Serializable] 17 | public class RootField { 18 | [SerializeField] 19 | private string first; 20 | [SerializeField] 21 | private string second; 22 | [SerializeField] 23 | private string third; 24 | } 25 | [Serializable] 26 | public class SingleArray { 27 | [SerializeField] 28 | private string[] array; 29 | } 30 | [Serializable] 31 | public class TwoArrays { 32 | [SerializeField, Highlight(1, 0, 0)] 33 | private int[] first; 34 | [SerializeField, Highlight(0, 1, 0), Width(125)] 35 | private string[] second; 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /Samples~/Scripts/Details/Nested/NestedArrayExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using OneLine; 4 | 5 | namespace OneLine.Examples.Nested { 6 | 7 | [CreateAssetMenu(menuName = "OneLine/Nested/Array")] 8 | public class NestedArrayExample : ScriptableObject { 9 | [SerializeField] 10 | private Root root; 11 | 12 | [Serializable] 13 | public class Root { 14 | [SerializeField] 15 | private string first; 16 | 17 | [SerializeField] 18 | private Parent parent; 19 | 20 | [SerializeField] 21 | private int third; 22 | } 23 | 24 | [Serializable] 25 | public class Parent { 26 | [SerializeField, OneLine] 27 | private Nested nested; 28 | 29 | [SerializeField, Range(0, 100)] 30 | private long second; 31 | } 32 | 33 | [Serializable] 34 | public class Nested { 35 | [SerializeField] 36 | private string first; 37 | 38 | [SerializeField] 39 | private string[] second; 40 | 41 | [SerializeField] 42 | private bool third; 43 | 44 | [SerializeField, Range(0, 100)] 45 | private long forth; 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /Samples~/Scripts/Details/Nested/NestedSimpleExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using OneLine; 4 | 5 | namespace OneLine.Examples.Nested { 6 | [CreateAssetMenu(menuName = "OneLine/Nested/Simple")] 7 | public class NestedSimpleExample : ScriptableObject { 8 | [SerializeField] 9 | private Root root; 10 | 11 | [Serializable] 12 | public class Root { 13 | [SerializeField] 14 | private string first; 15 | 16 | [SerializeField] 17 | private Parent parent; 18 | 19 | [SerializeField] 20 | private int third; 21 | } 22 | 23 | [Serializable] 24 | public class Parent { 25 | [SerializeField, OneLine, Tooltip("A am drawn with OneLine.")] 26 | private Nested nested; 27 | 28 | [SerializeField, Range(0, 100)] 29 | private long second; 30 | } 31 | 32 | [Serializable] 33 | public class Nested { 34 | [SerializeField] 35 | private string first; 36 | 37 | [SerializeField, Tooltip("I am the second element.")] 38 | private string second; 39 | 40 | [SerializeField] 41 | private bool third; 42 | 43 | [SerializeField, Range(0, 100)] 44 | private long forth; 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /Runtime/Scripts/Attributes/OneLineAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace OneLine { 5 | /// 6 | ///Draws field into one line in InspectorWindow with all nested fields (even arrays) 7 | ///which usual is presented in InspectorWindow in bulky weird view. 8 | /// 9 | ///Marked field is called ROOT FIELD. 10 | ///All internal fields in one scope are called NESTED FIELDS. 11 | /// 12 | ///Fields of classes, which have native representation in Inspector are called SIMPLE FIELDS. 13 | ///Fields, contains other fields are called COMPLEX FIELDS. 14 | /// 15 | [AttributeUsage(validOn: AttributeTargets.Field, AllowMultiple = false, Inherited = false)] 16 | public class OneLineAttribute : PropertyAttribute { 17 | public LineHeader Header { get; set; } 18 | } 19 | 20 | [AttributeUsage(validOn: AttributeTargets.Field, AllowMultiple = false, Inherited = false)] 21 | public class OneLineWithHeaderAttribute : OneLineAttribute { 22 | public OneLineWithHeaderAttribute() : base(){ 23 | Header = LineHeader.Short; 24 | } 25 | } 26 | 27 | public enum LineHeader { 28 | None = 0, 29 | Short = 1 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Editor/Scripts/Utils/ArraysSizeObserver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | using UnityEditor; 5 | using UnityEngine; 6 | 7 | namespace OneLine { 8 | // Crutch: see https://github.com/slavniyteo/one-line/issues/9 9 | internal class ArraysSizeObserver { 10 | 11 | private Dictionary arraysSizes = new Dictionary(); 12 | 13 | public bool IsArraySizeChanged(SerializedProperty property){ 14 | var arrayName = property.propertyPath.Split('.')[0]; 15 | property = property.serializedObject.FindProperty(arrayName); 16 | 17 | return property.IsReallyArray() && 18 | IsRealArraySizeChanged(arrayName, property.arraySize); 19 | } 20 | 21 | public bool IsRealArraySizeChanged(string arrayName, int currentArraySize){ 22 | if (! arraysSizes.ContainsKey(arrayName)){ 23 | arraysSizes[arrayName] = currentArraySize; 24 | } 25 | else if (arraysSizes[arrayName] != currentArraySize){ 26 | arraysSizes[arrayName] = currentArraySize; 27 | return true; 28 | } 29 | 30 | return false; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Editor/Scripts/Utils/GuiUtil.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | using UnityEditor; 5 | using UnityEngine; 6 | 7 | namespace OneLine { 8 | // Workaround to draw rects, see http://answers.unity3d.com/questions/377207/drawing-a-texture-in-a-custom-propertydrawer.html 9 | internal static class GuiUtil { 10 | 11 | public static Color GrayColor { get { return new Color (0.3f, 0.3f, 0.3f); } } 12 | 13 | private static Dictionary styles; 14 | 15 | 16 | static GuiUtil(){ 17 | styles = new Dictionary(); 18 | } 19 | 20 | public static void DrawRect(Rect rect, Color color) { 21 | PrepareStyle(color); 22 | EditorGUI.LabelField(rect, GUIContent.none, styles[color]); 23 | } 24 | 25 | private static void PrepareStyle(Color color){ 26 | if (styles.ContainsKey(color)) { return; } 27 | 28 | var texture = new Texture2D(1, 1); 29 | texture.SetPixel(0, 0, color); 30 | texture.Apply(); 31 | 32 | var style = new GUIStyle(); 33 | style.normal.background = texture; 34 | styles[color] = style; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Array/FixedArrayDrawer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using UnityEditor; 6 | using UnityEngine; 7 | 8 | namespace OneLine { 9 | internal class FixedArrayDrawer : ComplexFieldDrawer { 10 | 11 | public FixedArrayDrawer(DrawerProvider getDrawer) : base(getDrawer) { 12 | } 13 | 14 | protected override IEnumerable GetChildren(SerializedProperty property){ 15 | return property.GetArrayElements(); 16 | } 17 | 18 | public override void AddSlices(SerializedProperty property, Slices slices){ 19 | ModifyLength(property); 20 | base.AddSlices(property, slices); 21 | } 22 | 23 | protected virtual int ModifyLength(SerializedProperty property) { 24 | var attribute = property.GetCustomAttribute(); 25 | if (attribute == null) { 26 | var message = string.Format("Can not find ArrayLengthAttribute at property {0)", property.propertyPath); 27 | throw new InvalidOperationException(message); 28 | } 29 | property.arraySize = attribute.Length; 30 | return property.arraySize; 31 | } 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/CustomDrawer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Reflection; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using UnityEditor; 7 | using UnityEngine; 8 | using System.Text.RegularExpressions; 9 | 10 | namespace OneLine { 11 | internal class CustomDrawer : SimpleFieldDrawer { 12 | 13 | private CustomPropertyDrawers drawers = new CustomPropertyDrawers(); 14 | 15 | public bool HasCustomDrawer(SerializedProperty property){ 16 | #if ! ONE_LINE_CUSTOM_DRAWER_DISABLE 17 | var drawer = drawers.GetCustomPropertyDrawerFor(property); 18 | 19 | return drawer != null && drawer.GetPropertyHeight(property, GUIContent.none) < 20; 20 | #else 21 | return false; 22 | #endif 23 | } 24 | 25 | public override void Draw(Rect rect, SerializedProperty property) { 26 | DrawProperty(rect, property); 27 | } 28 | 29 | private void DrawProperty(Rect rect, SerializedProperty property){ 30 | var drawer = drawers.GetCustomPropertyDrawerFor(property); 31 | if (drawer != null) { 32 | drawer.OnGUI(rect, property, GUIContent.none); 33 | } 34 | else { 35 | var message = "[OneLine] Can not draw CustomPropertyDrawer for `{0}` at property path `{1}"; 36 | throw new Exception(string.Format(message, property.type, property.propertyPath)); 37 | } 38 | } 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Editor/Scripts/Utils/CustomPropertyDrawerExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Reflection; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using UnityEditor; 7 | using UnityEngine; 8 | 9 | namespace OneLine { 10 | public static class CustomPropertyDrawerExtension { 11 | public static Type GetTargetType(this CustomPropertyDrawer drawer){ 12 | return typeof(CustomPropertyDrawer) 13 | .GetField("m_Type", BindingFlags.NonPublic | BindingFlags.Instance) 14 | .GetValue(drawer) as Type; 15 | } 16 | 17 | public static bool IsForChildren(this CustomPropertyDrawer drawer){ 18 | return (bool) typeof(CustomPropertyDrawer) 19 | .GetField("m_UseForChildren", BindingFlags.NonPublic | BindingFlags.Instance) 20 | .GetValue(drawer); 21 | } 22 | 23 | public static void SetAttribute(this PropertyDrawer drawer, Attribute attribute){ 24 | typeof(PropertyDrawer) 25 | .GetField("m_Attribute", BindingFlags.NonPublic | BindingFlags.Instance) 26 | .SetValue(drawer, attribute); 27 | } 28 | 29 | public static void SetFieldInfo(this PropertyDrawer drawer, FieldInfo fieldInfo){ 30 | typeof(PropertyDrawer) 31 | .GetField("m_FieldInfo", BindingFlags.NonPublic | BindingFlags.Instance) 32 | .SetValue(drawer, fieldInfo); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/CustomDrawer/CustomPropertyTypesCache.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Reflection; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using UnityEditor; 7 | using UnityEngine; 8 | using System.Text.RegularExpressions; 9 | 10 | namespace OneLine { 11 | internal class CustomDrawerTypesCache : IEnumerable { 12 | private static IEnumerable customDrawers; 13 | 14 | private void Init(){ 15 | if (customDrawers == null) { 16 | customDrawers = findAllCustomDrawers(); 17 | } 18 | } 19 | 20 | private static IEnumerable findAllCustomDrawers(){ 21 | return ( 22 | from assembly in AppDomain.CurrentDomain.GetAssemblies() 23 | from type in assembly.GetTypes() 24 | where type.IsSubclassOf(typeof(PropertyDrawer)) 25 | where type != typeof(OneLinePropertyDrawer) && ! type.IsSubclassOf(typeof(OneLinePropertyDrawer)) 26 | from attribute in type.GetCustomAttributes(typeof(CustomPropertyDrawer), true) 27 | select new TypeForDrawing(attribute as CustomPropertyDrawer, type) 28 | ).ToArray(); 29 | } 30 | 31 | public IEnumerator GetEnumerator() { 32 | Init(); 33 | return customDrawers.GetEnumerator(); 34 | } 35 | 36 | IEnumerator IEnumerable.GetEnumerator() { 37 | return GetEnumerator(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Samples~/Details/One Line Example.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 20b1af4fb3548584f991e7399c18934c, type: 3} 12 | m_Name: One Line Example 13 | m_EditorClassIdentifier: 14 | root: 15 | first: Single field 16 | second: {r: 0.36838233, g: 0.6397059, b: 0.061148338, a: 0} 17 | third: 18 | first: 1 19 | second: {x: 1, y: 2} 20 | rootArray: 21 | - first: First 22 | second: {r: 1, g: 0, b: 0, a: 0} 23 | third: 24 | first: 0 25 | second: {x: 1, y: 2} 26 | - first: Second 27 | second: {r: 1, g: 0.26896554, b: 0, a: 0} 28 | third: 29 | first: 1 30 | second: {x: 3, y: 4} 31 | - first: Third 32 | second: {r: 1, g: 0.9724138, b: 0, a: 0} 33 | third: 34 | first: 0 35 | second: {x: 5, y: 6} 36 | - first: Forth 37 | second: {r: 0, g: 1, b: 0.048275948, a: 0} 38 | third: 39 | first: 1 40 | second: {x: 7, y: 8} 41 | - first: Fifth 42 | second: {r: 0, g: 0.8758622, b: 1, a: 0} 43 | third: 44 | first: 0 45 | second: {x: 9, y: 10} 46 | - first: Sixth 47 | second: {r: 0, g: 0.21379304, b: 1, a: 0} 48 | third: 49 | first: 1 50 | second: {x: 12, y: 11} 51 | - first: Seventh 52 | second: {r: 0.2827587, g: 0, b: 1, a: 0} 53 | third: 54 | first: 0 55 | second: {x: 13, y: 14} -------------------------------------------------------------------------------- /Editor/Scripts/Settings/GlobalSettingsLayer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | namespace OneLine.Settings { 7 | [Serializable] 8 | public class GlobalSettingsLayer : ISettings { 9 | [SerializeField] 10 | private TernaryBoolean enabled = TernaryBoolean.NULL; 11 | public TernaryBoolean Enabled { 12 | get { return enabled; } 13 | } 14 | 15 | [SerializeField] 16 | private TernaryBoolean drawVerticalSeparator = TernaryBoolean.NULL; 17 | public TernaryBoolean DrawVerticalSeparator { 18 | get { return drawVerticalSeparator; } 19 | } 20 | 21 | [SerializeField] 22 | private TernaryBoolean drawHorizontalSeparator = TernaryBoolean.NULL; 23 | public TernaryBoolean DrawHorizontalSeparator { 24 | get { return drawHorizontalSeparator; } 25 | } 26 | 27 | [SerializeField] 28 | private TernaryBoolean expandable = TernaryBoolean.NULL; 29 | public TernaryBoolean Expandable { 30 | get { return expandable; } 31 | } 32 | 33 | [SerializeField] 34 | private TernaryBoolean customDrawer = TernaryBoolean.NULL; 35 | public TernaryBoolean CustomDrawer { 36 | get { return customDrawer; } 37 | } 38 | 39 | [SerializeField] 40 | private TernaryBoolean cacheOptimization = TernaryBoolean.NULL; 41 | public TernaryBoolean CacheOptimization { 42 | get { return cacheOptimization; } 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /Samples~/Details/One Line Drawer Example.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: d587304b6c4ecaa47877eb62e0b4540b, type: 3} 12 | m_Name: One Line Drawer Example 13 | m_EditorClassIdentifier: 14 | root: 15 | first: Single field 16 | second: {r: 0.36838233, g: 0.6397059, b: 0.061148338, a: 0} 17 | third: 18 | first: 1 19 | second: {x: 1, y: 2} 20 | rootArray: 21 | - first: First 22 | second: {r: 1, g: 0, b: 0, a: 0} 23 | third: 24 | first: 0 25 | second: {x: 1, y: 2} 26 | - first: Second 27 | second: {r: 1, g: 0.26896554, b: 0, a: 0} 28 | third: 29 | first: 1 30 | second: {x: 3, y: 4} 31 | - first: Third 32 | second: {r: 1, g: 0.9724138, b: 0, a: 0} 33 | third: 34 | first: 0 35 | second: {x: 5, y: 6} 36 | - first: Forth 37 | second: {r: 0, g: 1, b: 0.048275948, a: 0} 38 | third: 39 | first: 1 40 | second: {x: 7, y: 8} 41 | - first: Fifth 42 | second: {r: 0, g: 0.8758622, b: 1, a: 0} 43 | third: 44 | first: 0 45 | second: {x: 9, y: 10} 46 | - first: Sixth 47 | second: {r: 0, g: 0.21379304, b: 1, a: 0} 48 | third: 49 | first: 1 50 | second: {x: 12, y: 11} 51 | - first: Seventh 52 | second: {r: 0.2827587, g: 0, b: 1, a: 0} 53 | third: 54 | first: 0 55 | second: {x: 13, y: 14} 56 | -------------------------------------------------------------------------------- /Editor/Scripts/Slices/SlicesCache.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEditor; 5 | 6 | using OneLine.Settings; 7 | 8 | namespace OneLine { 9 | internal class SlicesCache { 10 | 11 | private Dictionary cache; 12 | private Action calculate; 13 | 14 | public bool IsDirty { get; private set; } 15 | 16 | public SlicesCache(Action calculate){ 17 | cache = new Dictionary(); 18 | this.calculate = calculate; 19 | } 20 | 21 | private string lastId = null; 22 | 23 | public Slices this[SerializedProperty property] { 24 | get { 25 | if (!SettingsMenu.Value.CacheOptimization) { 26 | var slices = new SlicesImpl(); 27 | calculate(property, slices); 28 | return slices; 29 | } 30 | 31 | lastId = GetId(property); 32 | if (cache.ContainsKey(lastId)){ 33 | return cache[lastId]; 34 | } 35 | else { 36 | var slices = new SlicesImpl(); 37 | calculate(property, slices); 38 | cache.Add(lastId, slices); 39 | IsDirty = true; 40 | return slices; 41 | } 42 | } 43 | } 44 | 45 | private string GetId(SerializedProperty property){ 46 | return property.propertyPath; 47 | } 48 | 49 | public void InvalidateLastUsedId(SerializedProperty property){ 50 | var id = GetId(property); 51 | var list = new List(); 52 | foreach (var key in cache.Keys) { 53 | if (id.StartsWith(key + ".")) { 54 | list.Add(key); 55 | } 56 | } 57 | foreach(var key in list) { 58 | cache.Remove(key); 59 | } 60 | } 61 | 62 | } 63 | } -------------------------------------------------------------------------------- /Documentation~/store/readme.txt: -------------------------------------------------------------------------------- 1 | # Overview 2 | 3 | OneLine improves your databases and makes it more readable for people. It draws 4 | objects in Inspector into one line instead default line-by-line style. Also it 5 | provides a few features like fields highlightning, locking array size, etc... 6 | 7 | # Gettings Started 8 | 9 | - After importing look at Assets/Example/Overview/Overview.asset and open it 10 | in the Inspector Window. It will show you all capabilities of OneLine library. 11 | 12 | - In your code, add `using OneLine;` and add `[OneLine]` to fields you want 13 | to draw into one line. Note that internal fields don't need to be marked with 14 | `[OneLine]`: they will be processed automatically. 15 | 16 | - If you want to customize linified fields, use `[Width]`, `[Weight]`, 17 | `[HideLabel]`, `[Highlight]`, `[HideButtons]` and `[ArrayLength]` attributes 18 | (For details look at Overview.asset). 19 | 20 | - To separate lines use `[Separator]` instead built-in `[Header]`. 21 | `[Separator]` is just a nice-looked [Header]. 22 | 23 | - To follow object references in inspector use `[Expandable]` and 24 | `[ReadOnlyExpandable]`. 25 | 26 | # RectEx 27 | 28 | One more thing: RectEx. 29 | 30 | RectEx (rect extensions) is the small lighweight library which makes your work 31 | with EditorGUI easily. It provides some extension methods for class Rect. 32 | 33 | For example: 34 | - rect.Column(5) -- slices rect for 5 equal pieces with horizontal lines; 35 | - rect.Row(5) -- same as Column, but use vertical lines; 36 | - rect.Grid(2,3) -- return Rect[2,3]; 37 | - ... 38 | - a lot of them 39 | 40 | For details go to https://github.com/slavniyteo/rect-ex 41 | 42 | # Contributing 43 | 44 | For more information and support go to https://github.com/slavniyteo/one-line 45 | 46 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Directory/RootDirectoryDrawer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | using UnityEditor; 5 | using UnityEngine; 6 | using RectEx; 7 | 8 | namespace OneLine { 9 | internal class RootDirectoryDrawer : DirectoryDrawer { 10 | 11 | 12 | public RootDirectoryDrawer(DrawerProvider getDrawer) : base(getDrawer) { 13 | } 14 | 15 | public override void AddSlices(SerializedProperty property, Slices slices){ 16 | getDrawer(property).AddSlices(property, slices); 17 | } 18 | 19 | public Rect DrawPrefixLabel(Rect rect, SerializedProperty property){ 20 | var hideLabel = property.GetCustomAttribute(); 21 | if (hideLabel == null) { 22 | rect = IndentWithLabel(rect, property, true); 23 | } 24 | return rect; 25 | } 26 | 27 | private static Rect IndentWithLabel(Rect rect, SerializedProperty property, bool drawLabel) { 28 | var rects = rect.CutFromLeft(EditorGUIUtility.labelWidth, 0); 29 | 30 | if (drawLabel) { 31 | var labelRect = rects[0] 32 | .CutFromBottom(EditorGUIUtility.singleLineHeight)[1]; 33 | DrawLabel(labelRect, property); 34 | } 35 | return rects[1]; 36 | } 37 | 38 | private static void DrawLabel(Rect rect, SerializedProperty property){ 39 | string tooltip = property.GetCustomAttribute() 40 | .IfPresent(x => x.tooltip) 41 | .OrElse(null); 42 | 43 | var label = new GUIContent(property.displayName, tooltip); 44 | EditorGUI.LabelField(rect, label); 45 | } 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Tests/Editor/Scripts/SlicesTest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System; 3 | using UnityEngine; 4 | using OneLine; 5 | using RectEx; 6 | 7 | #if UNITY_EDITOR 8 | using UnityEditor; 9 | #endif 10 | 11 | namespace OneLine.Example { 12 | [CreateAssetMenu] 13 | public class SlicesTest : ScriptableObject { 14 | 15 | [OneLine] 16 | public Root root; 17 | public Root2 root2; 18 | 19 | [Serializable] 20 | public class First { 21 | public string first; 22 | public string second; 23 | } 24 | [Serializable] 25 | public class Second { 26 | public string[] array; 27 | } 28 | [Serializable] 29 | public class Root { 30 | public First first; 31 | [Separator] 32 | public Second second; 33 | [Separator] 34 | public string third; 35 | } 36 | 37 | [Serializable] 38 | public class Root2 { 39 | public First first; 40 | public Second second; 41 | public string third; 42 | } 43 | 44 | #if UNITY_EDITOR 45 | [CustomPropertyDrawer(typeof(Root2))] 46 | public class Root2Editor : PropertyDrawer { 47 | 48 | public override void OnGUI(Rect rect, SerializedProperty property, GUIContent label){ 49 | rect = EditorGUI.PrefixLabel(rect, label); 50 | 51 | var separatorWidth = 8; 52 | var buttonWidth = 20; 53 | var rects = rect.Row( 54 | new float[]{1,1,0,1,1,0,0,0,1}, 55 | new float[]{0,0,separatorWidth,0,0,buttonWidth,buttonWidth,separatorWidth,0}, 56 | 2); 57 | 58 | int i = 0; 59 | EditorGUI.TextField(rects[i++], ""); 60 | EditorGUI.TextField(rects[i++], ""); 61 | EditorGUI.DrawRect(rects[i++], Color.gray); 62 | EditorGUI.TextField(rects[i++], ""); 63 | EditorGUI.TextField(rects[i++], ""); 64 | GUI.Button(rects[i++], "+"); 65 | GUI.Button(rects[i++], "-"); 66 | EditorGUI.DrawRect(rects[i++], Color.gray); 67 | EditorGUI.TextField(rects[i++], ""); 68 | } 69 | 70 | } 71 | #endif 72 | } 73 | } -------------------------------------------------------------------------------- /Samples~/Scripts/Overview/StandartTypesOverview.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace OneLine.Examples { 6 | [CreateAssetMenu] 7 | public class StandartTypesOverview : ScriptableObject { 8 | 9 | [Separator("Pure types"),OneLineWithHeader, HideLabel] 10 | public PureClasses pure; 11 | 12 | [Separator, Space(25), Separator("Colors and reference")] 13 | [OneLineWithHeader, HideLabel] 14 | public FirstUnity first; 15 | 16 | [Separator, Space(25), Separator("Enumerators and Curves")] 17 | [OneLineWithHeader, HideLabel] 18 | public SecondUnity second; 19 | 20 | [Separator, Space(25), Separator("Enumerators and Curves")] 21 | [OneLineWithHeader, HideLabel] 22 | public ThirdUnity third; 23 | 24 | [Separator, Space(25), Separator("Other")] 25 | [OneLine] 26 | public Matrix4x4 matrixField; 27 | [OneLine] 28 | public Rect rectField; 29 | [OneLine] 30 | public Bounds boundsField; 31 | 32 | 33 | [Serializable] 34 | public class PureClasses { 35 | public int integerField; 36 | public long longField; 37 | public float floatField; 38 | public double doubleField; 39 | public bool booleanField; 40 | public string stringField; 41 | } 42 | 43 | [Serializable] 44 | public class FirstUnity { 45 | public Color colorField; 46 | public Color32 color32Field; 47 | public ScriptableObject objectField; 48 | } 49 | 50 | [Serializable] 51 | public class SecondUnity{ 52 | public LayerMask layerMaskField; 53 | public SystemLanguage enumField; 54 | public AnimationCurve curveField; 55 | } 56 | 57 | [Serializable] 58 | public class ThirdUnity { 59 | public float floatField; 60 | public Vector2 vector2Field; 61 | public Vector3 vector3Field; 62 | public Vector4 vector4Field; 63 | } 64 | 65 | 66 | 67 | } 68 | } -------------------------------------------------------------------------------- /Samples~/Overview/Standart Types Overview.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: cf8e04f773e79294a8deb45b168dd913, type: 3} 12 | m_Name: Standart Types Overview 13 | m_EditorClassIdentifier: 14 | pure: 15 | integerField: 542 16 | longField: 0 17 | floatField: 2 18 | doubleField: 212314 19 | booleanField: 1 20 | stringField: 65777164 21 | first: 22 | colorField: {r: 0.38235295, g: 0.12370243, b: 0.12370243, a: 0} 23 | color32Field: 24 | serializedVersion: 2 25 | rgba: 0 26 | objectField: {fileID: 0} 27 | second: 28 | layerMaskField: 29 | serializedVersion: 2 30 | m_Bits: 0 31 | enumField: 16 32 | curveField: 33 | serializedVersion: 2 34 | m_Curve: 35 | - serializedVersion: 2 36 | time: 0 37 | value: 0 38 | inSlope: 0 39 | outSlope: 0 40 | tangentMode: 0 41 | - serializedVersion: 2 42 | time: 1 43 | value: 1 44 | inSlope: 2 45 | outSlope: 2 46 | tangentMode: 0 47 | m_PreInfinity: 2 48 | m_PostInfinity: 2 49 | m_RotationOrder: 0 50 | third: 51 | floatField: 0 52 | vector2Field: {x: 0, y: 0} 53 | vector3Field: {x: 0, y: 0, z: 0} 54 | vector4Field: {x: 0, y: 0, z: 0, w: 0} 55 | matrixField: 56 | e00: 0 57 | e01: 0 58 | e02: 0 59 | e03: 0 60 | e10: 0 61 | e11: 0 62 | e12: 0 63 | e13: 0 64 | e20: 0 65 | e21: 0 66 | e22: 0 67 | e23: 0 68 | e30: 0 69 | e31: 0 70 | e32: 0 71 | e33: 0 72 | rectField: 73 | serializedVersion: 2 74 | x: 0 75 | y: 0 76 | width: 0 77 | height: 0 78 | boundsField: 79 | m_Center: {x: 0, y: 0, z: 0} 80 | m_Extent: {x: 0, y: 0, z: 0} 81 | -------------------------------------------------------------------------------- /Editor/Scripts/Settings/Settings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEditor; 4 | 5 | namespace OneLine.Settings { 6 | public class Settings : ScriptableObject, ISettings { 7 | public ISettings Defaults { get; private set; } 8 | 9 | private LocalSettingsLayer local = new LocalSettingsLayer(); 10 | public ISettings Local { get { return local; } } 11 | 12 | [SerializeField] 13 | private GlobalSettingsLayer layer = new GlobalSettingsLayer(); 14 | public ISettings Layer { get { return layer; } } 15 | 16 | private void OnEnable() { 17 | Defaults = new DefaultSettingsLayer(); 18 | 19 | SettingsMenu.ApplyDirectivesInOrderToCurrentSettings(this); 20 | } 21 | 22 | public TernaryBoolean Enabled { get { return GetBoolean(x => x.Enabled); } } 23 | public TernaryBoolean DrawVerticalSeparator { get { return GetBoolean(x => x.DrawVerticalSeparator); } } 24 | public TernaryBoolean DrawHorizontalSeparator { get { return GetBoolean(x => x.DrawHorizontalSeparator); } } 25 | public TernaryBoolean Expandable { get { return GetBoolean(x => x.Expandable); } } 26 | public TernaryBoolean CustomDrawer { get { return GetBoolean(x => x.CustomDrawer); } } 27 | public TernaryBoolean CacheOptimization { get { return GetBoolean(x => x.CacheOptimization); } } 28 | 29 | private TernaryBoolean GetBoolean(Func get) { 30 | var result = get(Defaults); 31 | if (get(layer).HasValue) { 32 | result = get(layer); 33 | } 34 | if (get(Local).HasValue) { 35 | result = get(Local); 36 | } 37 | return result; 38 | } 39 | 40 | public void SaveAndApply() { 41 | local.Save(); 42 | EditorUtility.SetDirty(this); 43 | SettingsMenu.ApplyDirectivesInOrderToCurrentSettings(this); 44 | } 45 | 46 | 47 | } 48 | } -------------------------------------------------------------------------------- /Editor/Scripts/Settings/Tools/PreprocessorDirectives/PreprocessorDirectives.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEditor; 5 | 6 | namespace OneLine.Settings { 7 | public class PreprocessorDirectives { 8 | private Dictionary> items = 9 | new Dictionary>(); 10 | 11 | public void add(string key, Nullable get) { 12 | if (string.IsNullOrEmpty(key) || get == null) { 13 | throw new ArgumentNullException(); 14 | } 15 | if (items.ContainsKey(key)) { 16 | throw new ArgumentException(string.Format("Key {0} is already registered", key)); 17 | } 18 | items[key] = get; 19 | } 20 | 21 | public void add(string key, TernaryBoolean get) { 22 | if (get == null) { 23 | throw new ArgumentNullException(); 24 | } 25 | items[key] = get.BoolValue; 26 | } 27 | 28 | public void DefineForCurrentBuildTarget() { 29 | BuildTargetGroup target = EditorUserBuildSettings.selectedBuildTargetGroup; 30 | if (target == BuildTargetGroup.Unknown) { 31 | Debug.LogError("OneLine Settings Error: can not determine current BuildTargetGroup"); 32 | return; 33 | } 34 | 35 | var currentDefines = PlayerSettings.GetScriptingDefineSymbolsForGroup(target); 36 | var resultDefines = new List(); 37 | foreach (var define in currentDefines.Split(';')) { 38 | if (!string.IsNullOrEmpty(define)) { 39 | if (!items.ContainsKey(define)){ 40 | resultDefines.Add(define); 41 | } 42 | } 43 | } 44 | 45 | foreach (var key in items.Keys) { 46 | var value = items[key]; 47 | if (value.HasValue && value.Value) { 48 | resultDefines.Add(key); 49 | } 50 | } 51 | 52 | PlayerSettings.SetScriptingDefineSymbolsForGroup(target, string.Join(";", resultDefines.ToArray())); 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /Samples~/Scripts/Overview/ComplexExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace OneLine.Examples { 5 | [CreateAssetMenu(menuName = "OneLine/Examples/ComplexExample")] 6 | public class ComplexExample : ScriptableObject { 7 | 8 | public Character[] characters; 9 | 10 | [Serializable] 11 | public class Character { 12 | [SerializeField, OneLine, Separator] 13 | private FullName fullName; 14 | [SerializeField, OneLineWithHeader] 15 | private Stats stats; 16 | [SerializeField, OneLine] 17 | private Skill[] skills; 18 | } 19 | 20 | [Serializable] 21 | public class FullName { 22 | [SerializeField, Tooltip("First name is not good")] private string firstName; 23 | [SerializeField] private string secondName; 24 | [SerializeField,Separator] private string nickName; 25 | } 26 | 27 | [Serializable] 28 | public class Stats { 29 | [SerializeField] private int strength; 30 | [SerializeField] private int intelligence; 31 | [SerializeField] private int agility; 32 | [SerializeField] private int charisma; 33 | [SerializeField] private int luck; 34 | } 35 | 36 | // Skills are from the legendary game `Dwarf Fortress` 37 | [Serializable] 38 | public class Skill { 39 | [SerializeField] private SkillType type; 40 | [SerializeField] private SkillLevel level; 41 | } 42 | 43 | public enum SkillType { 44 | Miner, 45 | Bowyer, 46 | Carpenter, 47 | WoodCutter, 48 | Engraver, 49 | Mason, 50 | } 51 | 52 | public enum SkillLevel { 53 | Dabbling, 54 | Novice, 55 | Adequate, 56 | Competent, 57 | Skilled, 58 | Proficient, 59 | Talented, 60 | Adept, 61 | Expert, 62 | Professional, 63 | Accomplished, 64 | Great, 65 | Master, 66 | HighMaster, 67 | GrandMaster, 68 | Legendary, 69 | } 70 | } 71 | } -------------------------------------------------------------------------------- /Editor/Scripts/SeparatorAttributeDrawer.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | using OneLine; 4 | using RectEx; 5 | 6 | namespace OneLine { 7 | #if ! ONE_LINE_HORIZONTAL_SEPARATOR_DISABLE 8 | [CustomPropertyDrawer(typeof(SeparatorAttribute))] 9 | #endif 10 | public class SeparatorAttributeDrawer : UnityEditor.DecoratorDrawer { 11 | 12 | private new SeparatorAttribute attribute { get { return base.attribute as SeparatorAttribute; }} 13 | 14 | private Color Color { get { return GuiUtil.GrayColor; } } 15 | private GUIStyle textStyle; 16 | private const float spaceBefore = 0; 17 | 18 | public override float GetHeight(){ 19 | return spaceBefore + Mathf.Max(attribute.Thickness, EditorGUIUtility.singleLineHeight + 5); 20 | } 21 | 22 | public override void OnGUI(Rect rect) { 23 | PrepareStyles(); 24 | rect.y += spaceBefore; 25 | rect.height -= spaceBefore; 26 | 27 | string text = attribute.Text; 28 | int thickness = attribute.Thickness; 29 | 30 | if (string.IsNullOrEmpty(text)){ 31 | DrawLine(rect, thickness); 32 | } 33 | else { 34 | var textSize = textStyle.CalcSize(new GUIContent(text)); 35 | var rects = rect.Row(new float[]{1,0,1}, new float[]{0, textSize.x, 0}); 36 | 37 | DrawLine(rects[0], thickness); 38 | DrawText(rects[1], text); 39 | DrawLine(rects[2], thickness); 40 | } 41 | } 42 | 43 | private void PrepareStyles(){ 44 | if (textStyle != null){ return; } 45 | 46 | textStyle = new GUIStyle(); 47 | textStyle.fontStyle = FontStyle.Bold; 48 | textStyle.normal.textColor = Color; 49 | textStyle.alignment = TextAnchor.MiddleCenter; 50 | } 51 | 52 | private void DrawText(Rect rect, string text){ 53 | EditorGUI.LabelField(rect, text, textStyle); 54 | } 55 | private void DrawLine(Rect rect, int thickness){ 56 | rect.y += (rect.height - thickness) / 2; 57 | rect.height = thickness; 58 | GuiUtil.DrawRect(rect, Color); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Editor/Scripts/Settings/LocalSettingsLayer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | using UnityEditor; 6 | 7 | namespace OneLine.Settings { 8 | public class LocalSettingsLayer : ISettings { 9 | 10 | private Dictionary booleans = new Dictionary(); 11 | 12 | private const string ENABLED_NAME = "ONE_LINE_SETTINGS_ENABLED"; 13 | private const string DRAW_VERTICAL_SEPARATOR_NAME = "ONE_LINE_SETTINGS_DRAW_VERTICAL_SEPARATOR"; 14 | private const string DRAW_HORIZONTAL_SEPARATOR_NAME = "ONE_LINE_SETTINGS_DRAW_HORIZONTAL_SEPARATOR"; 15 | private const string EXPANDABLE_NAME = "ONE_LINE_SETTINGS_EXPANDABLE"; 16 | private const string CUSTOM_DRAWER_NAME = "ONE_LINE_SETTINGS_CUSTOM_DRAWER"; 17 | private const string CACHE_OPTIMIZATION_NAME = "ONE_LINE_SETTINGS_CACHE_OPTIMIZATION"; 18 | 19 | public TernaryBoolean Enabled { get { return getBool(ENABLED_NAME); } } 20 | public TernaryBoolean DrawVerticalSeparator { get { return getBool(DRAW_VERTICAL_SEPARATOR_NAME); } } 21 | public TernaryBoolean DrawHorizontalSeparator { get { return getBool(DRAW_HORIZONTAL_SEPARATOR_NAME); } } 22 | public TernaryBoolean Expandable { get { return getBool(EXPANDABLE_NAME); } } 23 | public TernaryBoolean CustomDrawer { get { return getBool(CUSTOM_DRAWER_NAME); } } 24 | public TernaryBoolean CacheOptimization { get { return getBool(CACHE_OPTIMIZATION_NAME); } } 25 | 26 | private TernaryBoolean getBool(string key) { 27 | #if ONE_LINE_DEFAULTS_ONLY 28 | return new TernaryBoolean(null); 29 | #else 30 | TernaryBoolean result = null; 31 | if (!booleans.TryGetValue(key, out result)) { 32 | result = new TernaryBoolean((byte) EditorPrefs.GetInt(key, 0)); 33 | booleans[key] = result; 34 | } 35 | return result; 36 | #endif 37 | } 38 | 39 | public void Save() { 40 | foreach (var key in booleans.Keys) { 41 | Save(key, booleans[key]); 42 | } 43 | } 44 | 45 | private void Save(string key, TernaryBoolean value) { 46 | if (value != null) { 47 | EditorPrefs.SetInt(key, value.RawValue); 48 | } 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /Editor/Scripts/Utils/IEnumerableExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using System.Text; 6 | using UnityEditor; 7 | 8 | namespace OneLine { 9 | internal static class IEnumerableExtension { 10 | 11 | public static IEnumerable Merge (this IEnumerable first, 12 | IEnumerable second, 13 | Func selector){ 14 | var firstEnumerator = first.GetEnumerator(); 15 | var secondEnumerator = second.GetEnumerator(); 16 | while (firstEnumerator.MoveNext() && secondEnumerator.MoveNext()){ 17 | yield return selector(firstEnumerator.Current, secondEnumerator.Current); 18 | } 19 | } 20 | 21 | public static void ForEachMerged (this IEnumerable first, 22 | IEnumerable second, 23 | Action action){ 24 | var firstEnumerator = first.GetEnumerator(); 25 | var secondEnumerator = second.GetEnumerator(); 26 | while (firstEnumerator.MoveNext() && secondEnumerator.MoveNext()){ 27 | action(firstEnumerator.Current, secondEnumerator.Current); 28 | } 29 | } 30 | 31 | public static void ForEach(this IEnumerable enumerable, Action action){ 32 | foreach (var value in enumerable){ 33 | action(value); 34 | } 35 | } 36 | 37 | public static void ForEachExceptLast (this IEnumerable enumerable, Action action, Action lastAction = null){ 38 | var enumerator = enumerable.GetEnumerator(); 39 | var has = enumerator.MoveNext(); 40 | while (has){ 41 | var current = enumerator.Current; 42 | has = enumerator.MoveNext(); 43 | if (has) { 44 | action(current); 45 | } 46 | else if (lastAction != null) { 47 | lastAction(current); 48 | } 49 | } 50 | } 51 | 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Documentation~/store/image/large.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f4ebe1e6d22c1e745bebd0b8f8a466c6 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 521a23def9030eb4d80ef60e4bd4e99e 79 | internalID: 0 80 | vertices: [] 81 | indices: 82 | edges: [] 83 | weights: [] 84 | secondaryTextures: [] 85 | spritePackingTag: 86 | pSDRemoveMatte: 0 87 | pSDShowRemoveMatteOption: 0 88 | userData: 89 | assetBundleName: 90 | assetBundleVariant: 91 | -------------------------------------------------------------------------------- /Documentation~/store/image/small.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 71616b2da54dc7f4d95ee738e6309754 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 614d3a2eb950ba54b9d302fe756ba3c7 79 | internalID: 0 80 | vertices: [] 81 | indices: 82 | edges: [] 83 | weights: [] 84 | secondaryTextures: [] 85 | spritePackingTag: 86 | pSDRemoveMatte: 0 87 | pSDShowRemoveMatteOption: 0 88 | userData: 89 | assetBundleName: 90 | assetBundleVariant: 91 | -------------------------------------------------------------------------------- /Documentation~/store/image/medium.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ff8697bc56800d4aa4fed1270c6c6a0 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 167c352ad4b02b04880c0b22ff119262 79 | internalID: 0 80 | vertices: [] 81 | indices: 82 | edges: [] 83 | weights: [] 84 | secondaryTextures: [] 85 | spritePackingTag: 86 | pSDRemoveMatte: 0 87 | pSDShowRemoveMatteOption: 0 88 | userData: 89 | assetBundleName: 90 | assetBundleVariant: 91 | -------------------------------------------------------------------------------- /Documentation~/mdsrc/one-line-overview.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ed8767ff52836f40b9b52b6d209f1e5 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 5bb307b790b83be41923f254de3701f0 79 | internalID: 0 80 | vertices: [] 81 | indices: 82 | edges: [] 83 | weights: [] 84 | secondaryTextures: [] 85 | spritePackingTag: 86 | pSDRemoveMatte: 0 87 | pSDShowRemoveMatteOption: 0 88 | userData: 89 | assetBundleName: 90 | assetBundleVariant: 91 | -------------------------------------------------------------------------------- /Documentation~/mdsrc/root-array-example.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cc7f648e8b62a754eaa112de1d2bb040 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 1f83d3fc4b82f5e40b43c474662039f4 79 | internalID: 0 80 | vertices: [] 81 | indices: 82 | edges: [] 83 | weights: [] 84 | secondaryTextures: [] 85 | spritePackingTag: 86 | pSDRemoveMatte: 0 87 | pSDShowRemoveMatteOption: 0 88 | userData: 89 | assetBundleName: 90 | assetBundleVariant: 91 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Array/ArrayButtonsDrawer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEditor; 5 | using UnityEngine; 6 | using RectEx; 7 | 8 | namespace OneLine { 9 | internal class ArrayButtonsDrawer : Drawer { 10 | 11 | private Action notifyChange; 12 | 13 | public ArrayButtonsDrawer(Action notifyChange){ 14 | this.notifyChange = notifyChange; 15 | } 16 | 17 | #region Width 18 | 19 | public override void AddSlices(SerializedProperty property, Slices slices){ 20 | if (NeedDrawButtons(property)){ 21 | slices.Add(new SliceImpl(0, 20, rect => DrawPlusButton(rect, property.Copy()))); 22 | slices.Add(new SliceImpl(0, 20, rect => DrawMinusButton(rect, property.Copy()))); 23 | } 24 | else if (NeedDrawLabel(property)){ 25 | slices.Add(new SliceImpl(1,0, rect => DrawLabel(rect, property.Copy()))); 26 | } 27 | } 28 | 29 | private bool NeedDrawButtons(SerializedProperty property) { 30 | var attribute = property.GetCustomAttribute(); 31 | return attribute == null; 32 | } 33 | 34 | private bool NeedDrawLabel(SerializedProperty property) { 35 | return property.arraySize == 0; 36 | } 37 | 38 | #endregion 39 | 40 | public void DrawLabel(Rect rect, SerializedProperty array) { 41 | var rects = rect.Row(new float[] { 1, 0 }, new float[] { 0, 20 }); 42 | 43 | EditorGUI.LabelField(rects[0], array.displayName); 44 | if (GUI.Button(rects[1], "+")) { 45 | array.InsertArrayElementAtIndex(0); 46 | notifyChange(array); 47 | } 48 | } 49 | 50 | public void DrawPlusButton(Rect rect, SerializedProperty array) { 51 | if (GUI.Button(rect, "+")) { 52 | array.InsertArrayElementAtIndex(array.arraySize); 53 | notifyChange(array); 54 | } 55 | } 56 | 57 | public void DrawMinusButton(Rect rect, SerializedProperty array) { 58 | if (array.arraySize > 0 && GUI.Button(rect, "-")) { 59 | array.DeleteArrayElementAtIndex(array.arraySize - 1); 60 | notifyChange(array); 61 | } 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Documentation~/mdsrc/fixed-length-array-example.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2f6781a7f32f7b40a71a5e9dce940d5 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: ffd92bb5ce1f6004aa6fee6af3c029d2 79 | internalID: 0 80 | vertices: [] 81 | indices: 82 | edges: [] 83 | weights: [] 84 | secondaryTextures: [] 85 | spritePackingTag: 86 | pSDRemoveMatte: 0 87 | pSDShowRemoveMatteOption: 0 88 | userData: 89 | assetBundleName: 90 | assetBundleVariant: 91 | -------------------------------------------------------------------------------- /Documentation~/mdsrc/one-line-attribute-example.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c73f237c860401b408e2db7c61c8ab4d 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: bddb56b51f8fb554fb6535b7ba92c85c 79 | internalID: 0 80 | vertices: [] 81 | indices: 82 | edges: [] 83 | weights: [] 84 | secondaryTextures: [] 85 | spritePackingTag: 86 | pSDRemoveMatte: 0 87 | pSDShowRemoveMatteOption: 0 88 | userData: 89 | assetBundleName: 90 | assetBundleVariant: 91 | -------------------------------------------------------------------------------- /Documentation~/mdsrc/weight-attribute-example.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b5333335e23bd7c4eb2b83496d1fe78f 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 8337d29f9dab94442ac6bfecaa6e7429 79 | internalID: 0 80 | vertices: [] 81 | indices: 82 | edges: [] 83 | weights: [] 84 | secondaryTextures: [] 85 | spritePackingTag: 86 | pSDRemoveMatte: 0 87 | pSDShowRemoveMatteOption: 0 88 | userData: 89 | assetBundleName: 90 | assetBundleVariant: 91 | -------------------------------------------------------------------------------- /Documentation~/mdsrc/width-attribute-example.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41c431d459382aa4ea053d73366a4207 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: b0f906fbd3114dd4787897636fe4aa13 79 | internalID: 0 80 | vertices: [] 81 | indices: 82 | edges: [] 83 | weights: [] 84 | secondaryTextures: [] 85 | spritePackingTag: 86 | pSDRemoveMatte: 0 87 | pSDShowRemoveMatteOption: 0 88 | userData: 89 | assetBundleName: 90 | assetBundleVariant: 91 | -------------------------------------------------------------------------------- /Documentation~/mdsrc/expandable-attribute-example.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 205a2cc398c3a5d4b82e38a7d7bd3780 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 737ed5acd2868f846bb4ed8059a08310 79 | internalID: 0 80 | vertices: [] 81 | indices: 82 | edges: [] 83 | weights: [] 84 | secondaryTextures: [] 85 | spritePackingTag: 86 | pSDRemoveMatte: 0 87 | pSDShowRemoveMatteOption: 0 88 | userData: 89 | assetBundleName: 90 | assetBundleVariant: 91 | -------------------------------------------------------------------------------- /Documentation~/mdsrc/hide-buttons-attribute-example.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1cc2cafcd4f09f44ab3037cfd39cb58d 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 1f3d25da5291f4a4dae9f0fb512563de 79 | internalID: 0 80 | vertices: [] 81 | indices: 82 | edges: [] 83 | weights: [] 84 | secondaryTextures: [] 85 | spritePackingTag: 86 | pSDRemoveMatte: 0 87 | pSDShowRemoveMatteOption: 0 88 | userData: 89 | assetBundleName: 90 | assetBundleVariant: 91 | -------------------------------------------------------------------------------- /Documentation~/mdsrc/hide-label-attribute-example.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cf874d0364ee6cb4986c26771a25039c 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: b1cde8964ab42b740bb7b513acd38ff6 79 | internalID: 0 80 | vertices: [] 81 | indices: 82 | edges: [] 83 | weights: [] 84 | secondaryTextures: [] 85 | spritePackingTag: 86 | pSDRemoveMatte: 0 87 | pSDShowRemoveMatteOption: 0 88 | userData: 89 | assetBundleName: 90 | assetBundleVariant: 91 | -------------------------------------------------------------------------------- /Documentation~/mdsrc/highlight-attribute-example.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6a7ca28677844954d933479c4a0fe0f4 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 68e914833fa4b7a44911c83a25265d92 79 | internalID: 0 80 | vertices: [] 81 | indices: 82 | edges: [] 83 | weights: [] 84 | secondaryTextures: [] 85 | spritePackingTag: 86 | pSDRemoveMatte: 0 87 | pSDShowRemoveMatteOption: 0 88 | userData: 89 | assetBundleName: 90 | assetBundleVariant: 91 | -------------------------------------------------------------------------------- /Documentation~/mdsrc/separator-attribute-example.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea9db5b262031974eaab9a492525c94c 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 6a5c8ec64bc126a4c9c744a366199673 79 | internalID: 0 80 | vertices: [] 81 | indices: 82 | edges: [] 83 | weights: [] 84 | secondaryTextures: [] 85 | spritePackingTag: 86 | pSDRemoveMatte: 0 87 | pSDShowRemoveMatteOption: 0 88 | userData: 89 | assetBundleName: 90 | assetBundleVariant: 91 | -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/Array/DynamicArrayDrawer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using UnityEditor; 6 | using UnityEngine; 7 | 8 | namespace OneLine { 9 | internal class DynamicArrayDrawer : FixedArrayDrawer { 10 | private Drawer buttons; 11 | private Action notifyChange; 12 | 13 | public DynamicArrayDrawer(DrawerProvider getDrawer, Action notifyChange) : base(getDrawer) { 14 | buttons = new ArrayButtonsDrawer(notifyChange); 15 | this.notifyChange = notifyChange; 16 | } 17 | 18 | public override void AddSlices(SerializedProperty property, Slices slices){ 19 | base.AddSlices(property, slices); 20 | buttons.AddSlices(property, slices); 21 | } 22 | 23 | protected override int ModifyLength(SerializedProperty property) { 24 | return property.arraySize; 25 | } 26 | 27 | protected override void DrawChild(SerializedProperty parent, SerializedProperty child, Slices slices){ 28 | var childSlices = new SlicesImpl(); 29 | 30 | childSlices.AddBefore(new DrawableImpl(rect => DrawElementContextMenu(rect, parent, child))); 31 | base.DrawChild(parent, child, childSlices); 32 | 33 | slices.Add(childSlices); 34 | } 35 | 36 | private void DrawElementContextMenu(Rect rect, SerializedProperty parent, SerializedProperty element) { 37 | Event current = Event.current; 38 | if (current.type == EventType.ContextClick && rect.Contains(current.mousePosition)) { 39 | current.Use(); 40 | 41 | element = element.Copy(); 42 | 43 | var menu = new GenericMenu(); 44 | menu.AddItem(new GUIContent("Dublicate"), false, () => { 45 | element.DuplicateCommand(); 46 | element.serializedObject.ApplyModifiedProperties(); 47 | notifyChange(parent); 48 | }); 49 | menu.AddItem(new GUIContent("Delete"), false, () => { 50 | element.DeleteCommand(); 51 | element.serializedObject.ApplyModifiedProperties(); 52 | notifyChange(parent); 53 | }); 54 | menu.DropDown(rect); 55 | } 56 | } 57 | 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Documentation~/mdsrc/one-line-property-drawer-example.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15cf88f4f56eb4d4fb4c0146c9b15120 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 02abe6615c26c3347a04e798a696bdf6 79 | internalID: 0 80 | vertices: [] 81 | indices: 82 | edges: [] 83 | weights: [] 84 | secondaryTextures: [] 85 | spritePackingTag: 86 | pSDRemoveMatte: 0 87 | pSDShowRemoveMatteOption: 0 88 | userData: 89 | assetBundleName: 90 | assetBundleVariant: 91 | -------------------------------------------------------------------------------- /Documentation~/store/Screenshot_1.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f92f4fc2c485e4cb1bdffbd46191fc4d 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | ignorePngGamma: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 1 74 | spriteSheet: 75 | serializedVersion: 2 76 | sprites: [] 77 | outline: [] 78 | physicsShape: [] 79 | bones: [] 80 | spriteID: 5e97eb03825dee720800000000000000 81 | internalID: 0 82 | vertices: [] 83 | indices: 84 | edges: [] 85 | weights: [] 86 | secondaryTextures: [] 87 | spritePackingTag: 88 | pSDRemoveMatte: 0 89 | pSDShowRemoveMatteOption: 0 90 | userData: 91 | assetBundleName: 92 | assetBundleVariant: 93 | -------------------------------------------------------------------------------- /Documentation~/store/Screenshot_2.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ebadeaf495c97aa4781cff984609f24e 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | ignorePngGamma: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 1 74 | spriteSheet: 75 | serializedVersion: 2 76 | sprites: [] 77 | outline: [] 78 | physicsShape: [] 79 | bones: [] 80 | spriteID: 5e97eb03825dee720800000000000000 81 | internalID: 0 82 | vertices: [] 83 | indices: 84 | edges: [] 85 | weights: [] 86 | secondaryTextures: [] 87 | spritePackingTag: 88 | pSDRemoveMatte: 0 89 | pSDShowRemoveMatteOption: 0 90 | userData: 91 | assetBundleName: 92 | assetBundleVariant: 93 | -------------------------------------------------------------------------------- /Documentation~/store/Screenshot_3.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8883a0c7e7356614890274299a9ee67c 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 10 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 1 53 | spriteTessellationDetail: -1 54 | textureType: 8 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | ignorePngGamma: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 1 74 | spriteSheet: 75 | serializedVersion: 2 76 | sprites: [] 77 | outline: [] 78 | physicsShape: [] 79 | bones: [] 80 | spriteID: 5e97eb03825dee720800000000000000 81 | internalID: 0 82 | vertices: [] 83 | indices: 84 | edges: [] 85 | weights: [] 86 | secondaryTextures: [] 87 | spritePackingTag: 88 | pSDRemoveMatte: 0 89 | pSDShowRemoveMatteOption: 0 90 | userData: 91 | assetBundleName: 92 | assetBundleVariant: 93 | -------------------------------------------------------------------------------- /Editor/Scripts/Slices/Slices.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections; 3 | using System.Linq; 4 | using UnityEngine; 5 | using RectEx; 6 | using System; 7 | 8 | namespace OneLine { 9 | internal interface Slices : Slice, Drawable, IEnumerable { 10 | float[] Weights { get; } 11 | float[] Widthes { get; } 12 | int CountPayload { get; } 13 | 14 | void Add(Slice slice); 15 | void AddBefore(Drawable drawable); 16 | void AddAfter(Drawable drawable); 17 | } 18 | 19 | internal class SlicesImpl: SliceImpl, Slices, IEnumerable { 20 | 21 | private List slices = new List(); 22 | private List before = new List(); 23 | private List after = new List(); 24 | 25 | public override float Weight { get { return Weights.Sum(); } } 26 | public override float Width { get { return Widthes.Sum(); } } 27 | 28 | public float[] Weights { get { return slices.Select(x => x.Weight).ToArray(); } } 29 | 30 | public float[] Widthes { get { return slices.Select(x => x.Width).ToArray(); } } 31 | 32 | public int CountPayload { 33 | get { 34 | return this.Sum(x => { 35 | if (x is Slices) { 36 | return (x as Slices).CountPayload; 37 | } 38 | else return 1; 39 | }); 40 | } 41 | } 42 | 43 | public SlicesImpl(){ 44 | 45 | } 46 | 47 | #region Add 48 | 49 | public void Add(Slice slice){ 50 | slices.Add(slice); 51 | } 52 | 53 | public void AddBefore(Drawable drawable) { 54 | before.Add(drawable); 55 | } 56 | 57 | public void AddAfter(Drawable drawable) { 58 | after.Add(drawable); 59 | } 60 | 61 | #endregion 62 | 63 | #region Enumerable 64 | 65 | public IEnumerator GetEnumerator(){ 66 | foreach (var slice in slices) { 67 | if (slice is Slices) { 68 | var children = slice as Slices; 69 | foreach (var child in children) { 70 | yield return child; 71 | } 72 | } 73 | else { 74 | yield return slice; 75 | } 76 | } 77 | } 78 | 79 | IEnumerator IEnumerable.GetEnumerator(){ 80 | return GetEnumerator(); 81 | } 82 | 83 | #endregion 84 | 85 | #region Draw 86 | 87 | public override void Draw(Rect rect) { 88 | ForEach(rect, (r, x) => x.Draw(r)); 89 | } 90 | 91 | public override void DrawHeader(Rect rect) { 92 | ForEach(rect, (r, x) => x.DrawHeader(r)); 93 | } 94 | 95 | private void ForEach(Rect rect, Action action) { 96 | var rects = rect.Row(Weights, Widthes, 2); 97 | 98 | foreach (var drawable in before) { 99 | action(rect, drawable); 100 | } 101 | 102 | int rectIndex = 0; 103 | foreach (var slice in slices){ 104 | action(rects[rectIndex], slice); 105 | rectIndex++; 106 | } 107 | 108 | foreach (var drawable in after) { 109 | action(rect, drawable); 110 | } 111 | } 112 | #endregion 113 | } 114 | } -------------------------------------------------------------------------------- /Editor/Scripts/Drawers/SimpleFieldDrawer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Reflection; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using UnityEditor; 7 | using UnityEngine; 8 | 9 | namespace OneLine { 10 | internal class SimpleFieldDrawer : Drawer { 11 | 12 | public float GetWeight(SerializedProperty property){ 13 | var weights = property.GetCustomAttributes(); 14 | if (weights.Any()) { 15 | return weights.Sum(w=>w.Weight); 16 | } 17 | else 18 | { 19 | switch (property.propertyType) { 20 | case SerializedPropertyType.Boolean: { 21 | return 0; 22 | } 23 | default: { 24 | return 1; 25 | } 26 | } 27 | } 28 | } 29 | 30 | public float GetFixedWidth(SerializedProperty property){ 31 | var widths = property.GetCustomAttributes(); 32 | if (widths.Any()) { 33 | return widths.Sum(w=>w.Width); 34 | } 35 | else 36 | { 37 | switch (property.propertyType){ 38 | case SerializedPropertyType.Boolean: { 39 | return EditorGUIUtility.singleLineHeight - 2; 40 | } 41 | default: { 42 | return 0; 43 | } 44 | } 45 | } 46 | } 47 | 48 | public override void AddSlices(SerializedProperty property, Slices slices){ 49 | highlight.Draw(property, slices); 50 | slices.Add(new SliceImpl(GetWeight(property), GetFixedWidth(property), rect => Draw(rect, property.Copy()))); 51 | tooltip.Draw(property, slices); 52 | } 53 | 54 | public virtual void Draw(Rect rect, SerializedProperty property) { 55 | DrawProperty(rect, property); 56 | } 57 | 58 | /* 59 | * WORKAROUND 60 | * Unity3d `feature`: EditorGUI.PropertyField draws field 61 | * with all decorators (like Header, Space, etc) and this behaviour 62 | * can not be ommited. 63 | * see: http://answers.unity3d.com/questions/1394991/how-to-preserve-drawing-decoratordrawer-like-heade.html 64 | * Headers and Separators (provided by one-line) produces artefacts. 65 | * We solve this problem with reflection, but we call internal method 66 | * and this may be dangerous: unity3d developers may change API =( 67 | */ 68 | private void DrawProperty(Rect rect, SerializedProperty property){ 69 | //EditorGUI.PropertyField(rect, property, GUIContent.none); 70 | 71 | typeof(EditorGUI) 72 | .GetMethod("DefaultPropertyField", BindingFlags.NonPublic | BindingFlags.Static) 73 | .Invoke(null, new object[]{rect, property, GUIContent.none}); 74 | } 75 | 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Editor/Scripts/Utils/SerializedPropertyExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using System.Text; 6 | using UnityEditor; 7 | using UnityEngine; 8 | 9 | namespace OneLine { 10 | internal static class SerializedPropertyExtension { 11 | 12 | public static IEnumerable GetChildren(this SerializedProperty property) { 13 | if (!property.hasVisibleChildren) { 14 | yield break; 15 | } 16 | 17 | var copy = property.Copy(); 18 | int depth = copy.depth; 19 | 20 | copy.Next(true); 21 | do { 22 | string lastPath = copy.propertyPath; 23 | yield return copy.Copy(); 24 | 25 | if (copy.propertyPath != lastPath) { 26 | var message = 27 | string.Format("Property path'd been changed while iteration. Last iteration path: {0}, current path: {1}", lastPath, copy.propertyPath); 28 | throw new InvalidOperationException(message); 29 | } 30 | } 31 | while (copy.Next(false) && copy.depth > depth); 32 | } 33 | 34 | public static int CountChildrenAndMoveNext(this SerializedProperty property){ 35 | var depth = property.depth; 36 | int result = 0; 37 | while (property.NextVisible(true) && property.depth > depth){ 38 | result++; 39 | } 40 | return result; 41 | } 42 | 43 | public static bool IsReallyArray(this SerializedProperty property){ 44 | return property.isArray && property.propertyType != SerializedPropertyType.String; 45 | } 46 | 47 | public static IEnumerable GetArrayElements(this SerializedProperty property) { 48 | if (!property.IsReallyArray()) { 49 | string message = string.Format("Property {0} is not array or list", property.displayName); 50 | throw new InvalidOperationException(message); 51 | } 52 | 53 | property = property.Copy(); 54 | 55 | string path = property.propertyPath; 56 | int size = property.arraySize; 57 | for (int i = 0; i < size; i++) { 58 | if (property.propertyPath != path) { 59 | string message = string.Format("Property path {0} is changed during iteration", property.displayName); 60 | throw new InvalidOperationException(message); 61 | } 62 | yield return property.GetArrayElementAtIndex(i).Copy(); 63 | } 64 | } 65 | 66 | public static bool IsArrayElement(this SerializedProperty property){ 67 | var path = property.propertyPath; 68 | return path.Substring(path.Length - 1, 1) == "]" ; 69 | } 70 | 71 | public static bool IsArrayFirstElement(this SerializedProperty property){ 72 | var path = property.propertyPath; 73 | return path.Substring(path.Length - 3, 3) == "[0]" ; 74 | } 75 | 76 | } 77 | } 78 | --------------------------------------------------------------------------------