Just download the script and put it in a "Editor" folder.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Written by @cortvi | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SmartAnimator : UnityEngine.Object | |
{ | |
#region DATA | |
public Animator Animator { get; private set; } | |
private Dictionary<string, Param<float>> floats; | |
private Dictionary<string, Param<bool>> bools; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Created by @cortvi | |
/// adapted code from: | |
/// https://stackoverflow.com/questions/28167873/custom-generic-setflag-unsetflag-extension-methods | |
using System; | |
using System.Globalization; | |
public static class Extension | |
{ | |
/// <summary> | |
/// Usage: "if ( someEnum.HasFlag (someEnumFlag) ) {..}" |
Extended from this article