Search Unity

Accessing gameObject from another scene?

Discussion in 'Editor & General Support' started by DieMTi, Dec 5, 2020.

  1. DieMTi

    DieMTi

    Joined:
    Dec 5, 2020
    Posts:
    5
    Hello, so I have a problem. I have 2 different scenes, one is the main menu scene and the other is the game scene. The menu scene has a second canvas that opens the Campaign menu, and I'm trying to make it so that when I press "Back to menu" button at the end of the game scene it leads me to the campaign menu.The issue is, no matter what I do, when I press the button it leads me to the main menu. I've tried static variables and donotdestroy in order to make a script that opens the Campaign menu instead of the main menu, but it doesn't work, Any help would be appreciated.
     
    Last edited: Dec 5, 2020