Giter VIP home page Giter VIP logo

chestofpropertydrawers's Introduction

A collection of open-source Unity3D property drawers

http://blogs.unity3d.com/2012/09/07/property-drawers-in-unity-4/ http://docs.unity3d.com/Documentation/ScriptReference/PropertyDrawer.html

Property drawers are a new feature in Unity 4 to help you make custom inspectors without writing editor code. By just adding attributes to your behaviour's fields, you can turn the left image into the right:

Drawers before and after

Each directory contains one drawer, and some documentation.

##Installation

Download the zip from the ZIP button above, expand into your Assets directory.

##More Drawers

Got an idea for a drawer? No time? Suggest it in the issues page! https://github.com/tenpn/ChestOfPropertyDrawers/issues

###Pull Requests

Pull requests more than welcome, but new drawers must be grainular enough to be of use to multiple projects.

New pull requests should be in this format:

AttributeName
 |- Editor
     |- PropertyDrawer.cs
 |- Attribute.cs
 |- ExampleUsage.cs
 |- readme.md

If you can embed pictures in your readmes, all the better.

##Other Stuff

Partially-inspired by this Japanese(?) repro: https://github.com/anchan828/property-drawer-collection

For licensing, see license file

chestofpropertydrawers's People

Contributors

tenpn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chestofpropertydrawers's Issues

Idea: min/max attributes

To complement Range, but when you don't care about one bound:

[NotLessThan(1)]
public int m_startingLevel;

[NotGreaterThan(0f)]
public float m_debt;

Idea: Slider that snaps to certain values

Something that looks like this

[Range(1f, 10f, 0.5f)]
float values;

Where 1f is the minimum, 10f is the maximum and 0.5f is the step.

It would output a slider that can selects values such as 1, 1.5, 2, 2.5 ... 5.5 ... 9.5, 10, etc.

Congrats on the great idea of creating this repo btw ๐Ÿ‘

Deploy to asset store

For free, for easy addition to any project. And to hinder anyone trying to package this stuff as free.

Idea: label rewriter

Override the default label (maybe every drawer should provide this?):

[CustomLabel("Distance (m)", "Distance in meters to target")]
public float m_distance;

Maybe a secondary option that just adds a tooltip?

[CustomTooltip("Distance in meters to target")]
public float m_distance;

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.