Code: Select all
// For some reason, this will be null.
IronmanType = mod.GetCompiledType("DaggerfallWorkshop.Game.Mods.Ironman.Ironman");
// This will be null as well. IronmanGO is a GameObject with the Ironman Component
// that I need to access attached.
IronmanComponent = IronmanGO.GetComponent("DaggerfallWorkshop.Game.Mods.Ironman.Ironman");
Code: Select all
// This works and I can get data from the Component.
foreach (Component c in IronmanGO.GetComponents<Component>())
{
if (c.GetType().ToString() == "DaggerfallWorkshop.Game.Mods.Ironman.Ironman")
IronmanComponent = c;
}
Code: Select all
IronmanType = Type.GetType(IronmanComponent.GetType() + ", " + IronmanComponent.GetType().Assembly.GetName());