Skip to content

Instantly share code, notes, and snippets.

@nastajus
Created June 23, 2014 01:02
Show Gist options
  • Save nastajus/271a16968e577c1ca30c to your computer and use it in GitHub Desktop.
Save nastajus/271a16968e577c1ca30c to your computer and use it in GitHub Desktop.
what differences are there between these?
public class PowerupTouch : MonoBehaviour {
void OnTriggerEnter(Collider other){
GetComponent<MeshRenderer>().material.color = Color.green;
transform.renderer.material.color = Color.blue;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment