{"action":"created","issue":{"url":"https://api.github.com/repos/inkle/ink/issues/7","repository_url":"https://api.github.com/repos/inkle/ink","labels_url":"https://api.github.com/repos/inkle/ink/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/inkle/ink/issues/7/comments","events_url":"https://api.github.com/repos/inkle/ink/issues/7/events","html_url":"https://github.com/inkle/ink/issues/7","id":140408767,"number":7,"title":"Unhandled exception in Mac Unity 5.3.1f1 with 0.1.2 ink-engine.dll","user":{"login":"jjsonick","id":2752875,"avatar_url":"https://avatars.githubusercontent.com/u/2752875?v=3","gravatar_id":"","url":"https://api.github.com/users/jjsonick","html_url":"https://github.com/jjsonick","followers_url":"https://api.github.com/users/jjsonick/followers","following_url":"https://api.github.com/users/jjsonick/following{/other_user}","gists_url":"https://api.github.com/users/jjsonick/gists{/gist_id}","starred_url":"https://api.github.com/users/jjsonick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjsonick/subscriptions","organizations_url":"https://api.github.com/users/jjsonick/orgs","repos_url":"https://api.github.com/users/jjsonick/repos","events_url":"https://api.github.com/users/jjsonick/events{/privacy}","received_events_url":"https://api.github.com/users/jjsonick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-12T19:11:11Z","updated_at":"2016-03-12T20:51:57Z","closed_at":null,"body":"I can get 0.1.2 inklecate to successfully run an .ink file in the Mac OS Terminal window, but when I try to integrate a created json file and dll into Unity 5.3.1f1 following the RunningYourInk doc guide, Unity throws an error at the  \"Story _inkStory;\" line of the example wrapper script the doc suggests.  Unity is complaining that 'Newtonsoft.Json' is not present.  I am using the provided mac inklecate and ink-engine.dll files from https://github.com/inkle/ink/releases, I did not compile on my own.\r\n\r\nError:\r\n\r\nUnhandled Exception: Mono.CSharp.InternalErrorException: Assets/Ink/Script.cs(7,14): Script ---> Mono.CSharp.InternalErrorException: Assets/Ink/Script.cs(13,15): Script._inkStory ---> System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies.\r\nFile name: 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'\r\n  at (wrapper managed-to-native) System.MonoCustomAttrs:GetCustomAttributesInternal (System.Reflection.ICustomAttributeProvider,System.Type,bool)\r\n  at System.MonoCustomAttrs.GetCustomAttributesBase (ICustomAttributeProvider obj, System.Type attributeType) [0x00000] in <filename unknown>:0 \r\n  at System.MonoCustomAttrs.GetCustomAttributes (ICustomAttributeProvider obj, System.Type attributeType, Boolean inherit) [0x00000] in <filename unknown>:0 \r\n  at System.MonoType.GetCustomAttributes (System.Type attributeType, Boolean inherit) [0x00000] in <filename unknown>:0 \r\n  at Mono.CSharp.AttributeTester.GetObsoleteAttribute (System.Type type) [0x00000] in <filename unknown>:0 \r\n  at Mono.CSharp.Expression.ResolveAsTypeTerminal (IMemberContext ec, Boolean silent) [0x00000] in <filename unknown>:0 \r\n  at Mono.CSharp.MemberBase.ResolveMemberType () [0x00000] in <filename unknown>:0 \r\n  at Mono.CSharp.MemberBase.Define () [0x00000] in <filename unknown>:0 \r\n  at Mono.CSharp.Field.Define () [0x00000] in <filename unknown>:0 \r\n  at Mono.CSharp.TypeContainer+MemberCoreArrayList.DefineContainerMembers () [0x00000] in <filename unknown>:0 \r\n  --- End of inner exception stack trace ---\r\n  at Mono.CSharp.TypeContainer+MemberCoreArrayList.DefineContainerMembers () [0x00000] in <filename unknown>:0 \r\n  at Mono.CSharp.TypeContainer.DefineContainerMembers (Mono.CSharp.MemberCoreArrayList mcal) [0x00000] in <filename unknown>:0 \r\n  at Mono.CSharp.Class.DefineContainerMembers (Mono.CSharp.MemberCoreArrayList list) [0x00000] in <filename unknown>:0 \r\n  at Mono.CSharp.TypeContainer.DoDefineMembers () [0x00000] in <filename unknown>:0 \r\n  at Mono.CSharp.Class.DoDefineMembers () [0x00000] in <filename unknown>:0 \r\n  at Mono.CSharp.TypeContainer.Define () [0x00000] in <filename unknown>:0 \r\n  at Mono.CSharp.ClassOrStruct.Define () [0x00000] in <filename unknown>:0 \r\n  at Mono.CSharp.Class.Define () [0x00000] in <filename unknown>:0 \r\n  at Mono.CSharp.RootContext.PopulateTypes () [0x00000] in <filename unknown>:0 \r\n  --- End of inner exception stack trace ---\r\n  at Mono.CSharp.RootContext.PopulateTypes () [0x00000] in <filename unknown>:0 \r\n  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0 \r\n  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 \r\n\r\nThe following assembly referenced from /Users/joshualawrence/Dropbox/Unity/Hypertext2/Assets/Ink/ink-engine.dll could not be loaded:\r\n     Assembly:   Newtonsoft.Json    (assemblyref_index=2)\r\n     Version:    7.0.0.0\r\n     Public Key: 30ad4fe6b2a6aeed\r\nThe assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/Users/joshualawrence/Dropbox/Unity/Hypertext2/Assets/Ink/).\r\n\r\nCould not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies.\r\nMissing method .ctor in assembly /Users/joshualawrence/Dropbox/Unity/Hypertext2/Assets/Ink/ink-engine.dll, type Newtonsoft.Json.JsonObjectAttribute\r\nCan't find custom attr constructor image: /Users/joshualawrence/Dropbox/Unity/Hypertext2/Assets/Ink/ink-engine.dll mtoken: 0x0a00002d\r\n\r\n\r\n\r\nScript:\r\n\r\n```\r\nusing UnityEngine;\r\nusing System.Collections;\r\nusing Ink.Runtime;\r\n\r\npublic class Script : MonoBehaviour {\r\n\r\n\t// Set this file to your compiled json asset\r\n    public TextAsset inkAsset;\r\n\r\n\t// The ink story that we're wrapping\r\n\tStory _inkStory;\r\n\r\n\tvoid Awake()\r\n\t{\r\n\t\t_inkStory = Story.CreateWithJson(inkAsset.text);\r\n\t}\r\n\r\n\t// Use this for initialization\r\n\tvoid Start () {\r\n\r\n\t}\r\n\r\n\t// Update is called once per frame\r\n\tvoid Update () {\r\n\r\n\t\twhile (story.canContinue) {\r\n\t\t\tConsole.WriteLine (story.Continue ());\r\n\t\t}\r\n\r\n\t\tif( story.currentChoices.Count > 0 ) \r\n\t\t{\r\n\t\t\tfor (int i = 0; i < story.currentChoices.Count; ++i) {\r\n\t\t\t\tChoiceInstance choice = story.currentChoices [i];\r\n\t\t\t\tConsole.WriteLine (\"CHOICE {0}: {1}\", (i + 1), choice.choiceText);\r\n\t\t\t}\r\n\t\t\tstory.ChooseChoiceIndex (index);\r\n\t\t}\r\n\r\n\t}\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/inkle/ink/issues/comments/195806271","html_url":"https://github.com/inkle/ink/issues/7#issuecomment-195806271","issue_url":"https://api.github.com/repos/inkle/ink/issues/7","id":195806271,"user":{"login":"jjsonick","id":2752875,"avatar_url":"https://avatars.githubusercontent.com/u/2752875?v=3","gravatar_id":"","url":"https://api.github.com/users/jjsonick","html_url":"https://github.com/jjsonick","followers_url":"https://api.github.com/users/jjsonick/followers","following_url":"https://api.github.com/users/jjsonick/following{/other_user}","gists_url":"https://api.github.com/users/jjsonick/gists{/gist_id}","starred_url":"https://api.github.com/users/jjsonick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjsonick/subscriptions","organizations_url":"https://api.github.com/users/jjsonick/orgs","repos_url":"https://api.github.com/users/jjsonick/repos","events_url":"https://api.github.com/users/jjsonick/events{/privacy}","received_events_url":"https://api.github.com/users/jjsonick/received_events","type":"User","site_admin":false},"created_at":"2016-03-12T20:51:57Z","updated_at":"2016-03-12T20:51:57Z","body":"Thanks! That solved that error. (After that, I also quickly learned I needed to rewrite bits of the test script (\"story\" -> \"_inkStory\" and \"Console.WriteLine\" --> \"Debug.Log\" for Unity, but that was easy enough.)\r\n\r\nShould I close this now, or let you close once the json dll's included in the Mac release download?"}}