Forum begins after the advertisement:


[Part 5] Mana Image with prefab

Home Forums Video Game Tutorial Series Creating a Metroidvania in Unity [Part 5] Mana Image with prefab

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #12119
    Aka
    Level 4
    Former Patron
    Helpful?
    Up
    0
    ::

    If you put your player in prefab, then there is a bug “Type mismatch” with the image of Mana Storage remaining on none. The problem generates a bug when changing scenes.

    NullReferenceException: PlayerController.set_mana PlayerController.Heal () PlayerController.update ()

    You can try to unpack and repack the prefabs so that the mana is taken into account in the prefab, which no longer generates a bug when changing scenes, but this breaks the operation of the mana UI which always remains at max.

    I haven’t found the solution yet.

    #12120
    Aka
    Level 4
    Former Patron
    Helpful?
    Up
    0
    ::

    Ok, sorry, I didn’t go far enough in the tutorial. Just make a singleton with the UI.

    Sorry for the topic and thank you for your tutorials, you are bosses.

    -> UIManagerScript

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

    No problem Aka, glad you managed to fix your issue.

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: