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

error CS1503 Cannot convert method group to string.

$
0
0
using System.Collections; using System.Collections.Generic; using UnityEngine; public class HeatScript : MonoBehaviour { public Material[] material; Renderer rend; void start () { rend = GetComponent(); rend.enabled = true; } void OnCollisionEnter (Collision col) { if(col.gameObject.name == "Anvile") { StartCoroutine(ChangeColorToRed); } } public IEnumerator ChangeColorToRed() { yield return new WaitForSeconds(4f); rend.sharedMaterial = material[1]; } } There might be something very simple in here I am missing but I can't figure it out. Since I'm new to the whole coding thing I figured posting for help is my best option.

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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