模型预览功能
This commit is contained in:
@@ -239,6 +239,7 @@ namespace RapidIcon_1_7_2
|
||||
|
||||
//---Draw the draggable separator---//
|
||||
previewDraggableSeparator.Draw(100, window.position.height - 100, window);
|
||||
|
||||
GUILayout.Space(8);
|
||||
|
||||
//---Draw the icon selector---//
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace RapidIcon_1_7_2
|
||||
public List<bool> soeBools;
|
||||
|
||||
//Camera Settings
|
||||
// public Vector3 cameraPosition { get; set; }
|
||||
public Vector3 cameraPosition;
|
||||
public Vector3 cameraTarget;
|
||||
public bool autoPosition;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace RapidIcon_1_7_2
|
||||
public static bool dontSaveOnExit;
|
||||
public bool forceCloseDontSave;
|
||||
|
||||
[MenuItem("Tools/RapidIcon")]
|
||||
[MenuItem("NBC/模型预览编辑/主界面")]
|
||||
public static void Init()
|
||||
{
|
||||
SessionState.SetBool("rapidicon_forceclose", false);
|
||||
@@ -30,7 +30,7 @@ namespace RapidIcon_1_7_2
|
||||
*--------------------------------------------------------------------------------*/
|
||||
dontSaveOnExit = false;
|
||||
|
||||
window = (RapidIconWindow)GetWindow(typeof(RapidIconWindow), false, "RapidIcon");
|
||||
window = (RapidIconWindow)GetWindow(typeof(RapidIconWindow), false, "模型预览编辑");
|
||||
window.minSize = new Vector2(870, 600);
|
||||
window.forceCloseDontSave = false;
|
||||
window.Show();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -128,9 +129,13 @@ namespace RapidIcon_1_7_2
|
||||
ObjectPathPair obj = new ObjectPathPair(icon.parentIconSet.assetObject, icon.parentIconSet.assetPath);
|
||||
IconSet newIconSet = iconEditor.assetGrid.CreateIconSet(obj);
|
||||
|
||||
var newSet = newIconSet.icons[0].iconSettings;
|
||||
var oldSet = icon.iconSettings;
|
||||
|
||||
|
||||
Utils.CopyIconSettings(newIconSet.GetCurrentIcon(), icon, subOption == 0 ? iconEditor.tab : -1);
|
||||
ResetHierarchy(icon);
|
||||
|
||||
|
||||
Utils.UpdateIcon(icon, iconEditor);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user