AwesomeRunner/Assets/Scripts/Editor/ReflectionExtentions.cs
2022-09-12 22:23:18 +03:00

17 lines
338 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public static class ReflectionExtentions
{
public static IEnumerable<Type> GetClassHierarchy(this Type type)
{
while (type != null)
{
yield return type;
type = type.BaseType;
}
}
}