This commit is contained in:
陈思海 2025-03-11 21:03:30 +08:00
parent 9033d5abff
commit ebf95c3b0c
99 changed files with 1158 additions and 3357 deletions

View File

@ -35,7 +35,7 @@ SpriteAtlas:
m_AndroidETC2FallbackOverride: 0
m_ForceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
m_BuildTarget: iPhone
m_BuildTarget: iOS
m_MaxTextureSize: 2048
m_ResizeAlgorithm: 0
m_TextureFormat: 49

View File

@ -35,7 +35,7 @@ SpriteAtlas:
m_AndroidETC2FallbackOverride: 0
m_ForceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
m_BuildTarget: iPhone
m_BuildTarget: iOS
m_MaxTextureSize: 2048
m_ResizeAlgorithm: 0
m_TextureFormat: 49

View File

@ -0,0 +1 @@
{"DebugMode":false,"ResMode":1,"Language":1}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ab2440e36857b5c41a158bdd509cf9d8
guid: 4e3331916411c1b4a975d38de96dc2af
TextScriptImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 402293b9e7937184a89cd7d9b4ac24fa
guid: a5f57ac0b1d10054b94e07a7d2f65a85
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b73ba175345359b4f94c0a0077fb54a8
guid: 4c8342f8b81cb834fa3a9f82d44efd4f
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -0,0 +1,39 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b05c83971e3dca94f9fa460d396385e5, type: 3}
m_Name: BuildinCatalog
m_EditorClassIdentifier:
PackageName: DefaultPackage
PackageVersion: 2025-03-10-901
Wrappers:
- BundleGUID: 92ae5a3aec236b87f83a1603da5fc2a9
FileName: assets_bundles_audios_audioclip_92ae5a3aec236b87f83a1603da5fc2a9.bundle
- BundleGUID: 8d59bf4d24bcea500724da6bf929a9d8
FileName: assets_bundles_configs_bytes_8d59bf4d24bcea500724da6bf929a9d8.bundle
- BundleGUID: 03ab2999df78316aa2559198c5749f73
FileName: assets_bundles_dll_03ab2999df78316aa2559198c5749f73.bundle
- BundleGUID: cf9ac84552c8cc4579531fde229fb9cd
FileName: assets_bundles_scenes_map1000_cf9ac84552c8cc4579531fde229fb9cd.bundle
- BundleGUID: 6690ad300b34c0ebe929c31c3169578f
FileName: assets_bundles_uiraw_atlas_bg_6690ad300b34c0ebe929c31c3169578f.bundle
- BundleGUID: 5e6ab36bb331e560c6356376a19c7b90
FileName: assets_bundles_uiraw_atlas_icon_5e6ab36bb331e560c6356376a19c7b90.bundle
- BundleGUID: 5cd8ddfcb9a046645641c242d2dd7d89
FileName: assets_bundles_ui_uiloadupdate_5cd8ddfcb9a046645641c242d2dd7d89.bundle
- BundleGUID: ac3a2a5997e1d38db49f401928208c94
FileName: assets_bundles_ui_uitestcardwidget_ac3a2a5997e1d38db49f401928208c94.bundle
- BundleGUID: ce093762bdd7022d87109f35f63bb649
FileName: share_assets_resources_ui_uisprite_ce093762bdd7022d87109f35f63bb649.bundle
- BundleGUID: 424565db06dd56bd521fc4a060afa34e
FileName: share_packages_com_unity_render-pipelines_universal_runtime_materials_424565db06dd56bd521fc4a060afa34e.bundle
- BundleGUID: 2e6ec77722cc35069f3392a7f5167903
FileName: unityshaders_2e6ec77722cc35069f3392a7f5167903.bundle

View File

@ -1,8 +1,8 @@
fileFormatVersion: 2
guid: 303c55325c569f8419d1aa6dc00b02be
folderAsset: yes
DefaultImporter:
guid: 21166d2b90e0f5e4bbc09727c3f4878e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -185,6 +185,10 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4927968100452151227, guid: 8e4808bf30e54a8439a661bfa35ee982, type: 3}
propertyPath: componentType
value: AlicizaX.Timer.Runtime.GameTimerManager
objectReference: {fileID: 0}
- target: {fileID: 5472542677182214335, guid: 8e4808bf30e54a8439a661bfa35ee982, type: 3}
propertyPath: m_Name
value: Entry

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: ae6a79e083584ec98edcf80dc4f11347
timeCreated: 1737627973

View File

@ -1,24 +0,0 @@
{
"name": "Alicizax.Editor.Entension",
"rootNamespace": "",
"references": [
"GUID:e34a5702dd353724aa315fb8011f08c3",
"GUID:4d1926c9df5b052469a1c63448b7609a",
"GUID:df8e45d6cf544f2693a36da8779a9fc9",
"GUID:8d62da4aabd2a19419c7378d23ea5849",
"GUID:acfef7cabed3b0a42b25edb1cd4fa259",
"GUID:be2f20a77f3232f44b9711ef43234aac",
"GUID:75b6f2078d190f14dbda4a5b747d709c"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": true,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

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

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: bc3f948f15304085b3623e95529402b2
timeCreated: 1741335009

View File

@ -1,16 +0,0 @@
using UnityEditor;
using UnityEngine;
namespace AlicizaX.Editor.Extension
{
public abstract class EditorToolBase : EditorWindow
{
public abstract string ToolName { get; }
public abstract Vector2Int WinSize { get; }
private void Awake()
{
this.titleContent = new GUIContent(ToolName);
this.position.Set(this.position.x, this.position.y, this.WinSize.x, this.WinSize.y);
}
}
}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: c5059ae8ffe14e83adc79687bb2f6128
timeCreated: 1741335011

View File

@ -1,92 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEditor;
using UnityEngine;
namespace AlicizaX.Editor.Extension
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public class EditorToolFunctionAttribute : Attribute
{
public string ToolMenuPath { get; private set; }
public int MenuOrder { get; private set; }
public Type OwnerType { get; private set; }
public MethodInfo MethodInfo { get; private set; }
public EditorToolFunctionAttribute(string menu, Type owner, int menuOrder = 0)
{
this.ToolMenuPath = menu;
OwnerType = owner;
MenuOrder = menuOrder;
}
public void SetMethodInfo(MethodInfo methodInfo)
{
MethodInfo = methodInfo;
}
}
internal static class EditorToolFunctionAttributeCollector
{
public static List<EditorToolFunctionAttribute> Attributes = new List<EditorToolFunctionAttribute>();
public static void Register(EditorToolFunctionAttribute attribute)
{
Attributes.Add(attribute);
Attributes.Sort((x, y) => x.MenuOrder.CompareTo(y.MenuOrder));
}
/// <summary>
/// 扫描所有程序集中的类和方法,自动注册带有 EditorToolFunctionAttribute 的方法。
/// </summary>
[InitializeOnLoadMethod]
public static void ScanAndRegisterAllMethods()
{
// 获取当前应用程序域中的所有程序集
var assemblies = AppDomain.CurrentDomain.GetAssemblies();
foreach (var assembly in assemblies)
{
try
{
// 获取程序集中的所有类型
var types = assembly.GetTypes();
foreach (var type in types)
{
try
{
// 获取类型中的所有方法
var methods =
type.GetMethods(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
foreach (var method in methods)
{
// 检查方法是否带有 EditorToolFunctionAttribute
var attribute = method.GetCustomAttribute<EditorToolFunctionAttribute>();
if (attribute != null)
{
// 设置方法的 MethodInfo
attribute.SetMethodInfo(method);
Register(attribute);
}
}
}
catch (Exception ex)
{
Debug.LogError($"Failed to process type {type.FullName}: {ex.Message}");
}
}
}
catch (Exception ex)
{
Debug.LogError($"Failed to process assembly {assembly.FullName}: {ex.Message}");
}
}
// Debug.Log($"Registered {Attributes.Count} methods with EditorToolFunctionAttribute.");
}
}
}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: aea4eaf9f6aa4109bb9a01f4537ee060
timeCreated: 1741335052

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: aee016cbfab94fd1b7047ad26e7758bc
timeCreated: 1737627977

View File

@ -1,63 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEditor.Build.Reporting;
using UnityEngine;
using YooAsset;
using YooAsset.Editor;
public class AdvancedBuildWindow : EditorWindow
{
private Dictionary<string, EditorWindowTabBase> _tabs = new();
private int _selectedTab = -1;
private string[] _tabLabels;
private Vector2 _scrollPosition;
private EditorWindowTabBase showTab;
public static void ShowWindow()
{
GetWindow<AdvancedBuildWindow>("Build Window", true);
}
private void CreateGUI()
{
_tabs.Add("AB包构建", new AssetBundleBuildTab());
_tabs.Add("整包构建", new AppBuildTab());
_tabLabels = _tabs.Keys.ToArray();
}
private void OnDisable()
{
if (showTab != null)
{
showTab.OnDisable();
}
}
private void OnGUI()
{
var selectedTab = GUILayout.Toolbar(_selectedTab, _tabLabels);
if (selectedTab != _selectedTab)
{
_selectedTab = selectedTab;
if (showTab != null)
{
showTab.OnDisable();
}
string tabKey = _tabLabels[_selectedTab];
_tabs.TryGetValue(tabKey, out showTab);
showTab.OnEnable();
}
_scrollPosition = EditorGUILayout.BeginScrollView(_scrollPosition);
{
if (showTab != null) showTab.OnGUI();
}
EditorGUILayout.EndScrollView();
}
}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 299b9adaf99d4b81aa2822e5995a1b92
timeCreated: 1738739276

View File

@ -1,98 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEngine;
public class AppBuildTab : EditorWindowTabBase
{
// 整包构建配置
private BuildTarget _appBuildTarget = BuildTarget.StandaloneWindows64;
private string _appOutputPath = "Builds/App";
private SceneAsset _entryScene;
private bool _developmentBuild;
internal override void OnGUI()
{
base.OnGUI();
DrawAppBuildTab();
}
private void DrawAppBuildTab()
{
EditorGUILayout.Space();
EditorGUILayout.LabelField("整包构建配置", EditorStyles.boldLabel);
DrawBuildTarget(ref _appBuildTarget);
DrawPathSelection("输出路径:", ref _appOutputPath);
_developmentBuild = EditorGUILayout.Toggle("开发模式:", _developmentBuild);
EditorGUILayout.Space();
EditorGUILayout.LabelField("包含场景:", EditorStyles.boldLabel);
DrawSceneList();
EditorGUILayout.Space();
if (GUILayout.Button("构建应用程序", GUILayout.Height(30)))
{
BuildApplication();
}
}
private void DrawBuildTarget(ref BuildTarget target)
{
target = (BuildTarget)EditorGUILayout.EnumPopup("目标平台:", target);
}
private void DrawSceneList()
{
_entryScene = (SceneAsset)EditorGUILayout.ObjectField("启动场景", _entryScene, typeof(SceneAsset), false);
}
private void BuildApplication()
{
try
{
var options = new BuildPlayerOptions
{
scenes = new[] { AssetDatabase.GetAssetPath(_entryScene) },
locationPathName = Path.Combine(_appOutputPath, GetExecutableName()),
target = _appBuildTarget,
options = _developmentBuild ? BuildOptions.Development : BuildOptions.None
};
var report = BuildPipeline.BuildPlayer(options);
HandleBuildReport(report);
}
catch (Exception e)
{
EditorUtility.DisplayDialog("错误", $"构建过程中发生异常: {e.Message}", "确定");
}
}
private void HandleBuildReport(UnityEditor.Build.Reporting.BuildReport report)
{
if (report.summary.result == UnityEditor.Build.Reporting.BuildResult.Succeeded)
{
EditorUtility.DisplayDialog("构建成功",
$"应用程序构建完成!\n输出大小: {report.summary.totalSize / 1024 / 1024}MB", "确定");
}
else
{
EditorUtility.DisplayDialog("构建失败",
$"错误信息: {report.summary}", "确定");
}
}
private string GetExecutableName()
{
return _appBuildTarget switch
{
BuildTarget.StandaloneWindows64 => "Game.exe",
BuildTarget.StandaloneOSX => "Game.app",
BuildTarget.Android => "Game.apk",
_ => "Game"
};
}
}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 8a18b79139694e1bafb85f014a003665
timeCreated: 1740128549

View File

@ -1,241 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEngine;
using YooAsset;
using YooAsset.Editor;
public class AssetBundleBuildTab : EditorWindowTabBase
{
private BuildTarget _abBuildTarget = BuildTarget.StandaloneWindows64;
private string _outputPath = "Builds/AB";
private string _packageVersion;
private bool _copyAfterBuild;
private string _copyDestination;
private ECompressOption _compressOption = ECompressOption.LZ4;
private EFileNameStyle _fileNameStyle = EFileNameStyle.BundleName_HashName;
private EBuildinFileCopyOption _copyOption = EBuildinFileCopyOption.ClearAndCopyByTags;
private string _copyParams = "Launch";
private bool _enableSharePack = true;
private string _selectedEncryption;
private string _selectedPackage;
private List<string> _encryptionClasses;
private List<string> _buildPackageNames;
internal override void OnEnable()
{
LoadEncryptionClasses();
LoadBuildPackageNames();
GeneratePackageVersion();
}
private void GeneratePackageVersion()
{
int totalMinutes = DateTime.Now.Hour * 60 + DateTime.Now.Minute;
_packageVersion = DateTime.Now.ToString("yyyy-MM-dd") + "-" + totalMinutes;
}
private void LoadEncryptionClasses()
{
_encryptionClasses = AppDomain.CurrentDomain.GetAssemblies()
.SelectMany(a => a.GetTypes())
.Where(t => typeof(IEncryptionServices).IsAssignableFrom(t) && !t.IsAbstract)
.Select(t => t.FullName)
.ToList();
}
private void LoadBuildPackageNames()
{
_buildPackageNames = new List<string>();
foreach (var package in AssetBundleCollectorSettingData.Setting.Packages)
{
_buildPackageNames.Add(package.PackageName);
}
}
internal override void OnGUI()
{
base.OnGUI();
DrawABBuildTab();
}
private void DrawABBuildTab()
{
EditorGUILayout.Space();
EditorGUILayout.LabelField("AB包构建配置", EditorStyles.boldLabel);
// 基本配置
DrawBuildTarget(ref _abBuildTarget);
DrawPathSelection("输出路径:", ref _outputPath);
DrawPackageVersion();
// 高级配置
EditorGUILayout.Space();
EditorGUILayout.LabelField("高级选项", EditorStyles.boldLabel);
_compressOption = (ECompressOption)EditorGUILayout.EnumPopup("压缩方式:", _compressOption);
_fileNameStyle = (EFileNameStyle)EditorGUILayout.EnumPopup("文件命名风格:", _fileNameStyle);
_copyOption = (EBuildinFileCopyOption)EditorGUILayout.EnumPopup("内置文件拷贝选项:", _copyOption);
_copyParams = EditorGUILayout.TextField("拷贝参数:", _copyParams);
_enableSharePack = EditorGUILayout.Toggle("启用共享打包:", _enableSharePack);
DrawEncryptionSelection();
DrawPackageSelection();
// 拷贝配置
EditorGUILayout.Space();
_copyAfterBuild = EditorGUILayout.BeginToggleGroup("构建后拷贝", _copyAfterBuild);
DrawPathSelection("拷贝目标:", ref _copyDestination);
EditorGUILayout.EndToggleGroup();
// 操作按钮
EditorGUILayout.Space();
if (GUILayout.Button("构建AB包", GUILayout.Height(30)))
{
BuildABPackage();
}
if (GUILayout.Button("构建热更程序集", GUILayout.Height(30)))
{
BuildDLLCommand.BuildAndCopyDlls();
}
}
private void DrawBuildTarget(ref BuildTarget target)
{
target = (BuildTarget)EditorGUILayout.EnumPopup("目标平台:", target);
}
private void DrawPackageVersion()
{
EditorGUILayout.BeginHorizontal();
{
_packageVersion = EditorGUILayout.TextField("版本号:", _packageVersion);
if (GUILayout.Button("生成新版本", GUILayout.Width(100)))
{
GeneratePackageVersion();
}
}
EditorGUILayout.EndHorizontal();
}
private void DrawEncryptionSelection()
{
if (_encryptionClasses == null || _encryptionClasses.Count == 0)
{
EditorGUILayout.HelpBox("未找到加密类实现", MessageType.Info);
return;
}
int selectedIndex = Mathf.Max(0, _encryptionClasses.IndexOf(_selectedEncryption));
selectedIndex = EditorGUILayout.Popup("加密方式:", selectedIndex, _encryptionClasses.ToArray());
_selectedEncryption = _encryptionClasses[selectedIndex];
}
private void DrawPackageSelection()
{
if (_buildPackageNames == null || _buildPackageNames.Count == 0)
{
EditorGUILayout.HelpBox("未找到包", MessageType.Info);
return;
}
int selectedIndex = Mathf.Max(0, _buildPackageNames.IndexOf(_selectedPackage));
selectedIndex = EditorGUILayout.Popup("Package:", selectedIndex, _buildPackageNames.ToArray());
_selectedPackage = _buildPackageNames[selectedIndex];
}
private void BuildABPackage()
{
try
{
var parameters = new ScriptableBuildParameters
{
BuildOutputRoot = _outputPath,
BuildTarget = _abBuildTarget,
PackageName = _selectedPackage,
BuildBundleType = (int)EBuildBundleType.AssetBundle,
BuildPipeline = EBuildPipeline.ScriptableBuildPipeline.ToString(),
BuildinFileRoot = AssetBundleBuilderHelper.GetStreamingAssetsRoot(),
PackageVersion = _packageVersion,
CompressOption = _compressOption,
FileNameStyle = _fileNameStyle,
VerifyBuildingResult = true,
ClearBuildCacheFiles = false,
BuildinFileCopyOption = _copyOption,
BuildinFileCopyParams = _copyParams,
EnableSharePackRule = _enableSharePack,
EncryptionServices = CreateEncryptionInstance()
};
ScriptableBuildPipeline pipeline = new ScriptableBuildPipeline();
var report = pipeline.Run(parameters, true);
if (report.Success)
{
BuildUpdateData(_packageVersion, _copyDestination);
if (_copyAfterBuild && !string.IsNullOrEmpty(_copyDestination))
{
CopyFiles(report.OutputPackageDirectory, _copyDestination);
}
EditorUtility.DisplayDialog("构建成功", $"AB包构建完成\n输出目录: {report.OutputPackageDirectory}", "确定");
}
else
{
EditorUtility.DisplayDialog("构建失败", $"错误信息: {report.ErrorInfo}", "确定");
}
}
catch (Exception e)
{
Debug.LogException(e);
}
}
private void BuildUpdateData(string version, string outPath)
{
ResourcePatchData updateData = new ResourcePatchData()
{
Version = Application.version,
BundleUrl = $"http://127.0.0.1:8081/res/{version}/",
Notice = "Test Notice",
};
File.WriteAllText(Path.Combine(outPath, "UpdateData.json"), Newtonsoft.Json.JsonConvert.SerializeObject(updateData));
}
private void CopyFiles(string source, string destination)
{
try
{
if (!Directory.Exists(destination))
{
Directory.CreateDirectory(destination);
}
foreach (string file in Directory.GetFiles(source))
{
File.Copy(file, Path.Combine(destination, Path.GetFileName(file)), true);
}
Debug.Log($"文件拷贝完成: {source} -> {destination}");
}
catch (Exception e)
{
Debug.LogError($"文件拷贝失败: {e.Message}");
}
}
private IEncryptionServices CreateEncryptionInstance()
{
if (string.IsNullOrEmpty(_selectedEncryption)) return null;
var type = Type.GetType(_selectedEncryption);
if (type != null)
{
return (IEncryptionServices)Activator.CreateInstance(type);
}
return null;
}
}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 25d31eb885a64d3a868c2b56d4a6efad
timeCreated: 1740128311

View File

@ -1,34 +0,0 @@
using UnityEditor;
using UnityEngine;
public abstract class EditorWindowTabBase
{
internal virtual void OnEnable()
{
}
internal virtual void OnDisable()
{
}
internal virtual void OnGUI()
{
}
protected void DrawPathSelection(string label, ref string path)
{
EditorGUILayout.BeginHorizontal();
{
path = EditorGUILayout.TextField(label, path);
if (GUILayout.Button("浏览...", GUILayout.Width(60)))
{
string newPath = EditorUtility.SaveFolderPanel("选择输出目录", path, "");
if (!string.IsNullOrEmpty(newPath))
{
path = newPath;
}
}
}
EditorGUILayout.EndHorizontal();
}
}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 0acdf416d4534dca8b923bd9d1f87c8a
timeCreated: 1740128254

View File

@ -1,746 +0,0 @@
#if UNITY_EDITOR
using System;
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
using System.Linq;
using System.IO;
public class EditorIcons : EditorWindow
{
[MenuItem("Tools/Editor Icons %e", priority = -1001)]
public static void EditorIconsOpen()
{
#if UNITY_2018
var w = GetWindow<EditorIcons>("Editor Icons");
#else
var w = CreateWindow<EditorIcons>("Editor Icons");
#endif
w.ShowUtility();
w.minSize = new Vector2(320, 450);
}
static bool viewBigIcons = true;
static bool darkPreview = true;
Vector2 scroll;
int buttonSize = 70;
string search = "";
void SearchGUI()
{
using (new GUILayout.HorizontalScope())
{
if (isWide) GUILayout.Space(10);
#if UNITY_2018
search = EditorGUILayout.TextField(search, EditorStyles.toolbarTextField);
#else
search = EditorGUILayout.TextField(search, EditorStyles.toolbarSearchField);
#endif
if (GUILayout.Button(EditorGUIUtility.IconContent("winbtn_mac_close_h"), //SVN_DeletedLocal
EditorStyles.toolbarButton,
GUILayout.Width(22))
) search = "";
}
}
bool isWide => Screen.width > 550;
bool doSearch => !string.IsNullOrWhiteSpace(search) && search != "";
GUIContent GetIcon(string icon_name)
{
GUIContent valid = null;
Debug.unityLogger.logEnabled = false;
if (!string.IsNullOrEmpty(icon_name)) valid = EditorGUIUtility.IconContent(icon_name);
Debug.unityLogger.logEnabled = true;
return valid?.image == null ? null : valid;
}
void SaveIcon(string icon_name)
{
Texture2D tex = EditorGUIUtility.IconContent(icon_name).image as Texture2D;
if (tex != null)
{
string path = EditorUtility.SaveFilePanel(
"Save icon", "", icon_name, "png");
if (path != null)
{
try
{
#if UNITY_2018
Texture2D outTex = new Texture2D(
tex.width, tex.height,
tex.format, true);
#else
Texture2D outTex = new Texture2D(
tex.width, tex.height,
tex.format, tex.mipmapCount, true);
#endif
Graphics.CopyTexture(tex, outTex);
File.WriteAllBytes(path, outTex.EncodeToPNG());
}
catch (System.Exception e)
{
Debug.LogError("Cannot save the icon : " + e.Message);
}
}
}
else
{
Debug.LogError("Cannot save the icon : null texture error!");
}
}
void SaveAllIcons()
{
var folderpath = EditorUtility.SaveFolderPanel("", "", "");
try
{
foreach (string icon in ico_list)
{
var split = icon.Split('/').Last();
Texture2D tex = EditorGUIUtility.IconContent(icon).image as Texture2D;
if (tex == null) continue;
if (string.IsNullOrWhiteSpace(folderpath))
{
Debug.LogError("Folder path invalid...");
break;
}
var path = folderpath + "//" + $"{split}.png";
if (File.Exists(path))
{
Debug.Log($"file already written with name aborting write: {path}");
}
else
{
#if UNITY_2018
Texture2D outTex = new Texture2D(
tex.width, tex.height,
tex.format, true);
#else
Texture2D outTex = new Texture2D(
tex.width, tex.height,
tex.format, tex.mipmapCount, true);
#endif
Graphics.CopyTexture(tex, outTex);
File.WriteAllBytes(path, outTex.EncodeToPNG());
}
}
}
catch (Exception e)
{
Debug.LogError("Cannot save the icons: " + e.Message);
}
}
private void OnEnable()
{
//InitIcons();
//var all_icons = iconContentListAll.Select(x => x.tooltip).ToArray();
var all_icons = ico_list.Where(x => GetIcon(x) != null);
//List<string> found = new List<string>();
List<string> unique = new List<string>();
//var skip_flag = HideFlags.HideInInspector | HideFlags.HideAndDontSave;
//int unique_to_resources = 0, skipped_empty_str = 0, skipped_flags = 0,
// skipped_not_persistent = 0, skipped_nulls = 0, unique_to_list = 0;
foreach (Texture2D x in Resources.FindObjectsOfTypeAll<Texture2D>())
{
//if (string.IsNullOrEmpty(x.name)) skipped_empty_str++; // skipped 10 empty
//if (!EditorUtility.IsPersistent(x)) skipped_not_persistent++; // skipped 39 none persistent
//if (x.hideFlags != HideFlags.HideAndDontSave && x.hideFlags != skip_flag) skipped_flags++; // skipped 27 icons
GUIContent icoContent = GetIcon(x.name);
if (icoContent == null) continue; // skipped 14 icons
//{
// skipped_nulls++;
// continue;
//}
if (!all_icons.Contains(x.name))
{
//unique_to_resources++;
unique.Add(x.name);
}
//found.Add( x.name );
}
//foreach (var ico in all_icons) if (!found.Contains(ico)) unique_to_list++;
//Debug.Log( $"Resources skipped nulls={skipped_nulls} empty={skipped_empty_str} flags={skipped_flags}" );
//Debug.Log("Resources skipped_not_persistent=" + skipped_not_persistent);
//Debug.Log($"totals , list: {all_icons.Length} resource: {found.Count}");
//Debug.Log($"Unique list={ unique_to_list } resources={unique_to_resources}") ;
ico_list = ico_list.ToList().Concat(unique).ToArray();
// Static list icons count : 1315 ( unique = 749 )
// Found icons in resources : 1416 ( unique = 855 )
Resources.UnloadUnusedAssets();
System.GC.Collect();
}
private void OnGUI()
{
var ppp = EditorGUIUtility.pixelsPerPoint;
InitIcons();
if (!isWide) SearchGUI();
using (new GUILayout.HorizontalScope(EditorStyles.toolbar))
{
if (GUILayout.Button("Save all icons to folder...", EditorStyles.miniButton)) SaveAllIcons();
GUILayout.Label("Select what icons to show", GUILayout.Width(160));
viewBigIcons = GUILayout.SelectionGrid(
viewBigIcons ? 1 : 0, new string[] { "Small", "Big" },
2, EditorStyles.toolbarButton) == 1;
if (isWide) SearchGUI();
}
if (isWide) GUILayout.Space(3);
using (var scope = new GUILayout.ScrollViewScope(scroll))
{
GUILayout.Space(10);
scroll = scope.scrollPosition;
buttonSize = viewBigIcons ? 70 : 40;
// scrollbar_width = ~ 12.5
var render_width = (Screen.width / ppp - 13f);
var gridW = Mathf.FloorToInt(render_width / buttonSize);
var margin_left = (render_width - buttonSize * gridW) / 2;
int row = 0, index = 0;
List<GUIContent> iconList;
if (doSearch) iconList = iconContentListAll.Where(x => x.tooltip.ToLower()
.Contains(search.ToLower())).ToList();
else iconList = viewBigIcons ? iconContentListBig : iconContentListSmall;
while (index < iconList.Count)
{
using (new GUILayout.HorizontalScope())
{
GUILayout.Space(margin_left);
for (var i = 0; i < gridW; ++i)
{
int k = i + row * gridW;
var icon = iconList[k];
if (GUILayout.Button(icon,
iconButtonStyle,
GUILayout.Width(buttonSize),
GUILayout.Height(buttonSize)))
{
EditorGUI.FocusTextInControl("");
iconSelected = icon;
}
index++;
if (index == iconList.Count) break;
}
}
row++;
}
GUILayout.Space(10);
}
if (iconSelected == null) return;
GUILayout.FlexibleSpace();
using (new GUILayout.HorizontalScope(EditorStyles.helpBox, GUILayout.MaxHeight(viewBigIcons ? 140 : 120)))
{
using (new GUILayout.VerticalScope(GUILayout.Width(130)))
{
GUILayout.Space(2);
GUILayout.Button(iconSelected,
darkPreview ? iconPreviewBlack : iconPreviewWhite,
GUILayout.Width(128), GUILayout.Height(viewBigIcons ? 128 : 40));
GUILayout.Space(5);
darkPreview = GUILayout.SelectionGrid(
darkPreview ? 1 : 0, new string[] { "Light", "Dark" },
2, EditorStyles.miniButton) == 1;
GUILayout.FlexibleSpace();
}
GUILayout.Space(10);
using (new GUILayout.VerticalScope())
{
var s = $"Size: {iconSelected.image.width}x{iconSelected.image.height}";
s += "\nIs Pro Skin Icon: " + (iconSelected.tooltip.IndexOf("d_") == 0 ? "Yes" : "No");
s += $"\nTotal {iconContentListAll.Count} icons";
GUILayout.Space(5);
EditorGUILayout.HelpBox(s, MessageType.None);
GUILayout.Space(5);
EditorGUILayout.TextField("EditorGUIUtility.IconContent(\"" + iconSelected.tooltip + "\")");
GUILayout.Space(5);
if (GUILayout.Button("Copy to clipboard", EditorStyles.miniButton))
EditorGUIUtility.systemCopyBuffer = iconSelected.tooltip;
if (GUILayout.Button("Save icon to file ...", EditorStyles.miniButton))
SaveIcon(iconSelected.tooltip);
}
GUILayout.Space(10);
if (GUILayout.Button("X", GUILayout.ExpandHeight(true)))
{
iconSelected = null;
}
}
}
static GUIContent iconSelected;
static List<GUIContent> iconContentListAll;
static List<GUIContent> iconContentListSmall;
static List<GUIContent> iconContentListBig;
static List<string> iconMissingNames;
static GUIStyle iconButtonStyle = null;
static GUIStyle iconPreviewBlack = null;
static GUIStyle iconPreviewWhite = null;
void AllTheTEXTURES(ref GUIStyle s, Texture2D t)
{
s.hover.background = s.onHover.background = s.focused.background = s.onFocused.background = s.active.background = s.onActive.background = s.normal.background = s.onNormal.background = t;
s.hover.scaledBackgrounds = s.onHover.scaledBackgrounds = s.focused.scaledBackgrounds = s.onFocused.scaledBackgrounds = s.active.scaledBackgrounds = s.onActive.scaledBackgrounds = s.normal.scaledBackgrounds = s.onNormal.scaledBackgrounds = new Texture2D[] { t };
}
Texture2D Texture2DPixel(Color c)
{
Texture2D t = new Texture2D(1, 1);
t.SetPixel(0, 0, c);
t.Apply();
return t;
}
void InitIcons()
{
if (iconContentListSmall != null) return;
iconButtonStyle = new GUIStyle(EditorStyles.miniButton);
iconButtonStyle.margin = new RectOffset(0, 0, 0, 0);
iconButtonStyle.fixedHeight = 0;
iconPreviewBlack = new GUIStyle(iconButtonStyle);
AllTheTEXTURES(ref iconPreviewBlack, Texture2DPixel(new Color(0.15f, 0.15f, 0.15f)));
iconPreviewWhite = new GUIStyle(iconButtonStyle);
AllTheTEXTURES(ref iconPreviewWhite, Texture2DPixel(new Color(0.85f, 0.85f, 0.85f)));
iconMissingNames = new List<string>();
iconContentListSmall = new List<GUIContent>();
iconContentListBig = new List<GUIContent>();
iconContentListAll = new List<GUIContent>();
for (var i = 0; i < ico_list.Length; ++i)
{
GUIContent ico = GetIcon(ico_list[i]);
if (ico == null)
{
iconMissingNames.Add(ico_list[i]);
continue;
}
ico.tooltip = ico_list[i];
iconContentListAll.Add(ico);
if (!(ico.image.width <= 36 || ico.image.height <= 36))
iconContentListBig.Add(ico);
else iconContentListSmall.Add(ico);
}
}
// https://gist.github.com/MattRix/c1f7840ae2419d8eb2ec0695448d4321
// https://unitylist.com/p/5c3/Unity-editor-icons
#region ICONS
public static string[] ico_list =
{
"_Help","_Popup","aboutwindow.mainheader","ageialogo","AlphabeticalSorting","Animation.AddEvent",
"Animation.AddKeyframe","Animation.EventMarker","Animation.FirstKey","Animation.LastKey",
"Animation.NextKey","Animation.Play","Animation.PrevKey","Animation.Record","Animation.SequencerLink",
"animationanimated","animationdopesheetkeyframe","animationkeyframe","animationnocurve",
"animationvisibilitytoggleoff","animationvisibilitytoggleon","AnimationWrapModeMenu","AssemblyLock",
"Asset Store","Audio Mixer","AvatarCompass","AvatarController.Layer","AvatarController.LayerHover",
"AvatarController.LayerSelected","BodyPartPicker","BodySilhouette","DotFill","DotFrame","DotFrameDotted",
"DotSelection","Head","HeadIk","HeadZoom","HeadZoomSilhouette","LeftArm","LeftFeetIk","LeftFingers",
"LeftFingersIk","LeftHandZoom","LeftHandZoomSilhouette","LeftLeg","MaskEditor_Root","RightArm","RightFeetIk",
"RightFingers","RightFingersIk","RightHandZoom","RightHandZoomSilhouette","RightLeg","Torso","AvatarPivot",
"back","back@2x","beginButton-On","beginButton","blendKey","blendKeyOverlay","blendKeySelected",
"blendSampler","blueGroove","BuildSettings.Android","BuildSettings.Android.Small","BuildSettings.Broadcom",
"BuildSettings.Editor","BuildSettings.Editor.Small","BuildSettings.Facebook",
"BuildSettings.Facebook.Small","BuildSettings.FlashPlayer","BuildSettings.FlashPlayer.Small",
"BuildSettings.iPhone","BuildSettings.iPhone.Small","BuildSettings.Lumin","BuildSettings.Lumin.small",
"BuildSettings.Metro","BuildSettings.Metro.Small","BuildSettings.N3DS","BuildSettings.N3DS.Small",
"BuildSettings.PS4","BuildSettings.PS4.Small","BuildSettings.PSM","BuildSettings.PSM.Small",
"BuildSettings.PSP2","BuildSettings.PSP2.Small","BuildSettings.SelectedIcon","BuildSettings.Standalone",
"BuildSettings.Standalone.Small","BuildSettings.StandaloneBroadcom.Small",
"BuildSettings.StandaloneGLES20Emu.Small","BuildSettings.StandaloneGLESEmu",
"BuildSettings.StandaloneGLESEmu.Small","BuildSettings.Switch","BuildSettings.Switch.Small",
"BuildSettings.tvOS","BuildSettings.tvOS.Small","BuildSettings.Web","BuildSettings.Web.Small",
"BuildSettings.WebGL","BuildSettings.WebGL.Small","BuildSettings.WP8","BuildSettings.WP8.Small",
"BuildSettings.Xbox360","BuildSettings.Xbox360.Small","BuildSettings.XboxOne",
"BuildSettings.XboxOne.Small","BuildSettings.Xiaomi","Camera Gizmo","CheckerFloor","Clipboard",
"ClothInspector.PaintTool","ClothInspector.PaintValue","ClothInspector.SelectTool",
"ClothInspector.SettingsTool","ClothInspector.ViewValue","CloudConnect","Collab.Build",
"Collab.BuildFailed","Collab.BuildSucceeded","Collab.FileAdded","Collab.FileConflict","Collab.FileDeleted",
"Collab.FileIgnored","Collab.FileMoved","Collab.FileUpdated","Collab.FolderAdded","Collab.FolderConflict",
"Collab.FolderDeleted","Collab.FolderIgnored","Collab.FolderMoved","Collab.FolderUpdated",
"Collab.NoInternet","Collab","Collab.Warning","CollabConflict","CollabError","CollabNew","CollabOffline",
"CollabProgress","CollabPull","CollabPush","ColorPicker.ColorCycle","ColorPicker.CycleColor",
"ColorPicker.CycleSlider","ColorPicker.SliderCycle","console.erroricon.inactive.sml","console.erroricon",
"console.erroricon.sml","console.infoicon","console.infoicon.sml","console.warnicon.inactive.sml",
"console.warnicon","console.warnicon.sml","curvekeyframe","curvekeyframeselected",
"curvekeyframeselectedoverlay","curvekeyframesemiselectedoverlay","curvekeyframeweighted","CustomSorting",
"d__Popup","d_aboutwindow.mainheader","d_ageialogo","d_AlphabeticalSorting","d_Animation.AddEvent",
"d_Animation.AddKeyframe","d_Animation.EventMarker","d_Animation.FirstKey","d_Animation.LastKey",
"d_Animation.NextKey","d_Animation.Play","d_Animation.PrevKey","d_Animation.Record",
"d_Animation.SequencerLink","d_animationanimated","d_animationkeyframe","d_animationnocurve",
"d_animationvisibilitytoggleoff","d_animationvisibilitytoggleon","d_AnimationWrapModeMenu",
"d_AS Badge Delete","d_AS Badge New","d_AssemblyLock","d_Asset Store","d_Audio Mixer",
"d_AvatarBlendBackground","d_AvatarBlendLeft","d_AvatarBlendLeftA","d_AvatarBlendRight",
"d_AvatarBlendRightA","d_AvatarCompass","d_AvatarPivot","d_back","d_back@2x","d_beginButton-On",
"d_beginButton","d_blueGroove","d_BuildSettings.Android","d_BuildSettings.Android.Small",
"d_BuildSettings.Broadcom","d_BuildSettings.FlashPlayer","d_BuildSettings.FlashPlayer.Small",
"d_BuildSettings.iPhone","d_BuildSettings.iPhone.Small","d_BuildSettings.Lumin",
"d_BuildSettings.Lumin.small","d_BuildSettings.PS4","d_BuildSettings.PS4.Small","d_BuildSettings.PSP2",
"d_BuildSettings.PSP2.Small","d_BuildSettings.SelectedIcon","d_BuildSettings.Standalone",
"d_BuildSettings.Standalone.Small","d_BuildSettings.tvOS","d_BuildSettings.tvOS.Small",
"d_BuildSettings.Web","d_BuildSettings.Web.Small","d_BuildSettings.WebGL","d_BuildSettings.WebGL.Small",
"d_BuildSettings.Xbox360","d_BuildSettings.Xbox360.Small","d_BuildSettings.XboxOne",
"d_BuildSettings.XboxOne.Small","d_CheckerFloor","d_CloudConnect","d_Collab.FileAdded",
"d_Collab.FileConflict","d_Collab.FileDeleted","d_Collab.FileIgnored","d_Collab.FileMoved",
"d_Collab.FileUpdated","d_Collab.FolderAdded","d_Collab.FolderConflict","d_Collab.FolderDeleted",
"d_Collab.FolderIgnored","d_Collab.FolderMoved","d_Collab.FolderUpdated","d_ColorPicker.CycleColor",
"d_ColorPicker.CycleSlider","d_console.erroricon","d_console.erroricon.sml","d_console.infoicon",
"d_console.infoicon.sml","d_console.warnicon","d_console.warnicon.sml","d_curvekeyframe",
"d_curvekeyframeselected","d_curvekeyframeselectedoverlay","d_curvekeyframesemiselectedoverlay",
"d_curvekeyframeweighted","d_CustomSorting","d_DefaultSorting","d_EditCollider","d_editcollision_16",
"d_editconstraints_16","d_editicon.sml","d_endButton-On","d_endButton","d_eyeDropper.Large",
"d_eyeDropper.sml","d_Favorite","d_FilterByLabel","d_FilterByType","d_FilterSelectedOnly",
"d_FilterSelectedOnly@2x","d_forward","d_forward@2x","d_GEAR","d_Groove","d_HorizontalSplit",
"d_icon dropdown","d_InspectorLock","d_JointAngularLimits","d_leftBracket","d_Lighting",
"d_LightmapEditor.WindowTitle","d_LookDevCenterLight","d_LookDevCenterLight@2x","d_LookDevClose",
"d_LookDevClose@2x","d_LookDevEnvRotation","d_LookDevEnvRotation@2x","d_LookDevMirrorViews",
"d_LookDevMirrorViews@2x","d_LookDevMirrorViewsActive","d_LookDevMirrorViewsActive@2x",
"d_LookDevMirrorViewsInactive","d_LookDevMirrorViewsInactive@2x","d_LookDevObjRotation",
"d_LookDevObjRotation@2x","d_LookDevPaneOption","d_LookDevPaneOption@2x","d_LookDevResetEnv",
"d_LookDevResetEnv@2x","d_LookDevShadow","d_LookDevShadow@2x","d_LookDevSideBySide",
"d_LookDevSideBySide@2x","d_LookDevSingle1","d_LookDevSingle1@2x","d_LookDevSingle2",
"d_LookDevSingle2@2x","d_LookDevSplit","d_LookDevSplit@2x","d_LookDevZone","d_LookDevZone@2x",
"d_Mirror","d_model large","d_monologo","d_MoveTool on","d_MoveTool","d_Navigation","d_Occlusion",
"d_P4_AddedLocal","d_P4_AddedRemote","d_P4_CheckOutLocal","d_P4_CheckOutRemote","d_P4_Conflicted",
"d_P4_DeletedLocal","d_P4_DeletedRemote","d_P4_Local","d_P4_LockedLocal","d_P4_LockedRemote",
"d_P4_OutOfSync","d_Particle Effect","d_PauseButton On","d_PauseButton","d_PlayButton On","d_PlayButton",
"d_PlayButtonProfile On","d_PlayButtonProfile","d_playLoopOff","d_playLoopOn","d_preAudioAutoPlayOff",
"d_preAudioAutoPlayOn","d_preAudioLoopOff","d_preAudioLoopOn","d_preAudioPlayOff","d_preAudioPlayOn",
"d_PreMatCube","d_PreMatCylinder","d_PreMatLight0","d_PreMatLight1","d_PreMatSphere","d_PreMatTorus",
"d_Preset.Context","d_PreTextureAlpha","d_PreTextureMipMapHigh","d_PreTextureMipMapLow","d_PreTextureRGB",
"d_Profiler.Audio","d_Profiler.CPU","d_Profiler.FirstFrame","d_Profiler.GPU","d_Profiler.LastFrame",
"d_Profiler.Memory","d_Profiler.Network","d_Profiler.NextFrame","d_Profiler.Physics","d_Profiler.PrevFrame",
"d_Profiler.Record","d_Profiler.Rendering","d_Profiler.Video","d_ProfilerColumn.WarningCount","d_Project",
"d_RectTool On","d_RectTool","d_RectTransformBlueprint","d_RectTransformRaw","d_redGroove","d_Refresh",
"d_renderdoc","d_rightBracket","d_RotateTool On","d_RotateTool","d_ScaleTool On","d_ScaleTool",
"d_SceneViewAlpha","d_SceneViewAudio","d_SceneViewFx","d_SceneViewLighting","d_SceneViewOrtho",
"d_SceneViewRGB","d_ScrollShadow","d_Settings","d_SettingsIcon","d_SocialNetworks.FacebookShare",
"d_SocialNetworks.LinkedInShare","d_SocialNetworks.Tweet","d_SocialNetworks.UDNOpen","d_SpeedScale",
"d_StepButton On","d_StepButton","d_StepLeftButton-On","d_StepLeftButton","d_SVN_AddedLocal",
"d_SVN_Conflicted","d_SVN_DeletedLocal","d_SVN_Local","d_SVN_LockedLocal","d_SVN_OutOfSync","d_tab_next",
"d_tab_next@2x","d_tab_prev","d_tab_prev@2x","d_TerrainInspector.TerrainToolLower On",
"d_TerrainInspector.TerrainToolLowerAlt","d_TerrainInspector.TerrainToolPlants On",
"d_TerrainInspector.TerrainToolPlants","d_TerrainInspector.TerrainToolPlantsAlt On",
"d_TerrainInspector.TerrainToolPlantsAlt","d_TerrainInspector.TerrainToolRaise On",
"d_TerrainInspector.TerrainToolRaise","d_TerrainInspector.TerrainToolSetheight On",
"d_TerrainInspector.TerrainToolSetheight","d_TerrainInspector.TerrainToolSetheightAlt On",
"d_TerrainInspector.TerrainToolSetheightAlt","d_TerrainInspector.TerrainToolSettings On",
"d_TerrainInspector.TerrainToolSettings","d_TerrainInspector.TerrainToolSmoothHeight On",
"d_TerrainInspector.TerrainToolSmoothHeight","d_TerrainInspector.TerrainToolSplat On",
"d_TerrainInspector.TerrainToolSplat","d_TerrainInspector.TerrainToolSplatAlt On",
"d_TerrainInspector.TerrainToolSplatAlt","d_TerrainInspector.TerrainToolTrees On",
"d_TerrainInspector.TerrainToolTrees","d_TerrainInspector.TerrainToolTreesAlt On",
"d_TerrainInspector.TerrainToolTreesAlt","d_TimelineDigIn","d_TimelineEditModeMixOFF",
"d_TimelineEditModeMixON","d_TimelineEditModeReplaceOFF","d_TimelineEditModeReplaceON",
"d_TimelineEditModeRippleOFF","d_TimelineEditModeRippleON","d_TimelineSelector","d_Toolbar Minus",
"d_Toolbar Plus More","d_Toolbar Plus","d_ToolHandleCenter","d_ToolHandleGlobal","d_ToolHandleLocal",
"d_ToolHandlePivot","d_tranp","d_TransformTool On","d_TransformTool","d_tree_icon","d_tree_icon_branch",
"d_tree_icon_branch_frond","d_tree_icon_frond","d_tree_icon_leaf","d_TreeEditor.AddBranches",
"d_TreeEditor.AddLeaves","d_TreeEditor.Branch On","d_TreeEditor.Branch","d_TreeEditor.BranchFreeHand On",
"d_TreeEditor.BranchFreeHand","d_TreeEditor.BranchRotate On","d_TreeEditor.BranchRotate",
"d_TreeEditor.BranchScale On","d_TreeEditor.BranchScale","d_TreeEditor.BranchTranslate On",
"d_TreeEditor.BranchTranslate","d_TreeEditor.Distribution On","d_TreeEditor.Distribution",
"d_TreeEditor.Duplicate","d_TreeEditor.Geometry On","d_TreeEditor.Geometry","d_TreeEditor.Leaf On",
"d_TreeEditor.Leaf","d_TreeEditor.LeafFreeHand On","d_TreeEditor.LeafFreeHand","d_TreeEditor.LeafRotate On",
"d_TreeEditor.LeafRotate","d_TreeEditor.LeafScale On","d_TreeEditor.LeafScale",
"d_TreeEditor.LeafTranslate On","d_TreeEditor.LeafTranslate","d_TreeEditor.Material On",
"d_TreeEditor.Material","d_TreeEditor.Refresh","d_TreeEditor.Trash","d_TreeEditor.Wind On",
"d_TreeEditor.Wind","d_UnityEditor.AnimationWindow","d_UnityEditor.ConsoleWindow",
"d_UnityEditor.DebugInspectorWindow","d_UnityEditor.FindDependencies","d_UnityEditor.GameView",
"d_UnityEditor.HierarchyWindow","d_UnityEditor.InspectorWindow","d_UnityEditor.LookDevView",
"d_UnityEditor.ProfilerWindow","d_UnityEditor.SceneHierarchyWindow","d_UnityEditor.SceneView",
"d_UnityEditor.Timeline.TimelineWindow","d_UnityEditor.VersionControl","d_UnityLogo","d_VerticalSplit",
"d_ViewToolMove On","d_ViewToolMove","d_ViewToolOrbit On","d_ViewToolOrbit","d_ViewToolZoom On",
"d_ViewToolZoom","d_VisibilityOff","d_VisibilityOn","d_VUMeterTextureHorizontal","d_VUMeterTextureVertical",
"d_WaitSpin00","d_WaitSpin01","d_WaitSpin02","d_WaitSpin03","d_WaitSpin04","d_WaitSpin05","d_WaitSpin06",
"d_WaitSpin07","d_WaitSpin08","d_WaitSpin09","d_WaitSpin10","d_WaitSpin11","d_WelcomeScreen.AssetStoreLogo",
"d_winbtn_graph","d_winbtn_graph_close_h","d_winbtn_graph_max_h","d_winbtn_graph_min_h",
"d_winbtn_mac_close","d_winbtn_mac_close_a","d_winbtn_mac_close_h","d_winbtn_mac_inact","d_winbtn_mac_max",
"d_winbtn_mac_max_a","d_winbtn_mac_max_h","d_winbtn_mac_min","d_winbtn_mac_min_a","d_winbtn_mac_min_h",
"d_winbtn_win_close","d_winbtn_win_close_a","d_winbtn_win_close_h","d_winbtn_win_max","d_winbtn_win_max_a",
"d_winbtn_win_max_h","d_winbtn_win_min","d_winbtn_win_min_a","d_winbtn_win_min_h","d_winbtn_win_rest",
"d_winbtn_win_rest_a","d_winbtn_win_rest_h","DefaultSorting","EditCollider","editcollision_16",
"editconstraints_16","editicon.sml","endButton-On","endButton","eyeDropper.Large","eyeDropper.sml",
"Favorite","FilterByLabel","FilterByType","FilterSelectedOnly","FilterSelectedOnly@2x","forward",
"forward@2x","GEAR","Grid.BoxTool","Grid.Default","Grid.EraserTool","Grid.FillTool","Grid.MoveTool",
"Grid.PaintTool","Grid.PickingTool","Grid.SelectTool","Groove","align_horizontally",
"align_horizontally_center","align_horizontally_center_active","align_horizontally_left",
"align_horizontally_left_active","align_horizontally_right","align_horizontally_right_active",
"align_vertically","align_vertically_bottom","align_vertically_bottom_active","align_vertically_center",
"align_vertically_center_active","align_vertically_top","align_vertically_top_active",
"d_align_horizontally","d_align_horizontally_center","d_align_horizontally_center_active",
"d_align_horizontally_left","d_align_horizontally_left_active","d_align_horizontally_right",
"d_align_horizontally_right_active","d_align_vertically","d_align_vertically_bottom",
"d_align_vertically_bottom_active","d_align_vertically_center","d_align_vertically_center_active",
"d_align_vertically_top","d_align_vertically_top_active","HorizontalSplit","icon dropdown",
"InspectorLock","JointAngularLimits","KnobCShape","KnobCShapeMini","leftBracket","Lighting",
"LightmapEditor.WindowTitle","Lightmapping","d_greenLight","d_lightOff","d_lightRim","d_orangeLight",
"d_redLight","greenLight","lightOff","lightRim","orangeLight","redLight","LockIcon-On","LockIcon",
"LookDevCenterLight","LookDevCenterLightl@2x","LookDevClose","LookDevClose@2x","LookDevEnvRotation",
"LookDevEnvRotation@2x","LookDevEyedrop","LookDevLight","LookDevLight@2x","LookDevMirrorViewsActive",
"LookDevMirrorViewsActive@2x","LookDevMirrorViewsInactive","LookDevMirrorViewsInactive@2x",
"LookDevObjRotation","LookDevObjRotation@2x","LookDevPaneOption","LookDevPaneOption@2x","LookDevResetEnv",
"LookDevResetEnv@2x","LookDevShadow","LookDevShadow@2x","LookDevShadowFrame","LookDevShadowFrame@2x",
"LookDevSideBySide","LookDevSideBySide@2x","LookDevSingle1","LookDevSingle1@2x","LookDevSingle2",
"LookDevSingle2@2x","LookDevSplit","LookDevSplit@2x","LookDevZone","LookDevZone@2x","loop","Mirror",
"monologo","MoveTool on","MoveTool","Navigation","Occlusion","P4_AddedLocal","P4_AddedRemote",
"P4_BlueLeftParenthesis","P4_BlueRightParenthesis","P4_CheckOutLocal","P4_CheckOutRemote","P4_Conflicted",
"P4_DeletedLocal","P4_DeletedRemote","P4_Local","P4_LockedLocal","P4_LockedRemote","P4_OutOfSync",
"P4_RedLeftParenthesis","P4_RedRightParenthesis","P4_Updating","PackageBadgeDelete","PackageBadgeNew",
"Particle Effect","PauseButton On","PauseButton","PlayButton On","PlayButton","PlayButtonProfile On",
"PlayButtonProfile","playLoopOff","playLoopOn","playSpeed","preAudioAutoPlayOff","preAudioAutoPlayOn",
"preAudioLoopOff","preAudioLoopOn","preAudioPlayOff","preAudioPlayOn","PreMatCube","PreMatCylinder",
"PreMatLight0","PreMatLight1","PreMatQuad","PreMatSphere","PreMatTorus","Preset.Context","PreTextureAlpha",
"PreTextureArrayFirstSlice","PreTextureArrayLastSlice","PreTextureMipMapHigh","PreTextureMipMapLow",
"PreTextureRGB","AreaLight Gizmo","AreaLight Icon","Assembly Icon","AssetStore Icon","AudioMixerView Icon",
"AudioSource Gizmo","Camera Gizmo","CGProgram Icon","ChorusFilter Icon","CollabChanges Icon",
"CollabChangesConflict Icon","CollabChangesDeleted Icon","CollabConflict Icon","CollabCreate Icon",
"CollabDeleted Icon","CollabEdit Icon","CollabExclude Icon","CollabMoved Icon","cs Script Icon",
"d_AudioMixerView Icon","d_CollabChanges Icon","d_CollabChangesConflict Icon","d_CollabChangesDeleted Icon",
"d_CollabConflict Icon","d_CollabCreate Icon","d_CollabDeleted Icon","d_CollabEdit Icon",
"d_CollabExclude Icon","d_CollabMoved Icon","d_GridLayoutGroup Icon","d_HorizontalLayoutGroup Icon",
"d_Prefab Icon","d_PrefabModel Icon","d_PrefabVariant Icon","d_VerticalLayoutGroup Icon",
"DefaultSlate Icon","DirectionalLight Gizmo","DirectionalLight Icon","DiscLight Gizmo","DiscLight Icon",
"dll Script Icon","EchoFilter Icon","Favorite Icon","Folder Icon","FolderEmpty Icon",
"FolderFavorite Icon","GameManager Icon","GridBrush Icon","HighPassFilter Icon",
"HorizontalLayoutGroup Icon","LensFlare Gizmo","LightingDataAssetParent Icon","LightProbeGroup Gizmo",
"LightProbeProxyVolume Gizmo","LowPassFilter Icon","Main Light Gizmo","MetaFile Icon",
"Microphone Icon","MuscleClip Icon","ParticleSystem Gizmo","PointLight Gizmo","Prefab Icon",
"PrefabModel Icon","PrefabOverlayAdded Icon","PrefabOverlayModified Icon","PrefabOverlayRemoved Icon",
"PrefabVariant Icon","Projector Gizmo","RaycastCollider Icon","ReflectionProbe Gizmo",
"ReverbFilter Icon","SceneSet Icon","Search Icon","SoftlockProjectBrowser Icon","SpeedTreeModel Icon",
"SpotLight Gizmo","Spotlight Icon","SpriteCollider Icon","sv_icon_dot0_pix16_gizmo",
"sv_icon_dot10_pix16_gizmo","sv_icon_dot11_pix16_gizmo","sv_icon_dot12_pix16_gizmo",
"sv_icon_dot13_pix16_gizmo","sv_icon_dot14_pix16_gizmo","sv_icon_dot15_pix16_gizmo",
"sv_icon_dot1_pix16_gizmo","sv_icon_dot2_pix16_gizmo","sv_icon_dot3_pix16_gizmo",
"sv_icon_dot4_pix16_gizmo","sv_icon_dot5_pix16_gizmo","sv_icon_dot6_pix16_gizmo",
"sv_icon_dot7_pix16_gizmo","sv_icon_dot8_pix16_gizmo","sv_icon_dot9_pix16_gizmo",
"AnimatorController Icon","AnimatorState Icon","AnimatorStateMachine Icon",
"AnimatorStateTransition Icon","BlendTree Icon","AnimationWindowEvent Icon","AudioMixerController Icon",
"DefaultAsset Icon","EditorSettings Icon","AnyStateNode Icon","HumanTemplate Icon",
"LightingDataAsset Icon","LightmapParameters Icon","Preset Icon","SceneAsset Icon",
"SubstanceArchive Icon","AssemblyDefinitionAsset Icon","NavMeshAgent Icon","NavMeshData Icon",
"NavMeshObstacle Icon","OffMeshLink Icon","AnalyticsTracker Icon","Animation Icon",
"AnimationClip Icon","AimConstraint Icon","d_AimConstraint Icon","d_LookAtConstraint Icon",
"d_ParentConstraint Icon","d_PositionConstraint Icon","d_RotationConstraint Icon",
"d_ScaleConstraint Icon","LookAtConstraint Icon","ParentConstraint Icon","PositionConstraint Icon",
"RotationConstraint Icon","ScaleConstraint Icon","Animator Icon","AnimatorOverrideController Icon",
"AreaEffector2D Icon","AudioMixerGroup Icon","AudioMixerSnapshot Icon","AudioSpatializerMicrosoft Icon",
"AudioChorusFilter Icon","AudioClip Icon","AudioDistortionFilter Icon","AudioEchoFilter Icon",
"AudioHighPassFilter Icon","AudioListener Icon","AudioLowPassFilter Icon","AudioReverbFilter Icon",
"AudioReverbZone Icon","AudioSource Icon","Avatar Icon","AvatarMask Icon","BillboardAsset Icon",
"BillboardRenderer Icon","BoxCollider Icon","BoxCollider2D Icon","BuoyancyEffector2D Icon","Camera Icon",
"Canvas Icon","CanvasGroup Icon","CanvasRenderer Icon","CapsuleCollider Icon","CapsuleCollider2D Icon",
"CharacterController Icon","CharacterJoint Icon","CircleCollider2D Icon","Cloth Icon",
"CompositeCollider2D Icon","ComputeShader Icon","ConfigurableJoint Icon","ConstantForce Icon",
"ConstantForce2D Icon","Cubemap Icon","d_Canvas Icon","d_CanvasGroup Icon","d_CanvasRenderer Icon",
"d_GameObject Icon","d_LightProbeProxyVolume Icon","d_ParticleSystem Icon","d_ParticleSystemForceField Icon",
"d_RectTransform Icon","d_StreamingController Icon","DistanceJoint2D Icon","EdgeCollider2D Icon",
"d_EventSystem Icon","d_EventTrigger Icon","d_Physics2DRaycaster Icon","d_PhysicsRaycaster Icon",
"d_StandaloneInputModule Icon","d_TouchInputModule Icon","EventSystem Icon","EventTrigger Icon",
"HoloLensInputModule Icon","Physics2DRaycaster Icon","PhysicsRaycaster Icon","StandaloneInputModule Icon",
"TouchInputModule Icon","SpriteShapeRenderer Icon","VisualTreeAsset Icon","d_VisualEffect Icon",
"d_VisualEffectAsset Icon","VisualEffect Icon","VisualEffectAsset Icon","FixedJoint Icon",
"FixedJoint2D Icon","Flare Icon","FlareLayer Icon","Font Icon","FrictionJoint2D Icon",
"GameObject Icon","Grid Icon","GUILayer Icon","GUISkin Icon","GUIText Icon","GUITexture Icon",
"Halo Icon","HingeJoint Icon","HingeJoint2D Icon","LensFlare Icon","Light Icon","LightProbeGroup Icon",
"LightProbeProxyVolume Icon","LightProbes Icon","LineRenderer Icon","LODGroup Icon","Material Icon",
"Mesh Icon","MeshCollider Icon","MeshFilter Icon","MeshRenderer Icon","Motion Icon","MovieTexture Icon",
"NetworkAnimator Icon","NetworkDiscovery Icon","NetworkIdentity Icon","NetworkLobbyManager Icon",
"NetworkLobbyPlayer Icon","NetworkManager Icon","NetworkManagerHUD Icon","NetworkMigrationManager Icon",
"NetworkProximityChecker Icon","NetworkStartPosition Icon","NetworkTransform Icon",
"NetworkTransformChild Icon","NetworkTransformVisualizer Icon","NetworkView Icon","OcclusionArea Icon",
"OcclusionPortal Icon","ParticleSystem Icon","ParticleSystemForceField Icon","PhysicMaterial Icon",
"PhysicsMaterial2D Icon","PlatformEffector2D Icon","d_PlayableDirector Icon","PlayableDirector Icon",
"PointEffector2D Icon","PolygonCollider2D Icon","ProceduralMaterial Icon","Projector Icon",
"RectTransform Icon","ReflectionProbe Icon","RelativeJoint2D Icon","d_SortingGroup Icon",
"SortingGroup Icon","RenderTexture Icon","Rigidbody Icon","Rigidbody2D Icon","ScriptableObject Icon",
"Shader Icon","ShaderVariantCollection Icon","SkinnedMeshRenderer Icon","Skybox Icon","SliderJoint2D Icon",
"TrackedPoseDriver Icon","SphereCollider Icon","SpringJoint Icon","SpringJoint2D Icon","Sprite Icon",
"SpriteMask Icon","SpriteRenderer Icon","StreamingController Icon","StyleSheet Icon","SurfaceEffector2D Icon",
"TargetJoint2D Icon","Terrain Icon","TerrainCollider Icon","TerrainData Icon","TextAsset Icon",
"TextMesh Icon","Texture Icon","Texture2D Icon","Tile Icon","Tilemap Icon","TilemapCollider2D Icon",
"TilemapRenderer Icon","d_TimelineAsset Icon","TimelineAsset Icon","TrailRenderer Icon","Transform Icon",
"SpriteAtlas Icon","AspectRatioFitter Icon","Button Icon","CanvasScaler Icon","ContentSizeFitter Icon",
"d_AspectRatioFitter Icon","d_CanvasScaler Icon","d_ContentSizeFitter Icon","d_FreeformLayoutGroup Icon",
"d_GraphicRaycaster Icon","d_GridLayoutGroup Icon","d_HorizontalLayoutGroup Icon","d_LayoutElement Icon",
"d_PhysicalResolution Icon","d_ScrollViewArea Icon","d_SelectionList Icon","d_SelectionListItem Icon",
"d_SelectionListTemplate Icon","d_VerticalLayoutGroup Icon","Dropdown Icon","FreeformLayoutGroup Icon",
"GraphicRaycaster Icon","GridLayoutGroup Icon","HorizontalLayoutGroup Icon","Image Icon","InputField Icon",
"LayoutElement Icon","Mask Icon","Outline Icon","PositionAsUV1 Icon","RawImage Icon","RectMask2D Icon",
"Scrollbar Icon","ScrollRect Icon","Selectable Icon","Shadow Icon","Slider Icon","Text Icon","Toggle Icon",
"ToggleGroup Icon","VerticalLayoutGroup Icon","VideoClip Icon","VideoPlayer Icon","VisualEffect Icon",
"VisualEffectAsset Icon","WheelCollider Icon","WheelJoint2D Icon","WindZone Icon",
"SpatialMappingCollider Icon","SpatialMappingRenderer Icon","WorldAnchor Icon","UssScript Icon",
"UxmlScript Icon","VerticalLayoutGroup Icon","VideoEffect Icon","VisualEffect Gizmo",
"VisualEffectAsset Icon","AnchorBehaviour Icon","AnchorInputListenerBehaviour Icon",
"AnchorStageBehaviour Icon","CloudRecoBehaviour Icon","ContentPlacementBehaviour Icon",
"ContentPositioningBehaviour Icon","CylinderTargetBehaviour Icon","d_AnchorBehaviour Icon",
"d_AnchorInputListenerBehaviour Icon","d_AnchorStageBehaviour Icon","d_CloudRecoBehaviour Icon",
"d_ContentPlacementBehaviour Icon","d_ContentPositioningBehaviour Icon","d_CylinderTargetBehaviour Icon",
"d_ImageTargetBehaviour Icon","d_MidAirPositionerBehaviour Icon","d_ModelTargetBehaviour Icon",
"d_MultiTargetBehaviour Icon","d_ObjectTargetBehaviour Icon","d_PlaneFinderBehaviour Icon",
"d_UserDefinedTargetBuildingBehaviour Icon","d_VirtualButtonBehaviour Icon","d_VuforiaBehaviour Icon",
"d_VuMarkBehaviour Icon","d_WireframeBehaviour Icon","ImageTargetBehaviour Icon",
"MidAirPositionerBehaviour Icon","ModelTargetBehaviour Icon","MultiTargetBehaviour Icon",
"ObjectTargetBehaviour Icon","PlaneFinderBehaviour Icon","UserDefinedTargetBuildingBehaviour Icon",
"VirtualButtonBehaviour Icon","VuforiaBehaviour Icon","VuMarkBehaviour Icon","WireframeBehaviour Icon",
"WindZone Gizmo","Profiler.Audio","Profiler.CPU","Profiler.FirstFrame","Profiler.GlobalIllumination",
"Profiler.GPU","Profiler.Instrumentation","Profiler.LastFrame","Profiler.Memory","Profiler.NetworkMessages",
"Profiler.NetworkOperations","Profiler.NextFrame","Profiler.Physics","Profiler.Physics2D",
"Profiler.PrevFrame","Profiler.Record","Profiler.Rendering","Profiler.UI","Profiler.UIDetails",
"Profiler.Video","ProfilerColumn.WarningCount","Project","RectTool On","RectTool","RectTransformBlueprint",
"RectTransformRaw","redGroove","Refresh","renderdoc","rightBracket","RotateTool On","RotateTool",
"SaveActive","SaveFromPlay","SavePassive","ScaleTool On","ScaleTool","SceneLoadIn","SceneLoadOut",
"SceneSave","SceneSaveGrey","SceneViewAlpha","SceneViewAudio","SceneViewFx","SceneViewLighting",
"SceneViewOrtho","SceneViewRGB","ScrollShadow","Settings","SettingsIcon","SocialNetworks.FacebookShare",
"SocialNetworks.LinkedInShare","SocialNetworks.Tweet","SocialNetworks.UDNLogo","SocialNetworks.UDNOpen",
"SoftlockInline","SpeedScale","StateMachineEditor.ArrowTip","StateMachineEditor.ArrowTipSelected",
"StateMachineEditor.Background","StateMachineEditor.State","StateMachineEditor.StateHover",
"StateMachineEditor.StateSelected","StateMachineEditor.StateSub","StateMachineEditor.StateSubHover",
"StateMachineEditor.StateSubSelected","StateMachineEditor.UpButton","StateMachineEditor.UpButtonHover",
"StepButton On","StepButton","StepLeftButton-On","StepLeftButton","sticky_arrow","sticky_p4","sticky_skin",
"sv_icon_dot0_sml","sv_icon_dot10_sml","sv_icon_dot11_sml","sv_icon_dot12_sml","sv_icon_dot13_sml",
"sv_icon_dot14_sml","sv_icon_dot15_sml","sv_icon_dot1_sml","sv_icon_dot2_sml","sv_icon_dot3_sml",
"sv_icon_dot4_sml","sv_icon_dot5_sml","sv_icon_dot6_sml","sv_icon_dot7_sml","sv_icon_dot8_sml",
"sv_icon_dot9_sml","sv_icon_name0","sv_icon_name1","sv_icon_name2","sv_icon_name3","sv_icon_name4",
"sv_icon_name5","sv_icon_name6","sv_icon_name7","sv_icon_none","sv_label_0","sv_label_1","sv_label_2",
"sv_label_3","sv_label_4","sv_label_5","sv_label_6","sv_label_7","SVN_AddedLocal","SVN_Conflicted",
"SVN_DeletedLocal","SVN_Local","SVN_LockedLocal","SVN_OutOfSync","tab_next","tab_next@2x","tab_prev",
"tab_prev@2x","TerrainInspector.TerrainToolLower On","TerrainInspector.TerrainToolLower",
"TerrainInspector.TerrainToolLowerAlt","TerrainInspector.TerrainToolPlants On",
"TerrainInspector.TerrainToolPlants","TerrainInspector.TerrainToolPlantsAlt On",
"TerrainInspector.TerrainToolPlantsAlt","TerrainInspector.TerrainToolRaise On",
"TerrainInspector.TerrainToolRaise","TerrainInspector.TerrainToolSculpt On",
"TerrainInspector.TerrainToolSculpt","TerrainInspector.TerrainToolSetheight On",
"TerrainInspector.TerrainToolSetheight","TerrainInspector.TerrainToolSetheightAlt On",
"TerrainInspector.TerrainToolSetheightAlt","TerrainInspector.TerrainToolSettings On",
"TerrainInspector.TerrainToolSettings","TerrainInspector.TerrainToolSmoothHeight On",
"TerrainInspector.TerrainToolSmoothHeight","TerrainInspector.TerrainToolSplat On",
"TerrainInspector.TerrainToolSplat","TerrainInspector.TerrainToolSplatAlt On",
"TerrainInspector.TerrainToolSplatAlt","TerrainInspector.TerrainToolTrees On",
"TerrainInspector.TerrainToolTrees","TerrainInspector.TerrainToolTreesAlt On",
"TerrainInspector.TerrainToolTreesAlt","TestFailed","TestIgnored","TestInconclusive","TestNormal",
"TestPassed","TestStopwatch","TimelineClipBG","TimelineClipFG","TimelineDigIn","TimelineEditModeMixOFF",
"TimelineEditModeMixON","TimelineEditModeReplaceOFF","TimelineEditModeReplaceON","TimelineEditModeRippleOFF",
"TimelineEditModeRippleON","TimelineSelector","Toolbar Minus","Toolbar Plus More","Toolbar Plus",
"ToolHandleCenter","ToolHandleGlobal","ToolHandleLocal","ToolHandlePivot","tranp","TransformTool On",
"TransformTool","tree_icon","tree_icon_branch","tree_icon_branch_frond","tree_icon_frond","tree_icon_leaf",
"TreeEditor.AddBranches","TreeEditor.AddLeaves","TreeEditor.Branch On","TreeEditor.Branch",
"TreeEditor.BranchFreeHand On","TreeEditor.BranchFreeHand","TreeEditor.BranchRotate On",
"TreeEditor.BranchRotate","TreeEditor.BranchScale On","TreeEditor.BranchScale",
"TreeEditor.BranchTranslate On","TreeEditor.BranchTranslate","TreeEditor.Distribution On",
"TreeEditor.Distribution","TreeEditor.Duplicate","TreeEditor.Geometry On","TreeEditor.Geometry",
"TreeEditor.Leaf On","TreeEditor.Leaf","TreeEditor.LeafFreeHand On","TreeEditor.LeafFreeHand",
"TreeEditor.LeafRotate On","TreeEditor.LeafRotate","TreeEditor.LeafScale On","TreeEditor.LeafScale",
"TreeEditor.LeafTranslate On","TreeEditor.LeafTranslate","TreeEditor.Material On","TreeEditor.Material",
"TreeEditor.Refresh","TreeEditor.Trash","TreeEditor.Wind On","TreeEditor.Wind","UnityEditor.AnimationWindow",
"UnityEditor.ConsoleWindow","UnityEditor.DebugInspectorWindow","UnityEditor.FindDependencies",
"UnityEditor.GameView","UnityEditor.Graphs.AnimatorControllerTool","UnityEditor.HierarchyWindow",
"UnityEditor.InspectorWindow","UnityEditor.LookDevView","UnityEditor.ProfilerWindow",
"UnityEditor.SceneHierarchyWindow","UnityEditor.SceneView","UnityEditor.Timeline.TimelineWindow",
"UnityEditor.VersionControl","UnityLogo","UnityLogoLarge","UpArrow","vcs_add","vcs_branch","vcs_change",
"vcs_check","vcs_delete","vcs_document","vcs_edit","vcs_incoming","vcs_integrate","vcs_local","vcs_lock",
"vcs_refresh","vcs_sync","vcs_unresolved","vcs_update","VerticalSplit","ViewToolMove On","ViewToolMove",
"ViewToolOrbit On","ViewToolOrbit","ViewToolZoom On","ViewToolZoom","VisibilityOff","VisibilityOn",
"VisualEffect Gizmo","VUMeterTextureHorizontal","VUMeterTextureVertical","WaitSpin00","WaitSpin01",
"WaitSpin02","WaitSpin03","WaitSpin04","WaitSpin05","WaitSpin06","WaitSpin07","WaitSpin08","WaitSpin09",
"WaitSpin10","WaitSpin11","WelcomeScreen.AssetStoreLogo","winbtn_graph","winbtn_graph_close_h",
"winbtn_graph_max_h","winbtn_graph_min_h","winbtn_mac_close","winbtn_mac_close_a","winbtn_mac_close_h",
"winbtn_mac_inact","winbtn_mac_max","winbtn_mac_max_a","winbtn_mac_max_h","winbtn_mac_min",
"winbtn_mac_min_a","winbtn_mac_min_h","winbtn_win_close","winbtn_win_close_a","winbtn_win_close_h",
"winbtn_win_max","winbtn_win_max_a","winbtn_win_max_h","winbtn_win_min","winbtn_win_min_a",
"winbtn_win_min_h","winbtn_win_rest","winbtn_win_rest_a","winbtn_win_rest_h",
"AvatarInspector/RightFingersIk","AvatarInspector/LeftFingersIk","AvatarInspector/RightFeetIk",
"AvatarInspector/LeftFeetIk","AvatarInspector/RightFingers","AvatarInspector/LeftFingers",
"AvatarInspector/RightArm","AvatarInspector/LeftArm","AvatarInspector/RightLeg","AvatarInspector/LeftLeg",
"AvatarInspector/Head","AvatarInspector/Torso","AvatarInspector/MaskEditor_Root",
"AvatarInspector/BodyPartPicker","AvatarInspector/BodySIlhouette","boo Script Icon","js Script Icon",
"EyeDropper.Large","AboutWindow.MainHeader","AgeiaLogo","MonoLogo","PlayButtonProfile Anim",
"StepButton Anim","PauseButton Anim","PlayButton Anim","MoveTool On","Icon Dropdown",
"AvatarInspector/DotSelection","AvatarInspector/DotFrameDotted","AvatarInspector/DotFrame",
"AvatarInspector/DotFill","AvatarInspector/RightHandZoom","AvatarInspector/LeftHandZoom",
"AvatarInspector/HeadZoom","AvatarInspector/RightLeg","AvatarInspector/LeftLeg",
"AvatarInspector/RightFingers","AvatarInspector/RightArm","AvatarInspector/LeftFingers",
"AvatarInspector/LeftArm","AvatarInspector/Head","AvatarInspector/Torso",
"AvatarInspector/RightHandZoomSilhouette","AvatarInspector/LeftHandZoomSilhouette",
"AvatarInspector/HeadZoomSilhouette","AvatarInspector/BodySilhouette","lightMeter/redLight",
"lightMeter/orangeLight","lightMeter/lightRim","lightMeter/greenLight","SceneviewAudio",
"SceneviewLighting","TerrainInspector.TerrainToolSetHeight","AS Badge New","AS Badge Move",
"AS Badge Delete","WelcomeScreen.UnityAnswersLogo","WelcomeScreen.UnityForumLogo",
"WelcomeScreen.UnityBasicsLogo","WelcomeScreen.VideoTutLogo","WelcomeScreen.MainHeader","Icon Dropdown",
"PrefabNormal Icon","PrefabNormal Icon","BuildSettings.BlackBerry.Small","BuildSettings.Tizen.Small",
"BuildSettings.XBox360.Small","BuildSettings.PS3.Small","BuildSettings.SamsungTV.Small",
"BuildSettings.BlackBerry","BuildSettings.Tizen","BuildSettings.XBox360","BuildSettings.PS3",
"BuildSettings.SamsungTV"
};
#endregion
}
#endif

View File

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

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: ad986817a2f94919a9063c0f45cbfd78
timeCreated: 1738748198

View File

@ -1,24 +0,0 @@
// AtlasConfiguration.cs
using UnityEditor;
using UnityEngine;
[FilePath("ProjectSettings/AtlasConfiguration.asset",FilePathAttribute.Location.ProjectFolder)]
public class AtlasConfiguration : ScriptableSingleton<AtlasConfiguration>
{
[Header("Directory Settings")]
public string atlasOutputPath = "Assets/Art/Atlas";
public string rawUIPath = "Assets/Art/UI/Raw";
public string uiAtlasPath = "Assets/Art/UI/Atlases";
[Header("Texture Settings")]
public TextureImporterFormat androidFormat = TextureImporterFormat.ASTC_6x6;
public TextureImporterFormat iosFormat = TextureImporterFormat.ASTC_5x5;
public TextureImporterFormat webglFormat = TextureImporterFormat.ASTC_6x6;
public int compressionQuality = 50;
[Header("Packing Settings")]
public int padding = 2;
public bool enableRotation = true;
public int blockOffset = 1;
}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 3b1dfcbf9ece40758a159f4edb04e983
timeCreated: 1738748213

View File

@ -1,76 +0,0 @@
// AtlasEditorWindow.cs
using AlicizaX.Editor.Extension;
using UnityEditor;
using UnityEngine;
public class AtlasEditorWindow : EditorWindow
{
private AtlasConfiguration config;
private Vector2 scrollPos;
[EditorToolFunction("图集工具",typeof(AtlasEditorWindow))]
public static void ShowWindow()
{
GetWindow<AtlasEditorWindow>("图集打包");
}
private void OnEnable()
{
LoadOrCreateConfig();
}
private void LoadOrCreateConfig()
{
config = AtlasConfiguration.instance;
}
private void OnGUI()
{
scrollPos = EditorGUILayout.BeginScrollView(scrollPos);
EditorGUILayout.Space();
EditorGUILayout.LabelField("Atlas Configuration", EditorStyles.boldLabel);
if (config == null) return;
DrawConfigurationGUI();
EditorGUILayout.EndScrollView();
}
private void DrawConfigurationGUI()
{
EditorGUI.BeginChangeCheck();
EditorGUILayout.Space();
EditorGUILayout.LabelField("Paths", EditorStyles.boldLabel);
config.atlasOutputPath = EditorGUILayout.TextField("Atlas Output", config.atlasOutputPath);
config.rawUIPath = EditorGUILayout.TextField("Raw UI Path", config.rawUIPath);
config.uiAtlasPath = EditorGUILayout.TextField("UI Atlas Path", config.uiAtlasPath);
EditorGUILayout.Space();
EditorGUILayout.LabelField("Texture Settings", EditorStyles.boldLabel);
config.androidFormat = (TextureImporterFormat)EditorGUILayout.EnumPopup("Android Format", config.androidFormat);
config.iosFormat = (TextureImporterFormat)EditorGUILayout.EnumPopup("iOS Format", config.iosFormat);
config.webglFormat = (TextureImporterFormat)EditorGUILayout.EnumPopup("WebGL Format", config.webglFormat);
config.compressionQuality = EditorGUILayout.IntSlider("Compression Quality",
config.compressionQuality, 0, 100);
EditorGUILayout.Space();
EditorGUILayout.LabelField("Packing Settings", EditorStyles.boldLabel);
config.padding = EditorGUILayout.IntField("Padding", config.padding);
config.enableRotation = EditorGUILayout.Toggle("Enable Rotation", config.enableRotation);
config.blockOffset = EditorGUILayout.IntField("Block Offset", config.blockOffset);
if (EditorGUI.EndChangeCheck())
{
EditorUtility.SetDirty(config);
}
EditorGUILayout.Space();
if (GUILayout.Button("Force Rebuild All Atlases", GUILayout.Height(30)))
{
AtlasProcessor.ForceRebuildAtlases(config);
}
}
}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 42f94205e1cf43a0b15a96e17838c8b3
timeCreated: 1738748236

View File

@ -1,37 +0,0 @@
// AtlasPostprocessor.cs
using UnityEditor;
using UnityEngine;
public class AtlasPostprocessor : AssetPostprocessor
{
private static AtlasConfiguration config;
private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets,
string[] movedAssets, string[] movedFromAssetPaths)
{
if (config == null)
{
config = AtlasConfiguration.instance;
}
if (config == null) return;
foreach (var path in importedAssets) HandleAsset(path);
foreach (var path in movedAssets) HandleAsset(path);
foreach (var path in deletedAssets) HandleDeletedAsset(path);
foreach (var path in movedFromAssetPaths) HandleDeletedAsset(path);
}
private static void HandleAsset(string path)
{
if (path.EndsWith(".png") || path.EndsWith(".jpg"))
{
AtlasProcessor.ProcessSingleSprite(path, config);
}
}
private static void HandleDeletedAsset(string path)
{
// Handle removed sprites from atlases
// Implementation depends on tracking system
}
}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 1cf727bde4a5479b919d41cb8224d94b
timeCreated: 1738748276

View File

@ -1,210 +0,0 @@
// AtlasProcessor.cs
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEditor.U2D;
using UnityEngine;
using UnityEngine.U2D;
public static class AtlasProcessor
{
private static readonly HashSet<string> DirtyAtlas = new HashSet<string>();
private static readonly Dictionary<string, HashSet<string>> AtlasContents =
new Dictionary<string, HashSet<string>>();
public static void ForceRebuildAtlases(AtlasConfiguration config)
{
InitializeAtlasData(config);
ProcessAllSprites(config);
PackAllAtlases(config);
}
private static void InitializeAtlasData(AtlasConfiguration config)
{
AtlasContents.Clear();
var atlasGuids = AssetDatabase.FindAssets("t:SpriteAtlas", new[] { config.atlasOutputPath });
foreach (var guid in atlasGuids)
{
var path = AssetDatabase.GUIDToAssetPath(guid);
var atlas = AssetDatabase.LoadAssetAtPath<SpriteAtlas>(path);
if (atlas == null) continue;
var atlasName = Path.GetFileNameWithoutExtension(path);
var packed = atlas.GetPackables();
AtlasContents[atlasName] = new HashSet<string>();
foreach (var obj in packed)
{
var assetPath = AssetDatabase.GetAssetPath(obj);
if (!string.IsNullOrEmpty(assetPath))
{
AtlasContents[atlasName].Add(assetPath);
}
}
}
}
private static void ProcessAllSprites(AtlasConfiguration config)
{
var allSprites = AssetDatabase.FindAssets("t:Sprite", new[] { config.rawUIPath });
foreach (var guid in allSprites)
{
var path = AssetDatabase.GUIDToAssetPath(guid);
ProcessSingleSprite(path, config);
}
}
public static void ProcessSingleSprite(string path, AtlasConfiguration config)
{
if (!path.StartsWith(config.rawUIPath)) return;
var importer = AssetImporter.GetAtPath(path) as TextureImporter;
if (importer == null) return;
ConfigureTextureImporter(importer, config);
AddToAtlas(path, config);
}
private static void ConfigureTextureImporter(TextureImporter importer, AtlasConfiguration config)
{
var changed = false;
var settings = new TextureImporterSettings();
importer.ReadTextureSettings(settings);
if (importer.textureType != TextureImporterType.Sprite)
{
importer.textureType = TextureImporterType.Sprite;
changed = true;
}
if (settings.spriteGenerateFallbackPhysicsShape)
{
settings.spriteGenerateFallbackPhysicsShape = false;
importer.SetTextureSettings(settings);
changed = true;
}
ApplyPlatformSettings(importer, "Android", config.androidFormat, config);
ApplyPlatformSettings(importer, "iPhone", config.iosFormat, config);
ApplyPlatformSettings(importer, "WebGL", config.webglFormat, config);
if (changed) importer.SaveAndReimport();
}
private static void ApplyPlatformSettings(TextureImporter importer, string platform,
TextureImporterFormat format, AtlasConfiguration config)
{
var settings = importer.GetPlatformTextureSettings(platform);
if (!settings.overridden || settings.format != format ||
settings.compressionQuality != config.compressionQuality)
{
settings.overridden = true;
settings.format = format;
settings.compressionQuality = config.compressionQuality;
importer.SetPlatformTextureSettings(settings);
}
}
private static void AddToAtlas(string spritePath, AtlasConfiguration config)
{
var atlasName = GetAtlasName(spritePath, config);
if (string.IsNullOrEmpty(atlasName)) return;
if (!AtlasContents.TryGetValue(atlasName, out var paths))
{
paths = new HashSet<string>();
AtlasContents[atlasName] = paths;
}
if (paths.Add(spritePath)) DirtyAtlas.Add(atlasName);
}
private static string GetAtlasName(string path, AtlasConfiguration config)
{
var relativePath = path.Replace(config.rawUIPath, "").TrimStart('/');
var directory = Path.GetDirectoryName(relativePath);
return directory?.Replace("/", "_");
}
private static void PackAllAtlases(AtlasConfiguration config)
{
foreach (var atlasName in DirtyAtlas)
{
CreateOrUpdateAtlas(atlasName, config);
}
DirtyAtlas.Clear();
SpriteAtlasUtility.PackAllAtlases(EditorUserBuildSettings.activeBuildTarget);
AssetDatabase.SaveAssets();
}
private static void CreateOrUpdateAtlas(string atlasName, AtlasConfiguration config)
{
if (!System.IO.Directory.Exists(config.atlasOutputPath))
{
Directory.CreateDirectory(config.atlasOutputPath);
}
var path = $"{config.atlasOutputPath}/{atlasName}.spriteatlas";
var atlas = AssetDatabase.LoadAssetAtPath<SpriteAtlas>(path) ?? new SpriteAtlas();
ConfigureAtlasSettings(atlas, config);
AddSpritesToAtlas(atlas, AtlasContents[atlasName]);
if (!AssetDatabase.Contains(atlas))
{
AssetDatabase.CreateAsset(atlas, path);
}
else
{
EditorUtility.SetDirty(atlas);
}
}
private static void ConfigureAtlasSettings(SpriteAtlas atlas, AtlasConfiguration config)
{
// Packing Settings
var packingSettings = new SpriteAtlasPackingSettings
{
padding = config.padding,
enableRotation = config.enableRotation,
blockOffset = config.blockOffset
};
atlas.SetPackingSettings(packingSettings);
// Texture Settings
var textureSettings = new SpriteAtlasTextureSettings
{
generateMipMaps = false,
sRGB = true,
filterMode = FilterMode.Bilinear
};
atlas.SetTextureSettings(textureSettings);
// Platform Settings
SetPlatformFormat(atlas, "Android", config.androidFormat, config);
SetPlatformFormat(atlas, "iPhone", config.iosFormat, config);
SetPlatformFormat(atlas, "WebGL", config.webglFormat, config);
}
private static void SetPlatformFormat(SpriteAtlas atlas, string platform,
TextureImporterFormat format, AtlasConfiguration config)
{
var settings = atlas.GetPlatformSettings(platform);
settings.overridden = true;
settings.format = format;
settings.compressionQuality = config.compressionQuality;
atlas.SetPlatformSettings(settings);
}
private static void AddSpritesToAtlas(SpriteAtlas atlas, IEnumerable<string> spritePaths)
{
var packables = new List<Object>();
foreach (var path in spritePaths)
{
var obj = AssetDatabase.LoadAssetAtPath<Object>(path);
if (obj != null) packables.Add(obj);
}
atlas.Add(packables.ToArray());
}
}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 07f56f8c156246ddbc51eb82876f729e
timeCreated: 1738748262

View File

@ -1,549 +0,0 @@
// using System;
// using System.Collections.Generic;
// using System.IO;
// using UnityEditor;
// using UnityEditor.U2D;
// using UnityEngine;
// using UnityEngine.U2D;
// using Object = UnityEngine.Object;
//
// namespace GameFramework.Editor
// {
// /// <summary>
// /// 图集导入管线。
// /// </summary>
// public class SpritePostprocessor : AssetPostprocessor
// {
// static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
// {
// foreach (var s in importedAssets)
// {
// EditorSpriteSaveInfo.OnImportSprite(s);
// }
//
// foreach (var s in deletedAssets)
// {
// EditorSpriteSaveInfo.OnDeleteSprite(s);
// }
//
// foreach (var s in movedFromAssetPaths)
// {
// EditorSpriteSaveInfo.OnDeleteSprite(s);
// }
//
// foreach (var s in movedAssets)
// {
// EditorSpriteSaveInfo.OnImportSprite(s);
// }
// }
// }
//
// public static class EditorSpriteSaveInfo
// {
// private const string NormalAtlasDir = "Assets/AssetArt/Atlas";
// private const string UISpritePath = "Assets/AssetRaw/UIRaw";
// private const string UIAtlasPath = "Assets/AssetRaw/UIRaw/Atlas";
// private static readonly List<string> _dirtyAtlasList = new List<string>();
// private static readonly Dictionary<string, List<string>> _allASprites = new Dictionary<string, List<string>>();
//
// private static readonly Dictionary<string, string> _uiAtlasMap = new Dictionary<string, string>();
// private static bool _isInit = false;
// private static bool m_dirty = false;
//
// public static void Init()
// {
// if (_isInit)
// {
// return;
// }
//
// EditorApplication.update += CheckDirty;
//
// //读取所有图集信息
// string[] findAssets = AssetDatabase.FindAssets("t:SpriteAtlas", new[] { NormalAtlasDir });
// foreach (var findAsset in findAssets)
// {
// var path = AssetDatabase.GUIDToAssetPath(findAsset);
// SpriteAtlas sa = AssetDatabase.LoadAssetAtPath(path, typeof(SpriteAtlas)) as SpriteAtlas;
// if (sa == null)
// {
// Debug.LogError($"加载图集数据{path}失败");
// continue;
// }
//
// string atlasName = Path.GetFileNameWithoutExtension(path);
// var objects = sa.GetPackables();
// foreach (var o in objects)
// {
// if (!_allASprites.TryGetValue(atlasName, out var list))
// {
// list = new List<string>();
// _allASprites.Add(atlasName, list);
// }
//
// list.Add(AssetDatabase.GetAssetPath(o));
// }
// }
//
// _isInit = true;
// }
//
// public static void CheckDirty()
// {
// if (m_dirty)
// {
// m_dirty = false;
//
// AssetDatabase.Refresh();
// float lastProgress = -1;
// for (int i = 0; i < _dirtyAtlasList.Count; i++)
// {
// string atlasName = _dirtyAtlasList[i];
// Debug.Log("更新图集 : " + atlasName);
// var curProgress = (float)i / _dirtyAtlasList.Count;
// if (curProgress > lastProgress + 0.01f)
// {
// lastProgress = curProgress;
// var progressText = $"当前进度:{i}/{_dirtyAtlasList.Count} {atlasName}";
// bool cancel = EditorUtility.DisplayCancelableProgressBar("刷新图集" + atlasName, progressText, curProgress);
// if (cancel)
// {
// break;
// }
// }
//
// bool isUI = atlasName.StartsWith("UIRaw");
// SaveAtlas(atlasName, isUI);
// }
//
// EditorUtility.ClearProgressBar();
// AssetDatabase.SaveAssets();
// AssetDatabase.Refresh();
// _dirtyAtlasList.Clear();
// }
// }
//
// public static void OnImportSprite(string assetPath)
// {
// if (!assetPath.StartsWith(UISpritePath))
// {
// return;
// }
//
// TextureImporter ti = AssetImporter.GetAtPath(assetPath) as TextureImporter;
//
// if (ti != null)
// {
// var modify = false;
//
// if (assetPath.StartsWith(UISpritePath))
// {
// if (ti.textureType != TextureImporterType.Sprite)
// {
// ti.textureType = TextureImporterType.Sprite;
// modify = true;
// }
//
// if (!string.IsNullOrEmpty(ti.spritePackingTag))
// {
// ti.spritePackingTag = string.Empty;
// modify = true;
// }
//
// var setting = new TextureImporterSettings();
// ti.ReadTextureSettings(setting);
// if (setting.spriteGenerateFallbackPhysicsShape)
// {
// setting.spriteGenerateFallbackPhysicsShape = false;
// ti.SetTextureSettings(setting);
// modify = true;
// }
//
// if (IsKeepRawImage(assetPath))
// {
// //调整android格式
// var andPlatformSettings = ti.GetPlatformTextureSettings("Android");
// if (!andPlatformSettings.overridden)
// {
// andPlatformSettings.overridden = true;
// modify = true;
// }
//
// if (andPlatformSettings.format != TextureImporterFormat.ASTC_6x6)
// {
// andPlatformSettings.format = TextureImporterFormat.ASTC_6x6;
// andPlatformSettings.compressionQuality = 50;
// ti.SetPlatformTextureSettings(andPlatformSettings);
// modify = true;
// }
//
// //调整ios格式
// var iosPlatformSettings = ti.GetPlatformTextureSettings("iPhone");
// if (!iosPlatformSettings.overridden)
// {
// iosPlatformSettings.overridden = true;
// modify = true;
// }
//
// if (iosPlatformSettings.format != TextureImporterFormat.ASTC_5x5)
// {
// iosPlatformSettings.format = TextureImporterFormat.ASTC_5x5;
// iosPlatformSettings.compressionQuality = 50;
// ti.SetPlatformTextureSettings(iosPlatformSettings);
// modify = true;
// }
//
// //调整WebGL格式
// var webglSettings = ti.GetPlatformTextureSettings("WebGL");
// if (!webglSettings.overridden)
// {
// webglSettings.overridden = true;
// modify = true;
// }
//
// if (webglSettings.format != TextureImporterFormat.ASTC_6x6)
// {
// webglSettings.format = TextureImporterFormat.ASTC_6x6;
// webglSettings.compressionQuality = 50;
// ti.SetPlatformTextureSettings(webglSettings);
// modify = true;
// }
// }
// }
//
// if (modify)
// {
// ti.SaveAndReimport();
// }
//
// if (ti.textureType == TextureImporterType.Sprite)
// {
// OnProcessSprite(assetPath);
// }
// }
// }
//
// /// <summary>
// /// 是否保持散图(不打图集)
// /// </summary>
// /// <param name="dirPath"></param>
// /// <returns></returns>
// public static bool IsKeepRawImage(string dirPath)
// {
// return dirPath.Contains("UIRaw/Raw/") || dirPath.Contains("UIRaw_Raw_");
// }
//
// public static string GetSpritePath(string assetPath)
// {
// string path = assetPath.Substring(0, assetPath.LastIndexOf(".", StringComparison.Ordinal));
// path = path.Replace("Assets/AssetRaw/", "");
// return path;
// }
//
// /// <summary>
// /// 根据文件路径,返回图集名称
// /// </summary>
// /// <param name="fullName"></param>
// /// <returns></returns>
// public static string GetPackageTag(string fullName)
// {
// fullName = fullName.Replace("\\", "/");
// int idx = fullName.LastIndexOf("UIRaw", StringComparison.Ordinal);
// if (idx == -1)
// {
// return "";
// }
//
// if (IsKeepRawImage(fullName))
// {
// return "";
// }
//
// var atlasPath = fullName.Substring(idx);
// string str = atlasPath;
// str = str.Substring(0, str.LastIndexOf("/", StringComparison.Ordinal)).Replace("/", "_");
//
// return str;
// }
//
// public static void OnProcessSprite(string assetPath)
// {
// if (!assetPath.StartsWith("Assets"))
// {
// return;
// }
//
// if (assetPath.StartsWith("Assets/UIRaw_Delete"))
// {
// return;
// }
//
// Init();
//
// var spriteName = Path.GetFileNameWithoutExtension(assetPath);
// var spritePath = GetSpritePath(assetPath);
// if (!_uiAtlasMap.TryGetValue(spriteName, out string oldAssetPath) || spritePath == oldAssetPath)
// {
// _uiAtlasMap[spriteName] = spritePath;
// m_dirty = true;
// }
// else
// {
// Debug.LogError($"有重名的图片:{spriteName}\n旧图集{oldAssetPath}\n新图集{spritePath} ");
// _uiAtlasMap[spriteName] = spritePath;
// m_dirty = true;
// }
//
// string atlasName = GetPackageTag(assetPath);
// if (string.IsNullOrEmpty(atlasName))
// {
// bool keepRaw = IsKeepRawImage(assetPath);
// if (!keepRaw)
// {
// Debug.LogError($"empty packingTag of asset :{assetPath} !!!");
// }
//
// return;
// }
// else
// {
// List<string> ret;
// if (!_allASprites.TryGetValue(atlasName, out ret))
// {
// ret = new List<string>();
// _allASprites.Add(atlasName, ret);
// }
//
// if (!ret.Contains(assetPath))
// {
// ret.Add(assetPath);
// m_dirty = true;
// if (!_dirtyAtlasList.Contains(atlasName))
// {
// _dirtyAtlasList.Add(atlasName);
// }
// }
// }
// }
//
// public static void OnDeleteSprite(string assetPath)
// {
// if (assetPath.StartsWith("Assets/UIRaw_Delete"))
// {
// return;
// }
//
// if (!assetPath.StartsWith(UISpritePath))
// {
// return;
// }
//
// Init();
// string atlasName = GetPackageTag(assetPath);
// if (!_allASprites.TryGetValue(atlasName, out var ret))
// {
// return;
// }
//
// //改成文件名的匹配
// if (!ret.Exists(s => Path.GetFileName(s) == Path.GetFileName(assetPath)))
// {
// return;
// }
//
// if (assetPath.StartsWith(UISpritePath))
// {
// var spriteName = Path.GetFileNameWithoutExtension(assetPath);
// if (_uiAtlasMap.ContainsKey(spriteName))
// {
// _uiAtlasMap.Remove(spriteName);
// m_dirty = true;
// }
// }
//
// ret.Remove(assetPath);
// m_dirty = true;
// if (!_dirtyAtlasList.Contains(atlasName))
// {
// _dirtyAtlasList.Add(atlasName);
// }
// }
//
// #region 更新图集
//
// public static void SaveAtlas(string atlasName, bool isUI)
// {
// List<Object> spriteList = new List<Object>();
// if (_allASprites.TryGetValue(atlasName, out var list))
// {
// list.Sort(StringComparer.Ordinal);
//
// foreach (var s in list)
// {
// var sprite = AssetDatabase.LoadAssetAtPath<Sprite>(s);
// if (sprite != null)
// {
// spriteList.Add(sprite);
// }
// }
// }
//
// var path = $"{NormalAtlasDir}/{atlasName}.spriteatlas";
//
// if (spriteList.Count == 0)
// {
// if (File.Exists(path))
// {
// AssetDatabase.DeleteAsset(path);
// }
//
// return;
// }
//
// var atlas = new SpriteAtlas();
// // var atlas = new SpriteAtlasAsset();
// var setting = new SpriteAtlasPackingSettings
// {
// blockOffset = 1,
// padding = 2,
// enableRotation = true
// };
//
// bool isOpaque = atlasName.Contains("Opaque");
//
// var textureSetting = new SpriteAtlasTextureSettings
// {
// generateMipMaps = false,
// sRGB = true,
// filterMode = FilterMode.Bilinear
// };
// atlas.SetTextureSettings(textureSetting);
//
// var iphonePlatformSetting = atlas.GetPlatformSettings("iPhone");
// if (!iphonePlatformSetting.overridden)
// {
// iphonePlatformSetting.overridden = true;
// iphonePlatformSetting.format = TextureImporterFormat.ASTC_5x5;
// iphonePlatformSetting.compressionQuality = 100;
// atlas.SetPlatformSettings(iphonePlatformSetting);
// }
//
// var androidPlatformSetting = atlas.GetPlatformSettings("Android");
// if (!androidPlatformSetting.overridden)
// {
// androidPlatformSetting.overridden = true;
// androidPlatformSetting.format = TextureImporterFormat.ASTC_6x6;
// androidPlatformSetting.compressionQuality = 100;
// atlas.SetPlatformSettings(androidPlatformSetting);
// }
//
// var webglSettings = atlas.GetPlatformSettings("WebGL");
// if (!webglSettings.overridden)
// {
// webglSettings.overridden = true;
// webglSettings.format = TextureImporterFormat.ASTC_6x6;
// webglSettings.compressionQuality = 50;
// atlas.SetPlatformSettings(webglSettings);
// }
//
// atlas.SetPackingSettings(setting);
// atlas.Add(spriteList.ToArray());
//
// AssetDatabase.CreateAsset(atlas, path);
// AssetDatabase.SaveAssets();
// AssetDatabase.Refresh();
// }
//
// #endregion
//
// #region 重新生成图集
//
// private static readonly Dictionary<string, List<string>> m_tempAllASprites = new Dictionary<string, List<string>>();
//
// [MenuItem("开发工具/Atlas/重新生成UI图集", false, 90)]
// static void ForceGenAtlas()
// {
// Init();
// List<string> needSaveAtlas = new List<string>();
// m_tempAllASprites.Clear();
// _allASprites.Clear();
// var findAssets = AssetDatabase.FindAssets("t:sprite", new[] { UIAtlasPath });
// foreach (var findAsset in findAssets)
// {
// var path = AssetDatabase.GUIDToAssetPath(findAsset);
// var atlasName = GetPackageTag(path);
// if (!m_tempAllASprites.TryGetValue(atlasName, out var spriteList))
// {
// spriteList = new List<string>();
// m_tempAllASprites[atlasName] = spriteList;
// }
//
// if (!spriteList.Contains(path))
// {
// spriteList.Add(path);
// }
// }
//
// //有变化的才刷
// var iter = m_tempAllASprites.GetEnumerator();
// while (iter.MoveNext())
// {
// bool needSave = false;
// var atlasName = iter.Current.Key;
// var newSpritesList = iter.Current.Value;
//
// if (_allASprites.TryGetValue(atlasName, out var existSprites))
// {
// if (existSprites.Count != newSpritesList.Count)
// {
// needSave = true;
// existSprites.Clear();
// existSprites.AddRange(newSpritesList);
// }
// else
// {
// for (int i = 0; i < newSpritesList.Count; i++)
// {
// if (!existSprites.Contains(newSpritesList[i]))
// {
// needSave = true;
// break;
// }
// }
//
// if (needSave)
// {
// existSprites.Clear();
// existSprites.AddRange(newSpritesList);
// }
// }
// }
// else
// {
// needSave = true;
// _allASprites.Add(atlasName, new List<string>(newSpritesList));
// }
//
// if (needSave && !needSaveAtlas.Contains(atlasName))
// {
// needSaveAtlas.Add(atlasName);
// }
// }
//
// iter.Dispose();
// foreach (var atlas in needSaveAtlas)
// {
// Debug.LogFormat("Gen atlas:{0}", atlas);
// SaveAtlas(atlas, true);
// }
//
// AssetDatabase.SaveAssets();
// AssetDatabase.Refresh();
//
// SpriteAtlasUtility.PackAllAtlases(EditorUserBuildSettings.activeBuildTarget);
// Debug.Log("Gen end");
// }
//
// #endregion
// }
// }

View File

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

View File

@ -1,25 +0,0 @@
using Paps.UnityToolbarExtenderUIToolkit;
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;
[MainToolbarElement(id: "BuildSettingWindow", alignment: ToolbarAlign.Right, order: 1)]
public class BuildSettingWindow : IMGUIContainer
{
private GUIContent buildBtContent;
public void InitializeElement()
{
buildBtContent = EditorGUIUtility.TrTextContentWithIcon("Build App/Hotfix", "打新包/打热更", EditorGUIUtility.IconContent("d_BuildSettings.Standalone").image);
onGUIHandler = MyGUIMethod;
}
private void MyGUIMethod()
{
GUILayout.BeginHorizontal();
if (GUILayout.Button(buildBtContent, EditorStyles.toolbarButton, GUILayout.MaxWidth(125)))
Debug.Log("GUI Button clicked");
GUILayout.EndHorizontal();
}
}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: af03d991c6e34e8bbfbf861b558aa11b
timeCreated: 1741240351

View File

@ -1,62 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Paps.UnityToolbarExtenderUIToolkit;
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;
namespace AlicizaX.Editor.Extension
{
[MainToolbarElement("EditorQuickToolBar", alignment: ToolbarAlign.Right, order: 0)]
public class EditorQuickToolBar : IMGUIContainer
{
private static GUIContent toolsDropBtContent;
public void InitializeElement()
{
toolsDropBtContent = EditorGUIUtility.TrTextContentWithIcon("Tools", "工具箱", "CustomTool");
onGUIHandler = MyGUIMethod;
}
private void MyGUIMethod()
{
GUILayout.BeginHorizontal();
if (EditorGUILayout.DropdownButton(toolsDropBtContent, FocusType.Passive, EditorStyles.toolbarPopup,
GUILayout.MaxWidth(90)))
{
DrawEditorToolDropdownMenus();
}
GUILayout.Space(5);
GUILayout.EndHorizontal();
}
static void DrawEditorToolDropdownMenus()
{
GenericMenu popMenu = new GenericMenu();
for (int i = 0; i < EditorToolFunctionAttributeCollector.Attributes.Count; i++)
{
var toolAttr = EditorToolFunctionAttributeCollector.Attributes[i];
popMenu.AddItem(new GUIContent(toolAttr.ToolMenuPath), false,
menuIdx => { ClickToolsSubmenu((int)menuIdx); }, i);
}
popMenu.ShowAsContext();
}
static void ClickToolsSubmenu(int menuIdx)
{
var editorTp = EditorToolFunctionAttributeCollector.Attributes[menuIdx];
if (editorTp.MethodInfo != null && editorTp.MethodInfo.IsStatic)
{
editorTp.MethodInfo.Invoke(null, null); // Invoke the static method
}
else
{
Debug.LogError("Method is not static or not found.");
}
}
}
}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 6862584178a44687ab6912b5bbac36b4
timeCreated: 1741334878

View File

@ -1,65 +0,0 @@
using System.Collections.Generic;
using System.Linq;
using AlicizaX.Resource.Runtime;
using Paps.UnityToolbarExtenderUIToolkit;
using UnityEditor;
using UnityEditor.Toolbars;
using UnityEngine;
using UnityEngine.UIElements;
namespace AlicizaX.Editor.Extension
{
[MainToolbarElement("ResourceModeDropdownField", alignment: ToolbarAlign.Right, order: 0)]
public class ResourceModeDropdownField : IMGUIContainer
{
private static GUIContent appConfigBtContent;
private static readonly string[] _resourceModeNames =
{
"Editor",
"Offline",
"Host",
};
public void InitializeElement()
{
appConfigBtContent =
EditorGUIUtility.TrTextContentWithIcon("Res:", "配置App运行时所需DataTable/Config/Procedure",
"Settings");
onGUIHandler = MyGUIMethod;
}
private void MyGUIMethod()
{
GUILayout.BeginHorizontal();
string title = "Res:" + _resourceModeNames[EditorPrefs.GetInt(ResourceComponent.PrefsKey, 0)];
appConfigBtContent.text = title;
if (EditorGUILayout.DropdownButton(appConfigBtContent, FocusType.Passive, EditorStyles.toolbarPopup, GUILayout.MaxWidth(90)))
{
DrawEditorToolDropdownMenus();
}
GUILayout.Space(5);
GUILayout.EndHorizontal();
}
static void DrawEditorToolDropdownMenus()
{
int index = EditorPrefs.GetInt(ResourceComponent.PrefsKey, 0);
GenericMenu popMenu = new GenericMenu();
for (int i = 0; i < _resourceModeNames.Length; i++)
{
var selected = index == i;
var toolAttr = _resourceModeNames[i];
popMenu.AddItem(new GUIContent(toolAttr), selected, menuIdx => { ClickToolsSubmenu((int)menuIdx); }, i);
}
popMenu.ShowAsContext();
}
static void ClickToolsSubmenu(int menuIdx)
{
EditorPrefs.SetInt(ResourceComponent.PrefsKey, menuIdx);
}
}
}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 0a9f36ab7c6f42a5bed41bceeed67fc6
timeCreated: 1741056284

View File

@ -1,101 +0,0 @@
using System.Collections.Generic;
using Paps.UnityToolbarExtenderUIToolkit;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UIElements;
[MainToolbarElement(id: "SwitchSceneToolBar", alignment: ToolbarAlign.Left, order: 1)]
public class SwitchSceneToolBar : IMGUIContainer
{
private GUIContent switchSceneBtContent;
public void InitializeElement()
{
var curOpenSceneName = EditorSceneManager.GetActiveScene().name;
switchSceneBtContent = EditorGUIUtility.TrTextContentWithIcon(
string.IsNullOrEmpty(curOpenSceneName) ? "Switch Scene" : curOpenSceneName, "切换场景", "UnityLogo");
onGUIHandler = MyGUIMethod;
EditorSceneManager.sceneOpened += OnSceneOpened;
}
private void OnSceneOpened(Scene scene, OpenSceneMode mode)
{
switchSceneBtContent.text = scene.name;
}
private static List<string> sceneAssetList = new List<string>();
private void MyGUIMethod()
{
GUILayout.BeginHorizontal();
if (EditorGUILayout.DropdownButton(switchSceneBtContent, FocusType.Passive, EditorStyles.toolbarPopup,
GUILayout.MaxWidth(150)))
{
DrawSwithSceneDropdownMenus();
}
GUILayout.EndHorizontal();
}
static string[] ScenePath = new[] { "Assets/Bundles/Scenes/", "Assets/Scenes/" };
private static string RootScenePath = "Assets/Bundles/Scenes/";
private static string BundleScenePath = "Assets/Scenes/";
static void DrawSwithSceneDropdownMenus()
{
GenericMenu popMenu = new GenericMenu();
popMenu.allowDuplicateNames = true;
var sceneGuids = AssetDatabase.FindAssets("t:Scene", ScenePath);
sceneAssetList.Clear();
for (int i = 0; i < sceneGuids.Length; i++)
{
var scenePath = AssetDatabase.GUIDToAssetPath(sceneGuids[i]);
sceneAssetList.Add(scenePath);
string fileDir = System.IO.Path.GetDirectoryName(scenePath);
bool isInRootDir = AlicizaX.Runtime.Utility.Path.GetRegularPath(BundleScenePath).TrimEnd('/') ==
AlicizaX.Runtime.Utility.Path.GetRegularPath(fileDir).TrimEnd('/');
var sceneName = System.IO.Path.GetFileNameWithoutExtension(scenePath);
string displayName = sceneName;
if (!isInRootDir)
{
var sceneDir = System.IO.Path.GetRelativePath(RootScenePath, fileDir);
displayName = $"{sceneDir}/{sceneName}";
}
popMenu.AddItem(new GUIContent(displayName), false, menuIdx => { SwitchScene((int)menuIdx); }, i);
}
popMenu.ShowAsContext();
}
private static void SwitchScene(int menuIdx)
{
if (menuIdx >= 0 && menuIdx < sceneAssetList.Count)
{
var scenePath = sceneAssetList[menuIdx];
var curScene = EditorSceneManager.GetActiveScene();
if (curScene != null && curScene.isDirty)
{
int opIndex =
EditorUtility.DisplayDialogComplex("警告", $"当前场景{curScene.name}未保存,是否保存?", "保存", "取消", "不保存");
switch (opIndex)
{
case 0:
if (!EditorSceneManager.SaveOpenScenes())
{
return;
}
break;
case 1:
return;
}
}
EditorSceneManager.OpenScene(scenePath, OpenSceneMode.Single);
}
}
}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 558a3f0219eb4dc498ca3ef90446af34
timeCreated: 1741329998

View File

@ -45,9 +45,10 @@ namespace Unity.Startup.Procedure
#if UNITY_EDITOR
UnityEditor.EditorApplication.isPlaying = false;
#else
Application.OpenURL(GlobalConfig.PatchData.AppDownloadUrl);
Application.OpenURL(GlobalSetting.PatchData.AppDownloadUrl);
Application.Quit();
#endif
return;
}
ChangeState<ProcedurePatchInit>(procedureOwner);

