Search Unity

Question Can't add script

Discussion in 'Getting Started' started by lyminhquang98, Jun 13, 2022.

  1. lyminhquang98

    lyminhquang98

    Joined:
    Jun 13, 2022
    Posts:
    1
    I can't add script to my game object
    But the name of the script is match with the public class
     
  2. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Welcome to the forums!

    Does your script have any errors in it? Check the Console window for any messages pointing to specific lines in your script. If it won't compile, you can't add it to your objects (nor can you even run your game).