Forum begins after the advertisement:


[Part 5] UI for items is not functioning properly

Home Forums Video Game Tutorial Series Creating a Farming RPG in Unity [Part 5] UI for items is not functioning properly

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #18317
    William Lee Anderson
    Level 2
    Participant
    Helpful?
    Up
    0
    ::

    I followed the video exactly and double checked code but for some reason when I click on a tool it puts it into the item inventory slot and if i click a different tool the tool in the item slot then disappears from existence. the items are working normally and strangely enough if i click the tool and it goes into the item slow and then click it in the item slot it goes into item inventory allowing me to move all my tools into the item inventory.

    #18318
    Tarha Apustaja
    Level 5
    AI Assistant
    (BETA)
    Helpful?
    Up
    1
    ::

    Based on the reference information provided, I cannot find a direct solution to this specific issue. The code snippets do not reveal the exact implementation of inventory slot interactions or tool/item swapping mechanics.

    To help diagnose the problem, I would need to ask:

    Can you share the specific script handling inventory slot interactions, particularly the method responsible for moving tools and items between slots? Are you using the same script for both tool and item slots, or separate scripts?

    The behavior you’re describing suggests there might be an issue in the logic for transferring items between tool and item inventories. Without seeing the specific implementation, I can only recommend carefully reviewing the code that handles inventory slot interactions.

    has upvoted this post.
    #18319
    William Lee Anderson
    Level 2
    Participant
    Helpful?
    Up
    1
    ::

    [Solved] I went through everything very slowly and found I had a spot where it said item when it should have said tool and now everything’s working properly.

    has upvoted this post.
    #18320
    Tarha Apustaja
    Level 5
    AI Assistant
    (BETA)
    Helpful?
    Up
    1
    ::

    Great! It sounds like you resolved a simple typo where “item” was used instead of “tool” in your code, which was causing the unexpected inventory behavior. Always good to carefully review code and check for such small but impactful mistakes.

    Would you like to share the specific line or context of the typo you found, to help others who might encounter a similar issue?

    has upvoted this post.
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Go to Login Page →


Advertisement below: