奇怪的调

This commit is contained in:
2025-06-14 20:47:45 +08:00
parent 970ee90a8b
commit 338ae9bddd
22 changed files with 20470 additions and 2681 deletions

View File

@@ -49,10 +49,10 @@ MonoBehaviour:
m_addressable:
m_atlas:
m_fileSize: 26192
m_assetChangeTS: 1749448225
m_fileInfoReadTS: 1749448229
m_fileWriteTS: 1749448225
m_cachefileWriteTS: 1749448225
m_assetChangeTS: 1749905131
m_fileInfoReadTS: 1749905238
m_fileWriteTS: 1749905131
m_cachefileWriteTS: 1749905131
refreshStamp: 3
UseGUIDsList: []
- guid: 00000000000000005000000000000000
@@ -12053,10 +12053,10 @@ MonoBehaviour:
m_addressable:
m_atlas:
m_fileSize: 3645
m_assetChangeTS: 1749279554
m_fileInfoReadTS: 1749279793
m_fileWriteTS: 1749279554
m_cachefileWriteTS: 1749279554
m_assetChangeTS: 1749905131
m_fileInfoReadTS: 1749905238
m_fileWriteTS: 1749905131
m_cachefileWriteTS: 1749905131
refreshStamp: 3
UseGUIDsList:
- guid: bf2edee5c58d82540a51f03df9d42094
@@ -22204,15 +22204,15 @@ MonoBehaviour:
UseGUIDsList: []
- guid: 81e2cda70e8084a3fb324d644db244fd
type: 5
m_fileInfoHash: 271595.asset
m_fileInfoHash: 268950.asset
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 271595
m_assetChangeTS: 1749373163
m_fileInfoReadTS: 1749373169
m_fileWriteTS: 1749367807
m_cachefileWriteTS: 1749367807
m_fileSize: 268950
m_assetChangeTS: 1749887098
m_fileInfoReadTS: 1749887328
m_fileWriteTS: 1749887098
m_cachefileWriteTS: 1749887098
refreshStamp: 3
UseGUIDsList:
- guid: e6b16dc7c203450459bb86e24305f9ca
@@ -23031,20 +23031,22 @@ MonoBehaviour:
ids: d50000001c000000
- guid: 66995b6b61aed864daa956ae255d7fee
ids: d50000001c000000
- guid: b0f85f7da5042c0448a526d5ecacbfa9
- guid: 188dfe7e559f13248ba2c41eb5a59328
ids: 1c000000
- guid: 02f78a9ec76d40f49bfac78c64a754d1
ids: 1c000000
- guid: a7ec9e7ad8b847b7ae4510af83c5d868
ids: 1c000000
- guid: f87b5805002ec9649bcb1b96d8a16ba9
- guid: 3ee40aa79cd242a5b53b0b0ca4f13f0f
ids: 1c000000
- guid: 02f78a9ec76d40f49bfac78c64a754d1
- guid: b0f85f7da5042c0448a526d5ecacbfa9
ids: 1c000000
- guid: f87b5805002ec9649bcb1b96d8a16ba9
ids: 1c000000
- guid: f66c4aa44c09b6a42a2b5b9f9334d824
ids: 1c000000
- guid: 3028dc075ba8c584d9bc7d1e0255e038
ids: 1c000000
- guid: 93f09189124b21e479fc891dbc1b93bf
ids: 1c000000
- guid: dcc0ed9263c0d524aabeb5f4bd75ecee
ids: 1c000000
- guid: 8113366f9f7cec647878e3af2fb98922
@@ -28387,10 +28389,10 @@ MonoBehaviour:
m_addressable:
m_atlas:
m_fileSize: 3642
m_assetChangeTS: 1749279554
m_fileInfoReadTS: 1749279793
m_fileWriteTS: 1749279554
m_cachefileWriteTS: 1749279554
m_assetChangeTS: 1749905131
m_fileInfoReadTS: 1749905238
m_fileWriteTS: 1749905131
m_cachefileWriteTS: 1749905131
refreshStamp: 3
UseGUIDsList:
- guid: bf2edee5c58d82540a51f03df9d42094
@@ -39822,15 +39824,15 @@ MonoBehaviour:
UseGUIDsList: []
- guid: b2cabbb688cb54529acc02a54919c608
type: 9
m_fileInfoHash: 588.json
m_fileInfoHash: 280631.json
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 588
m_assetChangeTS: 1748743056
m_fileInfoReadTS: 1748743076
m_fileWriteTS: 1748669109
m_cachefileWriteTS: 1748669109
m_fileSize: 280631
m_assetChangeTS: 1749879649
m_fileInfoReadTS: 1749879673
m_fileWriteTS: 1749448127
m_cachefileWriteTS: 1749448127
refreshStamp: 3
UseGUIDsList: []
- guid: b2da6b27df236b144b3516ed8e7d36ac
@@ -45802,19 +45804,6 @@ MonoBehaviour:
m_cachefileWriteTS: 1733863246
refreshStamp: 3
UseGUIDsList: []
- guid: 23c9ee719a4d6cf47b3b330d589b7a1d
type: 9
m_fileInfoHash: 643038.json
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 643038
m_assetChangeTS: 1749445088
m_fileInfoReadTS: 1749445108
m_fileWriteTS: 1749444974
m_cachefileWriteTS: 1749444974
refreshStamp: 3
UseGUIDsList: []
- guid: 23f922a362522a540b38b85bb2a5353f
type: 9
m_fileInfoHash: 230.template
@@ -62618,15 +62607,15 @@ MonoBehaviour:
UseGUIDsList: []
- guid: 54748045ed19d4ea6889de9b617f6f8b
type: 2
m_fileInfoHash: 2329.cs
m_fileInfoHash: 3210.cs
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 2329
m_assetChangeTS: 1748068396
m_fileInfoReadTS: 1748068409
m_fileWriteTS: 1748068392
m_cachefileWriteTS: 1748068392
m_fileSize: 3210
m_assetChangeTS: 1749886316
m_fileInfoReadTS: 1749886330
m_fileWriteTS: 1749886313
m_cachefileWriteTS: 1749886313
refreshStamp: 3
UseGUIDsList: []
- guid: 5474cb78511de04459cac50d50b9d9e0
@@ -80658,15 +80647,15 @@ MonoBehaviour:
UseGUIDsList: []
- guid: 95d3a881bc3654f05ba69138e8c703cb
type: 2
m_fileInfoHash: 9795.cs
m_fileInfoHash: 10780.cs
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 9795
m_assetChangeTS: 1749445907
m_fileInfoReadTS: 1749445926
m_fileWriteTS: 1749445904
m_cachefileWriteTS: 1749445904
m_fileSize: 10780
m_assetChangeTS: 1749882773
m_fileInfoReadTS: 1749882789
m_fileWriteTS: 1749882746
m_cachefileWriteTS: 1749882746
refreshStamp: 3
UseGUIDsList: []
- guid: 95140e49213aa6f49a470a81873b87c0
@@ -88267,15 +88256,15 @@ MonoBehaviour:
UseGUIDsList: []
- guid: 16fbe890712a645c9ba3004c732c9d18
type: 2
m_fileInfoHash: 6577.cs
m_fileInfoHash: 6882.cs
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 6577
m_assetChangeTS: 0
m_fileInfoReadTS: 1747758824
m_fileWriteTS: 1746949787
m_cachefileWriteTS: 1746949787
m_fileSize: 6882
m_assetChangeTS: 1749904976
m_fileInfoReadTS: 1749904993
m_fileWriteTS: 1749904974
m_cachefileWriteTS: 1749904974
refreshStamp: 3
UseGUIDsList: []
- guid: 164c9b1458eaab743a4b45c37a4d720d
@@ -111096,15 +111085,15 @@ MonoBehaviour:
UseGUIDsList: []
- guid: b73aa7982dc9e4261b2ff45db0112d48
type: 2
m_fileInfoHash: 5038.cs
m_fileInfoHash: 4210.cs
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 5038
m_assetChangeTS: 0
m_fileInfoReadTS: 1747758820
m_fileWriteTS: 1744659774
m_cachefileWriteTS: 1744659774
m_fileSize: 4210
m_assetChangeTS: 1749881813
m_fileInfoReadTS: 1749881830
m_fileWriteTS: 1749881811
m_cachefileWriteTS: 1749881811
refreshStamp: 3
UseGUIDsList: []
- guid: b7cabea05434bb9479aee1e121b0d103
@@ -115169,15 +115158,15 @@ MonoBehaviour:
UseGUIDsList: []
- guid: 0892af0ddd15c449d9b1c65248b5dc64
type: 2
m_fileInfoHash: 6832.cs
m_fileInfoHash: 5942.cs
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 6832
m_assetChangeTS: 0
m_fileInfoReadTS: 1747758820
m_fileWriteTS: 1746895565
m_cachefileWriteTS: 1746895565
m_fileSize: 5942
m_assetChangeTS: 1749881813
m_fileInfoReadTS: 1749881830
m_fileWriteTS: 1749881811
m_cachefileWriteTS: 1749881811
refreshStamp: 3
UseGUIDsList: []
- guid: 08d23c0b73905c148b525c3c93fff580
@@ -118861,15 +118850,15 @@ MonoBehaviour:
UseGUIDsList: []
- guid: 48120e902e0734a51a10b8b4c0229afa
type: 2
m_fileInfoHash: 7639.cs
m_fileInfoHash: 7736.cs
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 7639
m_assetChangeTS: 1748070911
m_fileInfoReadTS: 1748070929
m_fileWriteTS: 1748070908
m_cachefileWriteTS: 1748070908
m_fileSize: 7736
m_assetChangeTS: 1749882077
m_fileInfoReadTS: 1749882094
m_fileWriteTS: 1749882062
m_cachefileWriteTS: 1749882062
refreshStamp: 3
UseGUIDsList: []
- guid: 4822e5675c12bf14d93b254d27ec8bd7
@@ -135998,15 +135987,15 @@ MonoBehaviour:
UseGUIDsList: []
- guid: 79d811a12f27f43629797719fcbfc6ae
type: 2
m_fileInfoHash: 8326.cs
m_fileInfoHash: 7844.cs
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 8326
m_assetChangeTS: 1749445943
m_fileInfoReadTS: 1749445956
m_fileWriteTS: 1749445941
m_cachefileWriteTS: 1749445941
m_fileSize: 7844
m_assetChangeTS: 1749881813
m_fileInfoReadTS: 1749881830
m_fileWriteTS: 1749881811
m_cachefileWriteTS: 1749881811
refreshStamp: 3
UseGUIDsList: []
- guid: 79e8584360be43649ad60cb0f180e904
@@ -137582,15 +137571,15 @@ MonoBehaviour:
UseGUIDsList: []
- guid: 99c9720ab356a0642a771bea13969a05
type: 3
m_fileInfoHash: 941229.unity
m_fileInfoHash: 942272.unity
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 941229
m_assetChangeTS: 1749448226
m_fileInfoReadTS: 1749448229
m_fileWriteTS: 1749448226
m_cachefileWriteTS: 1749448226
m_fileSize: 942272
m_assetChangeTS: 1749887097
m_fileInfoReadTS: 1749887328
m_fileWriteTS: 1749887097
m_cachefileWriteTS: 1749887097
refreshStamp: 3
UseGUIDsList:
- guid: 20c30ea7b5a4fa046b4cc5a27824d90b
@@ -138619,7 +138608,21 @@ MonoBehaviour:
ids:
- guid: d6ba0e915cddec743a29f85a93f12594
ids: 73000000
- guid: ee148e281f3c41c5b4ff5f8a5afe5a6c
- guid: 188dfe7e559f13248ba2c41eb5a59328
ids: 1c000000
- guid: 02f78a9ec76d40f49bfac78c64a754d1
ids: 1c000000
- guid: a7ec9e7ad8b847b7ae4510af83c5d868
ids: 1c000000
- guid: 3ee40aa79cd242a5b53b0b0ca4f13f0f
ids: 1c000000
- guid: b0f85f7da5042c0448a526d5ecacbfa9
ids: 1c000000
- guid: f87b5805002ec9649bcb1b96d8a16ba9
ids: 1c000000
- guid: f66c4aa44c09b6a42a2b5b9f9334d824
ids: 1c000000
- guid: 3028dc075ba8c584d9bc7d1e0255e038
ids: 1c000000
- guid: 991ae4d843392bc4e9ec4e7d8649d94e
type: 2
@@ -150857,15 +150860,15 @@ MonoBehaviour:
UseGUIDsList: []
- guid: 7ab6cd8f9a2e77c49a158e16014f9cec
type: 9
m_fileInfoHash: 547353.json
m_fileInfoHash: 643022.json
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 547353
m_assetChangeTS: 1749401888
m_fileInfoReadTS: 1749401892
m_fileWriteTS: 1749377641
m_cachefileWriteTS: 1749377641
m_fileSize: 643022
m_assetChangeTS: 1749891405
m_fileInfoReadTS: 1749891426
m_fileWriteTS: 1749890708
m_cachefileWriteTS: 1749890708
refreshStamp: 3
UseGUIDsList: []
- guid: 7af6ac3e6b51b8d4aab04adc85b8de2f
@@ -166382,10 +166385,10 @@ MonoBehaviour:
m_addressable:
m_atlas:
m_fileSize: 3649
m_assetChangeTS: 1749279554
m_fileInfoReadTS: 1749279793
m_fileWriteTS: 1749279554
m_cachefileWriteTS: 1749279554
m_assetChangeTS: 1749905131
m_fileInfoReadTS: 1749905238
m_fileWriteTS: 1749905131
m_cachefileWriteTS: 1749905131
refreshStamp: 3
UseGUIDsList:
- guid: bf2edee5c58d82540a51f03df9d42094
@@ -185950,15 +185953,15 @@ MonoBehaviour:
UseGUIDsList: []
- guid: dcf702d09b6611648a7df04aa49aa927
type: 2
m_fileInfoHash: 7318.cs
m_fileInfoHash: 7317.cs
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 7318
m_assetChangeTS: 0
m_fileInfoReadTS: 1747758809
m_fileWriteTS: 1745130750
m_cachefileWriteTS: 1745130750
m_fileSize: 7317
m_assetChangeTS: 1749904747
m_fileInfoReadTS: 1749904768
m_fileWriteTS: 1749904743
m_cachefileWriteTS: 1749904743
refreshStamp: 3
UseGUIDsList: []
- guid: dc38e8eba37821e4e82c938d9dc3aa0c
@@ -195556,15 +195559,15 @@ MonoBehaviour:
UseGUIDsList: []
- guid: 8d2b6af5deaa046ff89ed3c74bb2ffdc
type: 2
m_fileInfoHash: 19432.cs
m_fileInfoHash: 19594.cs
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 19432
m_assetChangeTS: 0
m_fileInfoReadTS: 1747758807
m_fileWriteTS: 1746895565
m_cachefileWriteTS: 1746895565
m_fileSize: 19594
m_assetChangeTS: 1749880683
m_fileInfoReadTS: 1749880721
m_fileWriteTS: 1749880681
m_cachefileWriteTS: 1749880681
refreshStamp: 3
UseGUIDsList: []
- guid: 8d4bc6bfa28760b29f13174d6b6ea710
@@ -197017,15 +197020,15 @@ MonoBehaviour:
UseGUIDsList: []
- guid: add3d51f41f934e4587c625e503dbdf5
type: 2
m_fileInfoHash: 4263.cs
m_fileInfoHash: 3354.cs
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 4263
m_assetChangeTS: 1749446098
m_fileInfoReadTS: 1749446113
m_fileWriteTS: 1749446095
m_cachefileWriteTS: 1749446095
m_fileSize: 3354
m_assetChangeTS: 1749882418
m_fileInfoReadTS: 1749882435
m_fileWriteTS: 1749882416
m_cachefileWriteTS: 1749882416
refreshStamp: 3
UseGUIDsList: []
- guid: adf3c8361dd31e1448483775ea241c10
@@ -204087,15 +204090,15 @@ MonoBehaviour:
ids: 73000000
- guid: 2e498d1c8094910479dc3e1b768306a4
type: 5
m_fileInfoHash: 570708.asset
m_fileInfoHash: 9628.asset
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 570708
m_assetChangeTS: 1749373163
m_fileInfoReadTS: 1749373168
m_fileWriteTS: 1749367802
m_cachefileWriteTS: 1749367802
m_fileSize: 9628
m_assetChangeTS: 1749905131
m_fileInfoReadTS: 1749905238
m_fileWriteTS: 1749905131
m_cachefileWriteTS: 1749905131
refreshStamp: 3
UseGUIDsList:
- guid: fe393ace9b354375a9cb14cdbbc28be4
@@ -230096,15 +230099,41 @@ MonoBehaviour:
UseGUIDsList: []
- guid: 5a395afff7499be44a346df2868c66a8
type: 2
m_fileInfoHash: 11905.cs
m_fileInfoHash: 14244.cs
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 11905
m_assetChangeTS: 1749444665
m_fileInfoReadTS: 1749444680
m_fileWriteTS: 1749444568
m_cachefileWriteTS: 1749444568
m_fileSize: 14244
m_assetChangeTS: 1749891405
m_fileInfoReadTS: 1749891426
m_fileWriteTS: 1749891391
m_cachefileWriteTS: 1749891391
refreshStamp: 3
UseGUIDsList: []
- guid: 97779e95563721b4e8d4a28bb0d46cb9
type: 2
m_fileInfoHash: 2044.cs
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 2044
m_assetChangeTS: 1749886316
m_fileInfoReadTS: 1749886330
m_fileWriteTS: 1749886313
m_cachefileWriteTS: 1749886313
refreshStamp: 3
UseGUIDsList: []
- guid: 164e0d19daa7a6f468776820913d9eda
type: 9
m_fileInfoHash: 1098550.json
m_assetbundle:
m_addressable:
m_atlas:
m_fileSize: 1098550
m_assetChangeTS: 0
m_fileInfoReadTS: 1749904567
m_fileWriteTS: 1749891547
m_cachefileWriteTS: 1749891547
refreshStamp: 3
UseGUIDsList: []
setting:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -261,5 +261,70 @@ namespace Ichni.Editor
}
Debug.Log("===== =====");
}
public static void SetNoteHLInGame(bool forceSetOff = false, bool SameTheme = false)
{
var noteBases = EditorManager.instance.beatmapContainer.gameElementList.OfType<NoteBase>().ToList();
// 先全部关闭高亮如果forceSetOff为true
if (forceSetOff)
{
foreach (var note in noteBases)
{
note.noteVisual.isHighlighted = false;
note.noteVisual.SetHighlight();
}
}
// 按时间分组
var groups = SameTheme
? noteBases.GroupBy(n => (object)new { n.exactJudgeTime, Type = n.GetType() })
: noteBases.GroupBy(n => (object)n.exactJudgeTime);
foreach (var group in groups)
{
if (group.Count() > 1)
{
foreach (var note in group)
{
note.noteVisual.isHighlighted = true;
note.noteVisual.SetHighlight();
}
}
}
}
public static void SetNoteHLInElement(bool forceSetOff = false, bool SameTheme = false)
{
var noteBases = inspector.connectedGameElement.GetAllGameElementsFromThis().OfType<NoteBase>().ToList();
// 先全部关闭高亮如果forceSetOff为true
if (forceSetOff)
{
foreach (var note in noteBases)
{
note.noteVisual.isHighlighted = false;
note.noteVisual.SetHighlight();
}
}
// 按时间分组
var groups = SameTheme
? noteBases.GroupBy(n => (object)new { n.exactJudgeTime, Type = n.GetType() })
: noteBases.GroupBy(n => (object)n.exactJudgeTime);
foreach (var group in groups)
{
if (group.Count() > 1)
{
foreach (var note in group)
{
note.noteVisual.isHighlighted = true;
note.noteVisual.SetHighlight();
}
}
}
}
}
}

