Skip to content

Instantly share code, notes, and snippets.

@bibbis
bibbis / AnimationCallback.cs
Last active October 26, 2023 16:37
Callback intended for animation Events in Unity editor animations
/// <summary> Callback intended for animation Events in Unity editor animations </summary>
public void AnimationCallback(string callback)
{
switch (callback)
{
case "Example":
break;
default:
throw new ArgumentOutOfRangeException("Unhandled case: " + callback);
@bibbis
bibbis / UnityEditorTemplate.cs
Last active October 9, 2023 09:55
Unity Editor template where main class and editor class are both placed inside same file.
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
[System.Serializable]
public class ClassName
{
public int Property1;