Files
Cielonos/Packages/io.continis.subassets/Editor/Utilities/Constants.cs
SoulliesOfficial f26f9fd374 爆更
2026-03-20 12:07:44 -04:00

64 lines
4.9 KiB
C#

namespace SubAssetsToolbox.Editor
{
public static class Constants
{
public const string MenuItemBaseName = "Tools/SubAssets Toolbox/";
// URLs
public const string ReviewUrl = "https://assetstore.unity.com/packages/tools/utilities/subassets-toolbox-284154#reviews";
public const string DiscordUrl = "https://discord.com/invite/rCRug7Szr8";
public const string DocumentationUrl = "https://tools.continis.io/v/subassets-toolbox";
public const string OtherToolsUrl = "https://assetstore.unity.com/publishers/87819";
public const string SupportEmail = "mailto:buoybase@gmail.com";
public const string PackageName = "io.continis.subassets-toolbox";
public const string PackageAssetsFolder = "Packages/io.continis.subassets-toolbox";
public const string PackageReadableName = "SubAssets Toolbox";
// Error messages - Sub-asset type restrictions
internal static readonly string AddingPrefabAsSubAsset = $"({PackageReadableName}) Adding a Prefab as a SubAsset is not allowed.";
internal static readonly string AddingFolderAsSubAsset = $"({PackageReadableName}) Adding a Folder as a SubAsset is not allowed.";
internal static readonly string AddingScriptAsSubAsset = $"({PackageReadableName}) Adding a script as a SubAsset is not allowed.";
internal static readonly string Adding3DModelAsSubAsset = $"({PackageReadableName}) Adding a 3D model as a SubAsset is not allowed.";
internal static readonly string AddingShaderAsSubAsset = $"({PackageReadableName}) Adding a shader as a SubAsset is not allowed.";
// Error messages - Destination type restrictions
internal static readonly string AddingSubAssetToScript = $"({PackageReadableName}) Adding SubAssets to a script is not allowed.";
internal static readonly string AddingSubAssetToShader = $"({PackageReadableName}) Adding SubAssets to a Shader is not allowed.";
internal static readonly string AddingSubAssetTo3DModel = $"({PackageReadableName}) Adding SubAssets to a 3D model is not allowed.";
internal static readonly string AddingSubAssetToMixer = $"({PackageReadableName}) Adding SubAssets to an AudioMixer is not allowed.";
internal static readonly string AddingSubAssetToScene = $"({PackageReadableName}) Adding SubAssets to a scene is not allowed.";
// Warnings
internal static readonly string ExtensionDefaultedToAsset = $"({PackageReadableName}) It was impossible to determine the removed sub-assets extension, so it has defaulted to \".asset\". " +
"We recommend to change it now in your file system, if it matters.";
internal static readonly string ImpossibleToExtract =
$"({PackageReadableName}) Impossible to extract {{0}} from its main asset. An asset with the same name already exists in the same location.";
internal static readonly string RedirectionFailed = $"({PackageReadableName}) Reference patching failed for {{0}}. The original asset was kept to avoid broken references.";
internal static readonly string FileIdRetrievalFailed = $"({PackageReadableName}) Could not retrieve fileID for {{0}}. Reference redirection skipped for this object.";
// Dialog messages
internal const string LossOfDataWarning = "If you choose not to, you will have to " +
"fix those references manually.\n\n" +
"This process might lead to loss of data, " +
"so make sure you have your project under version control.";
internal const string ConfirmAddAsSubAsset = "Are you sure you want to add {0} as a sub-asset to {1}?";
internal const string ConfirmAddAsSubAssets = "Are you sure you want to add {0}, {1}, (...) as sub-assets to {2}?";
internal const string ConfirmDeleteSubAsset = "Are you sure you want to delete {0}?";
internal const string ConfirmDeleteSubAssets = "Are you sure you want to delete {0}, {1}, (...)?";
internal const string PatchRefsToSubAssetPrompt =
"Do you want to patch all references to the dragged asset(s) to point to the newly-created sub-asset(s)? " + LossOfDataWarning;
internal const string PatchRefsToStandalonePrompt =
"Do you want to patch all references to the dragged sub-asset(s) to point to the newly-created asset(s)? " + LossOfDataWarning;
// Addressable messages
internal static readonly string AddressableEntryMigrated =
$"({PackageReadableName}) Addressable entry '{{0}}' (address: {{1}}) was migrated to the parent asset {{2}}.";
internal static readonly string AddressableEntryRemoved =
$"({PackageReadableName}) Addressable entry '{{0}}' (address: {{1}}) was removed. The parent asset {{2}} is already Addressable.";
}
}