Cradle icon indicating copy to clipboard operation
Cradle copied to clipboard

Getting an exception error

Open ManjitBedi opened this issue 5 years ago • 3 comments

I am using Unity 2018.3.7f1 on a Mac running OS Mojave & I am getting an exception when trying to import an HTML file exported from Twine.

NotSupportedException: The invoked member is not supported in a dynamic module.
System.Reflection.Emit.AssemblyBuilder.get_Location () (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
Cradle.Editor.StoryImporter+<LoadMacrosInto>d__30.MoveNext () (at C:/Projects/(external)/Cradle/unity/Cradle/Assets/Cradle/.src/Cradle.Editor/Editor/StoryImporter.cs:78)
System.Collections.Generic.HashSet`1[T].UnionWith (System.Collections.Generic.IEnumerable`1[T] other) (at <1b13ba6391c74847bbc3eddc86df7eee>:0)
System.Collections.Generic.HashSet`1[T]..ctor (System.Collections.Generic.IEnumerable`1[T] collection, System.Collections.Generic.IEqualityComparer`1[T] comparer) (at <1b13ba6391c74847bbc3eddc86df7eee>:0)
System.Collections.Generic.HashSet`1[T]..ctor (System.Collections.Generic.IEnumerable`1[T] collection) (at <1b13ba6391c74847bbc3eddc86df7eee>:0)
Cradle.Editor.StoryImporter.Transcode () (at C:/Projects/(external)/Cradle/unity/Cradle/Assets/Cradle/.src/Cradle.Editor/Editor/StoryImporter.cs:42)
Cradle.Editor.CradleAssetProcessor.OnPostprocessAllAssets (System.String[] importedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromAssetPaths) (at C:/Projects/(external)/Cradle/unity/Cradle/Assets/Cradle/.src/Cradle.Editor/Editor/CradleAssetProcessor.cs:83)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:141)

ManjitBedi avatar Mar 05 '19 01:03 ManjitBedi

Same issue here with just four passages and one linking to the others. Unity 2018.3.8f1

NotSupportedException: The invoked member is not supported in a dynamic module.
System.Reflection.Emit.AssemblyBuilder.get_Location () (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
Cradle.Editor.StoryImporter+<LoadMacrosInto>d__30.MoveNext () (at C:/Projects/(external)/Cradle/unity/Cradle/Assets/Cradle/.src/Cradle.Editor/Editor/StoryImporter.cs:78)
System.Collections.Generic.HashSet`1[T].UnionWith (System.Collections.Generic.IEnumerable`1[T] other) (at <1b13ba6391c74847bbc3eddc86df7eee>:0)
System.Collections.Generic.HashSet`1[T]..ctor (System.Collections.Generic.IEnumerable`1[T] collection, System.Collections.Generic.IEqualityComparer`1[T] comparer) (at <1b13ba6391c74847bbc3eddc86df7eee>:0)
System.Collections.Generic.HashSet`1[T]..ctor (System.Collections.Generic.IEnumerable`1[T] collection) (at <1b13ba6391c74847bbc3eddc86df7eee>:0)
Cradle.Editor.StoryImporter.Transcode () (at C:/Projects/(external)/Cradle/unity/Cradle/Assets/Cradle/.src/Cradle.Editor/Editor/StoryImporter.cs:42)
Cradle.Editor.CradleAssetProcessor.OnPostprocessAllAssets (System.String[] importedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromAssetPaths) (at C:/Projects/(external)/Cradle/unity/Cradle/Assets/Cradle/.src/Cradle.Editor/Editor/CradleAssetProcessor.cs:83)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at C:/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:141)
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag()
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Murazaki avatar Mar 16 '19 19:03 Murazaki

Seems like the issue is this : https://stackoverflow.com/questions/44446720/notsupportedexception-the-invoked-member-is-not-supported-in-a-dynamic-module-i

In the StoryImporter.cs here : https://github.com/daterre/Cradle/blob/981be1cca368a3c21c26d6760402206e373fb890/.src/Cradle.Editor/Editor/StoryImporter.cs#L77

Murazaki avatar Mar 16 '19 20:03 Murazaki

@mifozski has already fixed it : https://github.com/mifozski/Cradle

Murazaki avatar Mar 16 '19 20:03 Murazaki