Hi All,
I have been trying to figure out the script so that when my player Obj collides with platform Obj, the platform changes color instantly and stays that color, i have the below so far, any help please?
Many Thanks.
using UnityEngine;
using System.Collections;
public class Colour : MonoBehaviour {
void OncollisionEnter2D(Collision2D col)
{
if(col.gameObject.tag == "Platform")
{
renderer.material.color = Color.cyan;
}
}
}