Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Bug My button wont click

Discussion in 'UGUI & TextMesh Pro' started by jaxsmu, Dec 20, 2022.

  1. jaxsmu

    jaxsmu

    Joined:
    Dec 9, 2022
    Posts:
    37
    and half of my options have disappeared
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEngine.SceneManagement;
    5.  
    6. public class MainMenu : MonoBehaviour
    7. {
    8.     public string firstLevel;
    9.  
    10.  
    11.       // Start is called before the first frame update
    12.     void start ()
    13.     {
    14.  
    15.     }
    16.  
    17.     // Update is called once per frame
    18.     void Update()
    19.     {
    20.        
    21.     }
    22.  
    23.     public void StartGame()
    24.     {
    25.          SceneManager.LoadScene(firstLevel);
    26.     }
    27.  
    28.     public void CloseOptions()
    29.     {
    30.         optionsScreen.SetActive(false);
    31.     }
    32.  
    33.     public void QuitGame()
    34.     {
    35.         Application.Quit();
    36.     }
    37. }
    upload_2022-12-21_6-17-8.png
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,251
    There is no button component attatched to this
     
  3. jaxsmu

    jaxsmu

    Joined:
    Dec 9, 2022
    Posts:
    37
    bro i am soo stupid sorry
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,251
    No worries, it happens to the best of us
     
  5. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,761
    Also, please don't post UI questions on the 2D forum. There are dedicated UI forums here.

    I'll move your post.