Skip to content

Commit a0b734d

Browse files
tomkailclaude
andcommitted
Merge v2 (2.0.0) into master
Brings the 2.0 ScriptedImporter line to master. v2 is the source of truth for 2.0; master's remaining unique commits were either already replicated on v2 (DEV_README packaging note, exception-safe PublishingTools) or moot (re-serialising the old Packages/Ink folder, which 2.0 renamed). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 parents edb8a4b + a4d053b commit a0b734d

428 files changed

Lines changed: 4491 additions & 4092 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/Update-UPM-Branch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ jobs:
2222
uses: hecomi/create-upm-branch-action@main
2323
with:
2424
git-tag: ${{ steps.tag.outputs.name }}
25-
pkg-root-dir-path: Packages/Ink
26-
samples-dir: Packages/Ink/Demos
25+
pkg-root-dir-path: Packages/com.inkle.ink-unity-integration
26+
samples-dir: Packages/com.inkle.ink-unity-integration/Demos

Assets/DEV_README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Demos are packaged up as separate .unitypackage files.
66

77
## Which Unity version to package from
88
Do the packaging from the **minimum supported Unity version** — the `unity` field in
9-
`Packages/Ink/package.json` (currently **2022.3 LTS**) — not a newer editor.
9+
`Packages/com.inkle.ink-unity-integration/package.json` (currently **2022.3 LTS**) — not a newer editor.
1010

1111
- The **`.unitypackage`** (produced by "Prepare for publishing", then both attached to the GitHub
1212
release and uploaded to the Asset Store — it's the same file) ships serialized assets: the demo
@@ -22,7 +22,7 @@ Do the packaging from the **minimum supported Unity version** — the `unity` fi
2222

2323
## To update create a new release
2424
- Update CHANGELOG.md with a list of changes (these will then autopopulate)
25-
- Increase the version number in InkLibrary.cs
25+
- Increase the version number in InkEditorUtils.cs (unityIntegrationVersionCurrent)
2626
- Open the Ink Publishing Tools wizard with the 'Publishing/Show Helper Window' menu item
2727
- Click 'Prepare for publishing'. This will run a bunch of automated tasks and produce a .UnityPackage which we'll need later. **Do this from the minimum supported Unity version — see "Which Unity version to package from" above.**
2828
- You can click the 'Show Package' button to reveal the packages in Finder

Assets/Editor/InkCompilerEditor.cs

Lines changed: 0 additions & 60 deletions
This file was deleted.

Assets/Editor/InkCompilerEditorWindow.cs

Lines changed: 0 additions & 29 deletions
This file was deleted.

Assets/Editor/InkLibraryEditor.cs

Lines changed: 0 additions & 107 deletions
This file was deleted.

Assets/Editor/InkLibraryEditorWindow.cs

Lines changed: 0 additions & 29 deletions
This file was deleted.

Assets/Ink Dev Tools.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
using System.IO;
2+
using UnityEditor;
3+
using UnityEngine;
4+
using Ink.UnityIntegration;
5+
6+
// Package-author dev tool: simulates a 1.x -> 2.0 upgrade so the Ink Update window and its migrate
7+
// prompt can be tested. Lives under Assets (never shipped in the package); not for end users.
8+
public static class PretendUpgrade {
9+
const string legacyJsonPath = "Assets/Ink Dev Tools/LegacyStory.json";
10+
// Must match InkUnityIntegrationStartupWindow.editorPrefsKeyForVersionSeen.
11+
const string startupVersionSeenKey = "Ink Unity Integration Startup Window Version Confirmed";
12+
13+
[MenuItem("Ink Test/Simulate Upgrade (show update window)")]
14+
static void SimulateUpgrade () {
15+
// 1. Recreate a leftover 1.x compiled .json so the migrate prompt has something to find.
16+
Directory.CreateDirectory("Assets/Ink Dev Tools");
17+
File.WriteAllText(legacyJsonPath,
18+
"{\"inkVersion\":21,\"root\":[[\"^Pretend upgrade story.\",\"\\n\",[\"done\",null],null],\"done\",null],\"listDefs\":{}}");
19+
AssetDatabase.Refresh();
20+
21+
// 2. Refresh the migration cache so HasLegacyJson() reports true.
22+
InkMigrationTool.RecheckLegacyJson();
23+
24+
// 3. Mark the update window as never-seen, so this launch is treated as an upgrade.
25+
EditorPrefs.SetInt(startupVersionSeenKey, -1);
26+
27+
// 4. The window won't show if it's suppressed in settings.
28+
if (InkSettings.instance.suppressStartupWindow)
29+
Debug.LogWarning("Ink: 'Suppress Startup Window' is ON (Project Settings > Ink) — turn it off or the window won't auto-show on reload.");
30+
31+
// Show it now — this is what the automatic on-load path does after an upgrade.
32+
InkUnityIntegrationStartupWindow.ShowWindow();
33+
Debug.Log("Ink: simulated upgrade. The Ink Update window should show the changelog + a migrate prompt.");
34+
}
35+
36+
[MenuItem("Ink Test/Reset Upgrade Simulation")]
37+
static void ResetSimulation () {
38+
AssetDatabase.DeleteAsset(legacyJsonPath);
39+
InkMigrationTool.RecheckLegacyJson();
40+
Debug.Log("Ink: removed the simulated legacy .json.");
41+
}
42+
}

Assets/Editor/InkLibraryEditor.cs.meta renamed to Assets/Ink Dev Tools/Editor/PretendUpgrade.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)