diff --git a/Editor/ScreenshotMaker.cs b/Editor/ScreenshotMaker.cs new file mode 100644 index 0000000..7304f1c --- /dev/null +++ b/Editor/ScreenshotMaker.cs @@ -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); + + } + + } +} \ No newline at end of file diff --git a/Editor/ScreenshotMaker.cs.meta b/Editor/ScreenshotMaker.cs.meta new file mode 100644 index 0000000..1cf608a --- /dev/null +++ b/Editor/ScreenshotMaker.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7dba407e8e8740a1bed3ee5fa833b13c +timeCreated: 1687881092 \ No newline at end of file diff --git a/Editor/TsvImporter.cs b/Editor/TsvImporter.cs new file mode 100644 index 0000000..77299f5 --- /dev/null +++ b/Editor/TsvImporter.cs @@ -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); + } +} diff --git a/Editor/TsvImporter.cs.meta b/Editor/TsvImporter.cs.meta new file mode 100644 index 0000000..cc19afd --- /dev/null +++ b/Editor/TsvImporter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b3f8438db4084014bab0a063e4675d3f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NEG/UI/UnityUi/MonoUiInputManger.cs b/NEG/UI/UnityUi/MonoUiInputManger.cs index 1285f13..22cd060 100644 --- a/NEG/UI/UnityUi/MonoUiInputManger.cs +++ b/NEG/UI/UnityUi/MonoUiInputManger.cs @@ -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;