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;
|
|||
|
|
// <20><><EFBFBD>ù<EFBFBD><C3B9><EFBFBD>·<EFBFBD><C2B7>
|
|||
|
|
settings.profileSettings.SetValue(
|
|||
|
|
settings.activeProfileId,
|
|||
|
|
"Remote.BuildPath",
|
|||
|
|
$"{Application.dataPath}/{relativePath}/[BuildTarget]");
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD>ü<EFBFBD><C3BC><EFBFBD>·<EFBFBD><C2B7>
|
|||
|
|
settings.profileSettings.SetValue(
|
|||
|
|
settings.activeProfileId,
|
|||
|
|
"Remote.LoadPath",
|
|||
|
|
$"{relativePath}/ServerData");
|
|||
|
|
}
|
|||
|
|
}
|