Open dh-milcho opened 5 years ago
Hi! This would be more appropriate at https://github.com/inkle/ink-unity-integration, but yeah; it sounds like the auto-prompt. We don't have build machines so this has never come up, but I'd be very interested in a solution, if you find one! I don't think Unity has a way of detecting it a build is done the "normal" way?
I believe you can check for "nographics" and "batchmode" by doing something like this:
string commandLineOptions = System.Environment.CommandLine;
if (commandLineOptions.Contains("-batchmode") )
{
Debug.Log("Batch mode!");
}
else if (commandLineOptions.Contains("-nographics") )
{
Debug.Log("No Graphcis Mode");
}
But yeah not sure what else we can do except removing the compiler from the project (or force the build machine to ignore it somehow). Should I post this in https://github.com/inkle/ink-unity-integration as well?
Oh great! I'm not set up to test this, but a fix that sounds good to me is to early out of InkPreBuildValidationCheck.PreprocessValidationStep if in batch/nographics mode (I'm not sure which is best). Ideally it'd log a warning if it would have popped up that dialogue box so you can find out if something went less than perfectly. If it works then feel free to submit a pull request or just send me a code snippet and I'll sort it.
Thanks!
We might as well just keep the issue here now we're close to solving it (we manage both projects at inkle anyway).
Hum, although your log makes it seem that it's the "Ink Library was rebuilt." that leads to the crash? Does the issue resolve just by removing the InkCompiler.cs, or do you remove the entire ink integration system?
We've been getting crashes on our build machine recently when building our game:
This seems to happen when we have the InkCompiler included in the project. When we remove the InkCompiler the problem disappears. We're using Unity 2019.1.8f1 with Ink 0.9.1
Let me know if I can share more logs or the crash dump to help resolve this. We don't want to remove the InkCopiler from the project just yet since it's useful for auto compiling. This is the stack trace:
One thing that might be responsible, which I noticed just now when making a build locally, is a popup that prompts you to build outdated Ink files when making the build. Maybe this can have something to do with it (since we're using the -nographics -batchmode Unity switch on the build machine)