@ -0,0 +1,29 @@ | |||||
using System.Collections; | |||||
using System.Collections.Generic; | |||||
using UnityEngine; | |||||
using NaughtyAttributes; | |||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
public static class GameObjectExtension | |||||
{ | |||||
public static bool isTagInParent(this GameObject go, string tag) | |||||
{ | |||||
Transform current = go.transform; | |||||
while (current != null) | |||||
{ | |||||
if (current.gameObject.CompareTag(tag)) | |||||
return true; | |||||
current = current.parent; | |||||
} | |||||
return false; | |||||
} | |||||
} |
@ -0,0 +1,11 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 372b54ac7f1e6564993301c9b3a0cb22 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |