Compare commits
9 Commits
9e5c383a49
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de70870682 | ||
| b0e0a7d5aa | |||
|
|
7995cab04a | ||
|
|
fe00ecfcc7 | ||
| 48e7364981 | |||
| 31d91e546d | |||
| 9e5471b4c4 | |||
|
|
02ee7fc72e | ||
|
|
810d019619 |
@@ -213,7 +213,7 @@ Material:
|
||||
- _Dst: 10
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EdgeValue: 0.92061317
|
||||
- _EdgeValue: 0.43645233
|
||||
- _EnvironmentReflections: 1
|
||||
- _FNLfanxiangkaiguan: 0
|
||||
- _Face: 1
|
||||
@@ -258,7 +258,7 @@ Material:
|
||||
- _Mask_scale: 1
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Opacity: 0.07938683
|
||||
- _Opacity: 0.5635477
|
||||
- _Parallax: 0.005
|
||||
- _Pass: 0
|
||||
- _QueueOffset: 0
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89332e728ceca7d4bb803d7f4d2f3a0a
|
||||
guid: e00e6f90ab8233e46a41c5e33917c642
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1743bfe8b418fff479dd0ddd566eade1
|
||||
guid: 9da5530d5ebfab24c8ecad68795e720f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23c8ba413611d24439ba1527f3c10e3a
|
||||
guid: aa102d640b98b5d4781710a3a3dd6983
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b1e8289bb1689144a9ba9d396e9e4969
|
||||
guid: 7a0bb33169d95ec499136d59cb25918b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 641c955d37d2fac4f87e00ac5c9d9bd8
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2690f45490c175045bbdc63395bf6278
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fbd1fd9b3a70fad429d1eaaa5799c2a5
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3579d9cf4b75c564faa8fffc58a9f3f6
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0023a0858ba124646a55dfcb7231ed46
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d1c0b77896049554fa4b635531caf741
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c0a0a980c9ba86345bc15411db88d34f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2edbf4a9b9544774bbef617e92429664
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 13ab599a7bda4e54fba3e92a13c9580a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f6f268949ccf3f34fa4d18e92501ed82
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 69bc3229216b1504ea3e28b5820bbb0d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4f665a06c5a2aa5499fa1c79ac058999
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8a87ed432fe2d97498c0de5fae312e35
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7c3bfbbeb9427b94099254e2e2768ad4
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c5303861611f41c438a30be552da5de4
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a9d68dd8913f05d4d9ce75e7b40c6044
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2243c8b4e1ab6914995699133f67ab5a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9a5e61a8b3421b944863d0946e32da0a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89f0b84148d149d4d96b838d7ef60e92
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 19939ee2cdb76e0489b1b8cd4bed7f3d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70777e8ce9f3c8d4a8182ca2f965cdb2
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ba281a1a00c8ac54c914e0763299f637
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e6fc8948257acee42b666d0bfe1d782c
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4b5cb8698f2d9c14fadf8e2383441d37
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b460b52e6c1feae45b70b7ddc2c45bd6
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57fcea0ed8b5eb347923c4c21fa31b57
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e9da72e7e3196146bf7d27450013734
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0904cdf24ddcd5042b024326476220d5
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 929783250050f8a448821b6ca1f2c578
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fcc4d2eb0af82e546ae75506872cf092
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cd0a0171c5157b748afe763b89f71211
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4990f6ace6142c4bbbf41cdd80b0bd3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -5,6 +5,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using Ichni;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Build;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
@@ -44,35 +45,79 @@ public class BuildAssetBundle
|
||||
}
|
||||
}
|
||||
|
||||
public static void BuildForTarget(BuildTarget target)
|
||||
{
|
||||
string platformDirectory = GetPlatformDirectory(target);
|
||||
if (string.IsNullOrEmpty(platformDirectory))
|
||||
{
|
||||
Debug.LogWarning($"Skip AssetBundle build for unsupported build target: {target}");
|
||||
return;
|
||||
}
|
||||
|
||||
string uri = Path.Combine(BuildPrepare(), platformDirectory);
|
||||
if (Directory.Exists(uri) == false)
|
||||
{
|
||||
Directory.CreateDirectory(uri);
|
||||
}
|
||||
AssetBundleManifest manifest = BuildPipeline.BuildAssetBundles(uri, BuildAssetBundleOptions.None, target);
|
||||
if (manifest == null)
|
||||
{
|
||||
throw new BuildFailedException($"AssetBundle build failed for target: {target}");
|
||||
}
|
||||
|
||||
GenerateAbstracts(manifest);
|
||||
}
|
||||
|
||||
private static string GetPlatformDirectory(BuildTarget target)
|
||||
{
|
||||
return target switch
|
||||
{
|
||||
BuildTarget.StandaloneWindows => "Windows64",
|
||||
BuildTarget.StandaloneWindows64 => "Windows64",
|
||||
BuildTarget.StandaloneOSX => "OSX",
|
||||
BuildTarget.Android => "Android",
|
||||
BuildTarget.iOS => "IOS",
|
||||
_ => string.Empty
|
||||
};
|
||||
}
|
||||
|
||||
[MenuItem("AssetBundleTools/BuildToWindows64")]
|
||||
public static void BuildToWindows64()
|
||||
{
|
||||
string uri = BuildPrepare() + "/Windows64";
|
||||
AssetBundleManifest manifestWin64 = BuildPipeline.BuildAssetBundles(uri, BuildAssetBundleOptions.None, BuildTarget.StandaloneWindows64);
|
||||
GenerateAbstracts(manifestWin64);
|
||||
BuildForTarget(BuildTarget.StandaloneWindows64);
|
||||
}
|
||||
|
||||
[MenuItem("AssetBundleTools/BuildToOSX")]
|
||||
public static void BuildToOSX()
|
||||
{
|
||||
string uri = BuildPrepare() + "/OSX";
|
||||
AssetBundleManifest manifestOSX = BuildPipeline.BuildAssetBundles(uri, BuildAssetBundleOptions.None, BuildTarget.StandaloneOSX);
|
||||
GenerateAbstracts(manifestOSX);
|
||||
BuildForTarget(BuildTarget.StandaloneOSX);
|
||||
}
|
||||
|
||||
[MenuItem("AssetBundleTools/BuildToAndroid")]
|
||||
public static void BuildToAndroid()
|
||||
{
|
||||
string uri = BuildPrepare() + "/Android";
|
||||
AssetBundleManifest manifestAndroid = BuildPipeline.BuildAssetBundles(uri, BuildAssetBundleOptions.None, BuildTarget.Android);
|
||||
GenerateAbstracts(manifestAndroid);
|
||||
BuildForTarget(BuildTarget.Android);
|
||||
}
|
||||
|
||||
[MenuItem("AssetBundleTools/BuildToIOS")]
|
||||
public static void BuildToIOS()
|
||||
{
|
||||
string uri = BuildPrepare() + "/IOS";
|
||||
AssetBundleManifest manifestIOS = BuildPipeline.BuildAssetBundles(uri, BuildAssetBundleOptions.None, BuildTarget.iOS);
|
||||
GenerateAbstracts(manifestIOS);
|
||||
BuildForTarget(BuildTarget.iOS);
|
||||
}
|
||||
}
|
||||
|
||||
[InitializeOnLoad]
|
||||
public static class AssetBundleBuildPlayerHandler
|
||||
{
|
||||
static AssetBundleBuildPlayerHandler()
|
||||
{
|
||||
BuildPlayerWindow.RegisterBuildPlayerHandler(BuildPlayerWithAssetBundles);
|
||||
}
|
||||
|
||||
private static void BuildPlayerWithAssetBundles(BuildPlayerOptions options)
|
||||
{
|
||||
Debug.Log($"Rebuild AssetBundles before player build: {options.target}");
|
||||
BuildAssetBundle.BuildForTarget(options.target);
|
||||
BuildPlayerWindow.DefaultBuildMethods.BuildPlayer(options);
|
||||
}
|
||||
}
|
||||
231
Assets/Editor/QuickSelector.CS
Normal file
231
Assets/Editor/QuickSelector.CS
Normal file
@@ -0,0 +1,231 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
[InitializeOnLoad]
|
||||
public class QuickSelectorHud
|
||||
{
|
||||
public static GameObject HoveredObject;
|
||||
|
||||
static QuickSelectorHud()
|
||||
{
|
||||
SceneView.duringSceneGui += OnSceneGUI;
|
||||
}
|
||||
|
||||
private static void OnSceneGUI(SceneView sceneView)
|
||||
{
|
||||
if (HoveredObject != null)
|
||||
{
|
||||
DrawHighlight(HoveredObject);
|
||||
sceneView.Repaint();
|
||||
}
|
||||
|
||||
Event e = Event.current;
|
||||
if (e.type == EventType.MouseDown && e.button == 1 && e.shift)
|
||||
{
|
||||
var entries = CollectData(sceneView, e.mousePosition);
|
||||
QuickSelectorPopup popup = new QuickSelectorPopup(entries);
|
||||
PopupWindow.Show(new Rect(e.mousePosition.x, e.mousePosition.y, 0, 0), popup);
|
||||
e.Use();
|
||||
}
|
||||
}
|
||||
|
||||
private static void DrawHighlight(GameObject go)
|
||||
{
|
||||
Handles.color = new Color(0f, 0.7f, 1f, 1f); // 亮蓝色
|
||||
RectTransform rt = go.GetComponent<RectTransform>();
|
||||
if (rt != null)
|
||||
{
|
||||
Vector3[] corners = new Vector3[4];
|
||||
rt.GetWorldCorners(corners);
|
||||
Handles.DrawPolyLine(corners[0], corners[1], corners[2], corners[3], corners[0]);
|
||||
Handles.color = new Color(0f, 0.7f, 1f, 0.1f);
|
||||
Handles.DrawAAConvexPolygon(corners);
|
||||
}
|
||||
else
|
||||
{
|
||||
Renderer r = go.GetComponent<Renderer>();
|
||||
if (r != null) Handles.DrawWireCube(r.bounds.center, r.bounds.size);
|
||||
}
|
||||
}
|
||||
|
||||
private static List<SelectionEntry> CollectData(SceneView sceneView, Vector2 mousePos)
|
||||
{
|
||||
bool enableUI = EditorPrefs.GetBool("QS_UI", true);
|
||||
bool enable3D = EditorPrefs.GetBool("QS_3D", true);
|
||||
Vector2 guiPos = mousePos;
|
||||
guiPos.y = sceneView.camera.pixelHeight - guiPos.y;
|
||||
Ray ray = HandleUtility.GUIPointToWorldRay(mousePos);
|
||||
|
||||
HashSet<GameObject> processed = new HashSet<GameObject>();
|
||||
List<SelectionEntry> list = new List<SelectionEntry>();
|
||||
|
||||
GameObject smart = HandleUtility.PickGameObject(mousePos, false);
|
||||
if (smart != null) AddEntry(list, processed, smart, "PICK");
|
||||
|
||||
if (enableUI)
|
||||
{
|
||||
var rects = GameObject.FindObjectsByType<RectTransform>(FindObjectsSortMode.None);
|
||||
foreach (var rect in rects)
|
||||
{
|
||||
if (rect.gameObject.activeInHierarchy && RectTransformUtility.RectangleContainsScreenPoint(rect, guiPos, sceneView.camera))
|
||||
AddEntry(list, processed, rect.gameObject, "UI");
|
||||
}
|
||||
}
|
||||
|
||||
if (enable3D)
|
||||
{
|
||||
RaycastHit[] hits = Physics.RaycastAll(ray, float.MaxValue);
|
||||
foreach (var hit in hits) AddEntry(list, processed, hit.collider.gameObject, "3D");
|
||||
foreach (var r in GameObject.FindObjectsByType<Renderer>(FindObjectsSortMode.None))
|
||||
if (!processed.Contains(r.gameObject) && r.bounds.IntersectRay(ray, out _))
|
||||
AddEntry(list, processed, r.gameObject, "Mesh");
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
private static void AddEntry(List<SelectionEntry> list, HashSet<GameObject> set, GameObject go, string src)
|
||||
{
|
||||
if (go == null || !set.Add(go)) return;
|
||||
string maj = (go.GetComponent<RectTransform>() != null) ? "UI" : (go.GetComponent<Collider>() != null ? "3D" : "Mesh");
|
||||
string min = (maj == "UI") ? GetUIType(go) : (go.GetComponent<Renderer>()?.GetType().Name ?? "Object");
|
||||
list.Add(new SelectionEntry { go = go, root = GetRoot(go.transform), depth = GetDepth(go.transform), sibling = go.transform.GetSiblingIndex(), major = maj, minor = min });
|
||||
}
|
||||
|
||||
private static string GetUIType(GameObject go)
|
||||
{
|
||||
if (go.GetComponent("TextMeshProUGUI")) return "TMPro";
|
||||
if (go.GetComponent<Text>()) return "Text";
|
||||
if (go.GetComponent<Image>()) return "Image";
|
||||
return "Rect";
|
||||
}
|
||||
private static GameObject GetRoot(Transform t) { while (t.parent != null) t = t.parent; return t.gameObject; }
|
||||
private static int GetDepth(Transform t) { int d = 0; while (t.parent != null) { d++; t = t.parent; } return d; }
|
||||
}
|
||||
|
||||
public class SelectionEntry { public GameObject go, root; public int depth, sibling; public string major, minor; }
|
||||
|
||||
public class QuickSelectorPopup : PopupWindowContent
|
||||
{
|
||||
private List<SelectionEntry> _entries;
|
||||
private List<DisplayItem> _displayItems;
|
||||
private Vector2 _scroll;
|
||||
private GUIStyle _hoverStyle;
|
||||
private GUIStyle _richLabelStyle; // 修正点:手动创建支持富文本的 Style
|
||||
|
||||
public QuickSelectorPopup(List<SelectionEntry> entries)
|
||||
{
|
||||
_entries = entries;
|
||||
RefreshList();
|
||||
}
|
||||
|
||||
public override Vector2 GetWindowSize() => new Vector2(280, Mathf.Min((_displayItems.Count * 22) + 30, 450));
|
||||
|
||||
public override void OnGUI(Rect rect)
|
||||
{
|
||||
// 样式初始化
|
||||
if (_hoverStyle == null)
|
||||
{
|
||||
_hoverStyle = new GUIStyle(EditorStyles.label);
|
||||
_hoverStyle.normal.background = MakeTex(2, 2, new Color(0.2f, 0.5f, 1f, 0.4f));
|
||||
}
|
||||
if (_richLabelStyle == null)
|
||||
{
|
||||
_richLabelStyle = new GUIStyle(EditorStyles.label);
|
||||
_richLabelStyle.richText = true; // 关键修正:开启富文本支持
|
||||
}
|
||||
|
||||
_scroll = EditorGUILayout.BeginScrollView(_scroll);
|
||||
Event e = Event.current;
|
||||
|
||||
foreach (var item in _displayItems)
|
||||
{
|
||||
if (item.isSep) { EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); continue; }
|
||||
|
||||
Rect r = EditorGUILayout.GetControlRect(false, 20);
|
||||
bool isHover = r.Contains(e.mousePosition);
|
||||
|
||||
if (isHover)
|
||||
{
|
||||
GUI.Box(r, "", _hoverStyle);
|
||||
if (QuickSelectorHud.HoveredObject != item.ent.go)
|
||||
{
|
||||
QuickSelectorHud.HoveredObject = item.ent.go;
|
||||
EditorGUIUtility.PingObject(item.ent.go);
|
||||
SceneView.RepaintAll();
|
||||
}
|
||||
if (e.type == EventType.MouseDown && e.button == 0)
|
||||
{
|
||||
Selection.activeGameObject = item.ent.go;
|
||||
this.editorWindow.Close();
|
||||
}
|
||||
}
|
||||
|
||||
// 使用修正后的富文本样式绘制
|
||||
GUI.Label(r, item.label, _richLabelStyle);
|
||||
}
|
||||
EditorGUILayout.EndScrollView();
|
||||
|
||||
DrawToolbar();
|
||||
|
||||
if (e.type == EventType.MouseMove && !rect.Contains(e.mousePosition))
|
||||
{
|
||||
QuickSelectorHud.HoveredObject = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawToolbar()
|
||||
{
|
||||
GUILayout.BeginHorizontal(EditorStyles.toolbar);
|
||||
if (GUILayout.Toggle(EditorPrefs.GetBool("QS_UI", true), "UI", EditorStyles.toolbarButton) != EditorPrefs.GetBool("QS_UI", true))
|
||||
{
|
||||
EditorPrefs.SetBool("QS_UI", !EditorPrefs.GetBool("QS_UI")); RefreshList();
|
||||
}
|
||||
if (GUILayout.Toggle(EditorPrefs.GetBool("QS_3D", true), "3D", EditorStyles.toolbarButton) != EditorPrefs.GetBool("QS_3D", true))
|
||||
{
|
||||
EditorPrefs.SetBool("QS_3D", !EditorPrefs.GetBool("QS_3D")); RefreshList();
|
||||
}
|
||||
GUILayout.FlexibleSpace();
|
||||
if (GUILayout.Toggle(EditorPrefs.GetBool("QS_REV", false), "Reverse", EditorStyles.toolbarButton) != EditorPrefs.GetBool("QS_REV", false))
|
||||
{
|
||||
EditorPrefs.SetBool("QS_REV", !EditorPrefs.GetBool("QS_REV")); RefreshList();
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
public override void OnClose() { QuickSelectorHud.HoveredObject = null; SceneView.RepaintAll(); }
|
||||
|
||||
private void RefreshList()
|
||||
{
|
||||
_displayItems = new List<DisplayItem>();
|
||||
bool rev = EditorPrefs.GetBool("QS_REV", false);
|
||||
var groups = _entries.GroupBy(x => x.root).OrderByDescending(g => g.Any(e => e.major == "UI")).ThenBy(g => g.Key.name);
|
||||
bool first = true;
|
||||
foreach (var g in groups)
|
||||
{
|
||||
if (!first) _displayItems.Add(new DisplayItem { isSep = true });
|
||||
first = false;
|
||||
var sorted = rev ? g.OrderByDescending(x => x.depth).ThenByDescending(x => x.sibling) : g.OrderBy(x => x.depth).ThenBy(x => x.sibling);
|
||||
int minD = g.Min(x => x.depth);
|
||||
int maxD = g.Max(x => x.depth);
|
||||
foreach (var ent in sorted)
|
||||
{
|
||||
int ind = rev ? (maxD - ent.depth) : (ent.depth - minD);
|
||||
string color = (ent.major == "UI" ? "#00E6FF" : "#AAAAAA"); // 调整 UI 标签为更亮的青色
|
||||
string label = $"{new string(' ', ind * 4)}<color={color}>[{ent.major}|{ent.minor}]</color> {ent.go.name}";
|
||||
_displayItems.Add(new DisplayItem { ent = ent, label = label });
|
||||
}
|
||||
}
|
||||
if (editorWindow != null) editorWindow.Repaint();
|
||||
}
|
||||
|
||||
private Texture2D MakeTex(int w, int h, Color col)
|
||||
{
|
||||
Color[] pix = new Color[w * h]; for (int i = 0; i < pix.Length; i++) pix[i] = col;
|
||||
Texture2D t = new Texture2D(w, h); t.SetPixels(pix); t.Apply(); return t;
|
||||
}
|
||||
|
||||
private class DisplayItem { public bool isSep; public SelectionEntry ent; public string label; }
|
||||
}
|
||||
2
Assets/Editor/QuickSelector.CS.meta
Normal file
2
Assets/Editor/QuickSelector.CS.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7e9809a5644224c4fb21f9c621b3bda6
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1782b72cd0e99a54fac09382c482e3db
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 49d5bcbbd4cbd754b98cf3200197b0f1
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eefe45a405f061045be947217e30ed10
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e995dfe11e22d34d92432383d15c067
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ec984c51d4ae2504184eeb292734c672
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e447b3d7d913d694ca35f74e30581840
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6584a66582083a1459dcf5e4e87f6d62
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0190b8bde50f12943926613d9a63c89a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ae2ce8ad295486349839288636aed1ed
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d69745226619e3241a8e04ce86aee6a6
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 37e6a9374416bc946a55779c58d0d984
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/FR2_Cache.asset
LFS
BIN
Assets/FR2_Cache.asset
LFS
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e45363610a59a4543a9793b3bf2be4aa
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10
Assets/Localization/Message/Message.csv
Normal file
10
Assets/Localization/Message/Message.csv
Normal file
@@ -0,0 +1,10 @@
|
||||
Key,Chinese (Simplified)(zh-CN),English(en),Chinese (Traditional)(zh-TW),Japanese(ja),Korean(ko),Vietnamese (Vietnam)(vi-VN),Thai(th)
|
||||
story_c0_refusal_rewind_title,"旅程在这里结束","The Journey Ends Here","旅程在這裡結束","旅はここで終わる","여기서 여정이 끝납니다","Hành trình kết thúc tại đây","การเดินทางสิ้นสุดลงที่นี่"
|
||||
story_c0_refusal_rewind_body,"若希望返回选择之前,请点击时间轴上的“第五日 · 抉择”标记,并读取该时间点的存档。","To return to the point before your choice, select the “Day 5 · Decision” marker on the timeline and load that checkpoint.","若要回到做出選擇之前,請點擊時間軸上的「第五日 · 抉擇」標記,並讀取該時間點的存檔。","選択前に戻りたい場合は、タイムラインの「第5日・決断」マーカーを選び、その時点のセーブデータを読み込んでください。","선택하기 전으로 돌아가려면 타임라인의 “5일째 · 결단” 마커를 선택하고 해당 시점의 저장 데이터를 불러오세요.","Để quay lại trước khi đưa ra lựa chọn, hãy chọn mốc “Ngày thứ năm · Quyết định” trên dòng thời gian và tải bản lưu tại thời điểm đó.","หากต้องการกลับไปก่อนตัดสินใจ ให้เลือกเครื่องหมาย “วันที่ห้า · การตัดสินใจ” บนไทม์ไลน์ แล้วโหลดบันทึก ณ เวลานั้น"
|
||||
system_unlock_song_title,"已解锁新歌曲!","New Song Unlocked!","已解鎖新歌曲!","新しい楽曲を解放しました!","새 곡이 해금되었습니다!","Đã mở khóa bài hát mới!","ปลดล็อกเพลงใหม่แล้ว!"
|
||||
system_unlock_song_content,"你已解锁歌曲:{song_name}","You have unlocked: {song_name}","已解鎖歌曲:{song_name}","楽曲を解放しました:{song_name}","새 곡을 해금했습니다: {song_name}","Bạn đã mở khóa bài hát: {song_name}","คุณปลดล็อกเพลงแล้ว: {song_name}"
|
||||
system_return_to_title_title,"返回标题","Return to Title","返回標題","タイトルへ戻る","타이틀로 돌아가기","Về màn hình tiêu đề","กลับสู่หน้าชื่อเรื่อง"
|
||||
system_return_to_title_content,"你确定要返回标题页面吗?未保存的进度将丢失。","Are you sure you want to return to the title screen? Unsaved progress will be lost.","你確定要返回標題頁面嗎?未儲存的進度將會遺失。","タイトル画面に戻りますか?未保存の進行状況は失われます。","타이틀 화면으로 돌아가시겠습니까? 저장되지 않은 진행 상황은 사라집니다.","Bạn có chắc muốn quay lại màn hình tiêu đề không? Tiến trình chưa lưu sẽ bị mất.","คุณแน่ใจหรือไม่ว่าต้องการกลับสู่หน้าชื่อเรื่อง? ความคืบหน้าที่ยังไม่ได้บันทึกจะหายไป"
|
||||
system_rollback_chapter_title,"重开本章节","Restart This Chapter","重新開始本章","この章をやり直す","이 챕터 다시 시작하기","Chơi lại chương này","เริ่มบทนี้ใหม่"
|
||||
system_rollback_chapter_content,"将重置“{marker_name}”所在列及其之后的剧情选择与进度。歌曲成绩、解锁内容、设置和其它章节不会受到影响。","This resets the story choices and progress in the column containing “{marker_name}” and every column after it. Song records, unlocked content, settings, and other chapters are unaffected.","將重設「{marker_name}」所在欄位及其之後的劇情選擇與進度。歌曲成績、解鎖內容、設定及其他章節不受影響。","「{marker_name}」の列とそれ以降の物語選択・進行状況をリセットします。楽曲記録、解放済みコンテンツ、設定、ほかの章には影響しません。","“{marker_name}”이 있는 열과 그 이후의 스토리 선택 및 진행도를 초기화합니다. 곡 기록, 해금 콘텐츠, 설정 및 다른 챕터에는 영향을 주지 않습니다.","Thao tác này sẽ đặt lại các lựa chọn và tiến trình cốt truyện ở cột chứa “{marker_name}” cùng mọi cột phía sau. Kết quả bài hát, nội dung đã mở khóa, cài đặt và các chương khác không bị ảnh hưởng.","การดำเนินการนี้จะรีเซ็ตตัวเลือกและความคืบหน้าในคอลัมน์ที่มี “{marker_name}” รวมถึงคอลัมน์หลังจากนั้น ผลการเล่นเพลง เนื้อหาที่ปลดล็อก การตั้งค่า และบทอื่นจะไม่ถูกกระทบ"
|
||||
system_rollback_confirm,"重开此时间点","Restart from This Point","從此時間點重開","この時点からやり直す","이 시점부터 다시 시작","Chơi lại từ thời điểm này","เริ่มใหม่จากจุดนี้"
|
||||
|
7
Assets/Localization/Message/Message.csv.meta
Normal file
7
Assets/Localization/Message/Message.csv.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 184a5a2033604d06b9689d133f55741f
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 66e2adeede36cae428a36676ff35b167
|
||||
guid: 2b41ad37cb6b9184d9acc2e9bd4cde3f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
BIN
Assets/Localization/Settings/Chinese (Simplified) (zh-CN).asset
LFS
Normal file
BIN
Assets/Localization/Settings/Chinese (Simplified) (zh-CN).asset
LFS
Normal file
Binary file not shown.
BIN
Assets/Localization/Settings/English (en).asset
LFS
Normal file
BIN
Assets/Localization/Settings/English (en).asset
LFS
Normal file
Binary file not shown.
BIN
Assets/Localization/Settings/Localization Settings.asset
LFS
Normal file
BIN
Assets/Localization/Settings/Localization Settings.asset
LFS
Normal file
Binary file not shown.
8
Assets/Localization/Story/Chapter0.meta
Normal file
8
Assets/Localization/Story/Chapter0.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2574142997c87194f86b0dcde7d34c67
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Localization/Story/Chapter0/Content.meta
Normal file
8
Assets/Localization/Story/Chapter0/Content.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 726fc577c1d8fe94c85371a270251058
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Localization/Story/Chapter0/Content/Chapter0_Content Shared Data.asset
LFS
Normal file
BIN
Assets/Localization/Story/Chapter0/Content/Chapter0_Content Shared Data.asset
LFS
Normal file
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57af106901ec33343b20768bce170136
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Localization/Story/Chapter0/Content/Chapter0_Content.asset
LFS
Normal file
BIN
Assets/Localization/Story/Chapter0/Content/Chapter0_Content.asset
LFS
Normal file
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c7070a4b9bbf6840b614ac8042bd4c2
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user