Search Unity

Other Please help me with scripts

Discussion in 'Scripting' started by jaxsmu, Dec 9, 2022.

  1. jaxsmu

    jaxsmu

    Joined:
    Dec 9, 2022
    Posts:
    37
    So every time I upload_2022-12-10_6-11-5.png upload_2022-12-10_6-11-40.png upload_2022-12-10_6-11-5.png upload_2022-12-10_6-11-40.png try to add a script to my title screen it gives me this error

    My code is below can you help me, please
    upload_2022-12-10_6-11-5.png upload_2022-12-10_6-11-40.png
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,448
    the filename in project window needs to match class name,
    so make it "MainMenu" now its "mainmenu"
     
    Yoreki and jaxsmu like this.
  3. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,188
    Not sure why you posted the same stuff several times. But the simple thing is, CAPS matter.
    If you class is named MainMenu, then your script can't be named mainmenu. They need to match!
     
    Yoreki likes this.
  4. jaxsmu

    jaxsmu

    Joined:
    Dec 9, 2022
    Posts:
    37
    Thanks i will try now
     
  5. jaxsmu

    jaxsmu

    Joined:
    Dec 9, 2022
    Posts:
    37
    Thanks that actually worked