Quantcast
Channel: Questions in topic: "namespace"
Viewing all articles
Browse latest Browse all 398

Auto generated default C# script giving error ?

$
0
0
Hello everybody. Something weird is going on. I created a new script on the Assets folder named "2DRaycaster", and then I double-clicked it, to open it in Visual Studio and edit it. The moment it loads in VS, before I change anything to it, it has red lines and 12 errors. The script's code is this: using UnityEngine; using System.Collections; public class 2DRaycaster : MonoBehaviour { // Use this for initialization void Start () { } // Update is called once per frame void Update () { } } l And I get "A namespace cannot directly contain members such as fields or methods". Why is that ?

Viewing all articles
Browse latest Browse all 398


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>