Question by
LW · Nov 22, 2016 at 09:03 PM ·
assetmonoscriptuser generated content
Is there a quick and dirty way to get a list/array of user MonoScripts in a project?
Hi All,
I'm wondering if Unity has provided a way to get a list of the user generated script files within a project?
Thanks,
Comment
Best Answer
Answer by LW · Nov 22, 2016 at 10:29 PM
Couldn't find a Unity approach so here's what I'm doing:
List<Type> types = new List<Type>();
foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
{
foreach (Type type in assembly.GetExportedTypes())
{
if (type.IsSubclassOf(typeof(baseOfTypeImLookingFor)))
{
types.Add(type);
}
}
}
Hope this can help someone down the road!
Your answer
Follow this Question
Related Questions
After Unity update, Reimporting Assets takes ages. 2 Answers
Unity assets in a non-unity project 1 Answer
CS0030 Cannot convert type 'UnityEngine,Networking.PlayerController' to 'PlayerController' 1 Answer
Unity will be closed immediately. 0 Answers
Load Assets into Unity without Asset Bundle at Runtime 0 Answers