Crafting acceptable on click

Vahalla

Member
So I have almost all the ui working, on the crafting part how do I get it to accept and create the item, I have a recipe, if I add more then one the items go red, thing is when I accept the craft it does not produce the new item
 
I'm not sure I understand your question.

You are using the default Crafting Menu or a custom one you made?
The default one allows you to select the crafting recipe you wish to craft. Then you can choose the amount you wish to craft. The UI shows the amount of ingredients you'll need. If any amount becomes red it is because you do not have enough ingredient to craft that amount. So if you press craft while the ingridient amount are red nothing will happen.

Try out the demo scene to see how it behaves.
 
Yes I did all the steps to create it from my data base, when you click the craft button that has the quantity it does not make the item
 
I assume you've seen this video tutorial and read the documentation

Do you get any warnings/errors? Are you using any Item Restrictions on your Inventory?
Does it work like you expect in the demo scene?

You'll need to give me more information about how you've set things up, from what you've told me so far I can't really guess what the issue could be. Send me some screenshots or a video of your recipe in the database with the ingredients and result and of the UI when you craft the item at runtime
 
I see I went into the crafting part on the inventory manager and set a recipe, when I go to the crafting station which I copy and pasted from the demo scene, just for learning the setup, I then went under the crafting menu, and the script and set the inventory to my character, everything is the same, under the crafter script I set my recipe under the crafting categories, and checked remove ingredients external, set the currency owner to my character and added the appropriate coin base, all the other things I kept the same, I think what I’m asking is under the quantity picker panel, accept cancel, the cancel closes correct, the accept closes with out creating the item to the inventory, when your on the confirm button there is an on click event Method, is there something that has to be placed there for the item to be crafted, everything else seems to be good other then when I accept to craft the item
 
I'm not sure what your issue is.

Do the ingredients get consumed when you press Craft? or does nothing happen at all?

I'd really recommend you send me a recording showcasing your issue.

My best advice would be to open the demo scene and your scene side by side and compare the setup and recipes.
 
In that case my guess is that something is preventing the Craft function. There is function that is called "CanCraft" which checks if the item can be crafted, if it can't the button should be disabled. Are you sure your character has enough ingredients and currency to craft the item?

It would really help if you sent me a recoding or screenshot so I could be sure that's the case.
 
Ah... I'm sorry that field is called: "m_RemoveIngredientsExternally", most likely the "Externally" part must have been hidden in your inspector.
I'll change the name to "m_ExternallyRemoveIngredients" that should make it more clear that it should be off. That option was used to allow other systems to decide how the ingredients are removed, using an event with a call back
 
Top