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 user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
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
First time scripting in MonoDeveloper. Unknown ";" error.
error CS1612: Cannot modify a value type return value of `UnityEngine.Transform.position'. Consider storing the value in a temporary variable
No appropriate version of 'UnityEngine.Object.Instantiate. Please Help :(