find all scripts that inherit from one interface oder one abstract class

hello. I have a question, that seems not to exist on internet yet.


What i am trying to do:
i am creating a gameobject component, that adds addtional function or subtructs existing one. Every added function exteds the component in the inspector, because every added function has intensity variable. Selection of the function, that will be added, works over the gameobject component’s dropdown.
So creating of the custom editor is not a problem to me.
However the functions, that i want to add, are made with the strategy design pattern. That means, that every function inherits from an abstract class or an interface. This way i can easily add a new behavior or delete not functioning one.


So here is my question:
How can i find all the concrete public classes of functions that inherit from 1 abstract class (or 1 interface) and add tham to a list of references during the run time.


=> this way i want to avoid to do it myself manually every time i create or delete new function script or gameobject’s script that uses all this functions.

thank you for your help.

so maybe it works using the “resources” folder, but i couldn’t find how to do it with scripts and not with assets. So i decided to create script, that i call “librarian”. Inside the script i reference all the scripts that inherit from one script (abstract or interface). If i create a new script, i have to add the reference of it to the list of the librarian.
With it, if i want toget all the scripts during the run time, i get the librarian first, load his list, and then shoose one item from the list and work with it. This is a work around, as i have to make for every type of script one librarian, and i have to hard code the reference to the librarian’s list every time i create or delete one script. Well, atleast it works.
Still, if there exists one direct aproach that lets you search through an asset’s folder to find all the scripts of one type, i would be happy to hear about it.