maurovanetti/inkfungus-template

Compatibility issues with Ink 1.0.0

jjsonick opened this issue · 3 comments

With Unity 2019.4.21f1, after installing Fungus 3.13.4, Ink 1.0, and Ink-Fungus Gateway 1.0, I initially get this compiler complaint:

Assets\InkFungus\Scripts\NarrativeDirector.cs(943,20): error CS0104: 'Path' is an ambiguous reference between 'Ink.Runtime.Path' and 'System.IO.Path'

I don't know if this is the best way to do it, but I can get that error to go away by making these changes to lines 941-949 in NarrativeDirector.cs:

private static string GetSavePath(string slot)
        {
            string path2 = System.IO.Path.Combine(Application.persistentDataPath, slot + ".json");
            return path2;
            //return Path.Combine(Application.persistentDataPath, slot + ".json");
        }

        private static string GetFlagSavePath(string slot, string flagName)
        {
            string path2 = System.IO.Path.Combine(Application.persistentDataPath, slot + "." + flagName + ".json");
            return path2;
            //return Path.Combine(Application.persistentDataPath, slot + "." + flagName + ".json");
        }

But when running the Interactive Documentation, I get this console error after the question 'What do you want to know about the Ink-Fugus Gateway?":

NullReferenceException: Object reference not set to an instance of an object
Ink.Runtime.StoryStateWrapper.get_CPath () (at Assets/InkFungus/Scripts/StoryStateWrapper.cs:38)

And then continuing on in the documentation demo, the console repeatedly (maybe at each knot?) gives this error:

Autosave failed at preliminary stage: Story is already in background saving mode, can't call CopyStateForBackgroundThreadSave again!

The Documentation demo seems to work despite the NullReference error and repeated spamming of the autosave error, and I wonder if the autosave error is the result of my change above to the save directory code and/or if it and the other errors have to do with changes in Ink 1.0, which I think released just slightly after your most recent update the Ink-Fungus Integration?

Thank you very much for creating this report. This is definitely due to the new release of Ink (1.0.0); unfortunately it occurred exactly two days after the release of the Ink-Fungus Gateway 1.0!
Your fix of the ambiguous reference is correct, but the other problem is likely to be unrelated. I'm creating two subissues to keep track of everything.
I've already released a 1.0.1 version on the Asset Store to prevent the blocking bug and I'm trying to fix the other problem as soon as possible.

I've renamed this issue to keep it as a kind of container for everything related with updating to Ink 1.0.0.

Everything looks OK now! I'm closing this.