Esempio n. 1
0
    public static void BuildContent()
    {
        Debug.LogError("首次打包使用,会总把bundle资源克隆到对应的StreamingAsset目录");
        AddressableAssetSettings.BuildPlayerContent();
        string linkPath = Application.dataPath.Substring(0, Application.dataPath.LastIndexOf('/')) + "/" + AddressableAssetSettingsDefaultObject.Settings.RemoteCatalogBuildPath.GetValue(AddressableAssetSettingsDefaultObject.Settings);

        Debug.LogError(linkPath);
        var exportPath = Application.dataPath.Substring(0, Application.dataPath.LastIndexOf('/')) + "/" + Addressables.BuildPath + "/" + Utility.GetPlatformName();

        Debug.LogError(exportPath);
        MyEditorTools.CopyDirectory(linkPath, exportPath, true);
        AssetDatabase.Refresh();
    }