Forum begins after the advertisement:


[Part 7] Map problem

Viewing 11 posts - 61 through 71 (of 71 total)
  • Author
    Posts
  • #15816
    MI NI
    Participant
    Helpful?
    Up
    0
    ::

    This has successfully fixed the problem of being unable to open ESC, inventory, and maps in new games. However, the problem that the Button cannot be triggered on the first map still exists, but the ESC and inventory buttons in other maps can still be used normally.

    #15817
    Joseph Tang
    Moderator
    Helpful?
    Up
    0
    ::

    Do you have any red console errors appearing when you start the first map?

    #15818
    MI NI
    Participant
    Helpful?
    Up
    0
    ::

    No, there will be no red error when starting a new game or entering the first map directly.

    #15819
    Joseph Tang
    Moderator
    Helpful?
    Up
    0
    ::

    Can you first test if your GameManager.cs is able to sense that your inputs are being pressed by creating print messages through an if statement for the button inputs?

        private void Update()
        {
            if (Input.GetButtonDown("Map") || Input.GetKeyDown(KeyCode.Escape) || Input.GetButtonDown("Inventory"))
            {
                print("Input works")
            }
        }

    If input doesn’t work, something is wrong with your inputs, or your GameManager encountered an issue in Awake().


    If the input is not detected, add a print message to see if everything is loaded in Awake() of GameManager.cs

        private void Awake()
        {
            SaveData.Instance.Initialize();
    
            if(Instance != null && Instance != this)
            {
                Destroy(gameObject);
            }
            else
            {
                Instance = this;
            }
    
            
    
            DontDestroyOnLoad(gameObject);
    
            SaveData.Instance.LoadSceneData();
    
            SaveScene();
    
            SaveData.Instance.LoadMapData();
    
            savePoint = FindObjectOfType();
            print("Loaded everything");
        }
    #15820
    MI NI
    Participant
    Helpful?
    Up
    0
    ::

    Yes, they can detect input, but they still can’t click the button to pause the page or view the inventory content.

    #15821
    Joseph Tang
    Moderator
    Helpful?
    Up
    0
    ::

    Have you checked if you removed the raycast target from your Scene Fader just in case?

    #15822
    MI NI
    Participant
    Helpful?
    Up
    0
    ::

    My Scene Fader has raycast target checked

    #15824
    Terence
    Keymaster
    Helpful?
    Up
    0
    ::

    Does it fix the issue if you uncheck Raycast Target on Scene Fader?

    #15825
    MI NI
    Participant
    Helpful?
    Up
    0
    ::

    No, it doesn’t solve the problem

    #15826
    Joseph Tang
    Moderator
    Helpful?
    Up
    0
    ::

    In FadeUi.cs, can you try finding the codes that set canvasGroup.blocksRaycasts and comment them out?

    Following that, try setting your “Raycast Target” to false for your scene fader.


    When you test out pressing the button and you are unable to.

    *Do Not Restart* but instead looking through the canvas elements and deactivating any of them by settting those game objects inactive.

    You should do this to find if any one game object is causing the issue, or if the issue is primarily the buttons.

    #15827
    MI NI
    Participant
    Helpful?
    Up
    1
    ::

    If I comment out canvasGroup.blocksRaycasts, the start menu will not work. Thanks for your tips, I found the error problem. I unchecked the Raycast Target in the UI image in my dialogue function and it worked normally. Sorry for the inconvenience.

Viewing 11 posts - 61 through 71 (of 71 total)
  • You must be logged in to reply to this topic.

Go to Login Page →


Advertisement below: