Hi Support,
I've run into an issue where GetGame().FindEntity() doesn't seem to work on entities that are outside of the layer that the script is called.
This script is being called from a component on a entity that has a SlotManagerComponent.
I have found that it does work if the item is a new/modded prefab, not an overwritten or existing prefab.
Here is what I'm finding..
static TEF_CentralLootEconomyManager GetInstance() { SCR_CentralEconomy centralEconomy = SCR_CentralEconomy.Cast(GetGame().FindEntity("SCR_CentralEconomy")); Print(centralEconomy); if(centralEconomy) return TEF_CentralLootEconomyManager.Cast(centralEconomy.FindComponent(TEF_CentralLootEconomyManager)); else return null; }
Which returns...
SCR_CentralEconomy centralEconomy = NULL
On entities outside of the layer that my SCR_CentralEconomy entity is within.
If you need anymore information, please let me know.
Thanks,
Fox