- Home /
Question by
Therealperson · May 26, 2020 at 03:43 PM ·
unity 2dvisual studiocompiler error
Unity Error CS0234 in my Project. Does anyone know how to fix this?
This is my code for a ground check. error CS0234: The type or namespace name 'Media' does not exist in the namespace 'System' (are you missing an assembly reference?
using System.Collections; using System.Collections.Generic; using System.Media; using UnityEngine;
public class Grounded : MonoBehaviour { // Start is called before the first frame update void Start() { Player = gameObject.tranform.parent.gameObject; }
// Update is called once per frame
void Update()
{
}
private void OnCollisionEnter2D(Collision2D collision)
{
if (collision.colider.tag == "Ground")
{
Player.GetComponent<Move2D>().isGrounded = true;
}
}
private void OnCollisionExit2D(Collision2D collision)
{
if (collision.colider.tag == "Ground")
{
Player.GetComponent<Move2D>().isGrounded = false;
}
}
}
Comment