public void PlayCardChest()
{
Debug.Log("Open Chest");
GameObject itemGO = new GameObject();
ItemCollector newItemCollector = itemGO.AddComponent<ItemCollector>();
newItemCollector.settings.collectionType = ItemCollectorType.Box;
newItemCollector.settings.useLoot = true;
newItemCollector.settings.loot.SetAsset(ORK.Combatants.loot.loot[1]);
newItemCollector.StartInteraction(itemGO);
}
This generates a gameobject with a configured ItemCollector component, but StartInteraction() does nothing. No information in the debug console as to why nothing is happening. If I copy the generated gameobject into the scene and change the start setting to Auto->Start, and then press Play, the component will correctly display the item box for collection.It looks like you're new here. If you want to get involved, click one of these buttons!
Instead of using StartInteraction function, set it up to auto start and it should start on it's own:
newItemCollector.startSettings.autoStartSetting.isStart = true;
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Please note I tried this before asking for help and it did not work: