diff options
Diffstat (limited to 'AlienSurvival/Assets/Scripts/Utils/GameObjectUtils.cs')
-rw-r--r-- | AlienSurvival/Assets/Scripts/Utils/GameObjectUtils.cs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/AlienSurvival/Assets/Scripts/Utils/GameObjectUtils.cs b/AlienSurvival/Assets/Scripts/Utils/GameObjectUtils.cs deleted file mode 100644 index 416f097..0000000 --- a/AlienSurvival/Assets/Scripts/Utils/GameObjectUtils.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public static class GameObjectUtils -{ - - public static T AddOrGetComponent<T>(this GameObject go) where T : MonoBehaviour - { - T comp = go.GetComponent<T>(); - if(comp == null) - { - comp = go.AddComponent<T>(); - } - return comp; - } - -}
\ No newline at end of file |