Giter Club home page Giter Club logo

one-line's Introduction

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

  • 2019.08.20: Added how to build instruction here on request 39.

  • 2019.08.08: v0.5.0 released! Added UPM Support.

  • 2019.01.15: v0.4.0 released!

  • 2018.03.01: v0.3.0 released!

  • 2018.02.27: Added [Expandable] attribute. See full documentation and #22

  • 2018.02.26: Added custom property drawers support.
    Now any custom drawer, which returns height < 20, is drown. Acceptable for custom drawers of either types or attributes.

  • 2018.02.18: Available on the Asset Store for free.

TL;DR

  • After importing look at Documentation~/Examples/Overview/Overview.asset (see the screenshot below) and open it in InspectorWindow. It'll show you all capabilities of the library;
  • In your code, add using OneLine; and [OneLine] to fields you want to draw into one line. Note that internal fields don't need [OneLine]: they are processed automatically;
  • IToo customize onelined fields, use Width, Weight, HideLabel, Highlight, HideButtons and ArrayLength attributes (see Example.asset);
  • Use Separator attribute to separate different fields;
  • Use Expandable attribute to follow object references (real street magic is here) (idea is stolen from here;
  • OneLine uses RectEx, so feel free to try it.
  • Compatible with either .Net 2.0 or .Net 4.5 backends.

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.

one-line's People

Contributors

slavniyteo avatar raslab avatar d4160 avatar gspidy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.