Merge branch 'better-ui-manager' of newexceptiongames.dynamic-dns.net:NewExceptionGames/Neg_Utils into better-ui-manager
This commit is contained in:
commit
85daf89041
21
Editor/ScreenshotMaker.cs
Normal file
21
Editor/ScreenshotMaker.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NEG.Editor
|
||||
{
|
||||
public static class ScreenshotMaker
|
||||
{
|
||||
[MenuItem("CONTEXT/Camera/Save view")]
|
||||
public static void Capture(MenuCommand command)
|
||||
{
|
||||
string path = EditorUtility.SaveFilePanel("Save screenshot", "", "screen.png", "png");
|
||||
if (path.Length == 0)
|
||||
return;
|
||||
|
||||
ScreenCapture.CaptureScreenshot(path);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
3
Editor/ScreenshotMaker.cs.meta
Normal file
3
Editor/ScreenshotMaker.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7dba407e8e8740a1bed3ee5fa833b13c
|
||||
timeCreated: 1687881092
|
||||
16
Editor/TsvImporter.cs
Normal file
16
Editor/TsvImporter.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEditor.AssetImporters;
|
||||
using UnityEditor.Experimental.AssetImporters;
|
||||
using UnityEngine;
|
||||
|
||||
[ScriptedImporter(1, "tsv")]
|
||||
public class TsvImporter : ScriptedImporter
|
||||
{
|
||||
public override void OnImportAsset(AssetImportContext ctx)
|
||||
{
|
||||
var textAsset = new TextAsset(File.ReadAllText(ctx.assetPath));
|
||||
ctx.AddObjectToAsset(Path.GetFileNameWithoutExtension(ctx.assetPath), textAsset);
|
||||
ctx.SetMainObject(textAsset);
|
||||
}
|
||||
}
|
||||
11
Editor/TsvImporter.cs.meta
Normal file
11
Editor/TsvImporter.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b3f8438db4084014bab0a063e4675d3f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -173,7 +173,7 @@ namespace NEG.UI
|
||||
{
|
||||
if (forceShow)
|
||||
{
|
||||
if(currentShownPopup.priority <= priority)
|
||||
if(currentShownPopup.data != null && currentShownPopup.priority >= priority)
|
||||
return;
|
||||
|
||||
popupsToShow.Enqueue(currentShownPopup.data, currentShownPopup.priority);
|
||||
@ -185,6 +185,8 @@ namespace NEG.UI
|
||||
{
|
||||
if(!d.IsValid)
|
||||
continue;
|
||||
if(d == currentShownPopup.data)
|
||||
continue;
|
||||
ShowPopup(d, p);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -62,7 +62,13 @@ namespace NEG.UI.UnityUi
|
||||
{
|
||||
CurrentSelectionSource = SelectionSource.Pointer;
|
||||
Cursor.visible = true;
|
||||
|
||||
|
||||
if (EventSystem.current == null)
|
||||
{
|
||||
SetDirectionInput();
|
||||
return;
|
||||
}
|
||||
|
||||
if (EventSystem.current.currentInputModule == null)
|
||||
return;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user