Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Button on.click and change of scene

Discussion in 'Immediate Mode GUI (IMGUI)' started by berenicedecasteja, Jan 16, 2018.

  1. berenicedecasteja

    berenicedecasteja

    Joined:
    Nov 29, 2015
    Posts:
    5
    Hello everyone!

    I'm struggling with a small problem...
    I have a flower on a scene, each petal is a button that brings you to another scene.
    There is 11 petals, for each on a button for another scene.
    To make the interaction better I would like that when you click on a petal a sprite is active( appear) on the petal so that when you come back to the scene( with the whole flower) you know on which petal you already clicked on!

    I tried using GameObject Set.Active, it works so when I click on petal one the sprites appear, but then after playing on the scene in the petal and comes back to the whole flowers the sprite is not here anymore ....I really do not understand, i guess it's linked to the change of scene...

    Thanks for your help !