inkle / ink-unity-integration

Unity integration for the open source ink narrative scripting language.
http://www.inklestudios.com/ink
Other
578 stars 101 forks source link

'UnityIntegration' does not exist in the namespace 'Ink' after upgrading to 1.1.5 #179

Closed olivermarshall2 closed 1 year ago

olivermarshall2 commented 1 year ago

Hi After upgrading to 1.1.5 I get the following error when compiling;

error CS0234: The type or namespace name 'UnityIntegration' does not exist in the namespace 'Ink' (are you missing an assembly reference?)

I'm adding this namespace in VS2019, which seems happy enough, and then using it to control InkPlayerWindow. Visual Studio seems happy enough and can autocomplete functions from UnityIntegration.

using Ink.UnityIntegration;

Any ideas why that would be? It worked fine in 1.1.4.

Olly

tomkail commented 1 year ago

I'm not sure why it would have worked before! UnityIntegration is an editor namespace, which means you can't include it in game code without #IF UNITY_EDITOR tags.

ethanlavinsky46 commented 1 year ago

I'm not sure why it would have worked before! UnityIntegration is an editor namespace, which means you can't include it in game code without #IF UNITY_EDITOR tags.

In that case, how would I handle the use of the "InkFile" namesake?

tomkail commented 1 year ago

You need to wrap any editor only code that’s in game code in those UNITY_EDITOR tags. Do you find you need InkFile.cs your game code? Can you tell me why?

On Fri, 17 Mar 2023 at 01:43, ethanlavinsky46 @.***> wrote:

I'm not sure why it would have worked before! UnityIntegration is an editor namespace, which means you can't include it in game code without #IF UNITY_EDITOR tags.

In that case, how would I handle the use of the "InkFile" namesake?

— Reply to this email directly, view it on GitHub https://github.com/inkle/ink-unity-integration/issues/179#issuecomment-1472988266, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJR3UD5ZRWKI7P7ZA2LQHLW4O6TRANCNFSM6AAAAAATY6UTBU . You are receiving this because you commented.Message ID: @.***>