Forum rules - please read before posting.

Crafting/Ingredients: slot grid size error

Unity 2019.4.0f1/ AC v1.71.5

Hi everyone,

I've been working on my first 2D game for about a month now, currently having a go at crafting.
When increasing the Number of slots to 6 and Grid size to 3, I'm getting an IndexOutOfRangeException error:

image
image

I hope it's an easy fix. Please advise. Thank you.

Comments

  • Recreated, thanks for the details.

    Open up MenuCrafting, and find the line around 450:

    if (textEffects != TextEffects.None)
    

    Immediately above it, insert:

    if (_slot >= labels.Length) return;
    

    Does that resolve the issue?

  • Spot on. Issue resolved. Thanks, Chris! :smiley:

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.