Created
January 22, 2013 21:40
-
-
Save prime31/4598698 to your computer and use it in GitHub Desktop.
Simple fix for when you access any properties that hide GetComponent calls (such as transform, collider, renderer, etc)
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 new Transform transform; | |
public new Collider collider; | |
public new Renderer renderer; | |
public new Rigidbody rigidbody; | |
void Awake() | |
{ | |
transform = gameObject.transform; | |
collider = gameObject.collider; | |
renderer = gameObject.renderer; | |
rigidbody = gameObject.rigidbody; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment