Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #68 from techno-dwarf-works/dev
Browse files Browse the repository at this point in the history
Fix GetAllInheritedTypes
  • Loading branch information
uurha authored Mar 3, 2024
2 parents bf3aec5 + 5eaadbb commit d7d8c85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public static IEnumerable<Type> GetAllInheritedTypes(this Type self)

return AppDomain.CurrentDomain.GetAssemblies()
.SelectMany(assembly => assembly.GetTypes())
.Where(type => type.IsSubclassOf(self));
.Where(type => self.IsAssignableFrom(type) && (type.IsClass || type.IsValueType) && !type.IsAbstract);
}

public static IEnumerable<Type> GetAllInheritedTypes(this Type self, params Type[] excludes)
Expand Down
2 changes: 1 addition & 1 deletion Assets/BetterExtensions/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.uurha.betterextensions",
"displayName": "Better Extensions",
"version": "1.5.93",
"version": "1.5.94",
"unity": "2021.3",
"description": "Unity extensions, serialize extension, async extension, string extension and UI extensions",
"dependencies": {
Expand Down

0 comments on commit d7d8c85

Please sign in to comment.