All Projects → rotorz → Unity3d Reorderable List

rotorz / Unity3d Reorderable List

Licence: mit
List control for Unity allowing editor developers to add reorderable list controls to their GUIs.

Labels

Projects that are alternatives of or similar to Unity3d Reorderable List

Rcam
Real time volumetric video capture for live visuals
Stars: ✭ 128 (-8.57%)
Mutual labels:  unity3d
Meshapiexamples 2020.1
Example project for Unity 2020.1 Mesh API improvements
Stars: ✭ 133 (-5%)
Mutual labels:  unity3d
Unitylauncher
Unity Version Launcher
Stars: ✭ 137 (-2.14%)
Mutual labels:  unity3d
Il2cppassemblyunhollower
A tool to generate Managed->IL2CPP proxy assemblies
Stars: ✭ 126 (-10%)
Mutual labels:  unity3d
Customsrp
Many mini-custom-SRPs showing how to achieve different things when creating your own SRP. Only SRP Core package is needed.
Stars: ✭ 132 (-5.71%)
Mutual labels:  unity3d
Pesocket
A C# Network Library.
Stars: ✭ 134 (-4.29%)
Mutual labels:  unity3d
Volumetriclinesunity
Source of the Volumetric Lines Asset from Unity's Asset Store
Stars: ✭ 125 (-10.71%)
Mutual labels:  unity3d
Kinostreak
Anamorphic lens flare effect for Unity
Stars: ✭ 139 (-0.71%)
Mutual labels:  unity3d
Unium
Automation for Unity games
Stars: ✭ 132 (-5.71%)
Mutual labels:  unity3d
Eazy Sound Manager
Eazy Sound Manager is a simple Unity3D tool which aims to make sound and music management in games easier
Stars: ✭ 135 (-3.57%)
Mutual labels:  unity3d
Cubeworld
Minecraft like game made in Unity
Stars: ✭ 130 (-7.14%)
Mutual labels:  unity3d
Vralchemylab
VR Demo project using HDRP and unity 2019.3
Stars: ✭ 132 (-5.71%)
Mutual labels:  unity3d
Unity Webxr Export
Develop and export WebXR experiences using Unity WebGL
Stars: ✭ 130 (-7.14%)
Mutual labels:  unity3d
Unity Linesegmentsintersection
Line segments intersection for Unity.
Stars: ✭ 128 (-8.57%)
Mutual labels:  unity3d
Colorbands
Unity 3D's Gradient is a handy data type but comes with some limitations: for example you cannot set more than 8 color keys in its editor and RGB is the only color space available. ColorBand data type offers an alternative with less limitations. Creating ColorBands is fun and easy; they are stored as assets and can be accessed from code through an Evaluate method to get the color at time t, as for Gradient. RGB (or HSV) values are described by individual curves, allowing a better control over how the color function evolves between your points. Color bands are used in all kinds of applications including games, data visualization and other fields.
Stars: ✭ 137 (-2.14%)
Mutual labels:  unity3d
Gitdependencyresolverforunity
This plugin resolves git url dependencies in the package for Unity Package Manager. You can use a git url as a package dependency!
Stars: ✭ 126 (-10%)
Mutual labels:  unity3d
Textureupdateexample
An example showing how to update textures from a native plugin in Unity.
Stars: ✭ 133 (-5%)
Mutual labels:  unity3d
Tfclassify Unity
An example of using Tensorflow with Unity for image classification and object detection.
Stars: ✭ 140 (+0%)
Mutual labels:  unity3d
Gameframework demo
基于Unity3D框架Game Framework( http://gameframework.cn )的教程和实例,对应教程:http://www.benmutou.com/archives/category/unity3d/game-framework
Stars: ✭ 138 (-1.43%)
Mutual labels:  unity3d
Ml Agents
Unity Machine Learning Agents Toolkit
Stars: ✭ 12,134 (+8567.14%)
Mutual labels:  unity3d

unity3d-reorderable-list

List control for Unity allowing editor developers to add reorderable list controls to their GUIs. Supports generic lists and serialized property arrays, though additional collection types can be supported by implementing Rotorz.Games.Collections.IReorderableListAdaptor.

$ yarn add rotorz/unity3d-reorderable-list

This package is compatible with the unity3d-package-syncer tool. Refer to the tools' README for information on syncing packages into a Unity project.

screenshot

Features

  • Drag and drop reordering!
  • Automatically scrolls if inside a scroll view whilst reordering.
  • Easily customized using flags.
  • Adaptors for IList<T> and SerializedProperty.
  • Subscribe to add/remove item events.
  • Supports mixed item heights.
  • Disable drag and/or removal on per-item basis.
  • Drop insertion (for use with UnityEditor.DragAndDrop).
  • Styles can be overridden on per-list basis if desired.
  • Subclass list control to override context menu.
  • Add drop-down to add menu (or instead of add menu).
  • Helper functionality to build element adder menus.

Preview (showing drop insertion feature)

preview

Installation

The unity3d-reorderable-list library is designed to be installed into Unity projects using the npm package manager and then synchronized into the "Assets" directory using the unity3d-package-syncer utility. For more information regarding this workflow refer to the unity3d-package-syncer repository.

Alternatively you can download the contents of this repository and add directly into your project, but you would also need to download the sources of other packages that this package is dependant upon. Refer to the packages.json file to see these.

A couple of examples!

Serialized array of strings

private SerializedProperty wishlistProperty;
private SerializedProperty pointsProperty;

private void OnEnable()
{
    this.wishlistProperty = this.serializedObject.FindProperty("wishlist");
    this.pointsProperty = this.serializedObject.FindProperty("points");
}

public override void OnInspectorGUI()
{
    this.serializedObject.Update();

    ReorderableListGUI.Title("Wishlist");
    ReorderableListGUI.ListField(this.wishlistProperty);

    ReorderableListGUI.Title("Points");
    ReorderableListGUI.ListField(this.pointsProperty, ReorderableListFlags.ShowIndices);

    this.serializedObject.ApplyModifiedProperties();
}

List of strings

private List<string> yourList = new List<string>();

private void OnGUI()
{
    ReorderableListGUI.ListField(this.yourList, this.CustomListItem, this.DrawEmpty);
}

private string CustomListItem(Rect position, string itemValue)
{
    // Text fields do not like null values!
    if (itemValue == null) {
        itemValue = "";
    }
    return EditorGUI.TextField(position, itemValue);
}

private void DrawEmpty()
{
    GUILayout.Label("No items in list.", EditorStyles.miniLabel);
}

More examples

Refer to the docs/examples directory of this repository for further examples!

Contribution Agreement

This project is licensed under the MIT license (see LICENSE). To be in the best position to enforce these licenses the copyright status of this project needs to be as simple as possible. To achieve this the following terms and conditions must be met:

  • All contributed content (including but not limited to source code, text, image, videos, bug reports, suggestions, ideas, etc.) must be the contributors own work.

  • The contributor disclaims all copyright and accepts that their contributed content will be released to the public domain.

  • The act of submitting a contribution indicates that the contributor agrees with this agreement. This includes (but is not limited to) pull requests, issues, tickets, e-mails, newsgroups, blogs, forums, etc.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].