#Pause MEnu Problem
1 messages · Page 1 of 1 (latest)
let me send the video
@rare cedar here is the problem+video
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
And how are the buttons set up?
see the corners
When and where are you hiding the cursor
in the video u can see everything brother
in the code
no i didnt hide it anyone
I'm not going to try to follow code from a video, just copy paste the snippet
i pasted it already
The code you posted does not show you hiding the cursor
brother when i click to the button anything doesnt happens
But currently my guess is that you need to explicitly display the cursor whenever you pause
this is the probelm
Pressing esc iirc brings the cursor back by default, but is immediately hidden again when you click
leave the topic of cursour
if you know so well where the problem lies, then you can fix it yourself ¯_(ツ)_/¯
just understand that if i click on the the pause menu button the button doesnt works after the code is also right
then why i am here brothere
Let's be very clear here.
- I am not your brother, please do not address me as such, thank you.
- 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.
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
And I'm asking you to not refer to me as such
ok then why are u not understanding the issue
or u dont know it
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.
ok its my fault i came here no problem