Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question References not showing up in Inspector.

Discussion in 'Scripting' started by computergoddess, Nov 16, 2023.

  1. computergoddess

    computergoddess

    Joined:
    Sep 29, 2016
    Posts:
    6
    I am having my students create a flappy bird game take off. I have created this game many times with the same code and no issues. This was working yesterday but today when I created the logic script, added the public references and I save the script, their slots are not appearing in the inspector. I have ditched and remade the script several times and deleted the meta file and reloaded the game it is still not working: Can anyone explain how to get around this?

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEngineUI;
    5.  
    6. public class LogicScript : MonoBehaviour
    7. {
    8.     public int playerScore;
    9.     public Text scoreText;
    10. }

    Screenshot 2023-11-16 at 4.05.15 PM.png Screenshot 2023-11-16 at 4.03.59 PM.png
     
  2. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,163
    First thing to check is make sure you have no compiler errors. Any compiler error in any script can prevent the inspector from updating since the compiler doesn't finish. So, check the console. Are there any errors?