View File

@@ -36,35 +36,52 @@ namespace Ichni.Editor
public Vector2 vector2;
public void FindTab(GameElement targetElement, bool findparent = false)
{
if (findparent && targetElement.connectedTab != null)
{
targetElement.connectedTab.expandButton.onClick.Invoke();
return;
}
else if (targetElement.connectedTab != null)
{
targetElement.connectedTab.tabButton.onClick.Invoke();
}
else
{
FindTab(targetElement.parentElement, true);
if (!findparent)
{
targetElement.connectedTab.tabButton.onClick.Invoke();
}
else
{
targetElement.connectedTab.expandButton.onClick.Invoke();
return;
}
//targetElement.SetUpInspector();
StartCoroutine(TryGetTab(targetElement));
}
public IEnumerator TryGetTab(GameElement targetElement)
{
StandardInspectionElement.GenerateForLoading();
// 1. 向上找到最近的有Tab的祖先
Stack<GameElement> stack = new Stack<GameElement>();
GameElement current = targetElement;
while (current != null && current.connectedTab == null)
{
stack.Push(current);
current = current.parentElement;
}
HierarchyTab tab = targetElement.connectedTab;
float Tablocalpos = (-tab.transform.localPosition.y) - (tabContainer.sizeDelta.y / 4f);
// 2. 如果有Tab的祖先存在依次展开回目标
HierarchyTab parentTab = current != null ? current.connectedTab : null;
while (stack.Count > 0)
{
var elem = stack.Pop();
// 只展开父Tab不直接生成Tab
if (elem.parentElement != null && elem.parentElement.connectedTab != null && !elem.parentElement.connectedTab.isExpanded)
{
elem.parentElement.connectedTab.ExpandOrFold();
yield return null;
}
// 等待当前elem的Tab生成
while (elem.connectedTab == null)
{
yield return null;
}
parentTab = elem.connectedTab;
}
// 3. 等待目标Tab实例化
while (targetElement.connectedTab == null)
{
yield return null;
}
HierarchyTab finalTab = targetElement.connectedTab;
float Tablocalpos = (-finalTab.transform.localPosition.y) - (tabContainer.sizeDelta.y / 4f);
float pct = Tablocalpos / tabContainer.sizeDelta.y;
scrollRect.verticalNormalizedPosition = 1f - pct;
finalTab.SelectGameElement();
}
}
}

