Search Unity

Ignore please accidental duplicate

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

  1. Jinngineer

    Jinngineer

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

    WarmedxMints

    Joined:
    Feb 6, 2017
    Posts:
    1,035
    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. Jinngineer

    Jinngineer

    Joined:
    Apr 22, 2020
    Posts:
    41
    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