mirror of
https://github.com/Ratstail91/Mementos.git
synced 2025-11-29 02:24:28 +11:00
Committed everything
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15e2b2aa92f3dff4b9aa6924a01bfd96
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,66 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Build;
|
||||
using System.Text;
|
||||
using Ink.UnityIntegration;
|
||||
using System.Linq;
|
||||
#if UNITY_2018_1_OR_NEWER
|
||||
using UnityEditor.Build.Reporting;
|
||||
#endif
|
||||
|
||||
class InkPreBuildValidationCheck :
|
||||
#if UNITY_2018_1_OR_NEWER
|
||||
IPreprocessBuildWithReport
|
||||
#else
|
||||
IPreprocessBuild
|
||||
#endif
|
||||
{
|
||||
public int callbackOrder { get { return 0; } }
|
||||
|
||||
#if UNITY_2018_1_OR_NEWER
|
||||
public void OnPreprocessBuild(BuildReport report) {
|
||||
PreprocessValidationStep();
|
||||
}
|
||||
#else
|
||||
public void OnPreprocessBuild(BuildTarget target, string path) {
|
||||
PreprocessValidationStep();
|
||||
}
|
||||
#endif
|
||||
|
||||
static void PreprocessValidationStep () {
|
||||
AssertNotCompiling();
|
||||
CheckForInvalidFiles();
|
||||
}
|
||||
|
||||
static void AssertNotCompiling () {
|
||||
if(InkCompiler.compiling) {
|
||||
StringBuilder sb = new StringBuilder("Ink is currently compiling!");
|
||||
var errorString = sb.ToString();
|
||||
InkCompiler.buildBlocked = true;
|
||||
if(UnityEditor.EditorUtility.DisplayDialog("Ink Build Error!", errorString, "Ok")) {
|
||||
Debug.LogError(errorString);
|
||||
}
|
||||
}
|
||||
}
|
||||
// When syncronous compilation is allowed we should try to replace this error with a compile.
|
||||
static void CheckForInvalidFiles () {
|
||||
var filesToRecompile = InkLibrary.GetFilesRequiringRecompile();
|
||||
if(filesToRecompile.Any()) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("There are Ink files which should be compiled, but appear not to be. You can resolve this by either:");
|
||||
sb.AppendLine(" - Compiling your files via 'Assets/Recompile Ink'");
|
||||
var resolveStep = " - Disabling 'Compile Automatically' "+(InkSettings.instance.compileAutomatically ? "in your Ink Settings file" : "for each of the files listed below");
|
||||
sb.AppendLine(resolveStep);
|
||||
sb.AppendLine();
|
||||
sb.AppendLine("Files:");
|
||||
var filesAsString = string.Join(", ", filesToRecompile.Select(x => x.filePath).ToArray());
|
||||
sb.AppendLine(filesAsString);
|
||||
var errorString = sb.ToString();
|
||||
if(!UnityEditor.EditorUtility.DisplayDialog("Ink Build Error!", errorString, "Build anyway", "Cancel build")) {
|
||||
Debug.LogError(errorString);
|
||||
} else {
|
||||
Debug.LogWarning(errorString);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 260430d96c5f0aa46a31363984dc9088
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 51bebdd29a127594b90edb5938e78b79
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,184 @@
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
/*
|
||||
* This script allows you to set custom icons for folders in project browser.
|
||||
* Recommended icon sizes - small: 16x16 px, large: 64x64 px;
|
||||
*/
|
||||
|
||||
namespace Ink.UnityIntegration {
|
||||
[InitializeOnLoad]
|
||||
public class InkBrowserIcons {
|
||||
private static bool isRetina {
|
||||
get {
|
||||
float unityVersion = float.Parse(Application.unityVersion.Substring (0, 3));
|
||||
return Application.platform == RuntimePlatform.OSXEditor && unityVersion >= 5.4f;
|
||||
}
|
||||
}
|
||||
private const float largeIconSize = 64f;
|
||||
|
||||
private static Texture2D _inkFileIcon;
|
||||
public static Texture2D inkFileIcon {
|
||||
get {
|
||||
if(_inkFileIcon == null) {
|
||||
if(isRetina) {
|
||||
_inkFileIcon = Resources.Load<Texture2D>("InkFileIcon-retina");
|
||||
} else {
|
||||
_inkFileIcon = Resources.Load<Texture2D>("InkFileIcon");
|
||||
}
|
||||
}
|
||||
return _inkFileIcon;
|
||||
}
|
||||
}
|
||||
private static Texture2D _inkFileIconLarge;
|
||||
public static Texture2D inkFileIconLarge {
|
||||
get {
|
||||
if(_inkFileIconLarge == null) {
|
||||
_inkFileIconLarge = Resources.Load<Texture2D>("InkFileIcon-large");
|
||||
}
|
||||
return _inkFileIconLarge;
|
||||
}
|
||||
}
|
||||
private static Texture2D _errorIcon;
|
||||
public static Texture2D errorIcon {
|
||||
get {
|
||||
if(_errorIcon == null) {
|
||||
_errorIcon = Resources.Load<Texture2D>("InkErrorIcon");
|
||||
}
|
||||
return _errorIcon;
|
||||
}
|
||||
}
|
||||
private static Texture2D _warningIcon;
|
||||
public static Texture2D warningIcon {
|
||||
get {
|
||||
if(_warningIcon == null) {
|
||||
_warningIcon = Resources.Load<Texture2D>("InkWarningIcon");
|
||||
}
|
||||
return _warningIcon;
|
||||
}
|
||||
}
|
||||
private static Texture2D _todoIcon;
|
||||
public static Texture2D todoIcon {
|
||||
get {
|
||||
if(_todoIcon == null) {
|
||||
_todoIcon = Resources.Load<Texture2D>("InkTodoIcon");
|
||||
}
|
||||
return _todoIcon;
|
||||
}
|
||||
}
|
||||
private static Texture2D _manualIcon;
|
||||
public static Texture2D manualIcon {
|
||||
get {
|
||||
if(_manualIcon == null) {
|
||||
_manualIcon = Resources.Load<Texture2D>("InkCompileManualIcon");
|
||||
}
|
||||
return _manualIcon;
|
||||
}
|
||||
}
|
||||
private static Texture2D _childIcon;
|
||||
public static Texture2D childIcon {
|
||||
get {
|
||||
if(_childIcon == null) {
|
||||
_childIcon = Resources.Load<Texture2D>("InkChildIcon");
|
||||
}
|
||||
return _childIcon;
|
||||
}
|
||||
}
|
||||
private static Texture2D _childIconLarge;
|
||||
public static Texture2D childIconLarge {
|
||||
get {
|
||||
if(_childIconLarge == null) {
|
||||
_childIconLarge = Resources.Load<Texture2D>("InkChildIcon-Large");
|
||||
}
|
||||
return _childIconLarge;
|
||||
}
|
||||
}
|
||||
private static Texture2D _unknownFileIcon;
|
||||
public static Texture2D unknownFileIcon {
|
||||
get {
|
||||
if(_unknownFileIcon == null) {
|
||||
_unknownFileIcon = Resources.Load<Texture2D>("InkUnknownFileIcon");
|
||||
}
|
||||
return _unknownFileIcon;
|
||||
}
|
||||
}
|
||||
|
||||
static InkBrowserIcons() {
|
||||
EditorApplication.projectWindowItemOnGUI += OnDrawProjectWindowItem;
|
||||
}
|
||||
|
||||
static void OnDrawProjectWindowItem(string guid, Rect rect) {
|
||||
string path = AssetDatabase.GUIDToAssetPath(guid);
|
||||
if (InkEditorUtils.IsInkFile(path)) {
|
||||
DefaultAsset asset = AssetDatabase.LoadAssetAtPath<DefaultAsset>(path);
|
||||
DrawInkFile(InkLibrary.GetInkFileWithFile(asset), rect);
|
||||
}
|
||||
}
|
||||
|
||||
static void DrawInkFile (InkFile inkFile, Rect rect) {
|
||||
bool isSmall = rect.width > rect.height;
|
||||
if (isSmall) {
|
||||
rect.width = rect.height;
|
||||
} else {
|
||||
rect.height = rect.width;
|
||||
}
|
||||
if (rect.width >= largeIconSize) {
|
||||
DrawLarge(inkFile, rect);
|
||||
} else {
|
||||
DrawSmall(inkFile, rect);
|
||||
}
|
||||
}
|
||||
|
||||
static void DrawLarge (InkFile inkFile, Rect rect) {
|
||||
var offset = (rect.width - largeIconSize) * 0.5f;
|
||||
rect = new Rect(rect.x + offset, rect.y + offset, largeIconSize, largeIconSize);
|
||||
if(inkFileIconLarge != null)
|
||||
GUI.DrawTexture(rect, inkFileIconLarge);
|
||||
|
||||
Rect miniRect = new Rect(rect.center, rect.size * 0.5f);
|
||||
if(inkFile == null) {
|
||||
if(unknownFileIcon != null) {
|
||||
GUI.DrawTexture(miniRect, unknownFileIcon);
|
||||
}
|
||||
} else {
|
||||
if(inkFile.hasErrors && errorIcon != null) {
|
||||
GUI.DrawTexture(miniRect, errorIcon);
|
||||
} else if(inkFile.hasWarnings && warningIcon != null) {
|
||||
GUI.DrawTexture(miniRect, warningIcon);
|
||||
} else if(inkFile.hasTodos && todoIcon != null) {
|
||||
GUI.DrawTexture(miniRect, todoIcon);
|
||||
}
|
||||
if(!inkFile.isMaster && childIcon != null) {
|
||||
GUI.DrawTexture(new Rect(rect.x, rect.y, rect.width * 0.5f, rect.height * 0.5f), childIconLarge);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void DrawSmall (InkFile inkFile, Rect rect) {
|
||||
if(inkFileIcon != null)
|
||||
GUI.DrawTexture(rect, inkFileIcon);
|
||||
|
||||
if(inkFile == null) {
|
||||
if(unknownFileIcon != null) {
|
||||
GUI.DrawTexture(new Rect(rect.x, rect.y, unknownFileIcon.width, unknownFileIcon.height), unknownFileIcon);
|
||||
}
|
||||
} else {
|
||||
if(!InkSettings.instance.compileAutomatically && !inkFile.compileAutomatically && inkFile.isMaster)
|
||||
GUI.DrawTexture(new Rect(rect.x, rect.y + rect.size.y * 0.5f, rect.size.x * 0.5f, rect.size.y * 0.5f), manualIcon);
|
||||
|
||||
Rect miniRect = new Rect(rect.center, rect.size * 0.5f);
|
||||
if(inkFile.hasErrors && errorIcon != null) {
|
||||
GUI.DrawTexture(miniRect, errorIcon);
|
||||
} else if(inkFile.hasWarnings && warningIcon != null) {
|
||||
GUI.DrawTexture(miniRect, warningIcon);
|
||||
} else if(inkFile.hasTodos && todoIcon != null) {
|
||||
GUI.DrawTexture(miniRect, todoIcon);
|
||||
}
|
||||
if(!inkFile.isMaster && childIcon != null) {
|
||||
GUI.DrawTexture(new Rect(rect.x, rect.y, childIcon.width, childIcon.height), childIcon);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 38c650d4ee11f47559699f833d29d4b9
|
||||
timeCreated: 1459341699
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7db532cf76e3b4072a4e7ea2ff88d03e
|
||||
folderAsset: yes
|
||||
timeCreated: 1475576594
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,57 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4e541342c07c476094e04dc118fed7b
|
||||
timeCreated: 1463742861
|
||||
licenseType: Store
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,57 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 53256257fd17e4dfda5f08016551019e
|
||||
timeCreated: 1461958426
|
||||
licenseType: Store
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,84 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1e91fdbfb2b154a18b675257bc4d43d9
|
||||
timeCreated: 1485360612
|
||||
licenseType: Store
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 1
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 2
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,3 @@
|
||||
Hello world!
|
||||
* Hello back!
|
||||
Nice to hear from you!
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0487be7f554cd45a6916f94d2b6baf50
|
||||
timeCreated: 1462291397
|
||||
licenseType: Store
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,57 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab12885a47a21456596113fc9233946c
|
||||
timeCreated: 1461099630
|
||||
licenseType: Store
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,57 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 957c8ea47888d42349ae208cffe69c4b
|
||||
timeCreated: 1463734461
|
||||
licenseType: Store
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 16
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,57 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bd3c497264be941e3a935055a433bbb9
|
||||
timeCreated: 1459953147
|
||||
licenseType: Store
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,57 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e6b218461abe4192baeeabfbe7a9ced
|
||||
timeCreated: 1459341708
|
||||
licenseType: Store
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 16
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,84 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 73b0b2e787c654227845ff231c5eab5d
|
||||
timeCreated: 1485360612
|
||||
licenseType: Store
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 4
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 0
|
||||
linearTexture: 1
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 2
|
||||
textureShape: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
- buildTarget: iPhone
|
||||
maxTextureSize: 2048
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,57 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b26518ba7d72a4fd3bc42599f621c839
|
||||
timeCreated: 1462526037
|
||||
licenseType: Store
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,57 @@
|
||||
fileFormatVersion: 2
|
||||
guid: efc1324f6160840a9a4c26231cc2d304
|
||||
timeCreated: 1461099630
|
||||
licenseType: Store
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
serializedVersion: 2
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
linearTexture: 1
|
||||
correctGamma: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 0
|
||||
cubemapConvolution: 0
|
||||
cubemapConvolutionSteps: 7
|
||||
cubemapConvolutionExponent: 1.5
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -3
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
filterMode: 0
|
||||
aniso: 1
|
||||
mipBias: -1
|
||||
wrapMode: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
alphaIsTransparency: 1
|
||||
textureType: 2
|
||||
buildTargetSettings: []
|
||||
spriteSheet:
|
||||
sprites: []
|
||||
outline: []
|
||||
spritePackingTag:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c7ff1896f35a148d8a4c1850f1e8e13d
|
||||
folderAsset: yes
|
||||
timeCreated: 1459934446
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,60 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Ink.UnityIntegration {
|
||||
[CustomEditor(typeof(DefaultAsset), true)]
|
||||
public class DefaultAssetEditor : Editor {
|
||||
|
||||
private DefaultAssetInspector inspector;
|
||||
|
||||
private void OnEnable () {
|
||||
inspector = FindObjectInspector ();
|
||||
if(inspector != null) {
|
||||
inspector.editor = this;
|
||||
inspector.serializedObject = serializedObject;
|
||||
inspector.target = target;
|
||||
inspector.OnEnable();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDisable () {
|
||||
if(inspector != null)
|
||||
inspector.OnDisable();
|
||||
}
|
||||
|
||||
protected override void OnHeaderGUI () {
|
||||
if(inspector != null) {
|
||||
inspector.OnHeaderGUI();
|
||||
}
|
||||
else
|
||||
base.OnHeaderGUI();
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI () {
|
||||
if(inspector != null) {
|
||||
GUI.enabled = true;
|
||||
inspector.OnInspectorGUI();
|
||||
}
|
||||
else
|
||||
base.OnInspectorGUI();
|
||||
}
|
||||
|
||||
private DefaultAssetInspector FindObjectInspector () {
|
||||
var assembly = Assembly.GetExecutingAssembly();
|
||||
var assetPath = AssetDatabase.GetAssetPath(target);
|
||||
foreach(var type in assembly.GetTypes()) {
|
||||
if(type.IsSubclassOf(typeof(DefaultAssetInspector))) {
|
||||
DefaultAssetInspector objectInspector = (DefaultAssetInspector)Activator.CreateInstance(type);
|
||||
if(objectInspector.IsValid(assetPath)) {
|
||||
objectInspector.target = target;
|
||||
return objectInspector;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe3507ae5d970447197e131c39ac31b6
|
||||
timeCreated: 1464440328
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
namespace Ink.UnityIntegration {
|
||||
public abstract class DefaultAssetInspector {
|
||||
// Reference to the actual editor we draw to
|
||||
public Editor editor;
|
||||
// Shortcut to the target object
|
||||
public Object target;
|
||||
// Shortcut to the serializedObject
|
||||
public SerializedObject serializedObject;
|
||||
|
||||
public abstract bool IsValid(string assetPath);
|
||||
public virtual void OnEnable () {}
|
||||
public virtual void OnDisable () {}
|
||||
public virtual void OnHeaderGUI () {}
|
||||
public virtual void OnInspectorGUI() {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7fa6f007190b6408c8aebb32050a3bbe
|
||||
timeCreated: 1470299519
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,418 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditorInternal;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace Ink.UnityIntegration {
|
||||
public class InkInspector : DefaultAssetInspector {
|
||||
|
||||
private InkFile inkFile;
|
||||
private ReorderableList includesFileList;
|
||||
private ReorderableList mastersFileList;
|
||||
private ReorderableList errorList;
|
||||
private ReorderableList warningList;
|
||||
private ReorderableList todosList;
|
||||
private string cachedTrimmedFileContents;
|
||||
private const int maxCharacters = 16000;
|
||||
|
||||
public override bool IsValid(string assetPath) {
|
||||
return Path.GetExtension(assetPath) == InkEditorUtils.inkFileExtension;
|
||||
}
|
||||
|
||||
public override void OnHeaderGUI () {
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Space(38f);
|
||||
GUILayout.BeginVertical();
|
||||
GUILayout.Space(19f);
|
||||
GUILayout.BeginHorizontal();
|
||||
|
||||
GUILayoutUtility.GetRect(10f, 10f, 16f, 16f, EditorStyles.layerMaskField);
|
||||
GUILayout.FlexibleSpace();
|
||||
|
||||
EditorGUI.BeginDisabledGroup(inkFile == null);
|
||||
if (GUILayout.Button("Open", EditorStyles.miniButton)) {
|
||||
AssetDatabase.OpenAsset(inkFile.inkAsset, 3);
|
||||
GUIUtility.ExitGUI();
|
||||
}
|
||||
EditorGUI.EndDisabledGroup();
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.EndVertical();
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
Rect lastRect = GUILayoutUtility.GetLastRect();
|
||||
Rect rect = new Rect(lastRect.x, lastRect.y, lastRect.width, lastRect.height);
|
||||
Rect iconRect = new Rect(rect.x + 6f, rect.y + 6f, 32f, 32f);
|
||||
GUI.DrawTexture(iconRect, InkBrowserIcons.inkFileIconLarge);
|
||||
Rect childIconRect = new Rect(iconRect.x, iconRect.y, 16f, 16f);
|
||||
if(inkFile == null) {
|
||||
GUI.DrawTexture(childIconRect, InkBrowserIcons.unknownFileIcon, ScaleMode.ScaleToFit);
|
||||
} else if(!inkFile.isMaster) {
|
||||
GUI.DrawTexture(childIconRect, InkBrowserIcons.childIconLarge, ScaleMode.ScaleToFit);
|
||||
}
|
||||
|
||||
Rect titleRect = new Rect(rect.x + 44f, rect.y + 6f, rect.width - 44f - 38f - 4f, 16f);
|
||||
titleRect.yMin -= 2f;
|
||||
titleRect.yMax += 2f;
|
||||
GUI.Label(titleRect, editor.target.name, EditorStyles.largeLabel);
|
||||
}
|
||||
|
||||
public override void OnEnable () {
|
||||
Rebuild();
|
||||
InkCompiler.OnCompileInk += OnCompileInk;
|
||||
}
|
||||
|
||||
public override void OnDisable () {
|
||||
InkCompiler.OnCompileInk -= OnCompileInk;
|
||||
}
|
||||
|
||||
void OnCompileInk (InkFile inkFile) {
|
||||
Rebuild();
|
||||
}
|
||||
|
||||
void Rebuild () {
|
||||
cachedTrimmedFileContents = "";
|
||||
string assetPath = AssetDatabase.GetAssetPath(target);
|
||||
inkFile = InkLibrary.GetInkFileWithPath(assetPath);
|
||||
if(inkFile == null)
|
||||
return;
|
||||
|
||||
if (inkFile.includes.Count > 0) CreateIncludeList ();
|
||||
else includesFileList = null;
|
||||
|
||||
if (inkFile.masterInkAssets.Count > 0) CreateMastersList ();
|
||||
else mastersFileList = null;
|
||||
|
||||
CreateErrorList();
|
||||
CreateWarningList();
|
||||
CreateTodoList();
|
||||
cachedTrimmedFileContents = inkFile.GetFileContents();
|
||||
cachedTrimmedFileContents = cachedTrimmedFileContents.Substring(0, Mathf.Min(cachedTrimmedFileContents.Length, maxCharacters));
|
||||
if(cachedTrimmedFileContents.Length >= maxCharacters)
|
||||
cachedTrimmedFileContents += "...\n\n<...etc...>";
|
||||
}
|
||||
|
||||
void CreateIncludeList () {
|
||||
List<DefaultAsset> includeTextAssets = inkFile.includes;
|
||||
includesFileList = new ReorderableList(includeTextAssets, typeof(DefaultAsset), false, false, false, false);
|
||||
includesFileList.drawHeaderCallback = (Rect rect) => {
|
||||
EditorGUI.LabelField(rect, "Included Files");
|
||||
};
|
||||
includesFileList.drawElementCallback = (Rect rect, int index, bool isActive, bool isFocused) => {
|
||||
DefaultAsset childAssetFile = ((List<DefaultAsset>)includesFileList.list)[index];
|
||||
if(childAssetFile == null) {
|
||||
Debug.LogError("Ink file in include list is null. This should never occur. Use Assets > Recompile Ink to fix this issue.");
|
||||
EditorGUI.LabelField(rect, new GUIContent("Warning: Ink File in include list is null. Use Assets > Recompile Ink to fix this issue."));
|
||||
return;
|
||||
}
|
||||
InkFile childInkFile = InkLibrary.GetInkFileWithFile(childAssetFile);
|
||||
if(childInkFile == null) {
|
||||
Debug.LogError("Ink File for included file "+childAssetFile+" not found. This should never occur. Use Assets > Recompile Ink to fix this issue.");
|
||||
EditorGUI.LabelField(rect, new GUIContent("Warning: Ink File for included file "+childAssetFile+" not found. Use Assets > Recompile Ink to fix this issue."));
|
||||
return;
|
||||
}
|
||||
Rect iconRect = new Rect(rect.x, rect.y, 0, 16);
|
||||
if(childInkFile.hasErrors || childInkFile.hasWarnings) {
|
||||
iconRect.width = 20;
|
||||
}
|
||||
Rect objectFieldRect = new Rect(iconRect.xMax, rect.y, rect.width - iconRect.width - 80, 16);
|
||||
Rect selectRect = new Rect(objectFieldRect.xMax, rect.y, 80, 16);
|
||||
if(childInkFile.hasErrors) {
|
||||
EditorGUI.LabelField(iconRect, new GUIContent(InkBrowserIcons.errorIcon));
|
||||
} else if(childInkFile.hasWarnings) {
|
||||
EditorGUI.LabelField(iconRect, new GUIContent(InkBrowserIcons.warningIcon));
|
||||
}
|
||||
EditorGUI.BeginDisabledGroup(true);
|
||||
EditorGUI.ObjectField(objectFieldRect, childAssetFile, typeof(Object), false);
|
||||
EditorGUI.EndDisabledGroup();
|
||||
if(GUI.Button(selectRect, "Select")) {
|
||||
Selection.activeObject = childAssetFile;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void CreateMastersList () {
|
||||
List<DefaultAsset> mastersTextAssets = inkFile.masterInkAssets;
|
||||
mastersFileList = new ReorderableList(mastersTextAssets, typeof(DefaultAsset), false, false, false, false);
|
||||
mastersFileList.drawHeaderCallback = (Rect rect) => {
|
||||
EditorGUI.LabelField(rect, "Master Files");
|
||||
};
|
||||
mastersFileList.drawElementCallback = (Rect rect, int index, bool isActive, bool isFocused) => {
|
||||
DefaultAsset masterAssetFile = ((List<DefaultAsset>)mastersFileList.list)[index];
|
||||
if(masterAssetFile == null) {
|
||||
Debug.LogError("Ink file in masters list is null. This should never occur. Use Assets > Recompile Ink to fix this issue.");
|
||||
EditorGUI.LabelField(rect, new GUIContent("Warning: Ink File in masters list is null. Use Assets > Recompile Ink to fix this issue."));
|
||||
return;
|
||||
}
|
||||
InkFile masterInkFile = InkLibrary.GetInkFileWithFile(masterAssetFile);
|
||||
if(masterInkFile == null) {
|
||||
Debug.LogError("Ink File for master file "+masterAssetFile+" not found. This should never occur. Use Assets > Recompile Ink to fix this issue.");
|
||||
EditorGUI.LabelField(rect, new GUIContent("Warning: Ink File for master file "+masterAssetFile+" not found. Use Assets > Recompile Ink to fix this issue."));
|
||||
return;
|
||||
}
|
||||
Rect iconRect = new Rect(rect.x, rect.y, 0, 16);
|
||||
if(masterInkFile.hasErrors || masterInkFile.hasWarnings) {
|
||||
iconRect.width = 20;
|
||||
}
|
||||
Rect objectFieldRect = new Rect(iconRect.xMax, rect.y, rect.width - iconRect.width - 80, 16);
|
||||
Rect selectRect = new Rect(objectFieldRect.xMax, rect.y, 80, 16);
|
||||
if(masterInkFile.hasErrors) {
|
||||
EditorGUI.LabelField(iconRect, new GUIContent(InkBrowserIcons.errorIcon));
|
||||
} else if(masterInkFile.hasWarnings) {
|
||||
EditorGUI.LabelField(iconRect, new GUIContent(InkBrowserIcons.warningIcon));
|
||||
}
|
||||
EditorGUI.BeginDisabledGroup(true);
|
||||
EditorGUI.ObjectField(objectFieldRect, masterAssetFile, typeof(Object), false);
|
||||
EditorGUI.EndDisabledGroup();
|
||||
if(GUI.Button(selectRect, "Select")) {
|
||||
Selection.activeObject = masterAssetFile;
|
||||
}
|
||||
|
||||
|
||||
// foreach(var masterInkFile in inkFile.masterInkFiles) {
|
||||
// EditorGUILayout.BeginHorizontal();
|
||||
// if(masterInkFile.hasErrors) {
|
||||
// GUILayout.Label(new GUIContent(InkBrowserIcons.errorIcon), GUILayout.Width(20));
|
||||
// } else if(masterInkFile.hasWarnings) {
|
||||
// GUILayout.Label(new GUIContent(InkBrowserIcons.warningIcon), GUILayout.Width(20));
|
||||
// }
|
||||
// EditorGUI.BeginDisabledGroup(true);
|
||||
// EditorGUILayout.ObjectField("Master Ink File", masterInkFile.inkAsset, typeof(Object), false);
|
||||
// EditorGUI.EndDisabledGroup();
|
||||
// if(GUILayout.Button("Select", GUILayout.Width(80))) {
|
||||
// Selection.activeObject = masterInkFile.inkAsset;
|
||||
// }
|
||||
// EditorGUILayout.EndHorizontal();
|
||||
// }
|
||||
};
|
||||
}
|
||||
|
||||
void CreateErrorList () {
|
||||
errorList = new ReorderableList(inkFile.errors, typeof(string), false, false, false, false);
|
||||
errorList.elementHeight = 18;
|
||||
errorList.drawHeaderCallback = (Rect rect) => {
|
||||
EditorGUI.LabelField(rect, new GUIContent(InkBrowserIcons.errorIcon), new GUIContent("Errors"));
|
||||
};
|
||||
errorList.drawElementCallback = (Rect rect, int index, bool isActive, bool isFocused) => {
|
||||
Rect labelRect = new Rect(rect.x, rect.y, rect.width - 80, rect.height);
|
||||
Rect buttonRect = new Rect(labelRect.xMax, rect.y, 80, rect.height-2);
|
||||
InkCompilerLog log = ((List<InkCompilerLog>)errorList.list)[index];
|
||||
string label = log.content;
|
||||
GUI.Label(labelRect, label);
|
||||
string openLabel = "Open"+ (log.lineNumber == -1 ? "" : " ("+log.lineNumber+")");
|
||||
if(GUI.Button(buttonRect, openLabel)) {
|
||||
OpenInEditor(inkFile.filePath, log.lineNumber);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void CreateWarningList () {
|
||||
warningList = new ReorderableList(inkFile.warnings, typeof(string), false, false, false, false);
|
||||
warningList.elementHeight = 18;
|
||||
warningList.drawHeaderCallback = (Rect rect) => {
|
||||
EditorGUI.LabelField(rect, new GUIContent(InkBrowserIcons.warningIcon), new GUIContent("Warnings"));
|
||||
};
|
||||
warningList.drawElementCallback = (Rect rect, int index, bool isActive, bool isFocused) => {
|
||||
Rect labelRect = new Rect(rect.x, rect.y, rect.width - 80, rect.height);
|
||||
Rect buttonRect = new Rect(labelRect.xMax, rect.y, 80, rect.height-2);
|
||||
InkCompilerLog log = ((List<InkCompilerLog>)warningList.list)[index];
|
||||
string label = log.content;
|
||||
GUI.Label(labelRect, label);
|
||||
string openLabel = "Open"+ (log.lineNumber == -1 ? "" : " ("+log.lineNumber+")");
|
||||
if(GUI.Button(buttonRect, openLabel)) {
|
||||
OpenInEditor(inkFile.filePath, log.lineNumber);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void CreateTodoList () {
|
||||
todosList = new ReorderableList(inkFile.todos, typeof(string), false, false, false, false);
|
||||
todosList.elementHeight = 18;
|
||||
todosList.drawHeaderCallback = (Rect rect) => {
|
||||
EditorGUI.LabelField(rect, "To do");
|
||||
};
|
||||
todosList.drawElementCallback = (Rect rect, int index, bool isActive, bool isFocused) => {
|
||||
Rect labelRect = new Rect(rect.x, rect.y, rect.width - 80, rect.height);
|
||||
Rect buttonRect = new Rect(labelRect.xMax, rect.y, 80, rect.height-2);
|
||||
InkCompilerLog log = ((List<InkCompilerLog>)todosList.list)[index];
|
||||
string label = log.content;
|
||||
GUI.Label(labelRect, label);
|
||||
string openLabel = "Open"+ (log.lineNumber == -1 ? "" : " ("+log.lineNumber+")");
|
||||
if(GUI.Button(buttonRect, openLabel)) {
|
||||
OpenInEditor(inkFile.filePath, log.lineNumber);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
static void OpenInEditor (string filePath, int lineNumber) {
|
||||
#if UNITY_2019_1_OR_NEWER
|
||||
// This function replaces OpenFileAtLineExternal, but I guess it's totally internal and can't be accessed.
|
||||
// CodeEditorUtility.Editor.Current.OpenProject(filePath, lineNumber);
|
||||
#pragma warning disable
|
||||
UnityEditorInternal.InternalEditorUtility.OpenFileAtLineExternal(filePath, lineNumber);
|
||||
#pragma warning restore
|
||||
#else
|
||||
UnityEditorInternal.InternalEditorUtility.OpenFileAtLineExternal(filePath, lineNumber);
|
||||
#endif
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI () {
|
||||
editor.Repaint();
|
||||
serializedObject.Update();
|
||||
if(inkFile == null) {
|
||||
EditorGUILayout.HelpBox("Ink File is not in library.", MessageType.Warning);
|
||||
if(GUILayout.Button("Rebuild Library")) {
|
||||
InkLibrary.Rebuild();
|
||||
Rebuild();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(InkCompiler.GetCompilationStackItem(inkFile) != null) {
|
||||
EditorGUILayout.HelpBox("File is compiling...", MessageType.Info);
|
||||
return;
|
||||
}
|
||||
|
||||
if(inkFile.isMaster) {
|
||||
DrawMasterFileHeader();
|
||||
DrawEditAndCompileDates(inkFile);
|
||||
if(inkFile.hasUnhandledCompileErrors) {
|
||||
EditorGUILayout.HelpBox("Last compiled failed", MessageType.Error);
|
||||
} if(inkFile.hasErrors) {
|
||||
EditorGUILayout.HelpBox("Last compiled had errors", MessageType.Error);
|
||||
} else if(inkFile.hasWarnings) {
|
||||
EditorGUILayout.HelpBox("Last compile had warnings", MessageType.Warning);
|
||||
} else if(inkFile.jsonAsset == null) {
|
||||
EditorGUILayout.HelpBox("Ink file has not been compiled", MessageType.Warning);
|
||||
}
|
||||
if(inkFile.requiresCompile && GUILayout.Button("Compile")) {
|
||||
InkCompiler.CompileInk(inkFile);
|
||||
}
|
||||
DrawIncludedFiles();
|
||||
|
||||
DrawCompileErrors();
|
||||
DrawErrors();
|
||||
DrawWarnings();
|
||||
DrawTODOList();
|
||||
} else {
|
||||
DrawSubFileHeader();
|
||||
}
|
||||
|
||||
DrawFileContents ();
|
||||
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
void DrawMasterFileHeader () {
|
||||
EditorGUILayout.LabelField("Master File", EditorStyles.boldLabel);
|
||||
if(!InkSettings.instance.compileAutomatically) {
|
||||
inkFile.compileAutomatically = EditorGUILayout.Toggle("Compile Automatially", inkFile.compileAutomatically);
|
||||
EditorApplication.RepaintProjectWindow();
|
||||
}
|
||||
EditorGUI.BeginDisabledGroup(true);
|
||||
EditorGUILayout.ObjectField("JSON Asset", inkFile.jsonAsset, typeof(TextAsset), false);
|
||||
EditorGUI.EndDisabledGroup();
|
||||
|
||||
if(inkFile.jsonAsset != null && inkFile.errors.Count == 0 && GUILayout.Button("Play")) {
|
||||
InkPlayerWindow.LoadAndPlay(inkFile.jsonAsset);
|
||||
}
|
||||
|
||||
// if(!checkedStoryForErrors) {
|
||||
// if(GUILayout.Button("Check for errors")) {
|
||||
// GetStoryErrors();
|
||||
// }
|
||||
// } else {
|
||||
// if(exception != null) {
|
||||
// EditorGUILayout.HelpBox("Story is invalid\n"+exception.ToString(), MessageType.Error);
|
||||
// } else {
|
||||
// EditorGUILayout.HelpBox("Story is valid", MessageType.Info);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
void DrawSubFileHeader() {
|
||||
EditorGUILayout.LabelField("Include File", EditorStyles.boldLabel);
|
||||
if(mastersFileList != null && mastersFileList.count > 0) {
|
||||
mastersFileList.DoLayoutList();
|
||||
}
|
||||
}
|
||||
|
||||
void DrawEditAndCompileDates (InkFile masterInkFile) {
|
||||
string editAndCompileDateString = "";
|
||||
DateTime lastEditDate = inkFile.lastEditDate;
|
||||
editAndCompileDateString += "Last edit date "+lastEditDate.ToString();
|
||||
if(masterInkFile.jsonAsset != null) {
|
||||
DateTime lastCompileDate = masterInkFile.lastCompileDate;
|
||||
editAndCompileDateString += "\nLast compile date "+lastCompileDate.ToString();
|
||||
if(lastEditDate > lastCompileDate) {
|
||||
if(EditorApplication.isPlaying && InkSettings.instance.delayInPlayMode) {
|
||||
editAndCompileDateString += "\nWill compile on exiting play mode";
|
||||
EditorGUILayout.HelpBox(editAndCompileDateString, MessageType.Info);
|
||||
} else {
|
||||
EditorGUILayout.HelpBox(editAndCompileDateString, MessageType.Warning);
|
||||
}
|
||||
} else {
|
||||
EditorGUILayout.HelpBox(editAndCompileDateString, MessageType.None);
|
||||
}
|
||||
} else {
|
||||
EditorGUILayout.HelpBox(editAndCompileDateString, MessageType.None);
|
||||
}
|
||||
}
|
||||
|
||||
void DrawIncludedFiles () {
|
||||
if(includesFileList != null && includesFileList.count > 0) {
|
||||
includesFileList.DoLayoutList();
|
||||
}
|
||||
}
|
||||
|
||||
void DrawCompileErrors () {
|
||||
if(inkFile.unhandledCompileErrors.Count == 0)
|
||||
return;
|
||||
EditorGUILayout.BeginVertical(GUI.skin.box);
|
||||
EditorGUILayout.HelpBox("Compiler bug prevented compilation of JSON file. Please help us fix it by reporting this as a bug.", MessageType.Error);
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
if(GUILayout.Button("Report via Github")) {
|
||||
Application.OpenURL("https://github.com/inkle/ink-unity-integration/issues/new");
|
||||
}
|
||||
if(GUILayout.Button("Report via Email")) {
|
||||
Application.OpenURL("mailto:info@inklestudios.com");
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
foreach(string compileError in inkFile.unhandledCompileErrors) {
|
||||
GUILayout.TextArea(compileError);
|
||||
}
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
void DrawErrors () {
|
||||
if(errorList != null && errorList.count > 0) {
|
||||
errorList.DoLayoutList();
|
||||
}
|
||||
}
|
||||
|
||||
void DrawWarnings () {
|
||||
if(warningList != null && warningList.count > 0) {
|
||||
warningList.DoLayoutList();
|
||||
}
|
||||
}
|
||||
|
||||
void DrawTODOList () {
|
||||
if(todosList != null && todosList.count > 0) {
|
||||
todosList.DoLayoutList();
|
||||
}
|
||||
}
|
||||
|
||||
void DrawFileContents () {
|
||||
float width = EditorGUIUtility.currentViewWidth-50;
|
||||
float height = EditorStyles.wordWrappedLabel.CalcHeight(new GUIContent(cachedTrimmedFileContents), width);
|
||||
EditorGUILayout.BeginVertical(EditorStyles.textArea);
|
||||
EditorGUILayout.SelectableLabel(cachedTrimmedFileContents, EditorStyles.wordWrappedLabel, GUILayout.ExpandHeight(true), GUILayout.Width(width), GUILayout.Height(height));
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6905e53703af64a70aa6eb42f98b047c
|
||||
timeCreated: 1460011343
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09e392e872101fd4885d68e71c7ab38b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Ink.Runtime;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ink.UnityIntegration.Debugging {
|
||||
[System.Serializable]
|
||||
public class InkHistoryContentItem {
|
||||
public enum ContentType {
|
||||
PresentedContent,
|
||||
ChooseChoice,
|
||||
PresentedChoice,
|
||||
EvaluateFunction,
|
||||
CompleteEvaluateFunction,
|
||||
ChoosePathString,
|
||||
Warning,
|
||||
Error,
|
||||
DebugNote
|
||||
}
|
||||
|
||||
public string content;
|
||||
public List<string> tags;
|
||||
public ContentType contentType;
|
||||
[SerializeField]
|
||||
JsonDateTime _time;
|
||||
public DateTime time {
|
||||
get {
|
||||
return _time;
|
||||
} private set {
|
||||
_time = value;
|
||||
}
|
||||
}
|
||||
|
||||
InkHistoryContentItem (string text, ContentType contentType) {
|
||||
this.content = text;
|
||||
this.contentType = contentType;
|
||||
this.time = DateTime.Now;
|
||||
}
|
||||
InkHistoryContentItem (string text, List<string> tags, ContentType contentType) {
|
||||
this.content = text;
|
||||
this.tags = tags;
|
||||
this.contentType = contentType;
|
||||
this.time = DateTime.Now;
|
||||
}
|
||||
|
||||
public static InkHistoryContentItem CreateForContent (string choiceText, List<string> tags) {
|
||||
return new InkHistoryContentItem(choiceText, tags, InkHistoryContentItem.ContentType.PresentedContent);
|
||||
}
|
||||
public static InkHistoryContentItem CreateForPresentChoice (Choice choice) {
|
||||
return new InkHistoryContentItem(choice.text.Trim(), InkHistoryContentItem.ContentType.PresentedChoice);
|
||||
}
|
||||
public static InkHistoryContentItem CreateForMakeChoice (Choice choice) {
|
||||
return new InkHistoryContentItem(choice.text.Trim(), InkHistoryContentItem.ContentType.ChooseChoice);
|
||||
}
|
||||
public static InkHistoryContentItem CreateForEvaluateFunction (string choiceText) {
|
||||
return new InkHistoryContentItem(choiceText, InkHistoryContentItem.ContentType.EvaluateFunction);
|
||||
}
|
||||
public static InkHistoryContentItem CreateForCompleteEvaluateFunction (string choiceText) {
|
||||
return new InkHistoryContentItem(choiceText, InkHistoryContentItem.ContentType.CompleteEvaluateFunction);
|
||||
}
|
||||
public static InkHistoryContentItem CreateForChoosePathString (string choiceText) {
|
||||
return new InkHistoryContentItem(choiceText, InkHistoryContentItem.ContentType.ChoosePathString);
|
||||
}
|
||||
public static InkHistoryContentItem CreateForWarning (string choiceText) {
|
||||
return new InkHistoryContentItem(choiceText, InkHistoryContentItem.ContentType.Warning);
|
||||
}
|
||||
public static InkHistoryContentItem CreateForError (string choiceText) {
|
||||
return new InkHistoryContentItem(choiceText, InkHistoryContentItem.ContentType.Error);
|
||||
}
|
||||
public static InkHistoryContentItem CreateForDebugNote (string choiceText) {
|
||||
return new InkHistoryContentItem(choiceText, InkHistoryContentItem.ContentType.DebugNote);
|
||||
}
|
||||
|
||||
struct JsonDateTime {
|
||||
public long value;
|
||||
public static implicit operator DateTime(JsonDateTime jdt) {
|
||||
return DateTime.FromFileTime(jdt.value);
|
||||
}
|
||||
public static implicit operator JsonDateTime(DateTime dt) {
|
||||
JsonDateTime jdt = new JsonDateTime();
|
||||
jdt.value = dt.ToFileTime();
|
||||
return jdt;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9eeba5396eb679a4fbf1e275b4da1b2c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bf969d7f2c98e470c9797844e20b20ee
|
||||
timeCreated: 1459342679
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e6bbfb931dd0d104199fc4542fc5a85d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,123 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ink.UnityIntegration {
|
||||
[InitializeOnLoad]
|
||||
public class InkUnityIntegrationStartupWindow : EditorWindow {
|
||||
const string editorPrefsKeyForVersionSeen = "Ink Unity Integration Startup Window Version Confirmed";
|
||||
const int announcementVersion = 2;
|
||||
|
||||
Vector2 scrollPosition;
|
||||
static int announcementVersionPreviouslySeen;
|
||||
|
||||
private static Texture2D _logoIcon;
|
||||
public static Texture2D logoIcon {
|
||||
get {
|
||||
if(_logoIcon == null) {
|
||||
_logoIcon = Resources.Load<Texture2D>("InkLogoIcon");
|
||||
}
|
||||
return _logoIcon;
|
||||
}
|
||||
}
|
||||
|
||||
static InkUnityIntegrationStartupWindow () {
|
||||
UnityEditor.EditorApplication.delayCall += TryCreateWindow;
|
||||
}
|
||||
|
||||
static void TryCreateWindow() {
|
||||
announcementVersionPreviouslySeen = EditorPrefs.GetInt(editorPrefsKeyForVersionSeen, -1);
|
||||
if(announcementVersion != announcementVersionPreviouslySeen) {
|
||||
ShowWindow();
|
||||
}
|
||||
}
|
||||
|
||||
public static void ShowWindow () {
|
||||
InkUnityIntegrationStartupWindow window = EditorWindow.GetWindow(typeof(InkUnityIntegrationStartupWindow), true, "Ink Update "+InkLibrary.unityIntegrationVersionCurrent.ToString(), true) as InkUnityIntegrationStartupWindow;
|
||||
window.minSize = new Vector2(200, 200);
|
||||
var size = new Vector2(520, 320);
|
||||
window.position = new Rect((Screen.currentResolution.width-size.x) * 0.5f, (Screen.currentResolution.height-size.y) * 0.5f, size.x, size.y);
|
||||
EditorPrefs.SetInt(editorPrefsKeyForVersionSeen, announcementVersion);
|
||||
}
|
||||
|
||||
void OnGUI ()
|
||||
{
|
||||
EditorGUILayout.BeginVertical();
|
||||
var areaSize = new Vector2(90,90);
|
||||
GUILayout.BeginArea(new Rect((position.width-areaSize.x)*0.5f, 15, areaSize.x, areaSize.y));
|
||||
EditorGUILayout.BeginVertical();
|
||||
EditorGUILayout.LabelField(new GUIContent(logoIcon), GUILayout.Width(areaSize.x), GUILayout.Height(areaSize.x*((float)logoIcon.height/logoIcon.width)));
|
||||
GUILayout.Space(5);
|
||||
EditorGUILayout.LabelField("Version "+InkLibrary.unityIntegrationVersionCurrent.ToString(), EditorStyles.centeredGreyMiniLabel);
|
||||
EditorGUILayout.LabelField("Ink version "+InkLibrary.inkVersionCurrent.ToString(), EditorStyles.centeredGreyMiniLabel);
|
||||
EditorGUILayout.EndVertical();
|
||||
GUILayout.EndArea();
|
||||
|
||||
GUILayout.Space(20+areaSize.y);
|
||||
|
||||
if(announcementVersionPreviouslySeen == -1) {
|
||||
EditorGUILayout.BeginVertical(GUI.skin.box);
|
||||
EditorGUILayout.LabelField("New to ink?", EditorStyles.boldLabel);
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
if (GUILayout.Button("About Ink")) {
|
||||
Application.OpenURL("https://www.inklestudios.com/ink/");
|
||||
}
|
||||
if (GUILayout.Button("❤️Support Us!❤️")) {
|
||||
Application.OpenURL("https://www.patreon.com/inkle");
|
||||
}
|
||||
if (GUILayout.Button("Close")) {
|
||||
Close();
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
{
|
||||
scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition);
|
||||
{
|
||||
// 1.0.0
|
||||
EditorGUILayout.BeginVertical(GUI.skin.box);
|
||||
EditorGUILayout.LabelField("🎉Version 1.0.0🎉:", EditorStyles.boldLabel);
|
||||
EditorGUILayout.LabelField("• Update ink to 1.0.0", EditorStyles.wordWrappedLabel);
|
||||
EditorGUILayout.LabelField("• Ink Editor Window: Allow resizing (some) panels", EditorStyles.wordWrappedLabel);
|
||||
EditorGUILayout.LabelField("• Ink Editor Window: Named content panel ", EditorStyles.wordWrappedLabel);
|
||||
EditorGUILayout.LabelField("• Ink Editor Window: Improved performance for large stories", EditorStyles.wordWrappedLabel);
|
||||
EditorGUILayout.LabelField("• Allow compiling include files that don't have the .ink file extension", EditorStyles.wordWrappedLabel);
|
||||
EditorGUILayout.LabelField("• Remove ability to use a custom inklecate (legacy compiler)", EditorStyles.wordWrappedLabel);
|
||||
EditorGUILayout.LabelField("• Fixes settings menu on 2020+", EditorStyles.wordWrappedLabel);
|
||||
EditorGUILayout.LabelField("• Improved migration from earlier versions", EditorStyles.wordWrappedLabel);
|
||||
EditorGUILayout.LabelField("• Moved persistent compilation tracking code from InkLibrary into InkCompiler", EditorStyles.wordWrappedLabel);
|
||||
EditorGUILayout.LabelField("• Use Unity's new ScriptableSingleton for InkLibrary, InkSettings and InkCompiler on 2020+", EditorStyles.wordWrappedLabel);
|
||||
EditorGUILayout.EndVertical();
|
||||
EditorGUILayout.BeginVertical(GUI.skin.box);
|
||||
// 0.9.71
|
||||
EditorGUILayout.BeginVertical(GUI.skin.box);
|
||||
EditorGUILayout.LabelField("Version 0.9.71:", EditorStyles.boldLabel);
|
||||
EditorGUILayout.LabelField("• Resolves some compilation issues.", EditorStyles.wordWrappedLabel);
|
||||
EditorGUILayout.EndVertical();
|
||||
EditorGUILayout.BeginVertical(GUI.skin.box);
|
||||
// 0.9.60
|
||||
EditorGUILayout.LabelField("Version 0.9.60:", EditorStyles.boldLabel);
|
||||
EditorGUILayout.LabelField("• Moved InkLibrary and InkSettings from Assets into Library and ProjectSettings.", EditorStyles.wordWrappedLabel);
|
||||
EditorGUILayout.LabelField(" ‣ InkLibrary should no longer be tracked in source control.", EditorStyles.wordWrappedLabel);
|
||||
EditorGUILayout.LabelField(" ‣ Changes to InkSettings must be migrated manually.", EditorStyles.wordWrappedLabel);
|
||||
EditorGUILayout.LabelField(" ‣ The InkLibrary and InkSettings files in your project folder should be deleted.", EditorStyles.wordWrappedLabel);
|
||||
EditorGUILayout.LabelField("• Added a divertable list of knots, stitches and other named content to the Ink Editor Window, replacing the Diverts subpanel.", EditorStyles.wordWrappedLabel);
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c436e11a2a780e14680d25152259eadd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ed82eefbb606deb49b637f3947d9cfb0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
@@ -0,0 +1,121 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09746d3311e36764faa38d0e982f6a2d
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
externalObjects: {}
|
||||
serializedVersion: 9
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: 1
|
||||
mipBias: -100
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: -1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 2
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 2
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
- serializedVersion: 2
|
||||
buildTarget: Nintendo Switch
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user