View File

@@ -1,5 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using Ichni.RhythmGame;
using Michsky.MUIP;
using Sirenix.Utilities;
@@ -83,7 +84,8 @@ namespace Ichni.Editor
}
public void SetStatus()
{
expandButton.interactable = !connectedGameElement.childElementList.IsNullOrEmpty();
//expandButton.interactable = !connectedGameElement.childElementList.IsNullOrEmpty();
}
}
@@ -124,20 +126,18 @@ namespace Ichni.Editor
EditorManager.instance.timeline.SetTimeLine(connectedGameElement);
}
private void ExpandOrFold()
public void ExpandOrFold()
{
this.childTabList.RemoveAll(s => s == null);
isExpanded = !isExpanded;
StartCoroutine(ExpandAnim());
ExpandAnim();
if (isExpanded)
{
float startTime = Time.realtimeSinceStartup;
connectedGameElement.childElementList.Sort();//TODO: 后续可以让玩家手动快速排序
Debug.Log("排序耗时 " + (Time.realtimeSinceStartup - startTime).ToString());
StartCoroutine(ExpandOverTime());
for (var index = 0; index < connectedGameElement.childElementList.Count; index++)
{
var childElement = connectedGameElement.childElementList[index];
EditorManager.instance.uiManager.hierarchy.GenerateTab(childElement, connectedGameElement);
}
}
else
{
@@ -167,16 +167,25 @@ namespace Ichni.Editor
EditorManager.instance.uiManager.hierarchy.tabList.Remove(this);
}
}
private IEnumerator ExpandAnim()
private void ExpandAnim()
{
expandButton.transform.DORotate(new Vector3(0, 0, !isExpanded ? 0f : 180f), 0.2f);
}
private IEnumerator ExpandOverTime()//帧率过低的时候等一下再实例化
{
for (int i = 0; i < 10; i++)
float startTime = Time.realtimeSinceStartup;
for (var index = 0; index < connectedGameElement.childElementList.Count; index++)
{
expandButton.transform.GetComponentInChildren<TMP_Text>().rectTransform.localRotation =
Quaternion.Euler(0, 0, isExpanded ? 18 * i : 180 - 18 * i);
yield return null;
int hasYield = 0;
while (Time.realtimeSinceStartup - startTime > 1f / EditorManager.instance.editorSettings.frameRate * 3f && hasYield <= 2)
{
yield return null;
hasYield += 1;
}
var childElement = connectedGameElement.childElementList[index];
EditorManager.instance.uiManager.hierarchy.GenerateTab(childElement, connectedGameElement);
}
expandButton.transform.GetComponentInChildren<TMP_Text>().rectTransform.localRotation = Quaternion.Euler(0, 0, isExpanded ? 180 : 0);
}
}
}

