0
Fixed

2.0.0a8 InvalidCastException: Invalid variable binding: 5dde004c-9e48-4497-b78c-f1e454107901 is a Ludiq.Bolt.ClassAsset, expected Ludiq.Bolt.Generated.Utility.SOenum.

Ex-Crow 10 months ago updated by Lazlo Bonin (Lead Developer) 9 months ago 4

Not sure what this is about. Perhaps it doesn't like that I'm using a Class Asset as a pseudo Enum in Item Class Asset?

InvalidCastException: Invalid variable binding: 5dde004c-9e48-4497-b78c-f1e454107901 is a Ludiq.Bolt.ClassAsset, expected Ludiq.Bolt.Generated.Utility.SOenum.
Ludiq.Bolt.GeneratedClass`1[TInstance].BindVariable[T] (System.String guid) (at Assets/Ludiq/Bolt.Core/Runtime/Generation/GeneratedClass.cs:50)
Ludiq.Bolt.Generated.Items.Item.Bind () (at Assets/Ludiq.Generated/Transient/Scripts/Item.cs:76)
Ludiq.Bolt.ClassHost.InstantiateGenerated (System.Func`2[T,TResult] instantiator) (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/ClassHost.cs:383)
Ludiq.Bolt.ClassHost.InstantiateGenerated () (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/ClassHost.cs:414)
Ludiq.Bolt.ClassHost.Instantiate () (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/ClassHost.cs:246)
Ludiq.Bolt.ClassHost.Initialize () (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/ClassHost.cs:213)
Ludiq.Bolt.UnityClassHost.Awake () (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/UnityClassHost.cs:12)
Ludiq.Bolt.UnityClassHost.AwakeAndEnable () (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/UnityClassHost.cs:23)
Ludiq.Bolt.ClassAsset.OnPlayStateChange (UnityEditor.PlayModeStateChange state) (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/ClassAsset.cs:92)
UnityEditor.EditorApplication.Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange state) (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:405)







Bolt Version:
2.0.0a8
Unity Version:
2019.2.19
Platform(s):
PC
Scripting Backend:
Mono
.NET Version (API Compatibility Level):
.NET 4.x
Bolt 2

Finally managed to generate C# without errors but running the game produces these errors:



As mentioned above it looks like using Class Asset as variables inside other Class Assets currently doesn't work. 

Seeing it too.  Easy to reproduce.


Fixed (Unreleased)

Thanks, this will be fixed in Alpha 10.