Skip to content

Ink Scripted Importer #205

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 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e11d4e2
move version vars to ink file
SHiLLySiT Sep 1, 2024
18c0d21
first pass on pruning compiler system that will become obsolete with …
SHiLLySiT Sep 1, 2024
c4fc4fc
added ink scripted importer, changed inkfile into a scriptable object
SHiLLySiT Sep 2, 2024
aaa4b87
updated ink player to play InkFiles directly
SHiLLySiT Sep 2, 2024
65e81b8
remove now obsolete JSON files from demo
SHiLLySiT Sep 2, 2024
3665b32
updated demo script to use InkFile directly
SHiLLySiT Sep 2, 2024
53e3dd6
added additional ink files for testing includes
SHiLLySiT Sep 2, 2024
f14e5d9
updated demo scene
SHiLLySiT Sep 2, 2024
43f111d
fixed ink file inspector
SHiLLySiT Sep 2, 2024
d10d988
fixed ink compiler errors not being show in inspector or console
SHiLLySiT Sep 2, 2024
69b8a41
addressing remaining FIXMEs
SHiLLySiT Sep 2, 2024
794c17b
removed master and include files
SHiLLySiT Sep 2, 2024
0204945
fixed ink file inspector always disabled
SHiLLySiT Oct 6, 2024
56d6041
log story validation exceptions to console for easier debugging
SHiLLySiT Oct 6, 2024
38b73a4
removed code that allowed playing a JSON string without an ink file s…
SHiLLySiT Oct 6, 2024
bb45d14
switched demo scene back to default ink story
SHiLLySiT Oct 6, 2024
85d9a70
cleaner intialization for storyJson
SHiLLySiT Oct 6, 2024
4b8c16e
removed now obsolete settings from settings asset
SHiLLySiT Oct 6, 2024
64c4cf6
restored old log message format
SHiLLySiT Oct 6, 2024
73fe62a
reimplemented the printInkLogsInConsoleOnCompile flag in ink settings
SHiLLySiT Oct 6, 2024
4073f34
updated docs + comments
SHiLLySiT Oct 10, 2024
1e12395
moved files that are now required at runtime outside of the editor fo…
SHiLLySiT Feb 21, 2025
0b5980d
fixed files included in Ink not triggering reimports of main files wh…
SHiLLySiT Mar 10, 2025
3ee961f
added compileOnImport flag to allow disabling compilation of ink file…
SHiLLySiT Apr 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 0 additions & 60 deletions Assets/Editor/InkCompilerEditor.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Assets/Editor/InkCompilerEditor.cs.meta

This file was deleted.

29 changes: 0 additions & 29 deletions Assets/Editor/InkCompilerEditorWindow.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Assets/Editor/InkCompilerEditorWindow.cs.meta

This file was deleted.

107 changes: 0 additions & 107 deletions Assets/Editor/InkLibraryEditor.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Assets/Editor/InkLibraryEditor.cs.meta

This file was deleted.

29 changes: 0 additions & 29 deletions Assets/Editor/InkLibraryEditorWindow.cs

This file was deleted.

15 changes: 8 additions & 7 deletions Assets/Ink/Demos/Basic Demo/Basic Demo.unity
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 325.5, y: 0}
m_SizeDelta: {x: 346, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1104190023
MonoBehaviour:
Expand Down Expand Up @@ -313,8 +313,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 325.5, y: 0}
m_SizeDelta: {x: 651, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1300920512
MonoBehaviour:
Expand Down Expand Up @@ -500,8 +500,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 325.5, y: 0}
m_SizeDelta: {x: 365, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1767420454
MonoBehaviour:
Expand Down Expand Up @@ -774,7 +774,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 66e957d58a4584a8894329531ec0b096, type: 3}
m_Name:
m_EditorClassIdentifier:
inkJSONAsset: {fileID: 4900000, guid: 6cf48bb6d89824cc69e35b43f9a1aca6, type: 3}
inkFileAsset: {fileID: 6231892579173505729, guid: 1460e815e969b43b8a83a7caa8b48c27,
type: 3}
canvas: {fileID: 1908123726}
textPrefab: {fileID: 11456674, guid: 1aab6ef84d87c416f8f0b3e1ef3d77d2, type: 3}
buttonPrefab: {fileID: 11455116, guid: 37c108a6c38964f79a6621eccb33ddc1, type: 3}
Expand Down
4 changes: 4 additions & 0 deletions Assets/Ink/Demos/Basic Demo/Ink/included_story.ink
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
=== hello_world ===
hello world!

->END
10 changes: 10 additions & 0 deletions Assets/Ink/Demos/Basic Demo/Ink/included_story.ink.meta

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

1 change: 0 additions & 1 deletion Assets/Ink/Demos/Basic Demo/Ink/story 1.json

This file was deleted.

1 change: 0 additions & 1 deletion Assets/Ink/Demos/Basic Demo/Ink/story.json

This file was deleted.

8 changes: 0 additions & 8 deletions Assets/Ink/Demos/Basic Demo/Ink/story.json.meta

This file was deleted.

11 changes: 11 additions & 0 deletions Assets/Ink/Demos/Basic Demo/Ink/story_with_include.ink
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
INCLUDE included_story.ink

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed dictum, mauris sed tempus volutpat, augue nisi tincidunt justo, ut aliquam velit justo non velit.

* [Print hello world text] ->hello_world
* [Say hello] ->hello

=== hello

HELLO!
->END
10 changes: 10 additions & 0 deletions Assets/Ink/Demos/Basic Demo/Ink/story_with_include.ink.meta

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

5 changes: 3 additions & 2 deletions Assets/Ink/Demos/Basic Demo/Scripts/BasicInkExample.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using Ink.Runtime;
using Ink.UnityIntegration;
using UnityEngine;
using UnityEngine.UI;

Expand All @@ -15,7 +16,7 @@ void Awake () {

// Creates a new Story object with the compiled story which we can then play!
void StartStory () {
story = new Story (inkJSONAsset.text);
story = new Story (inkFileAsset.storyJson);
if(OnCreateStory != null) OnCreateStory(story);
RefreshView();
}
Expand Down Expand Up @@ -96,7 +97,7 @@ void RemoveChildren () {
}

[SerializeField]
private TextAsset inkJSONAsset = null;
private InkFile inkFileAsset = null;
public Story story;

[SerializeField]
Expand Down
Loading