summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Utils/UnityExtends.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2022-03-10 14:07:40 +0800
committerchai <chaifix@163.com>2022-03-10 14:07:40 +0800
commit22891bf59032ba88262824255a706d652031384b (patch)
tree7595439ba9966c9402d37e37cee5e8cf098757d5 /Assets/Scripts/Utils/UnityExtends.cs
parent8b04ea73e540067f83870b61d89db4868fea5e8a (diff)
* move folder
Diffstat (limited to 'Assets/Scripts/Utils/UnityExtends.cs')
-rw-r--r--Assets/Scripts/Utils/UnityExtends.cs16
1 files changed, 0 insertions, 16 deletions
diff --git a/Assets/Scripts/Utils/UnityExtends.cs b/Assets/Scripts/Utils/UnityExtends.cs
deleted file mode 100644
index d1a66f48..00000000
--- a/Assets/Scripts/Utils/UnityExtends.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public static class UnityExtends
-{
- public static T GetOrAddComponent<T>(this GameObject go) where T : MonoBehaviour
- {
- T component = go.GetComponent<T>();
- if (component == null)
- component = go.AddComponent<T>();
- return component;
- }
-
-
-}