0
Under Review

InvalidConversionException: Cannot convert from 'UnityEngine.Vector3' to 'UnityEngine.Transform'. Ludiq.ConversionUtility.Convert (System.Object value, System.Type type, Ludiq.ConversionUtility+ConversionType conversionType) (at C:/Users/lazlo/Projects/Lu

Aftab Ali 2 weeks ago • updated by Von Betelgeuse 2 days ago 2

InvalidConversionException: Cannot convert from 'UnityEngine.Vector3' to 'UnityEngine.Transform'.

Ludiq.ConversionUtility.Convert (System.Object value, System.Type type, Ludiq.ConversionUtility+ConversionType conversionType) (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Runtime/Reflection/ConversionUtility.cs:472)

Ludiq.ConversionUtility.Convert (System.Object value, System.Type type) (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Runtime/Reflection/ConversionUtility.cs:215)

Bolt.Flow.GetValue (Bolt.ValueInput input, System.Type type) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Runtime/Flow.cs:422)

Bolt.MemberUnit.UpdateTarget (Bolt.Flow flow) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Runtime/Framework/Codebase/MemberUnit.cs:124)

Bolt.GetMember.Value (Bolt.Flow flow) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Runtime/Framework/Codebase/GetMember.cs:56)

Bolt.Flow.GetValueDelegate (Bolt.ValueOutput output) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Runtime/Flow.cs:469)

Bolt.Flow.GetValue (Bolt.ValueOutput output) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Runtime/Flow.cs:413)

Bolt.Flow.GetValue (Bolt.ValueInput input) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Runtime/Flow.cs:369)

Bolt.Flow.GetValue (Bolt.ValueInput input, System.Type type) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Runtime/Flow.cs:422)

Bolt.Flow.GetConvertedValue (Bolt.ValueInput input) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Runtime/Flow.cs:432)

Bolt.InvokeMember.Invoke (Bolt.Flow flow) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Runtime/Framework/Codebase/InvokeMember.cs:174)

Bolt.InvokeMember.Enter (Bolt.Flow flow) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Runtime/Framework/Codebase/InvokeMember.cs:250)

Bolt.Flow.InvokeDelegate (Bolt.ControlInput input) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Runtime/Flow.cs:303)

Bolt.Flow.Invoke (Bolt.ControlOutput output) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Runtime/Flow.cs:209)

Bolt.Flow.Run (Bolt.ControlOutput port, System.Boolean coroutine) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Runtime/Flow.cs:178)

Bolt.EventUnit`1[TArgs].Run (Bolt.Flow flow) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Runtime/Framework/Events/EventUnit.cs:133)

Bolt.EventUnit`1[TArgs].Trigger (Ludiq.GraphReference reference, TArgs args) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Runtime/Framework/Events/EventUnit.cs:110)

Bolt.EventUnit`1+<>c__DisplayClass14_0[TArgs].b__0 (TArgs args) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Flow/Runtime/Framework/Events/EventUnit.cs:65)

Bolt.EventBus.Trigger[TArgs] (Bolt.EventHook hook, TArgs args) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Core/Runtime/Events/EventBus.cs:65)

Bolt.EventMachine`2[TGraph,TMacro].TriggerRegisteredEvent[TArgs] (Bolt.EventHook hook, TArgs args) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Core/Runtime/Events/EventMachine.cs:42)

Bolt.EventMachine`2[TGraph,TMacro].TriggerEvent (System.String name) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Core/Runtime/Events/EventMachine.cs:14)

Bolt Version:
1.4.0
Unity Version:
2018.3.12b
.NET Version:
Under Review

Hi Aftab,

It looks like you're trying to convert a vector to a transform, which can't be done automatically.

Can you post a screenshot of the graph where the error occurs (look for the red node) so we can help you figure out what's wrong?

I'm having this same issue and it's intermittent in Bolt 1.4.1 and Unity 2018.3.0f2

Everything works perfectly until I add a Timer (which has nothing to do with the variable in question), then I get the following error:

InvalidConversionException: Cannot convert from 'UnityEngine.GameObject' to 'System.String'.

When I add a Debug, the string debugs perfectly. I delete the Timer and the issue goes away.

InvalidConversionException: Cannot convert from 'UnityEngine.GameObject' to 'System.String'.
Ludiq.ConversionUtility.Convert (System.Object value, System.Type type, Ludiq.ConversionUtility+ConversionType conversionType) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Runtime/Reflection/ConversionUtility.cs:472)
Ludiq.ConversionUtility.Convert (System.Object value, System.Type type) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Runtime/Reflection/ConversionUtility.cs:215)
Bolt.Flow.GetValue (Bolt.ValueInput input, System.Type type) (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Flow/Runtime/Flow.cs:542)
Bolt.Flow.GetConvertedValue (Bolt.ValueInput input) (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Flow/Runtime/Flow.cs:552)
Bolt.InvokeMember.Invoke (Bolt.Flow flow) (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Flow/Runtime/Framework/Codebase/InvokeMember.cs:170)
Bolt.InvokeMember.Enter (Bolt.Flow flow) (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Flow/Runtime/Framework/Codebase/InvokeMember.cs:250)
Bolt.Flow.InvokeDelegate (Bolt.ControlInput input) (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Flow/Runtime/Flow.cs:399)
Bolt.Flow+d__52.MoveNext () (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Flow/Runtime/Flow.cs:337)
Bolt.Flow+d__52.MoveNext () (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Flow/Runtime/Flow.cs:341)
Bolt.Flow+d__52.MoveNext () (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Flow/Runtime/Flow.cs:324)
Bolt.Flow+d__52.MoveNext () (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Flow/Runtime/Flow.cs:341)
Bolt.Flow+d__52.MoveNext () (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Flow/Runtime/Flow.cs:341)
Bolt.Flow+d__52.MoveNext () (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Flow/Runtime/Flow.cs:324)
Bolt.Flow+d__50.MoveNext () (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Flow/Runtime/Flow.cs:263)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)