Forum begins after the advertisement:


[Part 5] All values are still 0 for Slot Indexes

Home Forums Video Game Tutorial Series Creating a Farming RPG in Unity [Part 5] All values are still 0 for Slot Indexes

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #11565
    Jonathan Teo
    Level 18
    Moderator
    Helpful?
    Up
    0
    ::

    Problem: All values are still 0 for Slot Indexes If the values are 0 in the inspector when the game isn’t running, but update once the game runs, it is working as intended, since the functions that update the slot indexes only work at runtime.

    Check that you have assigned the right toolSlots and itemSlots values in the inspector of UIManager. Make sure that the AssignSlotIndexes() function in UIManager is correct as well.

    #11775
    Ondra Dwi Putra Adi Setyo
    Level 1
    Participant
    Helpful?
    Up
    0
    ::

    Wait, so the indexes are only changing its values only when the game runs? Not when isn’t running?

    #11804
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    Yup, that is what Jonathan is saying. You can update it when it isn’t running as well, but it will be overwritten by updates when the game is running.

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

Go to Login Page →


Advertisement below: