Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/martinhodler/unity-productivity-tools

Extends the Unity Editor with simple productivity tools like an easy way to serialize SceneAssets in your component, grouping GameObjects in the scene and more.
https://github.com/martinhodler/unity-productivity-tools

editor extension productivity productivity-tools unity

Last synced: 4 months ago
JSON representation

Extends the Unity Editor with simple productivity tools like an easy way to serialize SceneAssets in your component, grouping GameObjects in the scene and more.

Awesome Lists containing this project

README

        

# Unity Productivity Tools
Extends the Unity Editor with simple productivity tools like an easy way to serialize SceneAssets in your component, grouping GameObjects in the scene and more.

- [Scene View / Hierarchy](#scene-view--hierarchy)
- [Grouping](#grouping)
- [Attributes](#attributes)
- [Button](#button)
- [Help](#help)
- [MinMaxRange](#minmaxrange)
- [NavMeshAreaMask](#navmeshareamask)
- [Scene](#scene)
- [Tag](#tag)

- [Install](#install)
- [License](#license)

## Scene View / Hierarchy
### Grouping
By selecting more than one GameObject in the Scene or in the Hierarchy you can group the selected objects by clicking on **Edit > Group** or by pressing Ctrl + G.

## Attributes
Unity allows you to use Attributes on your properties and fields. UPT extends the set of Attributes with these custom attributes:

### Button
`[Button (ButtonAvailability availability) ]`

Displays a button at the top of the inspector which invokes the assigned Method.
Methods with params will be displayed as a foldout.

Limited to methods.

**Example:**

```c#
[Button(ButtonAvailability.Play)]
private void MyTestMethod(int testValue)
{
...
}
```

### Help
`[Help (string message, MessageType type = MessageType.Info) ]`

Displays a HelpBox above any property.

**Example:**

```c#
[Help("Little description on how you should set this variable")]
public Vector3 spawnPosition;
````

### MinMaxRange
`[MinMaxRange (float min, float max, float stepSize = 1f) ]`

Displays the property as a slider with a min and max value to choose from.

Limited to `float`.

**Example:**

```c#
[MinMaxRange(0, 100, 1)]
public Vector2 spawnDelayRange;
```

### NavMeshAreaMask
`[NavMeshAreaMask]`

Displays the property as a Mask-Selection for NavMeshAreas similar to LayerMask for Layers.

Limited to `int`.

**Example:**

```c#
[NavMeshAreaMask]
public int walkableMask;
```

### Scene
`[Scene (inBuildCheck = true) ]`

Displays the property as a SceneAsset which allows to drag & drop or select Scenes from the project folder.

Limited to `string`.

**Example:**

```c#
[Scene]
public string menuScene;
```

### Tag
`[Tag]`

Displays the property as a dropdown with all the defined Tags.

Limited to `string`.

**Example:**

```c#
[Tag]
public string teamTag;
```

# Install
* In Unity open the Package Manager (`Window > Package Manager`).
* In the Package Manager click on the Plus-Icon in the top-left and select `Add package from git URL...`
* Enter the URL of this Repository (`https://github.com/martinhodler/unity-productivity-tools.git`) and press Enter

# License
See [LICENSE.md](LICENSE.md)