Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/roboryantron/unityeditorjunkie
Editor scripts to make working with the Unity Editor better.
https://github.com/roboryantron/unityeditorjunkie
csharp unity
Last synced: 1 day ago
JSON representation
Editor scripts to make working with the Unity Editor better.
- Host: GitHub
- URL: https://github.com/roboryantron/unityeditorjunkie
- Owner: roboryantron
- License: mit
- Created: 2018-05-04T03:33:51.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-02-11T05:20:12.000Z (almost 3 years ago)
- Last Synced: 2024-10-11T10:09:35.913Z (2 months ago)
- Topics: csharp, unity
- Language: C#
- Homepage:
- Size: 72.3 KB
- Stars: 613
- Watchers: 30
- Forks: 47
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UnityEditorJunkie
Unity code that gets you that sweet editor scripting fix. Unity did a pretty good job building out a massive editor... but there are a few holes. Lets fill them one by one.## SearchableEnum
Use the SearchableEnumAttribute on an enum to get an improved enum selector popup. This has a text search box to filter the list, scrolls like a real scroll list, works with keyboard navigation, and focuses on the current selection when opening.Use it on something like Unity's KeyCode to be less likley to want to kill yourself when trying to pick something at the bottom of the list.
### Example
```csharp
public class SearchableEnumDemo : ScriptableObject
{
[SearchableEnum]
public KeyCode AwesomeKeyCode;
}
```
![popup image](https://user-images.githubusercontent.com/20144789/39614240-5e844c24-4f3c-11e8-998a-e0fbf969ddd4.gif)## SceneReference
Loading a scene in Unity normally requires a string name or index which can easily break. By using a SceneReference on your MonoBehaviour, you can hard reference a scene and get validation features.## QuickButtons
Draw buttons in the inspector without writing any editor code.### Example
```csharp
public class QuickButtonsDemo : MonoBehaviour
{
///
/// This draws a button in the inpsector that calls
/// OnDebugButtonClicked on click.
///
public QuickButton NameButton = new QuickButton("OnDebugButtonClicked");
///
/// This draws a button in the inpsector that invokes a
/// delegate on click.
///
public QuickButton DelegateButton = new QuickButton(input =>
{
QuickButtonsDemo demo = input as QuickButtonsDemo;
Debug.Log("Delegate Button Clicked on " + demo.gameObject.name);
});
private void OnDebugButtonClicked()
{
Debug.Log("Debug Button Clicked");
}
}
```
![popup image](https://user-images.githubusercontent.com/20144789/54331762-d71dcc80-45f1-11e9-930a-38823c9ebc2e.png)