slavniyteo / one-line

One line property drawer for Unity3d
MIT License
146 stars 12 forks source link
property-drawer unity upm

Overview

OneLine provides a simple way to organize your databases without writing dozens of boilerplate code. It draws objects in Inspector into one line instead default line-by-line style. Also it provides a few features like field highlightning, locking array size, etc...

Read about OneLine on habr: 1, 2 (ru).

Full Reference is here.

Unity Asset Store GitHub release GitHub Release Date Github commits (since latest release) GitHub last commit

News

TL;DR

Overview

Code of the screenshot above is here.

Installation

Versions prior v0.5.0 are available at Unity Asset Store.

Since v0.5.0 One Line is managed via Unity Package Manager.

To add OneLine to your Unity project, add following dependency to your manifest.json as described here and here. Use master or any version above v0.5.0 (including) because v0.4.0 and previous versions are not compatible with Unity Package Manager.

{
  "dependencies": {
    "st.rect-ex": "https://github.com/slavniyteo/rect-ex.git#master",
    "st.one-line": "https://github.com/slavniyteo/one-line.git#master"
  }
}

To be able to run tests add these lines (actually OneLine doesn't have any tests but RectEx has):

{
  "dependencies": {
    "st.rect-ex": "https://github.com/slavniyteo/rect-ex.git#master",
    "st.one-line": "https://github.com/slavniyteo/one-line.git#master"
  },
  "testables": [
    "st.rect-ex",
    "st.one-line"
  ]
}

Edit OneLine Project

Added on request 39.

When you add OneLine via UPM as described above, it becomes readonly. To be able to edit OneLine, you should add it to project as local dependency:

  1. Clone repository to local directory:
git clone https://github.com/slavniyteo/one-line /home/user/projects/one-line
  1. In your working project add dependency to cloned OneLine:
{
  "dependencies": {
    "st.rect-ex": "https://github.com/slavniyteo/rect-ex.git#master",
    "st.one-line": "file:/home/user/projects/one-line"
  }
}

On Windows:

{
  "dependencies": {
    "st.rect-ex": "https://github.com/slavniyteo/rect-ex.git#master",
    "st.one-line": "file:D:/projects/one-line"
  }
}

Note that RectEx is git dependency.

It's all. OneLine becomes editable at InspectorWindow when your working project is open. Besides you can edit scripts of OneLine and they'll be compiled with our project.