Skip to content
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

Ink Scripted Importer #205

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open

Ink Scripted Importer #205

wants to merge 21 commits into from

Conversation

SHiLLySiT
Copy link

This aims to implement #53, which IMO, has some huge benefits:

  1. There is no longer separate source .INK files and compiled .JSON files that can get out of sync. Which means designers don't need to remember commit both .INK and JSON files, which can happen if they're testing/writing outside Unity with Inky.
  2. No need to deal with managing a ink file compilation queue, and fighting with the Editor. Ink files are compiled when imported, either when added or changed.
  3. You can expose InkFile references instead of generic TextAsset references in game code.
  4. This codebase becomes significantly less complex, and less prone to weird errors that have to deal with compiling assets outside of Unity's normal import process.

This PR is currently in a proof of concept stage: it hasn't been fully tested, but loading and running ink files at runtime and in the Editor is working.

The original implementation was written before Unity supported custom scripted importers, so many of the systems are now obsolete. Since this is a pretty big change, I wanted to open a PR to get an initial review to get some initial thoughts from the maintainers.

Interested in all feedback, but the question at the top of my mind: Do we need to expose includes and master files in the editor? While Ink at a language level still has these concepts, I'm not sure how important it is to expose these in Unity if its no longer important for compilation?

@SHiLLySiT SHiLLySiT marked this pull request as draft September 2, 2024 02:12
@tomkail
Copy link
Collaborator

tomkail commented Sep 2, 2024

Oh wow thanks for looking into this! I'll take a look this week if I find time. At a glance it looks lovely (so much less code!!)
I've pinged the Unity dev community on Discord (https://discord.gg/inkle) to take a look too, since this is a big change and I'd like as many devs as possible to confirm that it doesn't affect them negatively in any way.

@SHiLLySiT
Copy link
Author

Totally! I see your message in #ink-unity-integration-dev. I'll keep watch for questions/comments there too. Thanks!

@SHiLLySiT SHiLLySiT marked this pull request as ready for review October 6, 2024 23:45
@SHiLLySiT
Copy link
Author

@tomkail Okay I'm moving this out of draft as I've cleaned up the known things I needed to do, but I suspect there may be things I've missed since this was such a huge change. Feel free to tag me on any changes you want after doing a review. I'll loop back when I have the time 🤘

@tomkail
Copy link
Collaborator

tomkail commented Oct 7, 2024 via email

@SHiLLySiT
Copy link
Author

SHiLLySiT commented Oct 8, 2024

Sounds good to me! I'd rather give more people more time to test it out before its merged into main 😅

I don't appear to have the option to change the base branch to a new (non-existing) branch tho. If you make a beta branch I can update the PR!

@SHiLLySiT
Copy link
Author

I forgot to update the docs, so I snuck another commit in 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants