Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

why do i keep getting errors CS0101 and CS1011 on my console unity?

$
0
0
These are the errors I am getting: 1.Assets\scripts\PlayerCollision.cs(4,14): error CS0101: The namespace '' already contains a definition for 'PlayerCollision' 2.Assets\scripts\PlayerCollision.cs(9,10): error CS0111: Type 'PlayerCollision' already defines a member called 'OnCollisionEnter' with the same parameter types and here is the code that the errors are most probably referring to: using UnityEngine; public class PlayerCollision : MonoBehaviour { public PlayerMovement movement; void OnCollisionEnter(Collision collisionInfo) { if (collisionInfo.collider.tag == "obstacle") { movement.enabled = false; FindObjectOfType().EndGame(); } } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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