View File

@ -11,7 +11,6 @@
"AlicizaX.Resource.Runtime",
"AlicizaX.Runtime",
"AlicizaX.Fsm.Runtime",
"HybridCLRData",
"AlicizaX.Setting.Runtime",
"AlicizaX.Audio.Runtime",
"YooAsset",

View File

@ -17,7 +17,7 @@ MonoBehaviour:
m_RendererType: 1
m_RendererData: {fileID: 0}
m_RendererDataList:
- {fileID: 11400000, guid: f288ae1f4751b564a96ac7587541f7a2, type: 2}
- {fileID: 11400000, guid: 0bb04a7c6e8e8a849960d3a572f4961d, type: 2}
m_DefaultRendererIndex: 0
m_RequireDepthTexture: 1
m_RequireOpaqueTexture: 1

View File

@ -13,30 +13,22 @@ MonoBehaviour:
m_Name: PC_Renderer
m_EditorClassIdentifier:
debugShaders:
debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7,
type: 3}
debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7, type: 3}
hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3}
probeVolumeSamplingDebugComputeShader: {fileID: 7200000, guid: 53626a513ea68ce47b59dc1299fe3959,
type: 3}
probeVolumeSamplingDebugComputeShader: {fileID: 7200000, guid: 53626a513ea68ce47b59dc1299fe3959, type: 3}
probeVolumeResources:
probeVolumeDebugShader: {fileID: 4800000, guid: e5c6678ed2aaa91408dd3df699057aae,
type: 3}
probeVolumeFragmentationDebugShader: {fileID: 4800000, guid: 03cfc4915c15d504a9ed85ecc404e607,
type: 3}
probeVolumeOffsetDebugShader: {fileID: 4800000, guid: 53a11f4ebaebf4049b3638ef78dc9664,
type: 3}
probeVolumeSamplingDebugShader: {fileID: 4800000, guid: 8f96cd657dc40064aa21efcc7e50a2e7,
type: 3}
probeSamplingDebugMesh: {fileID: -3555484719484374845, guid: 57d7c4c16e2765b47a4d2069b311bffe,
type: 3}
probeSamplingDebugTexture: {fileID: 2800000, guid: 24ec0e140fb444a44ab96ee80844e18e,
type: 3}
probeVolumeBlendStatesCS: {fileID: 7200000, guid: b9a23f869c4fd45f19c5ada54dd82176,
type: 3}
probeVolumeDebugShader: {fileID: 4800000, guid: e5c6678ed2aaa91408dd3df699057aae, type: 3}
probeVolumeFragmentationDebugShader: {fileID: 4800000, guid: 03cfc4915c15d504a9ed85ecc404e607, type: 3}
probeVolumeOffsetDebugShader: {fileID: 4800000, guid: 53a11f4ebaebf4049b3638ef78dc9664, type: 3}
probeVolumeSamplingDebugShader: {fileID: 4800000, guid: 8f96cd657dc40064aa21efcc7e50a2e7, type: 3}
probeSamplingDebugMesh: {fileID: -3555484719484374845, guid: 57d7c4c16e2765b47a4d2069b311bffe, type: 3}
probeSamplingDebugTexture: {fileID: 2800000, guid: 24ec0e140fb444a44ab96ee80844e18e, type: 3}
probeVolumeBlendStatesCS: {fileID: 7200000, guid: b9a23f869c4fd45f19c5ada54dd82176, type: 3}
m_RendererFeatures:
- {fileID: 7833122117494664109}
m_RendererFeatureMap: ad6b866f10d7b46c
m_UseNativeRenderPass: 1
xrSystemData: {fileID: 0}
postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
m_AssetVersion: 2
m_OpaqueLayerMask:
@ -56,6 +48,8 @@ MonoBehaviour:
m_RenderingMode: 2
m_DepthPrimingMode: 0
m_CopyDepthMode: 0
m_DepthAttachmentFormat: 0
m_DepthTextureFormat: 0
m_AccurateGbufferNormals: 0
m_IntermediateTextureMode: 0
--- !u!114 &7833122117494664109

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f288ae1f4751b564a96ac7587541f7a2
guid: 0bb04a7c6e8e8a849960d3a572f4961d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000

