Unity Tips Tricks by HardcodedNumber - 1


Helpful Unity Editor Tips and Tricks

Unknown VersionUnknown LicenseUpdated 338 days agoCreated on March 3rd, 2019
Go to source

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



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

using Source.Runtime.Core;

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.


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.


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

Show all projects by HardcodedNumber