Created
May 19, 2016 08:52
-
-
Save tsmrecki/ee8026cc8c6bb1f2b3577833df7b1ddb to your computer and use it in GitHub Desktop.
Getting the component of the object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void SetGazedAt(bool gazedAt) { | |
GetComponent<Renderer>().material.color = gazedAt ? Color.green : Color.red; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment