Skip to content

Update to Inkle's Main state #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 132 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
3fee748
Enables Ink templating
May 18, 2021
8d8a499
Fixes a bug in startup window
tomkail Sep 15, 2021
31bc4d5
removes an unused field
tomkail Sep 15, 2021
dab9ca8
Save the files marked to compile automatically in InkSettings, since …
tomkail Sep 15, 2021
a223a4d
Ink Player Window updates!
tomkail Sep 15, 2021
e09f671
Replace my "is this the first launch of unity" boilerplate with Sessi…
tomkail Sep 15, 2021
89dde18
Improves the threading code for ink compiler, hopefully fixing a rare…
tomkail Sep 15, 2021
b74a1ca
Some ink library refactors
tomkail Sep 15, 2021
e1233c9
Various updates and fixes for the compiler/library
tomkail Sep 20, 2021
e5e5102
Various updates and fixes for the compiler/library
tomkail Sep 20, 2021
fd92f9f
Merge branch 'master' of https://github.com/inkle/ink-unity-integration
tomkail Sep 20, 2021
8b6cd2d
draw headers in ink inspector
tomkail Sep 22, 2021
e16b0b3
better gui
tomkail Sep 22, 2021
5c2f0bb
Test for weird include hierarchy
tomkail Sep 22, 2021
ef6a805
draw include file list for included files
tomkail Sep 22, 2021
530e099
Updates story to bring it up to date with expectations of this package
tomkail Dec 15, 2021
0b1ed42
More efficient ink file connection rebuild step
tomkail Dec 15, 2021
227944a
Moves ink logo code to editor utils
tomkail Dec 15, 2021
69e2f67
Some fixes for variable editing for the player window
tomkail Dec 15, 2021
de2ffd6
Minor log update
tomkail Dec 15, 2021
7b9dedf
Enables setting included ink files to also compile as if they were ma…
tomkail Dec 15, 2021
086d632
Allows inkpostprocessor to more accurately process renamed/moved ink …
tomkail Dec 15, 2021
279e779
Improves immediate mode ink compilation
tomkail Dec 15, 2021
fe3223e
removes redundant save call
tomkail Dec 15, 2021
087b3c7
ensure new ink files search for their json automatically
tomkail Dec 15, 2021
0978fd0
ink inspector editor update
tomkail Dec 15, 2021
ba9053b
Improves ink settings editor
tomkail Dec 15, 2021
3a339f8
new functions for adding and finding ink files in the library
tomkail Dec 15, 2021
6ec0952
Fixes the ink settings file when using sourcecontrol
tomkail Dec 15, 2021
4d52b80
Improved ink file creation tools
tomkail Dec 15, 2021
0c2d62f
Optimise an ink library call
tomkail Dec 15, 2021
cc37963
Make the ink player window less spammy when exiting/entering play mode
tomkail Dec 15, 2021
91137c2
renames the save/load state panel
tomkail Dec 15, 2021
9fcec00
Ink player window refactor
tomkail Dec 15, 2021
6037b66
Fixes some rare import bugs
tomkail Feb 16, 2022
bfeb25c
minor refactor
tomkail Feb 16, 2022
9f087a2
Removes some unwanted packages
tomkail Feb 16, 2022
896a406
Story State fields in InkPlayerWindow
tomkail Feb 16, 2022
7aa2967
Show type by variables in ink player window
tomkail Feb 16, 2022
5d480df
Moves ink file OpenInEditor to InkEditorUtils, and fix it to correctl…
tomkail Feb 16, 2022
44f6631
comment
tomkail Feb 16, 2022
2e28117
Change order of || statements to reduce performance costs
tomkail Feb 16, 2022
abbb3b4
Some missing bits for a prior commit
tomkail Feb 16, 2022
33b8759
Improves ink compiler progress bar code
tomkail Feb 16, 2022
f2b526e
Use Progress API for ink compiler
tomkail Feb 16, 2022
b3e6a2c
Upgrade version to 1.0.3
tomkail Feb 16, 2022
defa9d4
update gitignore
tomkail Feb 16, 2022
17b5a36
meta changes
tomkail Feb 16, 2022
d6d6650
Updates to the ink library
tomkail Mar 24, 2022
10a3cb4
Fixes moving json files
tomkail Mar 25, 2022
76867b2
Ensure allowExternalFunctionFallbacks is set true
tomkail Mar 25, 2022
ef2b0e3
Merge branch 'master' into master
tomkail Mar 25, 2022
7145be5
Merge pull request #152 from videlais/master
tomkail Mar 25, 2022
85c16df
Improvements for copying/saving storystate from the player window
tomkail Jul 20, 2022
d608e1e
Breaking change - OnCompileInk now returns a list of the ink files co…
tomkail Oct 3, 2022
ae6d7f5
Update README.md
tomkail Oct 12, 2022
37f7a42
Merge branch 'InkCompilationEvent'
tomkail Oct 20, 2022
ce1fe40
Update ink to 1.1.1
tomkail Oct 20, 2022
19150f7
Various changelogs etc for 1.1.1
tomkail Oct 20, 2022
5e681be
Use the new asset store tools plugin
tomkail Oct 20, 2022
2a58359
Recompile ink with new version!
tomkail Oct 20, 2022
44e0406
fills out the changelog some more
tomkail Oct 20, 2022
dcd1c0c
Support for tags in choices in the editor window
tomkail Oct 23, 2022
13a3320
Update UPM branch script
tomkail Oct 23, 2022
55aa2cf
Move workflow
tomkail Oct 23, 2022
47752b3
Update UPM branch script again
tomkail Oct 23, 2022
639f9b5
Update README.md
tomkail Oct 23, 2022
059f6c0
Splits the licence from hte readme
tomkail Oct 23, 2022
68e38f2
Adds samples dir to UPM branch updater
tomkail Oct 23, 2022
584a0de
Rename package name to just "Ink"
tomkail Oct 23, 2022
3e528b5
Merge branch 'master' of https://github.com/inkle/ink-unity-integration
tomkail Oct 23, 2022
5b9a611
Note about demo folder
tomkail Oct 23, 2022
b8d2786
Removes unused meta file
tomkail Oct 24, 2022
5314d3a
Splits licence and state lack of official support pre 2020
tomkail Oct 24, 2022
28598cb
Uses inkle rather than inklestudios as package manifest name
tomkail Oct 24, 2022
f62215e
Update UPM branch action now runs using x.x.x rather than vx.x.x
tomkail Oct 25, 2022
095f222
Update version to 1.1.2 so we can trigger OpenUPM (bah)
tomkail Oct 25, 2022
6d77eca
Note for the publishing tools
tomkail Oct 26, 2022
46d245e
removes duplicate script
tomkail Oct 26, 2022
4d378db
Fixes editor window tag bug
tomkail Oct 26, 2022
9a297a7
adds observation icon
tomkail Oct 26, 2022
9a91017
Adds "CanRestart" function to editor window
tomkail Oct 26, 2022
6a48c13
renames and comments a caching variable for clarity
tomkail Oct 26, 2022
c87db43
removes duplicate script
tomkail Oct 26, 2022
fd55c04
Update to 1.1.3
tomkail Oct 26, 2022
902c154
Update README.md
tomkail Oct 27, 2022
b644d83
Update README.md
tomkail Oct 30, 2022
5d52dc4
Better and more asserts to catch a weird bug where ink files arent pa…
tomkail Dec 1, 2022
b69812d
Adds a "suppress startup window" option, fixes inksettings never bein…
tomkail Dec 1, 2022
120afd0
Merge branch 'master' of https://github.com/inkle/ink-unity-integration
tomkail Dec 1, 2022
1fabdf9
Update build instructions, raise version to 1.1.5 to trigger UPM
tomkail Dec 2, 2022
50ba973
Adds a new test, for Include Of Include compilation
tomkail Dec 16, 2022
1379cbc
Current work on include refactor. Better than what we had before, but…
tomkail Dec 16, 2022
780b848
A rework of the includes system
tomkail Dec 17, 2022
a95eb83
A better way to open files via the OpenInEditor function
tomkail Dec 17, 2022
cb6b083
Merge branch 'includes_refactor' into development
tomkail Dec 17, 2022
e53b637
updated changelog
tomkail Dec 17, 2022
b056416
Compile ink automatically
tomkail Dec 17, 2022
90e4851
Some refactoring for the ink player window. Prevent it from force-sho…
tomkail Feb 19, 2023
9b75c43
Update to 1.1.7
tomkail Feb 20, 2023
8087523
Some performance updates for the ink player window. We no longer dete…
tomkail Apr 26, 2023
ce0ee6e
fix typos in search bar GUI style assignment
Jul 2, 2023
ce99233
Merge pull request #186 from forkingpath/master
tomkail Jul 2, 2023
6ae3f72
Ensures that the search style is found even after unity fixed their typo
tomkail Jul 11, 2023
fb93038
Tidy using statements
tomkail Jul 11, 2023
968093f
Startup window now reads change log from the CHANGELOG.md file
tomkail Jul 11, 2023
7ad86b4
Update Unity to 2020.3
tomkail Jul 11, 2023
7fde869
Increase version to 1.1.8
tomkail Jul 11, 2023
fb81a69
documentation PDFs for the unity asset store
tomkail Nov 9, 2022
9780e8f
update changelog
tomkail Jul 11, 2023
dbaeae9
Move documentation PDFs into a Documentation folder
tomkail Jul 11, 2023
77669fe
Adds ability to get the location of the package, handy for finding fi…
tomkail Jul 12, 2023
c0120cc
Updated Demo package
tomkail Jul 12, 2023
5668568
Update PublishingTools system to ensure it copies the Changelog into …
tomkail Jul 13, 2023
96cc121
Updated readme
tomkail Jul 13, 2023
db0fbce
Removes unused meta files
tomkail Jul 13, 2023
5454043
Updated demo package
tomkail Jul 13, 2023
e569e98
Update the other readme (gah!)
tomkail Jul 13, 2023
1b4e7a1
Significantly improves performance of IsInkFile
tomkail Jul 14, 2023
22797e8
Resolves some warnings in InkFile
tomkail Jul 14, 2023
cf3babd
Some work on adding #defines automatically. Not currently user facing…
tomkail Jul 14, 2023
f621587
Automatically adds define symbols for the current platform. Adds an o…
tomkail Oct 3, 2023
08d6870
Removes AssetSaver in InkSettings, since its no longer necessary
tomkail Oct 3, 2023
a37418a
Swap DateTime.Now to DateTime.UtcNow so to avoid an OSX Desktop Permi…
tomkail Oct 4, 2023
737bcb9
Removes some upgrade code from 0.9.71. It's unlikely that anyone will…
tomkail Oct 4, 2023
a8cc6ef
Alllll the latest code
tomkail Jan 21, 2024
0153b88
ink 1.2.0
joethephish Jun 10, 2024
700f6e8
Updates the plugin to expect Ink 1.2.0
tomkail Jul 12, 2024
2e853e5
Removed comments.
petalpatter Jul 25, 2024
ac5216f
Merge pull request #204 from petals4013/patch-1
tomkail Jul 31, 2024
e7a3df1
Upgrade version to 1.2.1
tomkail Jul 31, 2024
b19106a
Some updates to the publishing system
tomkail Jul 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 26 additions & 0 deletions .github/workflows/Update-UPM-Branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Update-UPM-Branch

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Tag name
id: tag
run: echo ::set-output name=name::${GITHUB_REF#refs/tags/v}

- name: Create UPM Branches
uses: hecomi/create-upm-branch-action@main
with:
git-tag: ${{ steps.tag.outputs.name }}
pkg-root-dir-path: Packages/Ink
samples-dir: Packages/Ink/Demos
27 changes: 26 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,32 @@
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Uu]nityGenerated/
[Bb]uild/
[Bb]uilds/
[Ll]ogs/

# MemoryCaptures can get excessive in size.
# They also could contain extremely sensitive data
/[Mm]emoryCaptures/

# Recordings can get excessive in size
/[Rr]ecordings/

# Autogenerated Jetbrains Rider plugin
/[Aa]ssets/Plugins/Editor/JetBrains*

# Visual Studio cache directory
.vs/

# Gradle cache directory
.gradle/

# Packed Addressables
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*

# Temporary auto-generated Android Assets
/[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/*

# =============================================== #
# Visual Studio / MonoDevelop / Sublime generated #
Expand Down
17 changes: 9 additions & 8 deletions Assets/DEV_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ This plugin is now designed to be imported as a UPM Package.
Our approach is to point [OpenUPM at a Git Repo](https://openupm.com/packages/com.inklestudios.ink-unity-integration/) with the assets in the Packages folder.
Demos are packaged up as separate .unitypackage files.

## To update the UPM
- (optional) Increase the version number in InkLibrary.cs
- Commit any changes and push to Master.
- Draft a new release. (You may also want to add a .unitypackage to the release)

### Exporting a .unitypackage
- Run Publishing > Create .unitypackage
This moves all the files from Packages into Assets, creates a package (also including the Demos folder), and then moves the files back to Packages.
## To update create a new release
- Update CHANGELOG.md with a list of changes (these will then autopopulate)
- Increase the version number in InkLibrary.cs
- Open the Ink Publishing Tools wizard with the 'Publishing/Show Helper Window' menu item
- Click 'Prepare for publishing'. This will run a bunch of automated tasks and produce a .UnityPackage which we'll need later.
- You can click the 'Show Package' button to reveal the packages in Finder
- Commit any changes and push to Master, tagging with the version in the format (x.x.x)
- This causes an Action to trigger, which will create a UPM branch automatically. [Check it succeeded on OpenUPM](https://openupm.com/packages/com.inkle.ink-unity-integration/?subPage=pipelines)
- Click 'Draft GitHub Release'. This will take you to a page with most of the fields auto-populated. Drag the new package into the release and hit Publish.
60 changes: 60 additions & 0 deletions Assets/Editor/InkCompilerEditor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
using System.Reflection;
using UnityEditor;
using UnityEngine;

namespace Ink.UnityIntegration {

[CustomEditor(typeof(InkCompiler))]
public class InkCompilerEditor : Editor {

#pragma warning disable
protected InkCompiler data;

public void OnEnable() {
data = (InkCompiler) target;
}

public bool RequiresConstantRepaint() {
return true;
}

public override void OnInspectorGUI() {
serializedObject.Update();
var type = typeof(InkCompiler);

EditorGUILayout.Toggle("Executing Compilation Stack", InkCompiler.executingCompilationStack);

EditorGUILayout.PropertyField(serializedObject.FindProperty("pendingCompilationStack"));
EditorGUILayout.PropertyField(serializedObject.FindProperty("compilationStack"));
// this.DrawDefaultInspector();

var buildBlockedInfo = type.GetField("buildBlocked", BindingFlags.NonPublic | BindingFlags.Static);
bool buildBlocked = (bool)buildBlockedInfo.GetValue(null);
EditorGUILayout.Toggle("Build Blocked", buildBlocked);

var playModeBlockedInfo = type.GetField("playModeBlocked", BindingFlags.NonPublic | BindingFlags.Static);
bool playModeBlocked = (bool)playModeBlockedInfo.GetValue(null);
EditorGUILayout.Toggle("Play Mode Blocked", playModeBlocked);

var hasLockedUnityCompilationInfo = type.GetField("hasLockedUnityCompilation", BindingFlags.NonPublic | BindingFlags.Static);
bool hasLockedUnityCompilation = (bool)hasLockedUnityCompilationInfo.GetValue(null);
EditorGUILayout.Toggle("Has Locked Compilation", hasLockedUnityCompilation);

EditorGUILayout.BeginHorizontal();
var disallowedAutoRefreshInfo = type.GetProperty("disallowedAutoRefresh", BindingFlags.NonPublic | BindingFlags.Static);
bool disallowedAutoRefresh = (bool)disallowedAutoRefreshInfo.GetValue(null);
EditorGUILayout.Toggle("DisallowedAutoRefresh", disallowedAutoRefresh);
#if UNITY_2019_4_OR_NEWER
if(GUILayout.Button("AllowAutoRefresh")) {
AssetDatabase.AllowAutoRefresh();
}
EditorGUILayout.EndHorizontal();
#endif


if(GUI.changed && target != null)
EditorUtility.SetDirty(target);
serializedObject.ApplyModifiedProperties();
}
}
}
11 changes: 11 additions & 0 deletions Assets/Editor/InkCompilerEditor.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions Assets/Editor/InkCompilerEditorWindow.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using UnityEditor;
using UnityEngine;

namespace Ink.UnityIntegration {
public class InkCompilerEditorWindow : EditorWindow {

#pragma warning disable
Editor InkCompilerEditor;

[MenuItem("Window/Ink Compiler Editor Window")]
static void Init() {
var window = (InkCompilerEditorWindow)GetWindow(typeof(InkCompilerEditorWindow));
window.titleContent = new GUIContent("Ink Compiler Window");
window.Show();
}

public void OnEnable() {
InkCompilerEditor = Editor.CreateEditor(InkCompiler.instance);
}

void OnInspectorUpdate() {
Repaint();
}

public void OnGUI() {
InkCompilerEditor.OnInspectorGUI();
}
}
}
11 changes: 11 additions & 0 deletions Assets/Editor/InkCompilerEditorWindow.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 6 additions & 22 deletions Assets/Editor/InkLibraryEditor.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;

namespace Ink.UnityIntegration {

Expand All @@ -26,7 +25,7 @@ protected override void OnHeaderGUI () {
GUILayout.FlexibleSpace();


EditorGUI.BeginDisabledGroup(InkCompiler.compiling);
EditorGUI.BeginDisabledGroup(InkCompiler.executingCompilationStack);
if (GUILayout.Button(new GUIContent("Rebuild Library", "Rebuilds the ink library. Do this if you're getting unusual errors"), EditorStyles.miniButton)) {
InkLibrary.Rebuild();
}
Expand Down Expand Up @@ -54,23 +53,13 @@ protected override void OnHeaderGUI () {
public override void OnInspectorGUI() {
serializedObject.Update();

EditorGUI.BeginDisabledGroup(InkCompiler.compiling);
EditorGUI.BeginDisabledGroup(InkCompiler.executingCompilationStack);
if (GUILayout.Button(new GUIContent("Rebuild Library", "Rebuilds the ink library. Do this if you're getting unusual errors"), EditorStyles.miniButton)) {
InkLibrary.Rebuild();
}
EditorGUI.EndDisabledGroup();

EditorGUILayout.Toggle("HasLockedUnityCompilation", InkCompiler.hasLockedUnityCompilation);
if(GUILayout.Button("Unlock")) {
EditorApplication.UnlockReloadAssemblies();
}
#if UNITY_2019_4_OR_NEWER
if(GUILayout.Button("AllowAutoRefresh")) {
AssetDatabase.AllowAutoRefresh();
}
#endif

if(InkCompiler.compiling) {
if(InkCompiler.executingCompilationStack) {
Rect r = EditorGUILayout.BeginVertical();
EditorGUI.ProgressBar(r, InkCompiler.GetEstimatedCompilationProgress(), "Compiling...");
GUILayout.Space(EditorGUIUtility.singleLineHeight);
Expand All @@ -89,7 +78,7 @@ public override void OnInspectorGUI() {
EditorGUILayout.HelpBox("All Ink files marked to compile automatically are compiled", MessageType.Info);
}
}
EditorGUI.BeginDisabledGroup(InkCompiler.compiling);
EditorGUI.BeginDisabledGroup(InkCompiler.executingCompilationStack);
if (GUILayout.Button(new GUIContent("Recompile All", "Recompiles all files marked to compile automatically."))) {
InkEditorUtils.RecompileAll();
}
Expand All @@ -108,13 +97,8 @@ public override void OnInspectorGUI() {

EditorGUI.BeginDisabledGroup(true);
EditorGUILayout.PropertyField(serializedObject.FindProperty("inkLibrary"), true);
EditorGUILayout.PropertyField(serializedObject.FindProperty("pendingCompilationStack"), true);
EditorGUILayout.PropertyField(serializedObject.FindProperty("compilationStack"), true);
EditorGUI.EndDisabledGroup();

if (GUILayout.Button(new GUIContent("Clear Compilation Stacks"))) {
InkCompiler.ClearCompilationStacks();
}
if(GUI.changed && target != null)
EditorUtility.SetDirty(target);
serializedObject.ApplyModifiedProperties();
Expand Down
6 changes: 2 additions & 4 deletions Assets/Editor/InkLibraryEditorWindow.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;

namespace Ink.UnityIntegration {
public class InkLibraryEditorWindow : EditorWindow {
Expand All @@ -11,7 +9,7 @@ public class InkLibraryEditorWindow : EditorWindow {

[MenuItem("Window/Ink Library Editor Window")]
static void Init() {
var window = (InkLibraryEditorWindow)EditorWindow.GetWindow(typeof(InkLibraryEditorWindow));
var window = (InkLibraryEditorWindow)GetWindow(typeof(InkLibraryEditorWindow));
window.titleContent = new GUIContent("Ink Library Window");
window.Show();
}
Expand Down
Loading