Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Ignore please accidental duplicate

Discussion in 'Scripting' started by TovinTheCowardly, Jul 31, 2020.

  1. TovinTheCowardly

    TovinTheCowardly

    Joined:
    Apr 22, 2020
    Posts:
    22
  2. WarmedxMints

    WarmedxMints

    Joined:
    Feb 6, 2017
    Posts:
    1,017
    You require a reference to the scorescript object as it is not static. The easy solution is to make the reference public in your CoinRotate script and populate it in the inspector or you can look for the object in the CoinRotate's start method.
     
  3. TovinTheCowardly

    TovinTheCowardly

    Joined:
    Apr 22, 2020
    Posts:
    22
    Im confused a bit. Casue i thought that i did make a reference to the score script when i wrote.

    Code (CSharp):
    1.  
    2. Score scoreScript;
    3.  
    Also what object do i need to populate it with?
    Do you mean with the

    Code (CSharp):
    1.  
    2. public Text scoreText;
    3.  
    I am sorry im asking so many questions, im just not sure what you mean with your answer.

    Thank you very much for your quick reply :)

    Best Regards
     
unityunity