22 lines
676 B
C#
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");
|
|
}
|
|
} |