Search Unity

Help me, i have a problem.

Discussion in 'Scripting' started by JustKilling, Mar 9, 2019.

  1. JustKilling

    JustKilling

    Joined:
    Mar 9, 2019
    Posts:
    2
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    Unity has some pretty good video tutorials. I'd recommend going through some of them to get a handle on the basics like this:

    https://unity3d.com/learn/tutorials

    To your specific question, one simple approach to start with is to put a reference to your "Score" script in your "HighScore" class, and assign the reference in the inspector. Then your HighScore class will have access to the Score class.

    Also, watch out for typos on class/script names. You have "HighSCore" as your class name. If you fix that in the code, make sure the file name is also consistent, or you'll run into problems trying to add the component in Unity.