Feature Request - Choose ingredient collections for crafting

Beor Games

New member
Hey there!

I wrote on Discord already that I need to prevent the crafting system from using equipped items. That's because now, if I end up using an equipped items as a material it gets destroyed and the new item isn't awarded to the players.

It would be great if we could choose which collections the crafter can select items.


Staff member
So this was a bit more complicated than I thought it would be.

It required me to change the SimpleCraftingProcessor and the ItemCollectionGroup script. You can find the scripts attached.
So now you can define your ItemCollections here. (if empty it will use the entire inventory like it does now)

Also, the UI doesn't know about the amount that can be crafted. So you'll need to make sure your prefab for your Ingredient ItemView, has an ItemViewModule to compare the amounts with a list of ItemCollections that matches to one from the crafter:
I hope that helps, I haven't tested it thouroughly, so if you find any bugs do let me know


  • ItemCollectionGroup.cs
    30 KB · Views: 2
  • SimpleCraftingProcessor.cs
    27.1 KB · Views: 2

Beor Games

New member
Hey thanks for working on this! I'm sorry to cause more trouble :X

Right from the start when I switched the script I got the following error:


So I commented that line and moved forward.

I set up the Crafter with the inventory

And prepared the ingredient view with the requirements, but I get this error at the bottom if I try to modify the quantity I can craft. It lets me raise from 1 to 2, but won't craft the items.


Staff member
I guess I must have added ListSlice<T>.Empty more recently than I thought.

You can remplace it by
new ListSlice<ItemInfo>();

And could you also replace the 47-51 by
 protected List<ItemCollection> m_ItemCollections = new List<ItemCollection>();
 protected List<ItemCollection> m_IgnoreCollections = new List<ItemCollection>();
 protected List<ItemStack> m_AllItemStacks = new List<ItemStack>();
 protected List<ItemInfo> m_AllItemInfos = new List<ItemInfo>();

That should prevent getting a null reference.