update
This commit is contained in:
parent
34807988d8
commit
17f48f7eb2
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:
|
||||||
@ -63,6 +63,12 @@ namespace NEG.UI.UnityUi
|
|||||||
CurrentSelectionSource = SelectionSource.Pointer;
|
CurrentSelectionSource = SelectionSource.Pointer;
|
||||||
Cursor.visible = true;
|
Cursor.visible = true;
|
||||||
|
|
||||||
|
if (EventSystem.current == null)
|
||||||
|
{
|
||||||
|
SetDirectionInput();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (EventSystem.current.currentInputModule == null)
|
if (EventSystem.current.currentInputModule == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user