Inspector Secondary Window & QuickCopy
inspector的二级界面,主要用于工具制作。 重新制作了Track的QuickCopy功能
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Dreamteck.Splines;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Lean.Pool;
|
||||
using Unity.Mathematics;
|
||||
@@ -70,6 +71,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
base.SetUpInspector();
|
||||
var container = inspector.GenerateContainer("Displacement");
|
||||
var positionXButton = inspector.GenerateButton(this, container, "Position X",
|
||||
|
||||
@@ -46,8 +46,6 @@ namespace Ichni.RhythmGame
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Inspector inspector => EditorManager.instance.uiManager.inspector;
|
||||
|
||||
public void SetUpInspector()
|
||||
{
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -79,6 +80,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Color");
|
||||
var baseColor = inspector.GenerateBaseColorPicker(this, container, "Base Color", nameof(originalBaseColor));
|
||||
if ((attachedGameElement as IHaveColorSubmodule).haveEmission)
|
||||
|
||||
@@ -61,6 +61,8 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
|
||||
foreach (var effect in effectCollection)
|
||||
{
|
||||
var container = inspector.GenerateContainer(effect.Key);
|
||||
@@ -145,8 +147,7 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
|
||||
public BaseElement_BM matchedBM { get; set; }
|
||||
public Inspector inspector => EditorManager.instance.uiManager.inspector;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 效果的持续时间,如果为0则表示瞬间效果
|
||||
/// </summary>
|
||||
|
||||
@@ -13,8 +13,6 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public BaseElement_BM matchedBM { get; set; }
|
||||
|
||||
public Inspector inspector => EditorManager.instance.uiManager.inspector;
|
||||
|
||||
public SubmoduleBase(GameElement attachedGameElement)
|
||||
{
|
||||
this.attachedGameElement = attachedGameElement;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
@@ -87,10 +88,11 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Time Duration");
|
||||
var overrideToggle = inspector.GenerateToggle(this, container, "Override Duration", nameof(isOverridingDuration));
|
||||
var startTimeInputField = inspector.GenerateInputField(this, container, "Start Time", nameof(startTime));
|
||||
var endTimeInputField = inspector.GenerateInputField(this, container, "End Time", nameof(endTime));
|
||||
var startTimeInputField = inspector.GenerateParameterInputField(this, container, "Start Time", nameof(startTime));
|
||||
var endTimeInputField = inspector.GenerateParameterInputField(this, container, "End Time", nameof(endTime));
|
||||
|
||||
void SetInputFieldInteractable(bool interactable)
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UniRx;
|
||||
using Unity.Mathematics;
|
||||
@@ -86,14 +87,16 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
|
||||
var container = inspector.GenerateContainer("Transform");
|
||||
|
||||
var originalPosInputField =
|
||||
inspector.GenerateVec3InputField(this, container, "Start Position", nameof(originalPosition));
|
||||
inspector.GenerateVector3InputField(this, container, "Start Position", nameof(originalPosition));
|
||||
var originalRotInputField =
|
||||
inspector.GenerateVec3InputField(this, container, "Start Rotation", nameof(originalEulerAngles));
|
||||
inspector.GenerateVector3InputField(this, container, "Start Rotation", nameof(originalEulerAngles));
|
||||
var originalScaleInputField =
|
||||
inspector.GenerateVec3InputField(this, container, "Start Scale", nameof(originalScale));
|
||||
inspector.GenerateVector3InputField(this, container, "Start Scale", nameof(originalScale));
|
||||
var currentPosText =
|
||||
inspector.GenerateParameterText(this, container, "Current Position", nameof(currentPosition), true);
|
||||
var currentRotText =
|
||||
@@ -135,6 +138,8 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
bool willRefresh = false;
|
||||
|
||||
if (transformSubmodule.scaleDirtyMark)
|
||||
{
|
||||
@@ -147,6 +152,7 @@ namespace Ichni.RhythmGame
|
||||
transformSubmodule.currentScale = transformSubmodule.originalScale + offset;
|
||||
attachedGameElement.transform.localScale = transformSubmodule.currentScale;
|
||||
transformSubmodule.scaleDirtyMark = false;
|
||||
willRefresh = true;
|
||||
}
|
||||
|
||||
if (transformSubmodule.eulerAnglesDirtyMark)
|
||||
@@ -160,6 +166,7 @@ namespace Ichni.RhythmGame
|
||||
transformSubmodule.currentEulerAngles = transformSubmodule.originalEulerAngles + offset;
|
||||
attachedGameElement.transform.localEulerAngles = transformSubmodule.currentEulerAngles;
|
||||
transformSubmodule.eulerAnglesDirtyMark = false;
|
||||
willRefresh = true;
|
||||
}
|
||||
|
||||
if (transformSubmodule.positionDirtyMark)
|
||||
@@ -173,11 +180,18 @@ namespace Ichni.RhythmGame
|
||||
transformSubmodule.currentPosition = transformSubmodule.originalPosition + offset;
|
||||
attachedGameElement.transform.localPosition = transformSubmodule.currentPosition;
|
||||
transformSubmodule.positionDirtyMark = false;
|
||||
willRefresh = true;
|
||||
}
|
||||
|
||||
if(willRefresh)
|
||||
{
|
||||
attachedGameElement.Refresh();
|
||||
}
|
||||
|
||||
transformSubmodule.scaleOffset.Clear();
|
||||
transformSubmodule.eulerAnglesOffset.Clear();
|
||||
transformSubmodule.positionOffset.Clear();
|
||||
|
||||
}).AddTo(attachedGameElement);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
base.SetUpInspector();
|
||||
var container = inspector.GenerateContainer("Generate");
|
||||
var folderButton = inspector.GenerateButton(this, container, "Folder",
|
||||
|
||||
@@ -53,11 +53,12 @@ namespace Ichni.Editor
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Background Setter");
|
||||
var useSkyboxToggle = inspector.GenerateToggle(this, container, "Use Skybox", nameof(useSkybox));
|
||||
var skyboxThemeBundleField = inspector.GenerateInputField(this, container, "Skybox Theme Bundle", nameof(skyboxThemeBundleName));
|
||||
var skyboxMaterialNameField = inspector.GenerateInputField(this, container, "Skybox Material", nameof(skyboxMaterialName));
|
||||
var backgroundSpriteField = inspector.GenerateInputField(this, container, "Background Sprite", nameof(backgroundSpriteName));
|
||||
var skyboxThemeBundleField = inspector.GenerateParameterInputField(this, container, "Skybox Theme Bundle", nameof(skyboxThemeBundleName));
|
||||
var skyboxMaterialNameField = inspector.GenerateParameterInputField(this, container, "Skybox Material", nameof(skyboxMaterialName));
|
||||
var backgroundSpriteField = inspector.GenerateParameterInputField(this, container, "Background Sprite", nameof(backgroundSpriteName));
|
||||
var applyButton = inspector.GenerateButton(this, container, "Apply", Refresh);
|
||||
useSkyboxToggle.AddListenerFunction(EditorManager.instance.backgroundController.EnableBackground);
|
||||
useSkyboxToggle.AddListenerFunction(value =>
|
||||
|
||||
@@ -39,9 +39,6 @@ namespace Ichni.RhythmGame
|
||||
//存档类
|
||||
public BaseElement_BM matchedBM { get; set; }
|
||||
|
||||
public Inspector inspector => EditorManager.instance.uiManager.inspector;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 首次初始化
|
||||
/// </summary>
|
||||
@@ -151,8 +148,9 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
public virtual void SetUpInspector() //被点击时设置第一层Inspector
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Element Info");
|
||||
var nameInputField = inspector.GenerateInputField(this, container, GetType().Name + "'s Name", nameof(elementName));
|
||||
var nameInputField = inspector.GenerateParameterInputField(this, container, GetType().Name + "'s Name", nameof(elementName));
|
||||
var guidText = inspector.GenerateParameterText(this, container, "Element GUID", nameof(elementGuid));
|
||||
var tagsListButton = inspector.GenerateButton(this, container, "Tags List", () =>
|
||||
{
|
||||
|
||||
@@ -38,9 +38,10 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Bloom Shake");
|
||||
var effectTimeField = inspector.GenerateInputField(this, container, "Bloom Time", nameof(bloomTime));
|
||||
var bloomPeakField = inspector.GenerateInputField(this, container, "Bloom Peak", nameof(bloomPeak));
|
||||
var effectTimeField = inspector.GenerateParameterInputField(this, container, "Bloom Time", nameof(bloomTime));
|
||||
var bloomPeakField = inspector.GenerateParameterInputField(this, container, "Bloom Peak", nameof(bloomPeak));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
@@ -42,8 +43,9 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Time Effects Collection");
|
||||
var timeInputField = inspector.GenerateInputField(this, container, "Time", nameof(time));
|
||||
var timeInputField = inspector.GenerateParameterInputField(this, container, "Time", nameof(time));
|
||||
var addEffectButton = inspector.GenerateButton(this, container, "Add Effect", () =>
|
||||
{
|
||||
IHaveEffectSubmodule.EffectCollection.TryGetValue("BloomShake", out var effect);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.Editor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame
|
||||
@@ -15,7 +16,8 @@ namespace Ichni.RhythmGame
|
||||
tempObj.Initialize(elementName, id, tags, isFirstGenerated, parentElement);
|
||||
tempObj.themeBundleName = string.Empty;
|
||||
tempObj.objectName = string.Empty;
|
||||
tempObj.themeBundleList = ThemeBundleManager.instance.loadedThemeBundleList.ConvertAll(x => x.themeBundleName);
|
||||
tempObj.themeBundleList =
|
||||
ThemeBundleManager.instance.loadedThemeBundleList.ConvertAll(x => x.themeBundleName);
|
||||
tempObj.objectNameList = new List<string>();
|
||||
return tempObj;
|
||||
}
|
||||
@@ -25,27 +27,33 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
var container = inspector.GenerateContainer("Temporary Object");
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
Inspector inspectorMain = EditorManager.instance.uiManager.inspector;
|
||||
|
||||
var themeBundleDropdown = inspector.GenerateDropdown(this, container, "Theme Bundle", themeBundleList, nameof(themeBundleName));
|
||||
themeBundleDropdown.AddListenerFunction(_ => inspector.SetInspector(this));
|
||||
var container = inspector.GenerateContainer("Temporary Object");
|
||||
|
||||
var themeBundleDropdown = inspector.GenerateDropdown(this, container, "Theme Bundle",
|
||||
themeBundleList, nameof(themeBundleName));
|
||||
themeBundleDropdown.AddListenerFunction(_ => inspectorMain.SetInspector(this));
|
||||
|
||||
if (themeBundleName != String.Empty)
|
||||
{
|
||||
objectNameList = ThemeBundleManager.instance.GetThemeBundle(themeBundleName).assetList_GameObject.ConvertAll(x => x.name);
|
||||
var objectNameDropdown = inspector.GenerateDropdown(this, container, "Object Name", objectNameList, nameof(objectName));
|
||||
objectNameDropdown.AddListenerFunction(_ => inspector.SetInspector(this));
|
||||
var objectNameDropdown =
|
||||
inspector.GenerateDropdown(this, container, "Object Name", objectNameList, nameof(objectName));
|
||||
objectNameDropdown.AddListenerFunction(_ => inspectorMain.SetInspector(this));
|
||||
}
|
||||
else
|
||||
{
|
||||
var objectNameDropdown = inspector.GenerateDropdown(this, container, "Object Name", new List<string>(), nameof(objectName));
|
||||
var objectNameDropdown = inspector.GenerateDropdown(this, container, "Object Name",
|
||||
new List<string>(), nameof(objectName));
|
||||
objectNameDropdown.dropdown.interactable = false;
|
||||
}
|
||||
|
||||
var generateButton = inspector.GenerateButton(this, container, "Generate", () =>
|
||||
{
|
||||
Delete();
|
||||
inspector.ClearInspector();
|
||||
inspectorMain.ClearInspector();
|
||||
SubstantialObject.GenerateElement(elementName, elementGuid, tags, false, themeBundleName, objectName, parentElement);
|
||||
});
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Dreamteck.Splines;
|
||||
using Ichni;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Lean.Pool;
|
||||
using Sirenix.OdinInspector;
|
||||
@@ -82,6 +83,8 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
|
||||
base.SetUpInspector();
|
||||
|
||||
var container = inspector.GenerateContainer("Path Node");
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Lean.Pool;
|
||||
using UnityEngine;
|
||||
@@ -70,6 +71,8 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
Inspector inspectorMain = EditorManager.instance.uiManager.inspector;
|
||||
base.SetUpInspector();
|
||||
|
||||
var container = inspector.GenerateContainer("Track");
|
||||
@@ -78,26 +81,26 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
trackPathSubmodule = new TrackPathSubmodule(this, TrackSpaceType.CatmullRom,
|
||||
TrackSamplingType.TimeDistributed, false);
|
||||
inspector.SetInspector(this);
|
||||
inspectorMain.SetInspector(this);
|
||||
});
|
||||
var trackTimeMovableButton = inspector.GenerateButton(this, container, "Track Time Movable",
|
||||
() =>
|
||||
{
|
||||
trackTimeSubmodule = new TrackTimeSubmoduleMovable(this, 0, 1, 1, AnimationCurveType.Linear);
|
||||
inspector.SetInspector(this);
|
||||
inspectorMain.SetInspector(this);
|
||||
});
|
||||
var trackTimeStaticButton = inspector.GenerateButton(this, container, "Track Time Static",
|
||||
() =>
|
||||
{
|
||||
trackTimeSubmodule = new TrackTimeSubmoduleStatic(this, 1, AnimationCurveType.Linear);
|
||||
inspector.SetInspector(this);
|
||||
inspectorMain.SetInspector(this);
|
||||
});
|
||||
|
||||
var trackRendererAutoOrientButton = inspector.GenerateButton(this, container, "Track Renderer Auto Orient",
|
||||
() =>
|
||||
{
|
||||
trackRendererSubmodule = new TrackRendererSubmoduleAutoOrient(this);
|
||||
inspector.SetInspector(this);
|
||||
inspectorMain.SetInspector(this);
|
||||
});
|
||||
|
||||
var trackRendererPathGeneratorButton = inspector.GenerateButton(this, container,
|
||||
@@ -105,7 +108,7 @@ namespace Ichni.RhythmGame
|
||||
() =>
|
||||
{
|
||||
trackRendererSubmodule = new TrackRendererSubmodulePathGenerator(this);
|
||||
inspector.SetInspector(this);
|
||||
inspectorMain.SetInspector(this);
|
||||
});
|
||||
|
||||
if (trackPathSubmodule != null)
|
||||
@@ -141,6 +144,29 @@ namespace Ichni.RhythmGame
|
||||
Swirl.GenerateElement("New Swirl", Guid.NewGuid(), new List<string>(), true, this,
|
||||
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
|
||||
});
|
||||
|
||||
var QuickCopyButton = inspector.GenerateButton(this, container, "QuickCopy", () =>
|
||||
{
|
||||
IHaveInspection qcWindow = inspectorMain.GenerateSecondaryWindow(this, elementName + "'s Quick Copy");
|
||||
var qcContainer = qcWindow.GenerateContainer();
|
||||
var xField = qcWindow.GenerateGetterInputField(qcContainer, "X offset", "0");
|
||||
var yField = qcWindow.GenerateGetterInputField(qcContainer, "Y offset", "0");
|
||||
var zField = qcWindow.GenerateGetterInputField(qcContainer, "Z offset", "0");
|
||||
qcWindow.GenerateButton(this, qcContainer, "Copy", () =>
|
||||
{
|
||||
CopyPasteDeleteModule cpd = EditorManager.instance.operationManager.CopyPasteDeleteModule;
|
||||
cpd.CopyElement(this);
|
||||
cpd.PasteElement(parentElement);
|
||||
Track newTrack = cpd.pastedElementList[0] as Track;
|
||||
newTrack.trackPathSubmodule.pathNodeList.ForEach(pn =>
|
||||
{
|
||||
Vector3 offset = new Vector3(xField.GetResult<float>(), yField.GetResult<float>(), zField.GetResult<float>());
|
||||
pn.transformSubmodule.originalPosition += offset;
|
||||
pn.transformSubmodule.Refresh();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
container.SetDeviver(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Dreamteck.Splines;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UnityEngine;
|
||||
@@ -90,6 +91,8 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
|
||||
base.SetUpInspector();
|
||||
var container = inspector.GenerateContainer("Cross Track Point");
|
||||
var trackSwitchButton = inspector.GenerateButton(this, container, "Track Switch",
|
||||
|
||||
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Dreamteck.Splines;
|
||||
using Ichni.Editor;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
@@ -73,6 +74,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Track Path");
|
||||
var trackSpaceDropdown =
|
||||
inspector.GenerateDropdown(this, container, "Space Type", typeof(Track.TrackSpaceType), nameof(trackSpaceType));
|
||||
@@ -120,7 +122,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void DuplicateBM(GameElement attached)
|
||||
{
|
||||
Track track = attachedElement as Track;
|
||||
Track track = attached as Track;
|
||||
track.trackPathSubmodule = new TrackPathSubmodule(track, trackSpaceType, trackSamplingType, isClosed);
|
||||
track.submoduleList.Add(track.trackPathSubmodule);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Dreamteck.Splines;
|
||||
using Ichni.Editor;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using Inspector = Unity.VisualScripting.Inspector;
|
||||
|
||||
namespace Ichni.RhythmGame
|
||||
{
|
||||
@@ -63,6 +65,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Track Renderer Auto Orient");
|
||||
}
|
||||
}
|
||||
@@ -143,6 +146,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
var container = inspector.GenerateContainer("Track Renderer Path Generator");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.Editor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame
|
||||
@@ -70,12 +71,15 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
Inspector inspectorMain = EditorManager.instance.uiManager.inspector;
|
||||
|
||||
var container = inspector.GenerateContainer("Track Time Movable");
|
||||
var startTimeInputField =
|
||||
inspector.GenerateInputField(this, container, "Start Time", nameof(trackStartTime));
|
||||
var endTimeInputField = inspector.GenerateInputField(this, container, "End Time", nameof(trackEndTime));
|
||||
inspector.GenerateParameterInputField(this, container, "Start Time", nameof(trackStartTime));
|
||||
var endTimeInputField = inspector.GenerateParameterInputField(this, container, "End Time", nameof(trackEndTime));
|
||||
var visibleTimeInputField =
|
||||
inspector.GenerateInputField(this, container, "Visible Time Length", nameof(visibleTrackTimeLength));
|
||||
inspector.GenerateParameterInputField(this, container, "Visible Time Length", nameof(visibleTrackTimeLength));
|
||||
var animationCurveDropdown = inspector.GenerateDropdown(this, container, "Animation Curve",
|
||||
typeof(AnimationCurveType), nameof(animationCurveType));
|
||||
var deleteButton = inspector.GenerateButton(this, container, "Delete",
|
||||
@@ -83,7 +87,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
Delete();
|
||||
track.trackTimeSubmodule = null;
|
||||
inspector.SetInspector(track);
|
||||
inspectorMain.SetInspector(track);
|
||||
track.Refresh();
|
||||
});
|
||||
}
|
||||
@@ -153,9 +157,12 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
IHaveInspection inspector = EditorManager.instance.uiManager.inspector;
|
||||
Inspector inspectorMain = EditorManager.instance.uiManager.inspector;
|
||||
|
||||
var container = inspector.GenerateContainer("Track Time Static");
|
||||
var totalTimeInputField =
|
||||
inspector.GenerateInputField(this, container, "Total Time", nameof(trackTotalTime));
|
||||
inspector.GenerateParameterInputField(this, container, "Total Time", nameof(trackTotalTime));
|
||||
var animationCurveDropdown = inspector.GenerateDropdown(this, container, "Animation Curve",
|
||||
typeof(AnimationCurveType), nameof(animationCurveType));
|
||||
var deleteButton = inspector.GenerateButton(this, container, "Delete",
|
||||
@@ -163,7 +170,7 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
Delete();
|
||||
track.trackTimeSubmodule = null;
|
||||
inspector.SetInspector(track);
|
||||
inspectorMain.SetInspector(track);
|
||||
track.Refresh();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user