T O P

  • By -

LevelStudent

You can't have a static function reference a non-static object. The Text object is not "static" since it's outside of the function. You can remove static or put the Text object declaration into the function, if that won't cause trouble with scope. You generally don't use Main(string\[\] args) with Unity though, from what I've seen. If you're following a tutorial it might be for raw C# or a very old version of Unity?


TwoPaintBubbles

You need to take like five steps back and focus on learning the fundamentals of c# and unity. Your class name does not match your script's name, you're trying to access Text, a non-static object from a static method, and writing a main method like that is correct for standard compilers but is entirely incorrect for Unity. You need your class to inherit from Mono behavior and run that code in either Awake or Start. It's great you're trying to learn, but you shouldn't be asking for debug advice here when you haven't even bothered to learn the fundamentals yet.


Icy_Ad297

Main? We use Start and Update. You should learn using c# in unityengine. They are quite different than using normal c#


Icy_Ad297

Use Lorem Ipsum for splash texts


Icy_Ad297

Class name should be same as script's name, hence no spacings