-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
550 additions
and
26 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
Assets/SLywnowAssets/KopiaUnity/Editor/KPSL_Editor_ImgPrev.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using SLywnow; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEditor; | ||
using UnityEngine; | ||
|
||
public class KPSL_Editor_ImgPrev : EditorWindow | ||
{ | ||
|
||
private void OnEnable() | ||
{ | ||
OnFocus(); | ||
} | ||
|
||
Texture2D loaded; | ||
|
||
private void OnFocus() | ||
{ | ||
string path = Application.dataPath.Replace("/Assets", "/Temp/KopiaCheck/"); | ||
|
||
loaded = null; | ||
if (FilesSet.CheckFile(path + "preview.png")) | ||
{ | ||
loaded = FilesSet.LoadSprite(path + "preview.png", false).texture; | ||
} | ||
} | ||
|
||
Vector2 pos; | ||
|
||
private void OnGUI() | ||
{ | ||
if (loaded !=null) | ||
{ | ||
pos = GUILayout.BeginScrollView(pos); | ||
|
||
GUILayout.Label(new GUIContent(loaded)); | ||
|
||
GUILayout.EndScrollView(); | ||
} | ||
else | ||
{ | ||
GUILayout.Label("Image not found! Try again!"); | ||
} | ||
} | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
Assets/SLywnowAssets/KopiaUnity/Editor/KPSL_Editor_ImgPrev.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.