View File

@ -33,27 +33,28 @@ MonoBehaviour:
m_Settings:
m_SettingsList:
m_List:
- rid: 8521677007200977269
- rid: 8521677007200977270
- rid: 8521677142241312790
- rid: 8521677142241312791
- rid: 6852985685364965378
- rid: 6852985685364965379
- rid: 6852985685364965380
- rid: 6852985685364965381
- rid: 8521677007200977271
- rid: 8521677007200977272
- rid: 8521677142241312792
- rid: 8521677142241312793
- rid: 6852985685364965384
- rid: 6852985685364965385
- rid: 8521677007200977273
- rid: 8521677007200977274
- rid: 8521677007200977275
- rid: 8521677007200977276
- rid: 8521677007200977277
- rid: 8521677007200977278
- rid: 8521677142241312794
- rid: 8521677142241312795
- rid: 8521677142241312796
- rid: 8521677142241312797
- rid: 8521677142241312798
- rid: 8521677142241312799
- rid: 6852985685364965392
- rid: 8521677007200977279
- rid: 8521677142241312800
- rid: 6852985685364965394
- rid: 8712630790384254976
- rid: 3945244723512606720
- rid: 8521677141868019712
m_RuntimeSettings:
m_List:
- rid: 6852985685364965378
@ -96,6 +97,8 @@ MonoBehaviour:
references:
version: 2
RefIds:
- rid: -2
type: {class: , ns: , asm: }
- rid: 3945244723512606720
type: {class: UniversalRenderPipelineRuntimeXRResources, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
@ -155,14 +158,18 @@ MonoBehaviour:
m_version: 0
m_EnableCompilationCaching: 1
m_EnableValidityChecks: 1
- rid: 8521677007200977269
- rid: 8521677141868019712
type: {class: UniversalRenderPipelineEditorAssets, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_DefaultSettingsVolumeProfile: {fileID: 11400000, guid: eda47df5b85f4f249abf7abd73db2cb2, type: 2}
- rid: 8521677142241312790
type: {class: URPShaderStrippingSetting, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_Version: 0
m_StripUnusedPostProcessingVariants: 1
m_StripUnusedVariants: 1
m_StripScreenCoordOverrideVariants: 1
- rid: 8521677007200977270
- rid: 8521677142241312791
type: {class: UniversalRenderPipelineEditorShaders, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_AutodeskInteractive: {fileID: 4800000, guid: 0e9d5a909a1f7e84882a534d0d11e49f, type: 3}
@ -174,7 +181,7 @@ MonoBehaviour:
m_DefaultSpeedTree7Shader: {fileID: 4800000, guid: 0f4122b9a743b744abe2fb6a0a88868b, type: 3}
m_DefaultSpeedTree8Shader: {fileID: -6465566751694194690, guid: 9920c1f1781549a46ba081a2a15a16ec, type: 3}
m_DefaultSpeedTree9Shader: {fileID: -6465566751694194690, guid: cbd3e1cc4ae141c42a30e33b4d666a61, type: 3}
- rid: 8521677007200977271
- rid: 8521677142241312792
type: {class: Renderer2DResources, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_Version: 0
@ -189,7 +196,7 @@ MonoBehaviour:
m_DefaultLitMaterial: {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
m_DefaultUnlitMaterial: {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2}
m_DefaultMaskMaterial: {fileID: 2100000, guid: 15d0c3709176029428a0da2f8cecf0b5, type: 2}
- rid: 8521677007200977272
- rid: 8521677142241312793
type: {class: UniversalRenderPipelineEditorMaterials, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_DefaultMaterial: {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
@ -197,7 +204,7 @@ MonoBehaviour:
m_DefaultLineMaterial: {fileID: 2100000, guid: e823cd5b5d27c0f4b8256e7c12ee3e6d, type: 2}
m_DefaultTerrainMaterial: {fileID: 2100000, guid: 594ea882c5a793440b60ff72d896021e, type: 2}
m_DefaultDecalMaterial: {fileID: 2100000, guid: 31d0dcc6f2dd4e4408d18036a2c93862, type: 2}
- rid: 8521677007200977273
- rid: 8521677142241312794
type: {class: GPUResidentDrawerResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.GPUDriven.Runtime}
data:
m_Version: 0
@ -210,13 +217,13 @@ MonoBehaviour:
m_OcclusionCullingDebugKernels: {fileID: 7200000, guid: b23e766bcf50ca4438ef186b174557df, type: 3}
m_DebugOcclusionTestPS: {fileID: 4800000, guid: d3f0849180c2d0944bc71060693df100, type: 3}
m_DebugOccluderPS: {fileID: 4800000, guid: b3c92426a88625841ab15ca6a7917248, type: 3}
- rid: 8521677007200977274
- rid: 8521677142241312795
type: {class: STP/RuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_setupCS: {fileID: 7200000, guid: 33be2e9a5506b2843bdb2bdff9cad5e1, type: 3}
m_preTaaCS: {fileID: 7200000, guid: a679dba8ec4d9ce45884a270b0e22dda, type: 3}
m_taaCS: {fileID: 7200000, guid: 3923900e2b41b5e47bc25bfdcbcdc9e6, type: 3}
- rid: 8521677007200977275
- rid: 8521677142241312796
type: {class: ProbeVolumeBakingResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_Version: 1
@ -229,12 +236,12 @@ MonoBehaviour:
skyOcclusionRT: {fileID: -5126288278712620388, guid: 5a2a534753fbdb44e96c3c78b5a6999d, type: 3}
renderingLayerCS: {fileID: -6772857160820960102, guid: 94a070d33e408384bafc1dea4a565df9, type: 3}
renderingLayerRT: {fileID: -5126288278712620388, guid: 94a070d33e408384bafc1dea4a565df9, type: 3}
- rid: 8521677007200977276
- rid: 8521677142241312797
type: {class: ProbeVolumeGlobalSettings, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_Version: 1
m_ProbeVolumeDisableStreamingAssets: 0
- rid: 8521677007200977277
- rid: 8521677142241312798
type: {class: ProbeVolumeDebugResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_Version: 1
@ -244,14 +251,14 @@ MonoBehaviour:
probeVolumeOffsetDebugShader: {fileID: 4800000, guid: db8bd7436dc2c5f4c92655307d198381, type: 3}
probeSamplingDebugMesh: {fileID: -3555484719484374845, guid: 20be25aac4e22ee49a7db76fb3df6de2, type: 3}
numbersDisplayTex: {fileID: 2800000, guid: 73fe53b428c5b3440b7e87ee830b608a, type: 3}
- rid: 8521677007200977278
- rid: 8521677142241312799
type: {class: IncludeAdditionalRPAssets, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_version: 0
m_IncludeReferencedInScenes: 0
m_IncludeAssetsByLabel: 0
m_LabelToInclude:
- rid: 8521677007200977279
- rid: 8521677142241312800
type: {class: ProbeVolumeRuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_Version: 1

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: e1f8a05e8ca47d74b8777ca92c26d313
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 5ec286b1b8368f1478cc4b26e606c3a6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 711eb213a0766f8468943b4e06505daf
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 3aeb77d5212f8c3418f6efdd8be4eb00
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 5f8325b621f2e06458dee5a7e12ba91f
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 320c45f0354900a44913a80df78068e9
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 4073b40de7752da48863e56b8a0cb4a1
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 66b79f24f1e393640a1803e2583196ae
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 8bfa618765641954e88e21f9bb7273bf
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -207,6 +207,9 @@ namespace AlicizaX.Debugger.Runtime
ActiveWindow = false;
break;
}
#if !UNITY_EDITOR
ActiveWindow = AppBuilderSetting.Instance.DebugMode;
#endif
}
private void Update()

@ -0,0 +1 @@
Subproject commit 7c11438a7748e86d3d072f90aed1ba11ce5f8e56

View File

@ -39,7 +39,7 @@ namespace AlicizaX.Localization.Runtime
}
else
{
_language = FrameworkSettingsUtils.FrameworkPublishSettings.Language;
_language = AppBuilderSetting.Instance.Language;
m_SettingComponent.SetString(nameof(LocalizationComponent) + "." + nameof(Language), value.ToString());
m_SettingComponent.Save();
}

View File

@ -75,7 +75,7 @@ namespace AlicizaX.Resource.Runtime
#if UNITY_EDITOR
m_GamePlayMode = (EPlayMode)UnityEditor.EditorPrefs.GetInt(PrefsKey, 0);
#else
m_GamePlayMode = (EPlayMode)FrameworkSettingsUtils.FrameworkPublishSettings.ResMode;
m_GamePlayMode = (EPlayMode)AppBuilderSetting.Instance.ResMode;
#endif
m_ResourceManager.DefaultPackageName = m_defaultPackageName;

View File

@ -2,6 +2,7 @@
"name": "AlicizaX.Timer.Runtime",
"rootNamespace": "",
"references": [
"GUID:75b6f2078d190f14dbda4a5b747d709c",
"GUID:75b6f2078d190f14dbda4a5b747d709c"
],
"includePlatforms": [],

View File

@ -0,0 +1,234 @@
using System;
using System.Collections.Generic;
using AlicizaX.Runtime;
using UnityEngine;
namespace AlicizaX.Timer.Runtime
{
public delegate void TimerHandler(params object[] args);
[Serializable]
public class Timer : IReference
{
public int TimerId;
public float TriggerTime;
public float Interval;
public TimerHandler Handler;
public bool IsLoop;
public bool IsRunning;
public bool IsUnscaled;
public bool IsActive; // 标记定时器是否有效
public object[] Args;
public LinkedListNode<Timer> Node; // 用于时间轮中的链表节点
public void Clear()
{
Handler = null;
Args = null;
Node = null;
IsActive = false;
}
}
[UnityEngine.Scripting.Preserve]
internal sealed class GameTimerManager : ITimerManager
{
private int _curTimerId;
private TimeWheel _scaledTimeWheel;
private TimeWheel _unscaledTimeWheel;
private readonly Dictionary<int, Timer> _activeTimers = new Dictionary<int, Timer>();
private class TimeWheel
{
private readonly float _slotInterval; // 每个槽的时间间隔(秒)
private readonly int _slotCount; // 槽的数量
private readonly LinkedList<Timer>[] _slots;
private float _currentTime;
private int _currentSlotIndex;
public TimeWheel(float slotInterval, int slotCount)
{
_slotInterval = slotInterval;
_slotCount = slotCount;
_slots = new LinkedList<Timer>[slotCount];
for (int i = 0; i < slotCount; i++)
_slots[i] = new LinkedList<Timer>();
_currentTime = 0f;
_currentSlotIndex = 0;
}
public void AddTimer(Timer timer, float currentTime)
{
if (!timer.IsActive) return;
float triggerTime = timer.TriggerTime;
float delta = triggerTime - currentTime;
if (delta < 0)
{
// 立即触发
delta = 0;
}
int slotsToAdvance = Mathf.FloorToInt(delta / _slotInterval);
int targetSlot = (_currentSlotIndex + slotsToAdvance) % _slotCount;
timer.Node = _slots[targetSlot].AddLast(timer);
timer.IsRunning = true;
}
public void Advance(float currentTime, Action<Timer> processTimer)
{
float timeDelta = currentTime - _currentTime;
if (timeDelta <= 0) return;
int steps = Mathf.FloorToInt(timeDelta / _slotInterval);
for (int i = 0; i < steps; i++)
{
_currentSlotIndex = (_currentSlotIndex + 1) % _slotCount;
_currentTime += _slotInterval;
LinkedList<Timer> currentSlot = _slots[_currentSlotIndex];
LinkedListNode<Timer> currentNode = currentSlot.First;
while (currentNode != null)
{
LinkedListNode<Timer> nextNode = currentNode.Next;
Timer timer = currentNode.Value;
currentSlot.Remove(currentNode);
if (timer.IsActive && timer.IsRunning)
{
processTimer(timer);
}
currentNode = nextNode;
}
}
}
}
public GameTimerManager()
{
_scaledTimeWheel = new TimeWheel(1f, 60);
_unscaledTimeWheel = new TimeWheel(1f, 60);
}
public int AddTimer(TimerHandler callback, float time, bool isLoop = false,
bool isUnscaled = false, params object[] args)
{
Timer timer = GetTimerFromPool();
timer.TimerId = ++_curTimerId;
timer.TriggerTime = (isUnscaled ? Time.unscaledTime : Time.time) + time;
timer.Interval = isLoop ? time : 0f;
timer.Handler = callback;
timer.IsLoop = isLoop;
timer.IsRunning = true;
timer.IsUnscaled = isUnscaled;
timer.Args = args;
timer.IsActive = true;
_activeTimers.Add(timer.TimerId, timer);
TimeWheel targetWheel = isUnscaled ? _unscaledTimeWheel : _scaledTimeWheel;
targetWheel.AddTimer(timer, isUnscaled ? Time.unscaledTime : Time.time);
return timer.TimerId;
}
public void Stop(int timerId)
{
if (_activeTimers.TryGetValue(timerId, out Timer timer))
timer.IsRunning = false;
}
public void Resume(int timerId)
{
if (_activeTimers.TryGetValue(timerId, out Timer timer))
timer.IsRunning = true;
}
public bool IsRunning(int timerId) =>
_activeTimers.TryGetValue(timerId, out Timer timer) && timer.IsRunning;
public float GetLeftTime(int timerId) =>
_activeTimers.TryGetValue(timerId, out Timer timer)
? Mathf.Max(timer.TriggerTime - (timer.IsUnscaled ? Time.unscaledTime : Time.time), 0)
: 0;
public void Restart(int timerId)
{
if (_activeTimers.TryGetValue(timerId, out Timer timer))
{
timer.TriggerTime = (timer.IsUnscaled ? Time.unscaledTime : Time.time) + timer.Interval;
TimeWheel targetWheel = timer.IsUnscaled ? _unscaledTimeWheel : _scaledTimeWheel;
targetWheel.AddTimer(timer, timer.IsUnscaled ? Time.unscaledTime : Time.time);
}
}
public void RemoveTimer(int timerId)
{
if (_activeTimers.TryGetValue(timerId, out Timer timer))
{
timer.IsActive = false; // 标记为无效
_activeTimers.Remove(timerId);
ReturnTimerToPool(timer);
}
}
public void RemoveAllTimer()
{
foreach (var timer in _activeTimers.Values)
{
timer.IsActive = false;
ReturnTimerToPool(timer);
}
_activeTimers.Clear();
}
private Timer GetTimerFromPool() => ReferencePool.Acquire<Timer>();
private void ReturnTimerToPool(Timer timer)
{
ReferencePool.Release(timer);
}
void IModuleUpdate.Update(float elapseSeconds, float realElapseSeconds)
{
float scaledTime = Time.time;
_scaledTimeWheel.Advance(scaledTime, ProcessTimer);
float unscaledTime = Time.unscaledTime;
_unscaledTimeWheel.Advance(unscaledTime, ProcessTimer);
}
private void ProcessTimer(Timer timer)
{
if (!timer.IsActive || !timer.IsRunning) return;
try
{
timer.Handler?.Invoke(timer.Args);
}
catch (Exception e)
{
Debug.LogError($"Timer callback error: {e}");
}
if (timer.IsLoop)
{
timer.TriggerTime += timer.Interval;
TimeWheel targetWheel = timer.IsUnscaled ? _unscaledTimeWheel : _scaledTimeWheel;
targetWheel.AddTimer(timer, timer.IsUnscaled ? Time.unscaledTime : Time.time);
}
else
{
RemoveTimer(timer.TimerId);
}
}
void IModule.Dispose() => RemoveAllTimer();
public int Priority => 0;
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 205d0803930745d7825f89aa604530a5
timeCreated: 1741683842

View File

@ -4,8 +4,6 @@ using AlicizaX.Runtime;
namespace AlicizaX.Timer.Runtime
{
public delegate void TimerHandler(object[] args);
/// <summary>
/// 定时器接口
/// </summary>
@ -52,16 +50,6 @@ namespace AlicizaX.Timer.Runtime
/// </summary>
public void Restart(int timerId);
/// <summary>
/// 重置计时器。
/// </summary>
public void Reset(int timerId, TimerHandler callback, float time, bool isLoop = false, bool isUnscaled = false);
/// <summary>
/// 重置计时器。
/// </summary>
public void Reset(int timerId, float time, bool isLoop, bool isUnscaled);
/// <summary>
/// 移除计时器。
/// </summary>

View File

@ -115,32 +115,6 @@ namespace AlicizaX.Timer.Runtime
_timerManager.Restart(timerId);
}
/// <summary>
/// 重置计时器。
/// </summary>
public void Reset(int timerId, TimerHandler callback, float time, bool isLoop = false, bool isUnscaled = false)
{
if (_timerManager == null)
{
throw new GameFrameworkException("TimerMgr is invalid.");
}
_timerManager.Reset(timerId, callback, time, isLoop, isUnscaled);
}
/// <summary>
/// 重置计时器。
/// </summary>
public void Reset(int timerId, float time, bool isLoop, bool isUnscaled)
{
if (_timerManager == null)
{
throw new GameFrameworkException("TimerMgr is invalid.");
}
_timerManager.Reset(timerId, time, isLoop, isUnscaled);
}
/// <summary>
/// 移除计时器。
/// </summary>

View File

@ -1,468 +0,0 @@
using System;
using System.Collections.Generic;
using AlicizaX.Runtime;
using UnityEngine;
namespace AlicizaX.Timer.Runtime
{
[Serializable]
public class Timer
{
public int timerId = 0;
public float curTime = 0;
public float time = 0;
public TimerHandler Handler;
public bool isLoop = false;
public bool isNeedRemove = false;
public bool isRunning = false;
public bool isUnscaled = false; //是否使用非缩放的时间
public object[] Args = null; //回调参数
}
[UnityEngine.Scripting.Preserve]
internal sealed class TimerManager : ITimerManager
{
private int _curTimerId = 0;
private readonly List<Timer> _timerList = new List<Timer>();
private readonly List<Timer> _unscaledTimerList = new List<Timer>();
private readonly List<int> _cacheRemoveTimers = new List<int>();
private readonly List<int> _cacheRemoveUnscaledTimers = new List<int>();
/// <summary>
/// 添加计时器。
/// </summary>
/// <param name="callback">计时器回调。</param>
/// <param name="time">计时器间隔。</param>
/// <param name="isLoop">是否循环。</param>
/// <param name="isUnscaled">是否不收时间缩放影响。</param>
/// <param name="args">传参。(避免闭包)</param>
/// <returns>计时器Id。</returns>
public int AddTimer(TimerHandler callback, float time, bool isLoop = false, bool isUnscaled = false, params object[] args)
{
Timer timer = new Timer
{
timerId = ++_curTimerId,
curTime = time,
time = time,
Handler = callback,
isLoop = isLoop,
isUnscaled = isUnscaled,
Args = args,
isNeedRemove = false,
isRunning = true
};
InsertTimer(timer);
return timer.timerId;
}
private void InsertTimer(Timer timer)
{
bool isInsert = false;
if (timer.isUnscaled)
{
for (int i = 0, len = _unscaledTimerList.Count; i < len; i++)
{
if (_unscaledTimerList[i].curTime > timer.curTime)
{
_unscaledTimerList.Insert(i, timer);
isInsert = true;
break;
}
}
if (!isInsert)
{
_unscaledTimerList.Add(timer);
}
}
else
{
for (int i = 0, len = _timerList.Count; i < len; i++)
{
if (_timerList[i].curTime > timer.curTime)
{
_timerList.Insert(i, timer);
isInsert = true;
break;
}
}
if (!isInsert)
{
_timerList.Add(timer);
}
}
}
/// <summary>
/// 暂停计时器。
/// </summary>
/// <param name="timerId">计时器Id。</param>
public void Stop(int timerId)
{
Timer timer = GetTimer(timerId);
if (timer != null) timer.isRunning = false;
}
/// <summary>
/// 恢复计时器。
/// </summary>
/// <param name="timerId">计时器Id。</param>
public void Resume(int timerId)
{
Timer timer = GetTimer(timerId);
if (timer != null) timer.isRunning = true;
}
/// <summary>
/// 计时器是否在运行中。
/// </summary>
/// <param name="timerId">计时器Id。</param>
/// <returns>否在运行中。</returns>
public bool IsRunning(int timerId)
{
Timer timer = GetTimer(timerId);
return timer is { isRunning: true };
}
/// <summary>
/// 获得计时器剩余时间
/// </summary>
public float GetLeftTime(int timerId)
{
Timer timer = GetTimer(timerId);
if (timer == null) return 0;
return timer.curTime;
}
/// <summary>
/// 重置计时器,恢复到开始状态。
/// </summary>
public void Restart(int timerId)
{
Timer timer = GetTimer(timerId);
if (timer != null)
{
timer.curTime = timer.time;
timer.isRunning = true;
}
}
/// <summary>
/// 重置计时器。
/// </summary>
public void Reset(int timerId, TimerHandler callback, float time, bool isLoop = false, bool isUnscaled = false)
{
Timer timer = GetTimer(timerId);
if (timer != null)
{
timer.curTime = time;
timer.time = time;
timer.Handler = callback;
timer.isLoop = isLoop;
timer.isNeedRemove = false;
if (timer.isUnscaled != isUnscaled)
{
RemoveTimerImmediate(timerId);
timer.isUnscaled = isUnscaled;
InsertTimer(timer);
}
}
}
/// <summary>
/// 重置计时器。
/// </summary>
public void Reset(int timerId, float time, bool isLoop, bool isUnscaled)
{
Timer timer = GetTimer(timerId);
if (timer != null)
{
timer.curTime = time;
timer.time = time;
timer.isLoop = isLoop;
timer.isNeedRemove = false;
if (timer.isUnscaled != isUnscaled)
{
RemoveTimerImmediate(timerId);
timer.isUnscaled = isUnscaled;
InsertTimer(timer);
}
}
}
/// <summary>
/// 立即移除。
/// </summary>
/// <param name="timerId"></param>
private void RemoveTimerImmediate(int timerId)
{
for (int i = 0, len = _timerList.Count; i < len; i++)
{
if (_timerList[i].timerId == timerId)
{
_timerList.RemoveAt(i);
return;
}
}
for (int i = 0, len = _unscaledTimerList.Count; i < len; i++)
{
if (_unscaledTimerList[i].timerId == timerId)
{
_unscaledTimerList.RemoveAt(i);
return;
}
}
}
/// <summary>
/// 移除计时器。
/// </summary>
/// <param name="timerId">计时器Id。</param>
public void RemoveTimer(int timerId)
{
for (int i = 0, len = _timerList.Count; i < len; i++)
{
if (_timerList[i].timerId == timerId)
{
_timerList[i].isNeedRemove = true;
return;
}
}
for (int i = 0, len = _unscaledTimerList.Count; i < len; i++)
{
if (_unscaledTimerList[i].timerId == timerId)
{
_unscaledTimerList[i].isNeedRemove = true;
return;
}
}
}
/// <summary>
/// 移除所有计时器。
/// </summary>
public void RemoveAllTimer()
{
_timerList.Clear();
_unscaledTimerList.Clear();
}
private Timer GetTimer(int timerId)
{
for (int i = 0, len = _timerList.Count; i < len; i++)
{
if (_timerList[i].timerId == timerId)
{
return _timerList[i];
}
}
for (int i = 0, len = _unscaledTimerList.Count; i < len; i++)
{
if (_unscaledTimerList[i].timerId == timerId)
{
return _unscaledTimerList[i];
}
}
return null;
}
private void LoopCallInBadFrame()
{
bool isLoopCall = false;
for (int i = 0, len = _timerList.Count; i < len; i++)
{
Timer timer = _timerList[i];
if (timer.isLoop && timer.curTime <= 0)
{
if (timer.Handler != null)
{
timer.Handler(timer.Args);
}
timer.curTime += timer.time;
if (timer.curTime <= 0)
{
isLoopCall = true;
}
}
}
if (isLoopCall)
{
LoopCallInBadFrame();
}
}
private void LoopCallUnscaledInBadFrame()
{
bool isLoopCall = false;
for (int i = 0, len = _unscaledTimerList.Count; i < len; i++)
{
Timer timer = _unscaledTimerList[i];
if (timer.isLoop && timer.curTime <= 0)
{
if (timer.Handler != null)
{
timer.Handler(timer.Args);
}
timer.curTime += timer.time;
if (timer.curTime <= 0)
{
isLoopCall = true;
}
}
}
if (isLoopCall)
{
LoopCallUnscaledInBadFrame();
}
}
private void UpdateTimer(float elapseSeconds)
{
bool isLoopCall = false;
for (int i = 0, len = _timerList.Count; i < len; i++)
{
Timer timer = _timerList[i];
if (timer.isNeedRemove)
{
_cacheRemoveTimers.Add(i);
continue;
}
if (!timer.isRunning) continue;
timer.curTime -= elapseSeconds;
if (timer.curTime <= 0)
{
if (timer.Handler != null)
{
timer.Handler(timer.Args);
}
if (timer.isLoop)
{
timer.curTime += timer.time;
if (timer.curTime <= 0)
{
isLoopCall = true;
}
}
else
{
_cacheRemoveTimers.Add(i);
}
}
}
for (int i = _cacheRemoveTimers.Count - 1; i >= 0; i--)
{
_timerList.RemoveAt(_cacheRemoveTimers[i]);
_cacheRemoveTimers.RemoveAt(i);
}
if (isLoopCall)
{
LoopCallInBadFrame();
}
}
private void UpdateUnscaledTimer(float realElapseSeconds)
{
bool isLoopCall = false;
for (int i = 0, len = _unscaledTimerList.Count; i < len; i++)
{
Timer timer = _unscaledTimerList[i];
if (timer.isNeedRemove)
{
_cacheRemoveUnscaledTimers.Add(i);
continue;
}
if (!timer.isRunning) continue;
timer.curTime -= realElapseSeconds;
if (timer.curTime <= 0)
{
if (timer.Handler != null)
{
timer.Handler(timer.Args);
}
if (timer.isLoop)
{
timer.curTime += timer.time;
if (timer.curTime <= 0)
{
isLoopCall = true;
}
}
else
{
_cacheRemoveUnscaledTimers.Add(i);
}
}
}
for (int i = _cacheRemoveUnscaledTimers.Count - 1; i >= 0; i--)
{
_unscaledTimerList.RemoveAt(_cacheRemoveUnscaledTimers[i]);
_cacheRemoveUnscaledTimers.RemoveAt(i);
}
if (isLoopCall)
{
LoopCallUnscaledInBadFrame();
}
}
private readonly List<System.Timers.Timer> _ticker = new List<System.Timers.Timer>();
public System.Timers.Timer AddSystemTimer(Action<object, System.Timers.ElapsedEventArgs> callBack)
{
int interval = 1000;
var timerTick = new System.Timers.Timer(interval);
timerTick.AutoReset = true;
timerTick.Enabled = true;
timerTick.Elapsed += new System.Timers.ElapsedEventHandler(callBack);
_ticker.Add(timerTick);
return timerTick;
}
private void DestroySystemTimer()
{
foreach (var ticker in _ticker)
{
if (ticker != null)
{
ticker.Stop();
}
}
}
void IModuleUpdate.Update(float elapseSeconds, float realElapseSeconds)
{
UpdateTimer(elapseSeconds);
UpdateUnscaledTimer(realElapseSeconds);
}
void IModule.Dispose()
{
RemoveAllTimer();
DestroySystemTimer();
}
public int Priority { get; }
}
}

View File

@ -0,0 +1,468 @@
// using System;
// using System.Collections.Generic;
// using AlicizaX.Runtime;
// using UnityEngine;
//
// namespace AlicizaX.Timer.Runtime
// {
// [Serializable]
// public class Timer
// {
// public int timerId = 0;
// public float curTime = 0;
// public float time = 0;
// public TimerHandler Handler;
// public bool isLoop = false;
// public bool isNeedRemove = false;
// public bool isRunning = false;
// public bool isUnscaled = false; //是否使用非缩放的时间
// public object[] Args = null; //回调参数
// }
//
// [UnityEngine.Scripting.Preserve]
// internal sealed class TimerManager : ITimerManager
// {
// private int _curTimerId = 0;
// private readonly List<Timer> _timerList = new List<Timer>();
// private readonly List<Timer> _unscaledTimerList = new List<Timer>();
// private readonly List<int> _cacheRemoveTimers = new List<int>();
// private readonly List<int> _cacheRemoveUnscaledTimers = new List<int>();
//
// /// <summary>
// /// 添加计时器。
// /// </summary>
// /// <param name="callback">计时器回调。</param>
// /// <param name="time">计时器间隔。</param>
// /// <param name="isLoop">是否循环。</param>
// /// <param name="isUnscaled">是否不收时间缩放影响。</param>
// /// <param name="args">传参。(避免闭包)</param>
// /// <returns>计时器Id。</returns>
// public int AddTimer(TimerHandler callback, float time, bool isLoop = false, bool isUnscaled = false, params object[] args)
// {
// Timer timer = new Timer
// {
// timerId = ++_curTimerId,
// curTime = time,
// time = time,
// Handler = callback,
// isLoop = isLoop,
// isUnscaled = isUnscaled,
// Args = args,
// isNeedRemove = false,
// isRunning = true
// };
//
// InsertTimer(timer);
// return timer.timerId;
// }
//
// private void InsertTimer(Timer timer)
// {
// bool isInsert = false;
// if (timer.isUnscaled)
// {
// for (int i = 0, len = _unscaledTimerList.Count; i < len; i++)
// {
// if (_unscaledTimerList[i].curTime > timer.curTime)
// {
// _unscaledTimerList.Insert(i, timer);
// isInsert = true;
// break;
// }
// }
//
// if (!isInsert)
// {
// _unscaledTimerList.Add(timer);
// }
// }
// else
// {
// for (int i = 0, len = _timerList.Count; i < len; i++)
// {
// if (_timerList[i].curTime > timer.curTime)
// {
// _timerList.Insert(i, timer);
// isInsert = true;
// break;
// }
// }
//
// if (!isInsert)
// {
// _timerList.Add(timer);
// }
// }
// }
//
// /// <summary>
// /// 暂停计时器。
// /// </summary>
// /// <param name="timerId">计时器Id。</param>
// public void Stop(int timerId)
// {
// Timer timer = GetTimer(timerId);
// if (timer != null) timer.isRunning = false;
// }
//
// /// <summary>
// /// 恢复计时器。
// /// </summary>
// /// <param name="timerId">计时器Id。</param>
// public void Resume(int timerId)
// {
// Timer timer = GetTimer(timerId);
// if (timer != null) timer.isRunning = true;
// }
//
// /// <summary>
// /// 计时器是否在运行中。
// /// </summary>
// /// <param name="timerId">计时器Id。</param>
// /// <returns>否在运行中。</returns>
// public bool IsRunning(int timerId)
// {
// Timer timer = GetTimer(timerId);
// return timer is { isRunning: true };
// }
//
// /// <summary>
// /// 获得计时器剩余时间
// /// </summary>
// public float GetLeftTime(int timerId)
// {
// Timer timer = GetTimer(timerId);
// if (timer == null) return 0;
// return timer.curTime;
// }
//
// /// <summary>
// /// 重置计时器,恢复到开始状态。
// /// </summary>
// public void Restart(int timerId)
// {
// Timer timer = GetTimer(timerId);
// if (timer != null)
// {
// timer.curTime = timer.time;
// timer.isRunning = true;
// }
// }
//
//
// /// <summary>
// /// 重置计时器。
// /// </summary>
// public void Reset(int timerId, TimerHandler callback, float time, bool isLoop = false, bool isUnscaled = false)
// {
// Timer timer = GetTimer(timerId);
// if (timer != null)
// {
// timer.curTime = time;
// timer.time = time;
// timer.Handler = callback;
// timer.isLoop = isLoop;
// timer.isNeedRemove = false;
// if (timer.isUnscaled != isUnscaled)
// {
// RemoveTimerImmediate(timerId);
//
// timer.isUnscaled = isUnscaled;
// InsertTimer(timer);
// }
// }
// }
//
// /// <summary>
// /// 重置计时器。
// /// </summary>
// public void Reset(int timerId, float time, bool isLoop, bool isUnscaled)
// {
// Timer timer = GetTimer(timerId);
// if (timer != null)
// {
// timer.curTime = time;
// timer.time = time;
// timer.isLoop = isLoop;
// timer.isNeedRemove = false;
// if (timer.isUnscaled != isUnscaled)
// {
// RemoveTimerImmediate(timerId);
//
// timer.isUnscaled = isUnscaled;
// InsertTimer(timer);
// }
// }
// }
//
// /// <summary>
// /// 立即移除。
// /// </summary>
// /// <param name="timerId"></param>
// private void RemoveTimerImmediate(int timerId)
// {
// for (int i = 0, len = _timerList.Count; i < len; i++)
// {
// if (_timerList[i].timerId == timerId)
// {
// _timerList.RemoveAt(i);
// return;
// }
// }
//
// for (int i = 0, len = _unscaledTimerList.Count; i < len; i++)
// {
// if (_unscaledTimerList[i].timerId == timerId)
// {
// _unscaledTimerList.RemoveAt(i);
// return;
// }
// }
// }
//
// /// <summary>
// /// 移除计时器。
// /// </summary>
// /// <param name="timerId">计时器Id。</param>
// public void RemoveTimer(int timerId)
// {
// for (int i = 0, len = _timerList.Count; i < len; i++)
// {
// if (_timerList[i].timerId == timerId)
// {
// _timerList[i].isNeedRemove = true;
// return;
// }
// }
//
// for (int i = 0, len = _unscaledTimerList.Count; i < len; i++)
// {
// if (_unscaledTimerList[i].timerId == timerId)
// {
// _unscaledTimerList[i].isNeedRemove = true;
// return;
// }
// }
// }
//
// /// <summary>
// /// 移除所有计时器。
// /// </summary>
// public void RemoveAllTimer()
// {
// _timerList.Clear();
// _unscaledTimerList.Clear();
// }
//
// private Timer GetTimer(int timerId)
// {
// for (int i = 0, len = _timerList.Count; i < len; i++)
// {
// if (_timerList[i].timerId == timerId)
// {
// return _timerList[i];
// }
// }
//
// for (int i = 0, len = _unscaledTimerList.Count; i < len; i++)
// {
// if (_unscaledTimerList[i].timerId == timerId)
// {
// return _unscaledTimerList[i];
// }
// }
//
// return null;
// }
//
// private void LoopCallInBadFrame()
// {
// bool isLoopCall = false;
// for (int i = 0, len = _timerList.Count; i < len; i++)
// {
// Timer timer = _timerList[i];
// if (timer.isLoop && timer.curTime <= 0)
// {
// if (timer.Handler != null)
// {
// timer.Handler(timer.Args);
// }
//
// timer.curTime += timer.time;
// if (timer.curTime <= 0)
// {
// isLoopCall = true;
// }
// }
// }
//
// if (isLoopCall)
// {
// LoopCallInBadFrame();
// }
// }
//
// private void LoopCallUnscaledInBadFrame()
// {
// bool isLoopCall = false;
// for (int i = 0, len = _unscaledTimerList.Count; i < len; i++)
// {
// Timer timer = _unscaledTimerList[i];
// if (timer.isLoop && timer.curTime <= 0)
// {
// if (timer.Handler != null)
// {
// timer.Handler(timer.Args);
// }
//
// timer.curTime += timer.time;
// if (timer.curTime <= 0)
// {
// isLoopCall = true;
// }
// }
// }
//
// if (isLoopCall)
// {
// LoopCallUnscaledInBadFrame();
// }
// }
//
// private void UpdateTimer(float elapseSeconds)
// {
// bool isLoopCall = false;
// for (int i = 0, len = _timerList.Count; i < len; i++)
// {
// Timer timer = _timerList[i];
// if (timer.isNeedRemove)
// {
// _cacheRemoveTimers.Add(i);
// continue;
// }
//
// if (!timer.isRunning) continue;
// timer.curTime -= elapseSeconds;
// if (timer.curTime <= 0)
// {
// if (timer.Handler != null)
// {
// timer.Handler(timer.Args);
// }
//
// if (timer.isLoop)
// {
// timer.curTime += timer.time;
// if (timer.curTime <= 0)
// {
// isLoopCall = true;
// }
// }
// else
// {
// _cacheRemoveTimers.Add(i);
// }
// }
// }
//
// for (int i = _cacheRemoveTimers.Count - 1; i >= 0; i--)
// {
// _timerList.RemoveAt(_cacheRemoveTimers[i]);
// _cacheRemoveTimers.RemoveAt(i);
// }
//
// if (isLoopCall)
// {
// LoopCallInBadFrame();
// }
// }
//
// private void UpdateUnscaledTimer(float realElapseSeconds)
// {
// bool isLoopCall = false;
// for (int i = 0, len = _unscaledTimerList.Count; i < len; i++)
// {
// Timer timer = _unscaledTimerList[i];
// if (timer.isNeedRemove)
// {
// _cacheRemoveUnscaledTimers.Add(i);
// continue;
// }
//
// if (!timer.isRunning) continue;
// timer.curTime -= realElapseSeconds;
// if (timer.curTime <= 0)
// {
// if (timer.Handler != null)
// {
// timer.Handler(timer.Args);
// }
//
// if (timer.isLoop)
// {
// timer.curTime += timer.time;
// if (timer.curTime <= 0)
// {
// isLoopCall = true;
// }
// }
// else
// {
// _cacheRemoveUnscaledTimers.Add(i);
// }
// }
// }
//
// for (int i = _cacheRemoveUnscaledTimers.Count - 1; i >= 0; i--)
// {
// _unscaledTimerList.RemoveAt(_cacheRemoveUnscaledTimers[i]);
// _cacheRemoveUnscaledTimers.RemoveAt(i);
// }
//
// if (isLoopCall)
// {
// LoopCallUnscaledInBadFrame();
// }
// }
//
// private readonly List<System.Timers.Timer> _ticker = new List<System.Timers.Timer>();
//
// public System.Timers.Timer AddSystemTimer(Action<object, System.Timers.ElapsedEventArgs> callBack)
// {
// int interval = 1000;
// var timerTick = new System.Timers.Timer(interval);
// timerTick.AutoReset = true;
// timerTick.Enabled = true;
// timerTick.Elapsed += new System.Timers.ElapsedEventHandler(callBack);
//
// _ticker.Add(timerTick);
//
// return timerTick;
// }
//
// private void DestroySystemTimer()
// {
// foreach (var ticker in _ticker)
// {
// if (ticker != null)
// {
// ticker.Stop();
// }
// }
// }
//
// void IModuleUpdate.Update(float elapseSeconds, float realElapseSeconds)
// {
// UpdateTimer(elapseSeconds);
// UpdateUnscaledTimer(realElapseSeconds);
// }
//
// void IModule.Dispose()
// {
// RemoveAllTimer();
// DestroySystemTimer();
// }
//
// public int Priority { get; }
// }
// }

View File

@ -6,7 +6,7 @@
"version": "1.0.1",
"unity": "2017.1",
"keywords": [
"Game Framework X"
"Aliciza X"
],
"repository": {
"name": "com.alicizax.unity",

View File

@ -6,7 +6,7 @@ namespace AlicizaX.UI.Editor
{
public static class UIGenerateEditorTool
{
[MenuItem("GameObject/AlicizaX/生成UI代码", priority = -1)]
[MenuItem("GameObject/UI工具/生成UI代码", priority = -1)]
public static void GenerateUIScript()
{
UIGenerateWindow.ShowWindow(Selection.gameObjects.FirstOrDefault());

View File

@ -17,13 +17,13 @@ namespace AlicizaX.UI.Runtime
}
}
static class UIMetadataFactory
internal static class UIMetadataFactory
{
private static readonly Dictionary<RuntimeTypeHandle, UIMetadata> UIWindowMetadata = new();
private static readonly Dictionary<RuntimeTypeHandle, UIMetadata> UIWidgetMetadata = new();
public static UIMetadata GetWindowInfo(RuntimeTypeHandle handle)
internal static UIMetadata GetWindowInfo(RuntimeTypeHandle handle)
{
if (!UIWindowMetadata.TryGetValue(handle, out var meta))
{
@ -34,7 +34,7 @@ namespace AlicizaX.UI.Runtime
return meta;
}
public static UIMetadata GetWidgetInfo(RuntimeTypeHandle handle)
internal static UIMetadata GetWidgetInfo(RuntimeTypeHandle handle)
{
if (!UIWidgetMetadata.TryGetValue(handle, out var meta))
{

View File

@ -12,11 +12,11 @@ namespace AlicizaX.UI.Runtime
void Initlize(Transform root);
Camera UICamera { get; set; }
Transform UICanvasRoot { get; set; }
UIBase ShowUI(Type type, params System.Object[] userDatas);
UIBase ShowUI(UIMetadata meta, params System.Object[] userDatas);
UniTask<UIBase> ShowUIAsync(Type type, params System.Object[] userDatas);
void CloseUI(Type type, bool force = false);
UIBase GetUI(Type type);
UniTask<UIBase> ShowUIAsync(UIMetadata meta, params System.Object[] userDatas);
void CloseUI(UIMetadata meta, bool force = false);
UIBase GetUI(UIMetadata meta);
protected internal void SetTimerManager(ITimerManager timerManager);
}

View File

@ -21,24 +21,23 @@ namespace AlicizaX.UI.Runtime
{
private readonly LayerData[] _openUI = new LayerData[(int)UILayer.All];
private async UniTask<UIBase> ShowUIImplAsync(RuntimeTypeHandle typeHandle, params object[] userDatas)
private async UniTask<UIBase> ShowUIImplAsync(UIMetadata meta, params object[] userDatas)
{
var metaInfo = GetOrCreateMeta(typeHandle);
await UILoaderFactory.LoadUIResourcesAsync(metaInfo,UICacheLayer);
var metaInfo = GetOrCreateMeta(meta);
await UILoaderFactory.LoadUIResourcesAsync(metaInfo, UICacheLayer);
return FinalizeShow(metaInfo, userDatas);
}
public UIBase ShowUIImplSync(RuntimeTypeHandle typeHandle, params object[] userDatas)
public UIBase ShowUIImplSync(UIMetadata meta, params object[] userDatas)
{
var metaInfo = GetOrCreateMeta(typeHandle);
UILoaderFactory.LoadUIResourcesSync(metaInfo,UICacheLayer);
var metaInfo = GetOrCreateMeta(meta);
UILoaderFactory.LoadUIResourcesSync(metaInfo, UICacheLayer);
return FinalizeShow(metaInfo, userDatas);
}
private void CloseUIImpl(RuntimeTypeHandle typeHandle, bool force)
private void CloseUIImpl(UIMetadata meta, bool force)
{
UIMetadata meta = UIMetadataFactory.GetWindowInfo(typeHandle);
if (meta.State == UIState.Uninitialized)
{
return;
@ -52,16 +51,14 @@ namespace AlicizaX.UI.Runtime
}
private UIBase GetUIImpl(RuntimeTypeHandle typeHandle)
private UIBase GetUIImpl(UIMetadata meta)
{
var metaData = UIMetadataFactory.GetWindowInfo(typeHandle);
return metaData.View;
return meta.View;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private UIMetadata GetOrCreateMeta(RuntimeTypeHandle typeHandle)
private UIMetadata GetOrCreateMeta(UIMetadata meta)
{
UIMetadata meta = UIMetadataFactory.GetWindowInfo(typeHandle);
if (meta.State == UIState.Uninitialized) meta.CreateUI();
return meta;
}

View File

@ -37,25 +37,25 @@ namespace AlicizaX.UI.Runtime
}
}
public UIBase ShowUI(Type type, params System.Object[] userDatas)
public UIBase ShowUI(UIMetadata meta, params System.Object[] userDatas)
{
return ShowUIImplSync(type.TypeHandle, userDatas);
return ShowUIImplSync(meta, userDatas);
}
public async UniTask<UIBase> ShowUIAsync(Type type, params System.Object[] userDatas)
public async UniTask<UIBase> ShowUIAsync(UIMetadata meta, params System.Object[] userDatas)
{
return await ShowUIImplAsync(type.TypeHandle, userDatas);
return await ShowUIImplAsync(meta, userDatas);
}
public void CloseUI(Type type, bool force = false)
public void CloseUI(UIMetadata meta, bool force = false)
{
CloseUIImpl(type.TypeHandle, force);
CloseUIImpl(meta, force);
}
public UIBase GetUI(Type type)
public UIBase GetUI(UIMetadata meta)
{
return (UIWindow)GetUIImpl(type.TypeHandle);
return (UIWindow)GetUIImpl(meta);
}

View File

@ -1,4 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Runtime.CompilerServices;
using AlicizaX.Resource.Runtime;
using AlicizaX.Runtime;
using AlicizaX.Timer.Runtime;
@ -115,57 +118,91 @@ namespace AlicizaX.UI.Runtime
public T ShowUI<T>(params System.Object[] userDatas) where T : UIWindow
{
return (T)ShowUI(typeof(T), userDatas);
return (T)ShowUI(MetaTypeCache<T>.Metadata, userDatas);
}
public async UniTask<T> ShowUIAsync<T>(params System.Object[] userDatas) where T : UIWindow
{
return (T)await ShowUIAsync(typeof(T), userDatas);
}
public UIBase ShowUI(string windowName, params System.Object[] userDatas)
{
Type uiType = UITypeCollector.GetUIInst(windowName);
GameFrameworkGuard.NotNull(uiType, nameof(uiType));
return ShowUI(uiType, userDatas);
}
public async UniTask<UIBase> ShowUIAsync(string windowName, params System.Object[] userDatas)
{
Type uiType = UITypeCollector.GetUIInst(windowName);
GameFrameworkGuard.NotNull(uiType, nameof(uiType));
return await ShowUIAsync(uiType, userDatas);
return (T)await ShowUIAsync(MetaTypeCache<T>.Metadata, userDatas);
}
public void CloseUI<T>(bool force = false) where T : UIWindow
{
CloseUI(typeof(T), force);
CloseUI(MetaTypeCache<T>.Metadata, force);
}
public T GetUI<T>() where T : UIWindow
{
return (T)GetUI(typeof(T));
return (T)GetUI(MetaTypeCache<T>.Metadata);
}
public UIBase ShowUI(Type type, params System.Object[] userDatas)
// public UIBase ShowUI(string windowName, params System.Object[] userDatas)
// {
// Type uiType = UITypeCollector.GetUIInst(windowName);
// GameFrameworkGuard.NotNull(uiType, nameof(uiType));
// return ShowUI(uiType, userDatas);
// }
//
// public async UniTask<UIBase> ShowUIAsync(string windowName, params System.Object[] userDatas)
// {
// Type uiType = UITypeCollector.GetUIInst(windowName);
// GameFrameworkGuard.NotNull(uiType, nameof(uiType));
// return await ShowUIAsync(uiType, userDatas);
// }
public UIBase ShowUI(UIMetadata meta, params System.Object[] userDatas)
{
return _uiManager.ShowUI(type, userDatas);
return _uiManager.ShowUI(meta, userDatas);
}
public async UniTask<UIBase> ShowUIAsync(Type type, params System.Object[] userDatas)
public async UniTask<UIBase> ShowUIAsync(UIMetadata meta, params System.Object[] userDatas)
{
return await _uiManager.ShowUIAsync(type, userDatas);
return await _uiManager.ShowUIAsync(meta, userDatas);
}
private void CloseUI(Type type, bool force = false)
private void CloseUI(UIMetadata meta, bool force = false)
{
_uiManager.CloseUI(type, force);
_uiManager.CloseUI(meta, force);
}
private UIBase GetUI(Type type)
private UIBase GetUI(UIMetadata meta)
{
return _uiManager.GetUI(type);
return _uiManager.GetUI(meta);
}
private static Dictionary<Type, Action> _triggerCache = new Dictionary<Type, Action>();
private static void TriggerStaticCtor(Type type)
{
// 已有缓存直接触发
if (_triggerCache.TryGetValue(type, out var trigger))
{
trigger();
return;
}
// 无缓存时动态编译并缓存 -------------------------------------------------
// 1. 构造泛型类型 MetaTypeCache<T>
var genericType = typeof(MetaTypeCache<>).MakeGenericType(type);
// 2. 构建表达式树RuntimeHelpers.RunClassConstructor(typeof(MetaTypeCache<T>).TypeHandle)
var method = typeof(RuntimeHelpers).GetMethod(
nameof(RuntimeHelpers.RunClassConstructor),
new[] { typeof(RuntimeTypeHandle) }
);
var typeHandleExpr = Expression.Constant(genericType.TypeHandle);
var callExpr = Expression.Call(method, typeHandleExpr);
var lambda = Expression.Lambda<Action>(callExpr);
// 3. 编译为原生委托(性能关键!)
var compiledTrigger = lambda.Compile();
// 4. 缓存并触发(非线程安全)
_triggerCache[type] = compiledTrigger;
compiledTrigger();
}
}
}

View File

@ -24,19 +24,17 @@ public static class BuildDLLCommand
{
ScriptingDefineSymbols.RemoveScriptingDefineSymbol(EnableHybridClrScriptingDefineSymbol);
HybridCLR.Editor.SettingsUtil.Enable = false;
SyncAssemblyContent.RefreshAssembly();
}
/// <summary>
/// 开启HybridCLR宏定义。
/// </summary>
[MenuItem("HybridCLR/Tools/Tools/Define Symbols/Enable HybridCLR", false, 31)]
[MenuItem("HybridCLR/Tools/Define Symbols/Enable HybridCLR", false, 31)]
public static void Enable()
{
ScriptingDefineSymbols.RemoveScriptingDefineSymbol(EnableHybridClrScriptingDefineSymbol);
ScriptingDefineSymbols.AddScriptingDefineSymbol(EnableHybridClrScriptingDefineSymbol);
HybridCLR.Editor.SettingsUtil.Enable = true;
SyncAssemblyContent.RefreshAssembly();
}
#if ENABLE_HYBRIDCLR
@ -49,6 +47,11 @@ public static class BuildDLLCommand
}
#endif
public static void GenerateHybridCLRSome()
{
PrebuildCommand.GenerateAll();
}
public static void BuildAndCopyDlls(BuildTarget target)
{
#if ENABLE_HYBRIDCLR
@ -71,7 +74,7 @@ public static class BuildDLLCommand
string aotAssembliesSrcDir = SettingsUtil.GetAssembliesPostIl2CppStripDir(target);
string aotAssembliesDstDir = Application.dataPath + "/" + AssemblyTextAssetPath;
foreach (var dll in AssemblyLoadData.Instance.AOTMetaAssemblies)
foreach (var dll in SettingsUtil.AOTAssemblyNames)
{
string srcDllPath = $"{aotAssembliesSrcDir}/{dll}";
if (!System.IO.File.Exists(srcDllPath))

View File

@ -6,15 +6,14 @@ namespace AlicizaX.Editor
{
public static class SyncAssemblyContent
{
[MenuItem("HybridCLR/Sync Assembly")]
public static void RefreshAssembly()
public static void GenerateAssemblyLoadData()
{
AssemblyLoadData assemblyLoadData = new AssemblyLoadData();
assemblyLoadData.HotUpdateAssemblies = HybridCLR.Editor.SettingsUtil.HotUpdateAssemblyFilesIncludePreserved;
assemblyLoadData.AOTMetaAssemblies = HybridCLR.Editor.SettingsUtil.AOTAssemblyNames;
File.WriteAllText("Assets/Resources/AssemblyLoadData.json", Utility.Json.ToJson(assemblyLoadData));
AssetDatabase.Refresh();
File.WriteAllText("Assets/Resources/AssemblyLoadData.bytes", Utility.Json.ToJson(assemblyLoadData));
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
}
}
}

View File

@ -10,14 +10,14 @@ for /d %%i in (*) do (
pushd "%%i"
if exist ".git" (
echo.
echo [正在处理仓库] %%i
echo [Process Git Library] %%i
:: 拉取更新(如果启用)
if !DO_PULL! equ 1 (
echo 拉取最新更改...
echo Pull New Changed...
git pull
if errorlevel 1 (
echo [错误] 拉取失败于 %%i
echo [Error] pull failed %%i
popd
goto :next_folder
)
@ -27,17 +27,17 @@ for /d %%i in (*) do (
git add .
git commit -m "modify"
if errorlevel 1 (
echo [信息] 无新更改或提交失败于 %%i
echo [inffo] NoChange or commit failed for %%i
) else (
echo 推送更改到远程...
echo Commit Change to Remote ...
git push
if errorlevel 1 (
echo [错误] 推送失败于 %%i
echo [Error] Push Failed %%i
)
)
) else (
echo.
echo [跳过] %%i 不是Git仓库
echo [Skip] %%i Not Git Library
)
:next_folder
popd
@ -45,5 +45,5 @@ for /d %%i in (*) do (
:: 主动等待用户关闭
echo.
echo 所有操作已完成,按任意键关闭窗口...
echo Commit FinishedPlease Input Any key to Close...
pause >nul

View File

@ -3,18 +3,18 @@
"com.code-philosophy.hybridclr": "https://gitee.com/focus-creative-games/hybridclr_unity.git",
"com.fantasy.unity": "http://101.34.252.46:3000/AlicizaX/Fantasy.Unity.git",
"com.paps.unity-toolbar-extender-ui-toolkit": "http://101.34.252.46:3000/AlicizaX/com.paps.unity-toolbar-extender-ui-toolkit.git",
"com.unity.ai.navigation": "2.0.4",
"com.unity.ai.navigation": "2.0.6",
"com.unity.editorcoroutines": "1.0.0",
"com.unity.ide.rider": "3.0.31",
"com.unity.ide.rider": "3.0.34",
"com.unity.ide.visualstudio": "2.0.22",
"com.unity.inputsystem": "1.11.1",
"com.unity.inputsystem": "1.13.1",
"com.unity.nuget.newtonsoft-json": "3.2.1",
"com.unity.render-pipelines.universal": "17.0.3",
"com.unity.scriptablebuildpipeline": "2.1.4",
"com.unity.test-framework": "1.4.5",
"com.unity.timeline": "1.8.7",
"com.unity.test-framework": "1.4.6",
"com.unity.timeline": "1.8.8",
"com.unity.ugui": "2.0.0",
"com.unity.visualscripting": "1.9.4",
"com.unity.visualscripting": "1.9.6",
"com.unity.modules.accessibility": "1.0.0",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",

View File

@ -48,6 +48,12 @@
"source": "embedded",
"dependencies": {}
},
"com.alicizax.unity.editor.extension": {
"version": "file:com.alicizax.unity.editor.extension",
"depth": 0,
"source": "embedded",
"dependencies": {}
},
"com.alicizax.unity.entry": {
"version": "file:com.alicizax.unity.entry",
"depth": 0,
@ -177,7 +183,7 @@
"hash": "da793070ba60e051230abdd5d174c774fb3d3b49"
},
"com.unity.ai.navigation": {
"version": "2.0.4",
"version": "2.0.6",
"depth": 0,
"source": "registry",
"dependencies": {
@ -222,7 +228,7 @@
"url": "https://packages.unity.com"
},
"com.unity.ide.rider": {
"version": "3.0.31",
"version": "3.0.34",
"depth": 0,
"source": "registry",
"dependencies": {
@ -240,7 +246,7 @@
"url": "https://packages.unity.com"
},
"com.unity.inputsystem": {
"version": "1.11.1",
"version": "1.13.1",
"depth": 0,
"source": "registry",
"dependencies": {
@ -346,7 +352,7 @@
}
},
"com.unity.test-framework": {
"version": "1.4.5",
"version": "1.4.6",
"depth": 0,
"source": "registry",
"dependencies": {
@ -367,7 +373,7 @@
"url": "https://packages.unity.com"
},
"com.unity.timeline": {
"version": "1.8.7",
"version": "1.8.8",
"depth": 0,
"source": "registry",
"dependencies": {
@ -388,7 +394,7 @@
}
},
"com.unity.visualscripting": {
"version": "1.9.4",
"version": "1.9.6",
"depth": 0,
"source": "registry",
"dependencies": {

View File

@ -34,8 +34,8 @@ MonoBehaviour:
- YooAsset.dll
- UniTask.Runtime.dll
- ZString.dll
outputLinkFile: HybridCLRData/Generated/link.xml
outputAOTGenericReferenceFile: HybridCLRData/Generated/AOTGenericReferences.cs
outputLinkFile: HybridCLRGenerate/link.xml
outputAOTGenericReferenceFile: HybridCLRGenerate/AOTGenericReferences.cs
maxGenericReferenceIteration: 10
maxMethodBridgeGenericIteration: 10
enableProfilerInReleaseBuild: 0

View File

@ -12,7 +12,7 @@ PlayerSettings:
targetDevice: 2
useOnDemandResources: 0
accelerometerFrequency: 60
companyName: DefaultCompany
companyName: com.alicizax.unity
productName: Aliciza
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
@ -164,7 +164,7 @@ PlayerSettings:
androidMinAspectRatio: 1
applicationIdentifier:
Android: com.UnityTechnologies.com.unity.template.urpblank
Standalone: com.Unity-Technologies.com.unity.template.urp-blank
Standalone: com.alicizax.unity.template
iPhone: com.Unity-Technologies.com.unity.template.urp-blank
buildNumber:
Standalone: 0
@ -527,6 +527,15 @@ PlayerSettings:
- m_BuildTarget: AndroidPlayer
m_APIs: 150000000b000000
m_Automatic: 0
- m_BuildTarget: WindowsStandaloneSupport
m_APIs: 0200000012000000
m_Automatic: 1
- m_BuildTarget: MacStandaloneSupport
m_APIs: 10000000
m_Automatic: 1
- m_BuildTarget: LinuxStandaloneSupport
m_APIs: 1100000015000000
m_Automatic: 1
m_BuildTargetVRSettings: []
m_DefaultShaderChunkSizeInMB: 16
m_DefaultShaderChunkCount: 0

View File

@ -4,7 +4,7 @@
QualitySettings:
m_ObjectHideFlags: 0
serializedVersion: 5
m_CurrentQuality: 0
m_CurrentQuality: 1
m_QualitySettings:
- serializedVersion: 4
name: Mobile

View File

@ -1,6 +1,30 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &1
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_PixelRect:
serializedVersion: 2
x: 2782
y: 169
width: 1050
height: 527
m_ShowMode: 0
m_Title: Package Manager
m_RootView: {fileID: 4}
m_MinSize: {x: 748, y: 276}
m_MaxSize: {x: 4000, y: 4026}
m_Maximized: 0
--- !u!114 &2
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -19,12 +43,63 @@ MonoBehaviour:
width: 1920
height: 997
m_ShowMode: 4
m_Title: Project
m_RootView: {fileID: 2}
m_Title: Console
m_RootView: {fileID: 5}
m_MinSize: {x: 875, y: 300}
m_MaxSize: {x: 10000, y: 10000}
m_Maximized: 1
--- !u!114 &2
--- !u!114 &3
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
m_Name: PackageManagerWindow
m_EditorClassIdentifier:
m_Children: []
m_Position:
serializedVersion: 2
x: 0
y: 0
width: 1050
height: 527
m_MinSize: {x: 748, y: 276}
m_MaxSize: {x: 4000, y: 4026}
m_ActualView: {fileID: 15}
m_Panes:
- {fileID: 15}
m_Selected: 0
m_LastSelected: 0
--- !u!114 &4
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_Children:
- {fileID: 3}
m_Position:
serializedVersion: 2
x: 0
y: 0
width: 1050
height: 527
m_MinSize: {x: 748, y: 276}
m_MaxSize: {x: 4000, y: 4026}
vertical: 0
controlID: 282
draggingID: 0
--- !u!114 &5
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -37,9 +112,9 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Children:
- {fileID: 3}
- {fileID: 5}
- {fileID: 4}
- {fileID: 6}
- {fileID: 8}
- {fileID: 7}
m_Position:
serializedVersion: 2
x: 0
@ -52,7 +127,7 @@ MonoBehaviour:
m_TopViewHeight: 36
m_UseBottomView: 1
m_BottomViewHeight: 20
--- !u!114 &3
--- !u!114 &6
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -74,7 +149,7 @@ MonoBehaviour:
m_MinSize: {x: 0, y: 0}
m_MaxSize: {x: 0, y: 0}
m_LastLoadedLayoutName:
--- !u!114 &4
--- !u!114 &7
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -95,7 +170,7 @@ MonoBehaviour:
height: 20
m_MinSize: {x: 0, y: 0}
m_MaxSize: {x: 0, y: 0}
--- !u!114 &5
--- !u!114 &8
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -108,10 +183,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Children:
- {fileID: 6}
- {fileID: 7}
- {fileID: 9}
- {fileID: 10}
- {fileID: 11}
- {fileID: 13}
- {fileID: 14}
m_Position:
serializedVersion: 2
x: 0
@ -121,9 +196,9 @@ MonoBehaviour:
m_MinSize: {x: 400, y: 100}
m_MaxSize: {x: 32384, y: 16192}
vertical: 0
controlID: 148
controlID: 47
draggingID: 0
--- !u!114 &6
--- !u!114 &9
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -133,25 +208,25 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
m_Name: GameView
m_Name: SceneView
m_EditorClassIdentifier:
m_Children: []
m_Position:
serializedVersion: 2
x: 0
y: 0
width: 529
width: 281
height: 941
m_MinSize: {x: 51, y: 76}
m_MinSize: {x: 201, y: 226}
m_MaxSize: {x: 4001, y: 4026}
m_ActualView: {fileID: 12}
m_ActualView: {fileID: 18}
m_Panes:
- {fileID: 13}
- {fileID: 14}
- {fileID: 12}
m_Selected: 2
m_LastSelected: 1
--- !u!114 &7
- {fileID: 17}
- {fileID: 18}
- {fileID: 16}
m_Selected: 1
m_LastSelected: 2
--- !u!114 &10
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -164,20 +239,20 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Children:
- {fileID: 8}
- {fileID: 9}
- {fileID: 11}
- {fileID: 12}
m_Position:
serializedVersion: 2
x: 529
x: 281
y: 0
width: 440
width: 616
height: 941
m_MinSize: {x: 100, y: 100}
m_MaxSize: {x: 8096, y: 16192}
vertical: 1
controlID: 40
controlID: 48
draggingID: 0
--- !u!114 &8
--- !u!114 &11
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -194,16 +269,16 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 440
height: 456
width: 616
height: 265
m_MinSize: {x: 202, y: 226}
m_MaxSize: {x: 4002, y: 4026}
m_ActualView: {fileID: 15}
m_ActualView: {fileID: 19}
m_Panes:
- {fileID: 15}
- {fileID: 19}
m_Selected: 0
m_LastSelected: 0
--- !u!114 &9
--- !u!114 &12
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -219,17 +294,17 @@ MonoBehaviour:
m_Position:
serializedVersion: 2
x: 0
y: 456
width: 440
height: 485
y: 265
width: 616
height: 676
m_MinSize: {x: 102, y: 126}
m_MaxSize: {x: 4002, y: 4026}
m_ActualView: {fileID: 16}
m_ActualView: {fileID: 20}
m_Panes:
- {fileID: 16}
- {fileID: 20}
m_Selected: 0
m_LastSelected: 0
--- !u!114 &10
--- !u!114 &13
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -244,18 +319,18 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 969
x: 897
y: 0
width: 284
width: 457
height: 941
m_MinSize: {x: 232, y: 276}
m_MaxSize: {x: 10002, y: 10026}
m_ActualView: {fileID: 17}
m_ActualView: {fileID: 21}
m_Panes:
- {fileID: 17}
- {fileID: 21}
m_Selected: 0
m_LastSelected: 0
--- !u!114 &11
--- !u!114 &14
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -270,18 +345,54 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 1253
x: 1354
y: 0
width: 667
width: 566
height: 941
m_MinSize: {x: 276, y: 76}
m_MaxSize: {x: 4001, y: 4026}
m_ActualView: {fileID: 18}
m_ActualView: {fileID: 22}
m_Panes:
- {fileID: 18}
- {fileID: 22}
m_Selected: 0
m_LastSelected: 0
--- !u!114 &12
--- !u!114 &15
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 13953, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_MinSize: {x: 748, y: 250}
m_MaxSize: {x: 4000, y: 4000}
m_TitleContent:
m_Text: Package Manager
m_Image: {fileID: -2824328813065806953, guid: 0000000000000000d000000000000000, type: 0}
m_Tooltip:
m_TextWithWhitespace: "Package Manager\u200B"
m_Pos:
serializedVersion: 2
x: 0
y: 26
width: 1050
height: 501
m_SerializedDataModeController:
m_DataMode: 0
m_PreferredDataMode: 0
m_SupportedDataModes:
isAutomatic: 1
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
m_SaveData: []
m_ContainerData: []
m_OverlaysVisible: 1
--- !u!114 &16
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -302,9 +413,9 @@ MonoBehaviour:
m_TextWithWhitespace: "Game\u200B"
m_Pos:
serializedVersion: 2
x: 0
y: 24
width: 528
x: 1920
y: 84
width: 280
height: 915
m_SerializedDataModeController:
m_DataMode: 0
@ -350,7 +461,7 @@ MonoBehaviour:
m_HSlider: 0
m_VSlider: 0
m_IgnoreScrollWheelUntilClicked: 0
m_EnableMouseInput: 1
m_EnableMouseInput: 0
m_EnableSliderZoomHorizontal: 0
m_EnableSliderZoomVertical: 0
m_UniformScale: 1
@ -359,29 +470,29 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 21
width: 528
width: 280
height: 894
m_Scale: {x: 0.275, y: 0.275}
m_Translation: {x: 264, y: 447}
m_Scale: {x: 0.14583333, y: 0.14583333}
m_Translation: {x: 140, y: 447.00003}
m_MarginLeft: 0
m_MarginRight: 0
m_MarginTop: 0
m_MarginBottom: 0
m_LastShownAreaInsideMargins:
serializedVersion: 2
x: -960
y: -1625.4545
width: 1920
height: 3250.909
x: -960.00006
y: -3065.143
width: 1920.0001
height: 6130.286
m_MinimalGUI: 1
m_defaultScale: 0.275
m_LastWindowPixelSize: {x: 528, y: 915}
m_defaultScale: 0.14583333
m_LastWindowPixelSize: {x: 280, y: 915}
m_ClearInEditMode: 1
m_NoCameraWarning: 1
m_LowResolutionForAspectRatios: 00000000000000000000
m_XRRenderMode: 0
m_RenderTexture: {fileID: 0}
--- !u!114 &13
--- !u!114 &17
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -453,7 +564,7 @@ MonoBehaviour:
m_CurrentEditor: 1
m_LayerEditor:
m_SelectedLayerIndex: 0
--- !u!114 &14
--- !u!114 &18
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -475,8 +586,8 @@ MonoBehaviour:
m_Pos:
serializedVersion: 2
x: 0
y: 79
width: 898
y: 24
width: 280
height: 915
m_SerializedDataModeController:
m_DataMode: 0
@ -548,10 +659,10 @@ MonoBehaviour:
displayed: 1
id: unity-transform-toolbar
index: 0
contents: '{"m_Layout":2,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":-374.9990234375,"y":-238.0},"m_SnapOffsetDelta":{"x":0.0,"y":0.0},"m_FloatingSnapCorner":3,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}'
contents: '{"m_Layout":2,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":-258.9990234375,"y":-238.0},"m_SnapOffsetDelta":{"x":0.0,"y":0.0},"m_FloatingSnapCorner":3,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}'
floating: 0
collapsed: 0
snapOffset: {x: -374.99902, y: -238}
snapOffset: {x: -258.99902, y: -238}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 3
layout: 2
@ -940,12 +1051,12 @@ MonoBehaviour:
displayed: 1
id: Overlays/OverlayMenu
index: 1
contents: '{"m_Layout":1,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":-47.0,"y":-56.0},"m_SnapOffsetDelta":{"x":0.0,"y":0.0},"m_FloatingSnapCorner":2,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}'
contents: '{"m_Layout":1,"m_Collapsed":false,"m_Floating":false,"m_FloatingSnapOffset":{"x":-327.0,"y":-56.0},"m_SnapOffsetDelta":{"x":0.0,"y":0.0},"m_FloatingSnapCorner":3,"m_Size":{"x":0.0,"y":0.0},"m_SizeOverridden":false}'
floating: 0
collapsed: 0
snapOffset: {x: -47, y: -56}
snapOffset: {x: -327, y: -56}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 2
snapCorner: 3
layout: 1
size: {x: 0, y: 0}
sizeOverridden: 0
@ -1121,7 +1232,7 @@ MonoBehaviour:
m_LastSceneViewRotation: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226}
m_LastSceneViewOrtho: 0
m_Viewpoint:
m_SceneView: {fileID: 14}
m_SceneView: {fileID: 18}
m_CameraOverscanSettings:
m_Opacity: 50
m_Scale: 1
@ -1131,7 +1242,7 @@ MonoBehaviour:
m_LastLockedObject: {fileID: 0}
m_LastDebugDrawMode: 35
m_ViewIsLockedToObject: 0
--- !u!114 &15
--- !u!114 &19
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -1154,8 +1265,8 @@ MonoBehaviour:
serializedVersion: 2
x: 1
y: 24
width: 438
height: 430
width: 614
height: 239
m_SerializedDataModeController:
m_DataMode: 0
m_PreferredDataMode: 0
@ -1172,7 +1283,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: b06bffffca6bffffd66bffff7874ffffd475ffff5a79ffffa285fffffe86ffffea89ffff0092ffff5c93ffff5c96ffffc298ffffbaa0ffff16a2ffff02a5ffff1eaeffff7aafffff08b3fffff4fafffff6faffff
m_ExpandedIDs: 72faffff
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1189,7 +1300,7 @@ MonoBehaviour:
m_OriginalEventType: 11
m_IsRenamingFilename: 0
m_TrimLeadingAndTrailingWhitespace: 0
m_ClientGUIView: {fileID: 8}
m_ClientGUIView: {fileID: 9}
m_SearchString:
m_ExpandedScenes: []
m_CurrenRootInstanceID: 0
@ -1197,7 +1308,7 @@ MonoBehaviour:
m_IsLocked: 0
m_CurrentSortingName: TransformSorting
m_WindowGUID: 85728a346145f5041b41bc3ce2f945c6
--- !u!114 &16
--- !u!114 &20
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -1219,9 +1330,9 @@ MonoBehaviour:
m_Pos:
serializedVersion: 2
x: 1
y: 480
width: 438
height: 459
y: 289
width: 614
height: 650
m_SerializedDataModeController:
m_DataMode: 0
m_PreferredDataMode: 0
@ -1233,7 +1344,7 @@ MonoBehaviour:
m_SaveData: []
m_ContainerData: []
m_OverlaysVisible: 1
--- !u!114 &17
--- !u!114 &21
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -1254,9 +1365,9 @@ MonoBehaviour:
m_TextWithWhitespace: "Project\u200B"
m_Pos:
serializedVersion: 2
x: 970
x: 898
y: 24
width: 282
width: 455
height: 915
m_SerializedDataModeController:
m_DataMode: 0
@ -1278,8 +1389,9 @@ MonoBehaviour:
m_SceneHandles:
m_ShowAllHits: 0
m_SkipHidden: 0
m_SearchArea: 1
m_Folders: []
m_SearchArea: 0
m_Folders:
- Packages/com.alicizax.unity.timer
m_Globs: []
m_ProductIds:
m_AnyWithAssetOrigin: 0
@ -1290,14 +1402,14 @@ MonoBehaviour:
m_StartGridSize: 96
m_LastFolders: []
m_LastFoldersGridSize: 16
m_LastProjectPath: F:\Web\Aliciza\Client
m_LastProjectPath: G:\UnityProject\Aliciza\Client
m_LockTracker:
m_IsLocked: 0
m_FolderTreeState:
scrollPos: {x: 0, y: 0}
m_SelectedIDs: e48c0000
m_LastClickedID: 36068
m_ExpandedIDs:
m_ExpandedIDs: 000000007abf00003ac100003cc100003ec1000040c1000042c1000044c1000046c1000048c100004ac100004cc100004ec10000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1326,7 +1438,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs:
m_ExpandedIDs: 000000007abf00003ac100003cc100003ec1000040c1000042c1000044c1000046c1000048c100004ac100004cc100004ec10000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1343,7 +1455,7 @@ MonoBehaviour:
m_OriginalEventType: 11
m_IsRenamingFilename: 1
m_TrimLeadingAndTrailingWhitespace: 0
m_ClientGUIView: {fileID: 10}
m_ClientGUIView: {fileID: 13}
m_SearchString:
m_CreateAssetUtility:
m_EndAction: {fileID: 0}
@ -1354,7 +1466,7 @@ MonoBehaviour:
m_ListAreaState:
m_SelectedInstanceIDs:
m_LastClickedInstanceID: 0
m_HadKeyboardFocusLastEvent: 0
m_HadKeyboardFocusLastEvent: 1
m_ExpandedInstanceIDs: 0c750000f2d60000
m_RenameOverlay:
m_UserAcceptedRename: 0
@ -1372,7 +1484,7 @@ MonoBehaviour:
m_OriginalEventType: 11
m_IsRenamingFilename: 1
m_TrimLeadingAndTrailingWhitespace: 0
m_ClientGUIView: {fileID: 10}
m_ClientGUIView: {fileID: 13}
m_CreateAssetUtility:
m_EndAction: {fileID: 0}
m_InstanceID: 0
@ -1384,7 +1496,7 @@ MonoBehaviour:
m_GridSize: 96
m_SkipHiddenPackages: 0
m_DirectoriesAreaWidth: 115
--- !u!114 &18
--- !u!114 &22
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -1405,9 +1517,9 @@ MonoBehaviour:
m_TextWithWhitespace: "Inspector\u200B"
m_Pos:
serializedVersion: 2
x: 1254
x: 1355
y: 24
width: 666
width: 565
height: 915
m_SerializedDataModeController:
m_DataMode: 0