#Pause MEnu Problem

1 messages · Page 1 of 1 (latest)

rare cedar
#

Way too little information, at the very least the code is required. Some more context wouldn't hurt either.

azure river
rare cedar
#

at the very least the code is required.

azure river
# rare cedar > at the very least the code is required.

using System.Collections;
using System.Collections.Generic;
using System.IO;
using TMPro.Examples;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.SceneManagement;

public class PauseMenu : MonoBehaviour
{
public static bool GameIsPaused = false;
public GameObject pauseMenuUI;

// Update is called once per frame
void Update()
{
    if(Input.GetKeyDown(KeyCode.Escape))
    {
        if(GameIsPaused)
        {
            Resume();
        }
        else
        {
            Pause();
        }
    }
}
public void Resume()
{
    pauseMenuUI.SetActive(false);
    Time.timeScale = 1f;
    GameIsPaused = false;


}
void Pause()
{
    pauseMenuUI.SetActive(true);
    Time.timeScale = 0f;
    GameIsPaused = true;

}
public void Loadmenu()
{
    Time.timeScale = 1f;
    SceneManager.LoadScene("Menu");
    
}

}
take this this is the code

rare cedar
#

And how are the buttons set up?

azure river
#

see the corners

azure river
rare cedar
#

When and where are you hiding the cursor

azure river
#

in the video u can see everything brother

rare cedar
#

in the code

azure river
azure river
rare cedar
#

I'm not going to try to follow code from a video, just copy paste the snippet

azure river
#

i pasted it already

rare cedar
#

The code you posted does not show you hiding the cursor

azure river
#

brother when i click to the button anything doesnt happens

rare cedar
#

But currently my guess is that you need to explicitly display the cursor whenever you pause

azure river
rare cedar
azure river
#

leave the topic of cursour

rare cedar
#

if you know so well where the problem lies, then you can fix it yourself ¯_(ツ)_/¯

azure river
#

just understand that if i click on the the pause menu button the button doesnt works after the code is also right

rare cedar
#

Let's be very clear here.

  1. I am not your brother, please do not address me as such, thank you.
  2. I gave a suggestion as to what could be the cause of your issue, if you then immediately want to dismiss it as that not being the cause. That's up to you, but I'm not going to put more time in helping in that case. I have more important things to do.
azure river
#

are u really a admin in such a big server

#

and not have a sense to talk

#

the brother is just a greeting type in indian culture

#

we call everybody brother to give them respect

rare cedar
#

And I'm asking you to not refer to me as such

azure river
#

or u dont know it

rare cedar
#

Because I am, and I made a suggestion that I believe could be related to your issue. If you don't agree that's fine, but in that case I am out of ideas, and I have no further help to give.

azure river
#

ok its my fault i came here no problem