This commit is contained in:
2025-10-31 15:31:34 +08:00
parent cf47a388ca
commit ad94eae693
316 changed files with 40772 additions and 89 deletions

View File

@@ -0,0 +1,22 @@
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");
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ef459a98d98d962448e8063cd219f434
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,24 @@
using UnityEditor;
using UnityEditor.AddressableAssets;
using UnityEditor.AddressableAssets.Settings;
using UnityEngine;
public class BuildTool
{
[MenuItem("Tools/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> %g")] // Ctrl+G (Windows) or Command+G (Mac)
public static void BuildIncremental()
{
CopyHotDll.CreateDllByte();
AddressableAssetSettings.BuildPlayerContent();
Debug.Log("Addressables <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (Ctrl+G)");
}
[MenuItem("Tools/ȫ<><C8AB><EFBFBD><EFBFBD><EFBFBD>´<EFBFBD><C2B4><EFBFBD> %#g")] // Ctrl+Shift+G (Windows) or Command+Shift+G (Mac)
public static void BuildClearCache()
{
CopyHotDll.CreateDllByte();
AddressableAssetSettings.CleanPlayerContent();
AddressableAssetSettings.BuildPlayerContent();
Debug.Log("Addressables ȫ<><C8AB><EFBFBD><EFBFBD><EFBFBD>´<EFBFBD><C2B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (Ctrl+Shift+G)");
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ae66b515223d332499794e4292efe9ff
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,32 @@
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using System;
using System.IO;
using System.Text;
public class CopyHotDll
{
[MenuItem("Tools/<2F><><EFBFBD><EFBFBD><EFBFBD>ȸ<EFBFBD>Dll<6C><6C><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>")]
public static void CreateDllByte()
{
HybridCLR.Editor.Commands.CompileDllCommand.CompileDllActiveBuildTarget();
BuildTarget buildTarget = UnityEditor.EditorUserBuildSettings.activeBuildTarget;
foreach (var dll in Boot.Inst.dllMap)
{
string sourcePath = dll.Value == 0 ?
$"{KeyManager.TDllSourceDir}/{buildTarget}/{dll.Key}.dll" :
$"{KeyManager.HotDllSourceDir}/{buildTarget}/{dll.Key}.dll";
string destPath = $"{KeyManager.AssetDllDir}/{dll.Key}.dll.bytes";
if (File.Exists(destPath))
File.Delete(destPath);
File.Copy(sourcePath, destPath);
AssetDatabase.Refresh();
Debug.Log($"copy {sourcePath} to {destPath}");
}
Debug.Log($"<22><><EFBFBD><EFBFBD><EFBFBD>ȸ<EFBFBD>Dll<6C><6C><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>");
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 54f422773e0842b41a6ad5488368667d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,20 @@
{
"name": "UnityScripts.Editor",
"rootNamespace": "",
"references": [
"GUID:2373f786d14518f44b0f475db77ba4de",
"GUID:231d2189f0e1fc546999766032d5c36d",
"GUID:69448af7b92c7f342b298e06a37122aa"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f0d1c4909ca503145a96825c04c64d1d
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: