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

two weird namespace errors

$
0
0
I have like 2 errors from unity that visual studio dont show and I dont know what is means. Please help me I am an idiot. script I used: `using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Security.Cryptography; using System.Threading; using UnityEngine; public float movement = 5f; public class movement : MonoBehaviour { // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { Vector3 movement = new Vector3(Input.getAxis("Horizontal"), 0f, 0f); transform.position += movement * Time.deltaTime*movement; } } void jump() { if (Input.GetButtonDown("Jump")) { gameObject.GetComponent().addForce(new Vector2(0f, 5f), forceMode2D.Impulse); }; }` errors from unity:Assets\movement.cs(10,14): error CS0116: A namespace cannot directly contain members such as fields or methods, Assets\movement.cs(28,6): error CS0116: A namespace cannot directly contain members such as fields or methods

Viewing all articles
Browse latest Browse all 398

Trending Articles