Skip to content
Helpful Unity Editor Tips and Tricks
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Assets
Packages
ProjectSettings
.gitignore
LICENSE
README.md

README.md

This repository is simply useful editor and runtime tips and tricks that have helped me along the way. Hopefully you find the stuff in here useful!

Unity Tips and Tricks

Inspector Buttons

Generate a button in a MonoBehaviour or ScriptableObject

Example

Usage

Simply add the following attribute to any non-parameterized method.

using Source.Runtime.Core;

[Button]
private void CreatePlayer()
{
    
}

Required Fields

Are you tired of people forgetting to set a field? Now make it obvious!

Example Example This is the first version of Required Fields. I want to later make it a complier error so it is self evident when something isn't working.

Usage

Simply add the following attribute to any class member that is public or SerializeField

using Source.Runtime.Core;

    public sealed class PlayerData : ScriptableObject
    {
        [SerializeField, RequiredField(RequiredFieldType.Mandatory)]
        private Player _player = null;
    }

Copy Full Path

In the Project window, copy the full directory path to the clipboard.

Usage

Project Window, right click any asset or folder under the Assets folder.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.