Created
March 12, 2015 23:44
-
-
Save strich/a4d49e0700e3088692b1 to your computer and use it in GitHub Desktop.
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 static class GameObjectExtensions { | |
public static bool HasComponent<T>(this GameObject gameObject) { | |
return gameObject.GetComponent<T>() != null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment