Files
HybridCLR_Addressable/Assets/Scripts/Editor/AddressablePathSetter.cs
2025-10-31 15:31:34 +08:00

22 lines
676 B
C#

using UnityEditor.AddressableAssets;
using UnityEditor.AddressableAssets.Settings;
using UnityEngine;
public static class AddressablePathSetter
{
public static void SetCustomPaths(string relativePath)
{
var settings = AddressableAssetSettingsDefaultObject.Settings;
// ÉèÖù¹½¨Â·¾¶
settings.profileSettings.SetValue(
settings.activeProfileId,
"Remote.BuildPath",
$"{Application.dataPath}/{relativePath}/[BuildTarget]");
// ÉèÖüÓÔØÂ·¾¶
settings.profileSettings.SetValue(
settings.activeProfileId,
"Remote.LoadPath",
$"{relativePath}/ServerData");
}
}