Note inspector调整,Static Window可开关,Log可复制清空
This commit is contained in:
BIN
Assets/.DS_Store
vendored
BIN
Assets/.DS_Store
vendored
Binary file not shown.
BIN
Assets/Feel/.DS_Store
vendored
BIN
Assets/Feel/.DS_Store
vendored
Binary file not shown.
BIN
Assets/Modern UI Pack/.DS_Store
vendored
BIN
Assets/Modern UI Pack/.DS_Store
vendored
Binary file not shown.
BIN
Assets/Plugins/.DS_Store
vendored
BIN
Assets/Plugins/.DS_Store
vendored
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
Assets/Prefabs/.DS_Store
vendored
BIN
Assets/Prefabs/.DS_Store
vendored
Binary file not shown.
294
Assets/Prefabs/DynamicUI/EnableButtonGroup.prefab
Normal file
294
Assets/Prefabs/DynamicUI/EnableButtonGroup.prefab
Normal file
@@ -0,0 +1,294 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &3166537319533722496
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6122254329879818755}
|
||||
- component: {fileID: 1740218868559927400}
|
||||
- component: {fileID: 2561374372163501939}
|
||||
- component: {fileID: 2227934711119551613}
|
||||
m_Layer: 5
|
||||
m_Name: EnableButton
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &6122254329879818755
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3166537319533722496}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8944494640791736749}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 29.97995}
|
||||
m_SizeDelta: {x: 100, y: 10}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1740218868559927400
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3166537319533722496}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2561374372163501939
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3166537319533722496}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &2227934711119551613
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3166537319533722496}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 2561374372163501939}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &3629515902686950372
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 95561077087833320}
|
||||
- component: {fileID: 5854294892073004479}
|
||||
- component: {fileID: 4695494783430303905}
|
||||
- component: {fileID: 1701167924756487343}
|
||||
m_Layer: 5
|
||||
m_Name: DisableButton
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &95561077087833320
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3629515902686950372}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8944494640791736749}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: -29.97995}
|
||||
m_SizeDelta: {x: 100, y: 10}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5854294892073004479
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3629515902686950372}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4695494783430303905
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3629515902686950372}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &1701167924756487343
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3629515902686950372}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 4695494783430303905}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &5754179520278970209
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8944494640791736749}
|
||||
- component: {fileID: 5159477174125129602}
|
||||
m_Layer: 5
|
||||
m_Name: EnableButtonGroup
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8944494640791736749
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5754179520278970209}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 6122254329879818755}
|
||||
- {fileID: 95561077087833320}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &5159477174125129602
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5754179520278970209}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9e35201c989394f039d7a198ccd53d65, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
enableButton: {fileID: 2227934711119551613}
|
||||
disableButton: {fileID: 1701167924756487343}
|
||||
7
Assets/Prefabs/DynamicUI/EnableButtonGroup.prefab.meta
Normal file
7
Assets/Prefabs/DynamicUI/EnableButtonGroup.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa9644af7cd7f4a939983928c8fa106a
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
BIN
Assets/Scripts/.DS_Store
vendored
BIN
Assets/Scripts/.DS_Store
vendored
Binary file not shown.
@@ -21,12 +21,12 @@ namespace Ichni.Editor
|
||||
dropdown.onValueChanged.AddListener((value) => ApplyParameters(dropdown.options[value].text) );
|
||||
}
|
||||
|
||||
public void SetUpStringList(List<string> stringList)
|
||||
public void SetUpStringList(List<string> originalList)
|
||||
{
|
||||
this.stringList = stringList;
|
||||
this.stringList.AddRange(originalList);
|
||||
this.stringList.Insert(0, "Please Select..."); // Add a default value "Please Select...
|
||||
dropdown.ClearOptions();
|
||||
dropdown.AddOptions(stringList);
|
||||
dropdown.AddOptions(this.stringList);
|
||||
}
|
||||
|
||||
private void ApplyParameters(string value)
|
||||
|
||||
13
Assets/Scripts/DynamicUI/EnableButtonGroup.cs
Normal file
13
Assets/Scripts/DynamicUI/EnableButtonGroup.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Ichni.Editor
|
||||
{
|
||||
public class EnableButtonGroup : MonoBehaviour
|
||||
{
|
||||
public Button enableButton;
|
||||
public Button disableButton;
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/DynamicUI/EnableButtonGroup.cs.meta
Normal file
11
Assets/Scripts/DynamicUI/EnableButtonGroup.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9e35201c989394f039d7a198ccd53d65
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -3,20 +3,30 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Lean.Pool;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Ichni.Editor
|
||||
{
|
||||
public class LogWindow : MonoBehaviour
|
||||
public class LogWindow : StaticWindow
|
||||
{
|
||||
public GameObject logTextPrefab;
|
||||
|
||||
List<string> savedTexts;
|
||||
|
||||
public RectTransform textRect;
|
||||
public Button copyAllTextsButton;
|
||||
public Button removeAllTextsButton;
|
||||
public Queue<LogText> logTexts;
|
||||
public int logTextCapacity = 4;
|
||||
|
||||
private void Start()
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
savedTexts = new List<string>();
|
||||
logTexts = new Queue<LogText>();
|
||||
copyAllTextsButton.onClick.AddListener(CopyAllText);
|
||||
removeAllTextsButton.onClick.AddListener(RemoveAllText);
|
||||
}
|
||||
|
||||
public static void Log(string text, Color color = default)
|
||||
@@ -29,6 +39,7 @@ namespace Ichni.Editor
|
||||
CheckLogTextCapacity();
|
||||
LogText logText = LeanPool.Spawn(logTextPrefab, textRect).GetComponent<LogText>();
|
||||
if (color == default) color = Color.white;
|
||||
savedTexts.Add(text);
|
||||
logText.SetLogText(text, color);
|
||||
logTexts.Enqueue(logText);
|
||||
}
|
||||
@@ -40,5 +51,26 @@ namespace Ichni.Editor
|
||||
LeanPool.Despawn(logTexts.Dequeue().gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
private void CopyAllText()
|
||||
{
|
||||
string allText = "";
|
||||
foreach (string text in savedTexts)
|
||||
{
|
||||
allText += text + "\n";
|
||||
}
|
||||
|
||||
GUIUtility.systemCopyBuffer = allText;
|
||||
}
|
||||
|
||||
private void RemoveAllText()
|
||||
{
|
||||
foreach (LogText logText in logTexts)
|
||||
{
|
||||
LeanPool.Despawn(logText.gameObject);
|
||||
}
|
||||
logTexts.Clear();
|
||||
savedTexts.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,18 +6,18 @@ using UnityEngine.UI;
|
||||
|
||||
namespace Ichni.Editor
|
||||
{
|
||||
public partial class ToolBar : MonoBehaviour
|
||||
public partial class ToolBar : StaticWindow
|
||||
{
|
||||
public Button projectInfoButton;
|
||||
public Button songInfoButton;
|
||||
public Button saveButton;
|
||||
public Button exportButton;
|
||||
|
||||
private void Start()
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
saveButton.onClick.AddListener(EditorManager.instance.projectManager.saveManager.Save);
|
||||
exportButton.onClick.AddListener(EditorManager.instance.projectManager.exportManager.Export);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
@@ -6,6 +7,29 @@ namespace Ichni.Editor
|
||||
{
|
||||
public abstract class StaticWindow : MonoBehaviour
|
||||
{
|
||||
public EnableButtonGroup enableButtonGroup;
|
||||
|
||||
protected virtual void Start()
|
||||
{
|
||||
if (enableButtonGroup != null)
|
||||
{
|
||||
enableButtonGroup.enableButton.onClick.AddListener(EnableWindow);
|
||||
enableButtonGroup.disableButton.onClick.AddListener(DisableWindow);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void EnableWindow()
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
enableButtonGroup.disableButton.gameObject.SetActive(true);
|
||||
enableButtonGroup.enableButton.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public virtual void DisableWindow()
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
enableButtonGroup.disableButton.gameObject.SetActive(false);
|
||||
enableButtonGroup.enableButton.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ using UnityEngine.UI;
|
||||
|
||||
namespace Ichni.Editor
|
||||
{
|
||||
public partial class Timeline : MonoBehaviour
|
||||
public partial class Timeline : StaticWindow
|
||||
{
|
||||
public float songTime => EditorManager.instance.songInformation.songTime;
|
||||
public float songBeat => EditorManager.instance.songInformation.songBeat;
|
||||
|
||||
BIN
Assets/Scripts/EditorGame/.DS_Store
vendored
Normal file
BIN
Assets/Scripts/EditorGame/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
Assets/Scripts/EditorGame/Base/.DS_Store
vendored
BIN
Assets/Scripts/EditorGame/Base/.DS_Store
vendored
Binary file not shown.
@@ -101,6 +101,13 @@ namespace Ichni.RhythmGame
|
||||
inspector.GenerateParameterText(this, container, "Current Position", nameof(currentPosition), true);
|
||||
var currentRotText =
|
||||
inspector.GenerateParameterText(this, container, "Current Rotation", nameof(currentEulerAngles), true);
|
||||
|
||||
if (attachedGameElement is PathNode pathNode) // 如果是PathNode,显示法线方向
|
||||
{
|
||||
var currentNormalText =
|
||||
inspector.GenerateHintText(this, container, () => "Normal: " + pathNode.transform.forward);
|
||||
}
|
||||
|
||||
var currentScaleText =
|
||||
inspector.GenerateParameterText(this, container, "Current Scale", nameof(currentScale), true);
|
||||
|
||||
@@ -108,8 +115,8 @@ namespace Ichni.RhythmGame
|
||||
originalRotInputField.AddListenerFunction(Refresh);
|
||||
originalScaleInputField.AddListenerFunction(Refresh);
|
||||
|
||||
//这玩意得放在最下面
|
||||
container.SetDeviver(1);
|
||||
//这玩意得放在最下面
|
||||
container.SetDeviver(1);
|
||||
}
|
||||
|
||||
public override void Refresh()
|
||||
|
||||
BIN
Assets/Scripts/EditorGame/GameElements/.DS_Store
vendored
Normal file
BIN
Assets/Scripts/EditorGame/GameElements/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
Assets/Scripts/EditorGame/GameElements/Notes/.DS_Store
vendored
Normal file
BIN
Assets/Scripts/EditorGame/GameElements/Notes/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -135,7 +135,8 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
}
|
||||
public override void SetUpInspector()
|
||||
{//我想把时间放在第一层菜单所以
|
||||
{
|
||||
//我想把时间放在第一层菜单所以
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Element Info");
|
||||
var nameInputField = inspector.GenerateParameterInputField(this, container, GetType().Name + "'s Name", nameof(elementName));
|
||||
@@ -144,15 +145,16 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
inspector.GenerateCompositeParameterWindow(this, "Tags List", nameof(tags)).SetAsStringList();
|
||||
});
|
||||
var exactJudgeTimeInputField =
|
||||
inspector.GenerateParameterInputField(this, container, "exactJudgeTime", nameof(exactJudgeTime));
|
||||
exactJudgeTimeInputField.AddListenerFunction(_ => UpdateNoteInTrack());
|
||||
|
||||
foreach (var submodule in submoduleList)
|
||||
{
|
||||
submodule.SetUpInspector();
|
||||
}
|
||||
|
||||
|
||||
var judgetimeinput =
|
||||
inspector.GenerateParameterInputField(this, container, "exactJudgeTime", nameof(exactJudgeTime));
|
||||
base.SetUpInspector();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,9 +36,9 @@ namespace Ichni.RhythmGame
|
||||
themeBundleList, nameof(themeBundleName));
|
||||
themeBundleDropdown.AddListenerFunction(_ => inspectorMain.SetInspector(this));
|
||||
|
||||
if (themeBundleName != String.Empty)
|
||||
if (themeBundleName != String.Empty && ThemeBundleManager.instance.TryGetThemeBundle(themeBundleName, out ThemeBundle themeBundle))
|
||||
{
|
||||
objectNameList = ThemeBundleManager.instance.GetThemeBundle(themeBundleName).assetList_GameObject.ConvertAll(x => x.name);
|
||||
objectNameList = themeBundle.assetList_GameObject.ConvertAll(x => x.name);
|
||||
var objectNameDropdown =
|
||||
inspector.GenerateDropdown(this, container, "Object Name", objectNameList, nameof(objectName));
|
||||
objectNameDropdown.AddListenerFunction(_ => inspectorMain.SetInspector(this));
|
||||
|
||||
BIN
Assets/Scripts/EditorGame/GameElements/Track/.DS_Store
vendored
Normal file
BIN
Assets/Scripts/EditorGame/GameElements/Track/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -276,8 +276,6 @@ namespace Ichni.RhythmGame
|
||||
|
||||
var setOnlyStartEndPathNodeSphereEnabledButton = inspector.GenerateButton(this, toolsContainerPathNode,
|
||||
"Only Start & End Path Node's sphere enabled", SetOnlyStartEndPathNodeSphereEnabled);
|
||||
|
||||
trackSubmodulesContainer.SetDeviver(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame;
|
||||
@@ -14,12 +15,13 @@ namespace Ichni.Editor
|
||||
public bool isSceneCameraActive;
|
||||
public SceneCamera sceneCamera;
|
||||
public float sceneCameraMoveSpeed;
|
||||
public float sceneCameraRotateSpeed;
|
||||
|
||||
public GameCamera gameCamera;
|
||||
public bool haveGameCamera => gameCamera != null;
|
||||
|
||||
public BaseElement_BM matchedBM { get; set; }
|
||||
|
||||
|
||||
public void SwitchCamera()
|
||||
{
|
||||
if (!haveGameCamera)
|
||||
|
||||
@@ -2,47 +2,82 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Ichni.Editor
|
||||
{
|
||||
public class InputListener : MonoBehaviour
|
||||
public partial class InputListener : MonoBehaviour
|
||||
{
|
||||
private PointerEventData pointerEventData;
|
||||
public EventSystem eventSystem;
|
||||
public List<GraphicRaycaster> graphicRaycasters;
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (EditorManager.instance.cameraManager.isSceneCameraActive)
|
||||
if (EditorManager.instance.cameraManager.isSceneCameraActive ||
|
||||
!Keyboard.current.leftCtrlKey.isPressed) // 场景相机的移动和旋转
|
||||
{
|
||||
float cameraSpeed = EditorManager.instance.cameraManager.sceneCameraMoveSpeed * Time.deltaTime;
|
||||
float cameraMoveSpeed = EditorManager.instance.cameraManager.sceneCameraMoveSpeed * Time.deltaTime;
|
||||
Transform sceneCameraTransform = EditorManager.instance.cameraManager.sceneCamera.transform;
|
||||
if (Keyboard.current.wKey.isPressed)
|
||||
{
|
||||
sceneCameraTransform.position += sceneCameraTransform.forward * cameraSpeed;
|
||||
sceneCameraTransform.position += sceneCameraTransform.forward * cameraMoveSpeed;
|
||||
}
|
||||
if (Keyboard.current.sKey.isPressed)
|
||||
{
|
||||
sceneCameraTransform.position -= sceneCameraTransform.forward * cameraSpeed;
|
||||
sceneCameraTransform.position -= sceneCameraTransform.forward * cameraMoveSpeed;
|
||||
}
|
||||
if (Keyboard.current.dKey.isPressed)
|
||||
{
|
||||
sceneCameraTransform.position += sceneCameraTransform.right * cameraSpeed;
|
||||
sceneCameraTransform.position += sceneCameraTransform.right * cameraMoveSpeed;
|
||||
}
|
||||
if (Keyboard.current.aKey.isPressed)
|
||||
{
|
||||
sceneCameraTransform.position -= sceneCameraTransform.right * cameraSpeed;
|
||||
sceneCameraTransform.position -= sceneCameraTransform.right * cameraMoveSpeed;
|
||||
}
|
||||
if (Keyboard.current.spaceKey.isPressed)
|
||||
if (Keyboard.current.eKey.isPressed)
|
||||
{
|
||||
sceneCameraTransform.position += sceneCameraTransform.up * cameraSpeed;
|
||||
sceneCameraTransform.position += sceneCameraTransform.up * cameraMoveSpeed;
|
||||
}
|
||||
if (Keyboard.current.leftShiftKey.isPressed)
|
||||
if (Keyboard.current.qKey.isPressed)
|
||||
{
|
||||
sceneCameraTransform.position -= sceneCameraTransform.up * cameraSpeed;
|
||||
sceneCameraTransform.position -= sceneCameraTransform.up * cameraMoveSpeed;
|
||||
}
|
||||
|
||||
bool isPointerOverUI = IsPointerOverUI(out GameObject hoveredUI);
|
||||
|
||||
if (Mouse.current.rightButton.isPressed && !isPointerOverUI)
|
||||
{
|
||||
float cameraRotateSpeed = EditorManager.instance.cameraManager.sceneCameraRotateSpeed * Time.deltaTime;
|
||||
Vector2 mouseDelta = Mouse.current.delta.ReadValue();
|
||||
sceneCameraTransform.Rotate(Vector3.up, -mouseDelta.x * cameraRotateSpeed, Space.World);
|
||||
sceneCameraTransform.Rotate(sceneCameraTransform.right, mouseDelta.y * cameraRotateSpeed, Space.World);
|
||||
}
|
||||
else if (isPointerOverUI)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (eventSystem.currentSelectedGameObject == null &&
|
||||
Keyboard.current.enterKey.wasPressedThisFrame) // 播放或暂停音乐
|
||||
{
|
||||
if (!EditorManager.instance.uiManager.timeline.musicPlayer.isPlaying)
|
||||
{
|
||||
EditorManager.instance.uiManager.timeline.musicPlayer.PlayMusic();
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorManager.instance.uiManager.timeline.musicPlayer.PauseMusic();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (Keyboard.current.leftCtrlKey.isPressed)
|
||||
if (Keyboard.current.leftCtrlKey.isPressed) // 快捷键
|
||||
{
|
||||
// 保存和导出
|
||||
if (Keyboard.current.sKey.wasPressedThisFrame)
|
||||
{
|
||||
EditorManager.instance.projectManager.saveManager.Save();
|
||||
@@ -52,6 +87,7 @@ namespace Ichni.Editor
|
||||
EditorManager.instance.projectManager.exportManager.Export();
|
||||
}
|
||||
|
||||
// 复制粘贴删除
|
||||
if (Keyboard.current.cKey.wasPressedThisFrame)
|
||||
{
|
||||
EditorManager.instance.operationManager.CopyPasteDeleteModule.CopyElement(EditorManager.instance.operationManager.currentSelectedElement);
|
||||
@@ -60,7 +96,12 @@ namespace Ichni.Editor
|
||||
{
|
||||
EditorManager.instance.operationManager.CopyPasteDeleteModule.PasteElement(EditorManager.instance.operationManager.currentSelectedElement);
|
||||
}
|
||||
else if (Keyboard.current.dKey.wasPressedThisFrame)
|
||||
{
|
||||
EditorManager.instance.operationManager.currentSelectedElement.Delete();
|
||||
}
|
||||
|
||||
// 开关移动设备分辨率提示
|
||||
if (Keyboard.current.digit1Key.wasPressedThisFrame)
|
||||
{
|
||||
EditorManager.instance.uiManager.mainPage.resolutionHints.SetPhoneFrame();
|
||||
@@ -76,4 +117,39 @@ namespace Ichni.Editor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class InputListener
|
||||
{
|
||||
public bool IsPointerOverUI(out GameObject hoveredUI)
|
||||
{
|
||||
hoveredUI = null;
|
||||
if (eventSystem == null || graphicRaycasters.Count == 0)
|
||||
return false;
|
||||
|
||||
pointerEventData = new PointerEventData(eventSystem)
|
||||
{
|
||||
position = Mouse.current.position.ReadValue()
|
||||
};
|
||||
|
||||
List<RaycastResult> allResults = new List<RaycastResult>();
|
||||
|
||||
// 遍历所有 Canvas 上的 GraphicRaycaster
|
||||
foreach (var raycaster in graphicRaycasters)
|
||||
{
|
||||
List<RaycastResult> results = new List<RaycastResult>();
|
||||
raycaster.Raycast(pointerEventData, results);
|
||||
allResults.AddRange(results);
|
||||
}
|
||||
|
||||
if (allResults.Count > 0)
|
||||
{
|
||||
// 按照 sortingOrder 获取最前面的 UI 物体
|
||||
allResults.Sort((a, b) => b.sortingOrder.CompareTo(a.sortingOrder));
|
||||
hoveredUI = allResults[0].gameObject;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,11 +30,12 @@ namespace Ichni
|
||||
LoadThemeBundle("departure_to_multiverse");
|
||||
}
|
||||
|
||||
public ThemeBundle GetThemeBundle(string themeBundleName)
|
||||
public bool TryGetThemeBundle(string themeBundleName, out ThemeBundle themeBundle)
|
||||
{
|
||||
return loadedThemeBundleList.Find(bundle => bundle.themeBundleName == themeBundleName);
|
||||
themeBundle = loadedThemeBundleList.Find(bundle => bundle.themeBundleName == themeBundleName);
|
||||
return themeBundle != null;
|
||||
}
|
||||
|
||||
|
||||
public T GetObject<T>(string themeBundleName, string objectName) where T : class
|
||||
{
|
||||
return loadedThemeBundleList.Find(bundle => bundle.themeBundleName == themeBundleName)?.GetObject<T>(objectName);
|
||||
|
||||
BIN
Assets/StreamingAssets/.DS_Store
vendored
BIN
Assets/StreamingAssets/.DS_Store
vendored
Binary file not shown.
BIN
Assets/StreamingAssets/Projects/.DS_Store
vendored
BIN
Assets/StreamingAssets/Projects/.DS_Store
vendored
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
ManifestFileVersion: 0
|
||||
CRC: 1057476443
|
||||
CRC: 31834448
|
||||
AssetBundleManifest:
|
||||
AssetBundleInfos:
|
||||
Info_0:
|
||||
|
||||
Binary file not shown.
@@ -1,15 +1,15 @@
|
||||
ManifestFileVersion: 0
|
||||
CRC: 1444715112
|
||||
CRC: 3542638627
|
||||
Hashes:
|
||||
AssetFileHash:
|
||||
serializedVersion: 2
|
||||
Hash: 6a31f70c38ba841b2847683946b57dbf
|
||||
Hash: f2543bc9e85a478ec7996872a61bb6f3
|
||||
TypeTreeHash:
|
||||
serializedVersion: 2
|
||||
Hash: 7c8fba77ff779a35ad42450f8316ace8
|
||||
IncrementalBuildHash:
|
||||
serializedVersion: 2
|
||||
Hash: 6a31f70c38ba841b2847683946b57dbf
|
||||
Hash: f2543bc9e85a478ec7996872a61bb6f3
|
||||
HashAppended: 0
|
||||
ClassTypes:
|
||||
- Class: 1
|
||||
|
||||
BIN
Assets/TextMesh Pro/.DS_Store
vendored
BIN
Assets/TextMesh Pro/.DS_Store
vendored
Binary file not shown.
@@ -35,7 +35,7 @@ ModelImporter:
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 5
|
||||
globalScale: 50
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
@@ -90,7 +90,7 @@ ModelImporter:
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 0.049999997
|
||||
globalScale: 0.5
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
|
||||
@@ -35,7 +35,7 @@ ModelImporter:
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
globalScale: 50
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
@@ -90,7 +90,7 @@ ModelImporter:
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
globalScale: 0.5
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
|
||||
Reference in New Issue
Block a user