@@ -176,13 +176,7 @@ namespace Ichni.Editor
|
||||
|
||||
private void GenerateSaveClipWindow()
|
||||
{
|
||||
GameElement currentElement = EditorManager.instance.operationManager.currentSelectedElements[0];
|
||||
|
||||
if (currentElement == null)
|
||||
{
|
||||
LogWindow.Log("No Game Element selected.", Color.red);
|
||||
return;
|
||||
}
|
||||
if (!TryGetSingleSelectedElementForClip(out GameElement currentElement)) return;
|
||||
|
||||
if (clipManagementWindow != null)
|
||||
{
|
||||
@@ -208,15 +202,7 @@ namespace Ichni.Editor
|
||||
|
||||
private void GenerateLoadClipWindow()
|
||||
{
|
||||
GameElement currentElement = EditorManager.instance.operationManager.currentSelectedElements[0];
|
||||
|
||||
if (currentElement == null)
|
||||
{
|
||||
LogWindow.Log("No Game Element selected.", Color.red);
|
||||
return;
|
||||
}
|
||||
|
||||
GameElement loadTarget = currentElement == EditorManager.instance ? null : currentElement.parentElement;
|
||||
if (!TryGetSingleSelectedElementForClip(out GameElement currentElement)) return;
|
||||
|
||||
if (clipManagementWindow != null)
|
||||
{
|
||||
@@ -240,6 +226,26 @@ namespace Ichni.Editor
|
||||
});
|
||||
}
|
||||
|
||||
private bool TryGetSingleSelectedElementForClip(out GameElement currentElement)
|
||||
{
|
||||
currentElement = null;
|
||||
var selectedElements = EditorManager.instance.operationManager.currentSelectedElements;
|
||||
if (selectedElements == null || selectedElements.Count != 1)
|
||||
{
|
||||
LogWindow.Log("Please select only one Game Element for clip operation.", Color.red);
|
||||
return false;
|
||||
}
|
||||
|
||||
currentElement = selectedElements[0];
|
||||
if (currentElement == null)
|
||||
{
|
||||
LogWindow.Log("No Game Element selected.", Color.red);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void GenerateMergeWindow()
|
||||
{
|
||||
GeneralSecondaryWindow mergeWindow = Instantiate(EditorManager.instance.basePrefabs.generalSecondaryWindow,
|
||||
|
||||
Reference in New Issue
Block a user