Skip to content

Instantly share code, notes, and snippets.

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