-
Notifications
You must be signed in to change notification settings - Fork 95
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
Compilation Error when Dropping Multiple Ink files with INCLUDEs Into Unity #5
Comments
Let me know if you're still getting this! |
(Hotfix package available here: https://github.com/inkle/ink/releases/download/0.3.4/UnityInkIntegration0.3.4_Hotfix_2.unitypackage - hopefully fixes both of your issues!) |
Tom / Joe, I'll check this out as soon as I've got a spare moment. Thanks for taking a look. Obviously, you think you have a fix for these issues if you've issued a hotfix. I see a couple of change sets indicating some more / vs \ nonsense, shakes fist towards Microsoft HQ were those the potential source of the problem? Or is there more than that involved? Thanks!
|
It's possible! We're mac people, so it's a bit hard to tell - I think that's the last of those bugs, we've not had any more reports this evening. |
I'll certainly let you all know. I'm wondering if InkFile.cs should just have a 'sanitizeSlashes(string path)' method that it calls when any of its paths are modified or set so that callers of that class could just use whatever paths they have been given and InkFile.cs would take care of the rest. It seems like we're sprinkling that string replace line EVERYWHERE, and honestly, it only needs to be in a single place to protect the internal state of that object. If we did that, I think we could kill the \ replace usage in InkLibrary, as it would always return properly formatted paths. Anyways, just a few musings. Thanks, I'll let you know what I find out. |
Yeah, that's a really good idea - it's starting to get a bit messy. Because I can't easily test it I'm a little wary to do this myself right now, but if you fancy it, free to create pull request and I'll bring it in for the next release! |
Yeah, without a windows test station you're probably not as able to verify that its working here or there. Once I re-familiarize myself with the latest changes, I may take a crack at it. Thanks Tom! |
Closing as this issue is resolved by ink-unity-integration v0.3.4, Hotfix 2. Thanks! |
OS - Windows 7 64bit
ink-unity-integration version: 0.33
If I drop these three files into an ink/unity project by copying and pasting them from another directory compilation completes but the ink script fails to run in the ink player.
* Steps to reproduce*
When I select 'main' and try to run the ink script, I get this error in the console:
NullReferenceException: Object reference not set to an instance of an object
Ink.UnityIntegration.InkPlayerWindow.Play (UnityEngine.TextAsset storyJSONTextAsset) (at Assets/Plugins/Ink/Editor/Player Window/InkPlayerWindow.cs:87)
Ink.UnityIntegration.InkPlayerWindow.LoadAndPlay (UnityEngine.TextAsset storyJSONTextAsset) (at Assets/Plugins/Ink/Editor/Player Window/InkPlayerWindow.cs:70)
Ink.UnityIntegration.InkInspector.OnInspectorGUI () (at Assets/Plugins/Ink/Editor/Ink Inspector/Ink Inspector/InkInspector.cs:106)
Ink.UnityIntegration.ObjectEditor.OnInspectorGUI () (at Assets/Plugins/Ink/Editor/Ink Inspector/Ink Inspector/ObjectEditor.cs:31)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1231)
UnityEditor.DockArea:OnGUI()
state.txt
main.txt
some_ink_file.txt
The text was updated successfully, but these errors were encountered: