Giter VIP home page Giter VIP logo

Comments (6)

rikkhill avatar rikkhill commented on June 27, 2024

Same problem, same platform, same setup.

I've spent a little while debugging this. I hadn't touched either C# or Unity until a couple of weeks ago, so I don't know how to remedy either of these things, but here are my findings:

  1. In the Linux version of Unity Editor, the editor progress bar prevents the delayCall callback from firing. Unfortunately, this callback is what clears the stack (and the progress bar), and if it never does this, the loop in Update() will continue to evaluate even if the whole stack has been processed, so it will eventually time out.

  2. If I close the progress bar, either programmatically or by manually closing it, my .inks will be compiled in a timely fashion, but OnProcessError() fires with a weird message string. It's of length 1 (so it passes the null/zero-length guards) but if I try and evaluate the Byte value of that character, I get System.OverflowException: Value is greater than Byte.MaxValue. So maybe it's getting garbage from stderr?

My current hacky workaround is to programmatically close the progress bar at the end of Update() if there are no files currently compiling, and to change the guard conditions on the error processor to discard messages of length less than a single character.

from ink-unity-integration.

tomkail avatar tomkail commented on June 27, 2024

from ink-unity-integration.

rikkhill avatar rikkhill commented on June 27, 2024

If you’d like out-of-the-box Linux compatibility, I’m happy to test and submit a PR with the following content:

  • Inclusion of /usr/bin/mono in the locations where the compiler script checks for Mono. (This isn’t necessarily where Mono lives. The Linux Unity Editor allegedly ships with its own copy of Mono, but this itself is broken out of the box, and the easiest fix is to just install the mono-complete package, which sticks it here) EDIT: I just noticed @Lattyware has an open pull request for custom mono path, which would supersede this.

  • Conditionalising all progress bar action on the runtime environment not being the Linux Unity Editor

  • Changing the guard conditions on the error handler to silence the (hopefully harmless and presumably idiosyncratic-to-Linux) length-1-inscrutable-character error. We might be able to do this more cleverly than checking the message length, like seeing if the first character is in the standard ASCII character set. If you're happy that Inklecate isn't ever going to try and legitimately return emojis or whatever to STDERR, this seems like a reasonable guard condition.

  • Default to Run Inklecate With Mono being true in Ink Settings, conditional on the runtime environment being Linux Unity Editor. I can’t think of any possible set of circumstances in which Linux users wouldn’t want this selected, unless they want the nostalgia of scratching their heads over Win32 errors.

This would cover all the gotchas I came across when running the plugin on Linux. @tomkail – are you happy with that as a self-contained set of changes? Any questions, comments, complaints or suggestions? @Lattyware – do you have any other potential Linux pitfalls to add?

from ink-unity-integration.

tomkail avatar tomkail commented on June 27, 2024

Seems the 1 character error is a unity 2017 and explains the issues other have had too. Fixed and merged, so that's only the first and third on your list left, which I'll leave for you since I can't test them.

from ink-unity-integration.

gboulard avatar gboulard commented on June 27, 2024

just got that same "Ink Compiler timed out" error (for the Assets/Plugin/Ink/example/Ink/story.ink file) and i'm on Windows ... so seems not specific to Linux.
this was during unity launch while a lot fo 3D heavy assets where imported, don't know if it has a link with this error or not.

from ink-unity-integration.

tomkail avatar tomkail commented on June 27, 2024

from ink-unity-integration.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.