Exemple #1
0
        public static bool IsSubAssetOf <T> (this T subAsset, ScriptableObject mainAsset) where T : ScriptableObject
        {
            T[] allSubAssets = mainAsset.GetSubAssetsOfType <T> ();
            foreach (T asset in allSubAssets)
            {
                if (asset == subAsset)
                {
                    return(true);
                }
            }

            return(false);
        }