I'm following the tutorial to try and get a GUI up an running, but it just gives errors:
Assets/GolfWarsAssets/Objects/Game/GameController.cs(110,18): error CS0119: Expression denotes a type', where a variable', value' or method group' was expected
type', where a
I am using c# - perhaps I am missing a reference? Any clues?
Answer by runevision
Dec 15, 2009 at 08:14 AM
When using C# you need to use the new keyword in front of all constructors. Constructors are like functions that are used to create new objects (or scructs). They always have the same name as the type of object you are creating.
So if you are creating a new Rect using the constructor Rect() then you need to write new Rect() if you are using C#.
Thank you so so so much.
Answer by Mark Davies
Nov 30, 2009 at 11:02 PM
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
2 People are following this question.
The name 'Joystick' does not denote a valid type ('not found')
Error cs0119 expression denotes a type' where a variable' value' or method group' was expected
Animation Scripting C# Error
Error I don't know how to fix