View File

@@ -0,0 +1,42 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Ichni.RhythmGame;
using UnityEngine;
namespace Ichni.Editor
{
public static class StandardInspectionElement
{
private static IHaveInspection inspector => EditorManager.instance.uiManager.inspector;
private static Inspector inspectorUI => EditorManager.instance.uiManager.inspector;
public static void GenerateForTransform(GameElement gameElement, DynamicUIContainer generateContainer = null)//关于有Transform
{
if (generateContainer is null)
{
generateContainer = inspector.GenerateContainer("Generate Elements");
}
var animationSubcontainer = generateContainer.GenerateSubcontainer(3);
var displacementButton = inspector.GenerateButton(gameElement, animationSubcontainer, "Displacement", () =>
{
Displacement.GenerateElement("New Displacement", Guid.NewGuid(), new List<string>(), true, gameElement,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
}); //位移
var swirlButton = inspector.GenerateButton(gameElement, animationSubcontainer, "Swirl", () =>
{
Swirl.GenerateElement("New Swirl", Guid.NewGuid(), new List<string>(), true, gameElement,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
}); //旋转
var scaleButton = inspector.GenerateButton(gameElement, animationSubcontainer, "Scale", () =>
{
Scale.GenerateElement("New Scale", Guid.NewGuid(), new List<string>(), true, gameElement,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
}); //缩放
}
public static void GenerateForLoading()
{
inspectorUI.ClearInspector();
var container = inspector.GenerateContainer("Loading");
}
}
}

View File

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

View File

@@ -56,7 +56,7 @@ namespace Ichni.RhythmGame
var crossTrackPoint = inspector.GenerateButton(this, generateBase, "Cross Track Point",
() => CrossTrackPoint.GenerateElement("New Cross Track Point", Guid.NewGuid(), new List<string>(), true,
this, new FlexibleInt(), new FlexibleFloat()));
StandardInspectionElement.GenerateForTransform(this, container); //关于有Transform的元素
var generateNote = container.GenerateSubcontainer(3);
var tapButton = inspector.GenerateButton(this, generateNote, "Tap",
() => Tap.GenerateElement("New Tap", Guid.NewGuid(), new List<string>(), true, this, 0f));
@@ -76,18 +76,7 @@ namespace Ichni.RhythmGame
() => TimeEffectsCollection.GenerateElement("New Time Effects Collection", Guid.NewGuid(),
new List<string>(), true, this, 0));
var generateAnimation = container.GenerateSubcontainer(3);
var displacementButton = inspector.GenerateButton(this, generateAnimation, "Displacement",
() => Displacement.GenerateElement("New Displacement", Guid.NewGuid(), new List<string>(), true, this,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
var swirlButton = inspector.GenerateButton(this, generateAnimation, "Swirl",
() => Swirl.GenerateElement("New Swirl", Guid.NewGuid(), new List<string>(), true, this,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
var scaleButton = inspector.GenerateButton(this, generateAnimation, "Scale", () =>
{
Scale.GenerateElement("New Scale", Guid.NewGuid(), new List<string>(), true, this,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
}); //缩放
}
}

View File

@@ -15,7 +15,7 @@ namespace Ichni.RhythmGame
public static EnvironmentObject GenerateElement(string elementName, Guid id, List<string> tags,
bool isFirstGenerated, string themeBundleName, string objectName, GameElement parentElement, bool isStatic)
{
EnvironmentObject environmentObject =
EnvironmentObject environmentObject =
SubstantialObject.GenerateElement(elementName, id, tags, isFirstGenerated, themeBundleName, objectName, parentElement)
.GetComponent<EnvironmentObject>();
@@ -30,34 +30,26 @@ namespace Ichni.RhythmGame
{
public override void SaveBM()
{
matchedBM = new EnvironmentObject_BM(elementName, elementGuid, tags,
matchedBM = new EnvironmentObject_BM(elementName, elementGuid, tags,
parentElement.matchedBM as GameElement_BM, themeBundleName, objectName, isStatic);
}
public override void SetUpInspector()
{
base.SetUpInspector();
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("Generate");
var objectSettings = container.GenerateSubcontainer(3);
var environmentObjectButton = inspector.GenerateButton(this, objectSettings, "Environment Object",
() => TemporaryObject.GenerateElement("New Environment Object", Guid.NewGuid(), new List<string>(),
true, this));
var isStaticToggle = inspector.GenerateToggle(this, objectSettings, "Is Static", nameof(isStatic))
.AddListenerFunction(() => gameObject.isStatic = isStatic);
StandardInspectionElement.GenerateForTransform(this, container); //关于有Transform的元素
var generateAnimation = container.GenerateSubcontainer(3);
var generateDisplacementButton = inspector.GenerateButton(this, generateAnimation, "Displacement",
() => Displacement.GenerateElement("New Displacement", Guid.NewGuid(), new List<string>(), true,
this, new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
var generateSwirlButton = inspector.GenerateButton(this, generateAnimation, "Swirl",
() => Swirl.GenerateElement("New Swirl", Guid.NewGuid(), new List<string>(), true,
this, new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
var generateScaleButton = inspector.GenerateButton(this, generateAnimation, "Scale",
() => Scale.GenerateElement("New Scale", Guid.NewGuid(), new List<string>(), true,
this, new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
var generateBaseColorChangeButton = inspector.GenerateButton(this, generateAnimation, "Base Color Change",
() => BaseColorChange.GenerateElement("New Base Color Change", Guid.NewGuid(), new List<string>(), true,
this, new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
@@ -67,7 +59,7 @@ namespace Ichni.RhythmGame
() => EmissionColorChange.GenerateElement("New Emission Color Change", Guid.NewGuid(), new List<string>(), true,
this, new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
}
}
}
@@ -92,12 +84,12 @@ namespace Ichni.RhythmGame
public override void ExecuteBM()
{
matchedElement = EnvironmentObject.GenerateElement(elementName, elementGuid, tags, false,
themeBundleName, objectName,GetElement(attachedElementGuid), isStatic);
themeBundleName, objectName, GetElement(attachedElementGuid), isStatic);
}
public override GameElement DuplicateBM(GameElement parent)
{
return EnvironmentObject.GenerateElement(elementName, Guid.NewGuid(), tags, false,
return EnvironmentObject.GenerateElement(elementName, Guid.NewGuid(), tags, false,
themeBundleName, objectName, parent, isStatic);
}
}

View File

@@ -68,13 +68,9 @@ namespace Ichni.RhythmGame
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
base.SetUpInspector();
var container = inspector.GenerateContainer("Generate");
StandardInspectionElement.GenerateForTransform(this, container); //关于有Transform的元素
var generateAnimation = container.GenerateSubcontainer(3);
var displacementButton = inspector.GenerateButton(this, generateAnimation, "Displacement",
() => Displacement.GenerateElement("New Displacement", Guid.NewGuid(), new List<string>(), true, this,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
var swirlButton = inspector.GenerateButton(this, generateAnimation, "Swirl",
() => Swirl.GenerateElement("New Swirl", Guid.NewGuid(), new List<string>(), true, this,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
var extensionButton = inspector.GenerateButton(this, generateAnimation, "Extension",
() => GameCameraExtension.GenerateElement("New Extension", Guid.NewGuid(),

View File

@@ -160,9 +160,28 @@ namespace Ichni.RhythmGame
}
public override void SetUpInspector()
{
base.SetUpInspector();
//
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("Element Info");
//基础信息
var info = container.GenerateSubcontainer(3);
var nameInputField = inspector.GenerateInputField(this, info, GetType().Name + "'s Name", nameof(elementName));
var guidText = inspector.GenerateParameterText(this, info, "Element GUID", nameof(elementGuid));
var tagsListButton = inspector.GenerateButton(this, info, "Tags List", () =>
{
inspector.GenerateCompositeParameterWindow(this, "Tags List", nameof(tags)).SetAsStringList();
});
if (noteVisual != null)
{
noteVisual.transformSubmodule.SetUpInspector();
}
//次级模块
foreach (var submodule in submoduleList)
{
submodule.SetUpInspector();
}
//为了设置便捷Transform编辑手动更改原方法而不是用Base
var infoContainer = inspector.GenerateContainer("Note Info");
var noteBaseSettings = infoContainer.GenerateSubcontainer(3);

View File

@@ -50,21 +50,10 @@ namespace Ichni.RhythmGame
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("Generate");
var generateAnimation = container.GenerateSubcontainer(3);
var displacementButton = inspector.GenerateButton(this, generateAnimation, "Displacement",
() => Displacement.GenerateElement("New Displacement", Guid.NewGuid(), new List<string>(), true, this,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
var swirlButton = inspector.GenerateButton(this, generateAnimation, "Swirl",
() => Swirl.GenerateElement("New Swirl", Guid.NewGuid(), new List<string>(), true, this,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat()));
var scaleButton = inspector.GenerateButton(this, generateAnimation, "Scale", () =>
{
Scale.GenerateElement("New Scale", Guid.NewGuid(), new List<string>(), true, this,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
}); //缩放
StandardInspectionElement.GenerateForTransform(this, container);
var settings = inspector.GenerateContainer("Settings");
var settingsSubcontainer = container.GenerateSubcontainer(3);
var settingsSubcontainer = settings.GenerateSubcontainer(3);
var highlightToggle =
inspector.GenerateToggle(this, settingsSubcontainer, "Highlight", nameof(isHighlighted))
.AddListenerFunction(SetHighlight);

View File

@@ -162,24 +162,24 @@ namespace Ichni.RhythmGame
var flickButton = inspector.GenerateButton(this, noteSubcontainer, "Flick",
() => { Flick.GenerateElement("New Flick", Guid.NewGuid(), new List<string>(), true, this, 0f, new List<Vector2>()); }); //Note Flick
StandardInspectionElement.GenerateForTransform(this, generateContainer); //关于有Transform的元素
// var animationSubcontainer = generateContainer.GenerateSubcontainer(3);
// var displacementButton = inspector.GenerateButton(this, animationSubcontainer, "Displacement", () =>
// {
// Displacement.GenerateElement("New Displacement", Guid.NewGuid(), new List<string>(), true, this,
// new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
// }); //位移
var animationSubcontainer = generateContainer.GenerateSubcontainer(3);
var displacementButton = inspector.GenerateButton(this, animationSubcontainer, "Displacement", () =>
{
Displacement.GenerateElement("New Displacement", Guid.NewGuid(), new List<string>(), true, this,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
}); //位移
var swirlButton = inspector.GenerateButton(this, animationSubcontainer, "Swirl", () =>
{
Swirl.GenerateElement("New Swirl", Guid.NewGuid(), new List<string>(), true, this,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
}); //旋转
var scaleButton = inspector.GenerateButton(this, animationSubcontainer, "Scale", () =>
{
Scale.GenerateElement("New Scale", Guid.NewGuid(), new List<string>(), true, this,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
}); //缩放
// var swirlButton = inspector.GenerateButton(this, animationSubcontainer, "Swirl", () =>
// {
// Swirl.GenerateElement("New Swirl", Guid.NewGuid(), new List<string>(), true, this,
// new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
// }); //旋转
// var scaleButton = inspector.GenerateButton(this, animationSubcontainer, "Scale", () =>
// {
// Scale.GenerateElement("New Scale", Guid.NewGuid(), new List<string>(), true, this,
// new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
// }); //缩放
if (trackPathSubmodule != null)
{
trackPathButton.button.interactable = false;

View File

@@ -69,6 +69,7 @@ namespace Ichni.RhythmGame
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
Inspector inspectorMain = EditorManager.instance.uiManager.inspector;
StandardInspectionElement.GenerateForTransform(this); //关于有Transform的元素
var container = inspector.GenerateContainer("Trail");

View File

@@ -123,7 +123,7 @@ namespace Ichni.Editor
List<Vector3> newPositions = new List<Vector3>();
// 添加距离检测逻辑
bool withinDistance = Vector3.Distance(sceneCamera.transform.position, point) <= 100f;
bool withinDistance = Vector3.Distance(sceneCamera.transform.position, point) <= 50f;
for (float x = minX; x <= maxX; x += step)
{

View File

@@ -11,7 +11,7 @@ namespace Ichni.Editor
public class GridController : MonoBehaviour, IBaseElement
{
public BaseElement_BM matchedBM { get; set; }
public EditorGrid yPlaneGrid;
public EditorGrid xPlaneGrid;
public EditorGrid zPlaneGrid;
@@ -34,18 +34,18 @@ namespace Ichni.Editor
public void SetUpInspector()
{
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
var container = inspector.GenerateContainer("Grid Controller");
//网格设置
var gridSettings = container.GenerateSubcontainer(3);
var yPlaneToggle =
var yPlaneToggle =
inspector.GenerateToggle(this, gridSettings, "Y Plane", nameof(yPlaneEnabled))
.AddListenerFunction(RefreshPlanes);
var xPlaneToggle =
var xPlaneToggle =
inspector.GenerateToggle(this, gridSettings, "X Plane", nameof(xPlaneEnabled))
.AddListenerFunction(RefreshPlanes);
var zPlaneToggle =
var zPlaneToggle =
inspector.GenerateToggle(this, gridSettings, "Z Plane", nameof(zPlaneEnabled))
.AddListenerFunction(RefreshPlanes);
@@ -60,7 +60,7 @@ namespace Ichni.Editor
xPlaneGrid.gameObject.SetActive(xPlaneEnabled);
zPlaneGrid.gameObject.SetActive(zPlaneEnabled);
yPlaneGrid.isShowingPositionText = isYPlaneShowingPositionText;
if (!yPlaneGrid.isShowingPositionText)
{
foreach (KeyValuePair<GameObject, Vector3> positionText in yPlaneGrid.positionTexts)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 23c9ee719a4d6cf47b3b330d589b7a1d
guid: 164e0d19daa7a6f468776820913d9eda
DefaultImporter:
externalObjects: {}
userData:

File diff suppressed because one or more lines are too long

View File

@@ -211,7 +211,6 @@ trackPercentPoint使用0到1的值代表track进程配合trail使用可以实
trail配有位置材质颜色等
目前Trail只能在trackPercentPoint下生成但是有一点~~奇技淫巧~~是可以把他复制出来然后直接粘贴在folder下这样就可以通过事件控制他了
>**编辑器存在的Bug**
>目前的Trail在暂停时会消失这是很头疼的一个点因为Unity组件原生原因这个Bug不大可能修复
>当然你不用担心,本体不会出现这个问题,如果没事,做完动效再播放一遍就是原本的效果了