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!
Generate a button in a MonoBehaviour or ScriptableObject
Simply add the following attribute to any non-parameterized method.
using Source.Runtime.Core;
[Button]
private void CreatePlayer()
{
}
Are you tired of people forgetting to set a field? Now make it obvious!
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;
}
In the Project window, copy the full directory path to the clipboard.
Project Window, right click any asset or folder under the Assets folder.