Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Calculator

0

89
Views
How can I solve the Unity GameObject Problem? Solved

When the Continue Ads gameobject is closed, the Game over button works, but when the Continue Ads is turned on, the Game over button does not work. I cannot understand why I make a mistake?

!Me fixed the problem, the problem is that I noticed that it is related to the continue ads dimension, thank you for your time.

enter image description here

void Update()
{
        if (Application.internetReachability == NetworkReachability.NotReachable)
        {
            //Debug.Log("No internet access");
            Destroy(GameObject.FindWithTag("ContinuePanel"));

        }
        else
        {
            //Debug.Log("internet connection");

            if (tag == "Skull")
            {
                ContinueAds();
            }
        }
}



public void ContinueAds()
{
    gameObject.AddComponent<AdsScript1>();
    gameoverPanel.SetActive(false);
    PausedGamePanel();
}


public void GameoverButton()
{
    gameoverPanel.SetActive(false);
    SceneManager.LoadScene(0);
}
9 months ago · Santiago Trujillo
1 answers
Answer question

0

Your continue ads object is in gameover panel. When you set gameoverPanel.SetActive(false) you also do the same on the child objects.

9 months ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.