Unity/Tip
AssetDatabase.GetAssetBundleDependencies
잉여씨
2018. 12. 6. 11:59
AssetDatabase.GetAssetBundleDependencies
해당 API가 정상적으로 동작하지 않는다. string[0] 배열만을 리턴한다.
다른 API를 통해 같은 효과를 얻을 수 있다.
1 2 3 4 5 6 7 8 9 10 | public string[] GetAssetBundleDependencies(string assetBundleName) { string[] assetPaths = AssetDatabase.GetAssetPathsFromAssetBundle(assetBundleName); string[] result = new string[assetPaths.Length]; for (int i = 0; i < assetPaths.Length; i++) { result[i] = Path.GetFileNameWithoutExtension(assetPaths[i]); } return result; } | cs |