Skip to content

Instantly share code, notes, and snippets.

@tedliou
Last active June 18, 2021 12:58
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public static partial class Extension
{
public static List<T> FindInterfacesOfType<T>(this GameObject _)
{
return Object.FindObjectsOfType<MonoBehaviour>().OfType<T>().ToList();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment