AssetBundles.AssetBundleManager.GetStreamingAssetsPath C# (CSharp) 메소드

GetStreamingAssetsPath() 개인적인 정적인 메소드

private static GetStreamingAssetsPath ( ) : string
리턴 string
        private static string GetStreamingAssetsPath()
        {
            if (Application.isEditor)
                return "file://" +  System.Environment.CurrentDirectory.Replace("\\", "/"); // Use the build output folder directly.
            else if (Application.isWebPlayer)
                return System.IO.Path.GetDirectoryName(Application.absoluteURL).Replace("\\", "/")+ "/StreamingAssets";
            else if (Application.isMobilePlatform || Application.isConsolePlatform)
                return Application.streamingAssetsPath;
            else // For standalone player.
                return "file://" +  Application.streamingAssetsPath;
        }

Usage Example

예제 #1
0
 public static void SetSourceAssetBundleDirectory(string relativePath)
 {
     AssetBundleManager.BaseDownloadingURL = AssetBundleManager.GetStreamingAssetsPath() + relativePath;
 }