Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity Console and Unity Inspector does not work!

Discussion in 'Scripting' started by Hannibal11, Mar 6, 2020.

  1. Hannibal11

    Hannibal11

    Joined:
    Mar 5, 2020
    Posts:
    15
    Hello Everyone,

    I just installed Unity 2018.4 and Visual Studio 2017,and I'm following a little tutorial to learn.
    I connected a script to a GameObject (camera), but when I enter play mode, nothing comes out of the console!
    Also in the Inspector, the cubePrefab variable,that i have created in the script,doesn't even appear!
    how can i solve?
    Thanks so much!
     

    Attached Files:

  2. APSchmidtOfOld

    APSchmidtOfOld

    Joined:
    Aug 8, 2016
    Posts:
    4,473
    You did save your script, did you? Your screeshot says "no".
     
    Hannibal11 likes this.
  3. Hannibal11

    Hannibal11

    Joined:
    Mar 5, 2020
    Posts:
    15
    Maybe you intend to save the script in Visual Studio?
    Thanks a lot I solved it!
    but the tutorial guy did not save.
    How did you see that I hadn't saved the script?
     

    Attached Files:

    • pre.jpg
      pre.jpg
      File size:
      174.1 KB
      Views:
      282
  4. APSchmidtOfOld

    APSchmidtOfOld

    Joined:
    Aug 8, 2016
    Posts:
    4,473
    The small asterisk on the right of the script name in the script tab.

    Screenshot_2020-03-06_12-21-52.png
     
    Joe-Censored and Hannibal11 like this.
  5. Hannibal11

    Hannibal11

    Joined:
    Mar 5, 2020
    Posts:
    15
    Thank you very much!!
     
    Joe-Censored likes this.
  6. APSchmidtOfOld

    APSchmidtOfOld

    Joined:
    Aug 8, 2016
    Posts:
    4,473
    There is also the colour of the vertical line in the script; if it's yellow, the script is not saved. Once saved, it should be green, unless you modified the colour in the preferences of Visual Studio (I hate that green). :)