+2
Fixed

IinvalidConversionException: Vector3 > Quaternion

Aleksandr Ladenko 2 years ago updated by Lazlo Bonin (Lead Developer) 10 months ago 4

The error is shown only when opening the "C # Preview" window.
The script itself and the animation - work without problems!

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


StackTrace:

InvalidConversionException: Cannot convert from 'UnityEngine.Vector3' to 'UnityEngine.Quaternion'.
Ludiq.Bolt.UnitGeneratorUtility.GenerateConvertedExpression (Ludiq.CodeDom.CodeExpression expression, System.Type sourceType, System.Type destinationType) (at Assets/Ludiq/Bolt.Flow/Editor/Units/UnitGeneratorUtility.cs:182)
Ludiq.Bolt.UnitGeneratorUtility.GenerateExpression (Ludiq.Bolt.ValueInput valueInput, Ludiq.Bolt.FlowMethodGenerationContext context, System.Type destinationType, System.Boolean bind) (at Assets/Ludiq/Bolt.Flow/Editor/Units/UnitGeneratorUtility.cs:318)
Rethrow as CodeGenerationException: An exception occurred while trying generate expression for value input "Target" of Tween Member unit:
InvalidConversionException: Cannot convert from 'UnityEngine.Vector3' to 'UnityEngine.Quaternion'.
Ludiq.Bolt.UnitGeneratorUtility.GenerateExpression (Ludiq.Bolt.ValueInput valueInput, Ludiq.Bolt.FlowMethodGenerationContext context, System.Type destinationType, System.Boolean bind) (at Assets/Ludiq/Bolt.Flow/Editor/Units/UnitGeneratorUtility.cs:333)
Ludiq.Bolt.TweenMemberGenerator+d__1.MoveNext () (at Assets/Ludiq/Bolt.Flow/Editor/Framework/Codebase/TweenMemberGenerator.cs:48)
Ludiq.GraphGeneratorUtility+d__3`1[TElement].MoveNext () (at Assets/Ludiq/Ludiq.Graphs/Editor/Generation/GraphGenerationUtility.cs:36)
Ludiq.LinqUtility+d__20`1[T].MoveNext () (at Assets/Ludiq/Ludiq.Core/Runtime/Utilities/LinqUtility.cs:260)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
Ludiq.Bolt.UnitGeneratorUtility+<>c__DisplayClass1_0.b__0 (System.Exception e) (at Assets/Ludiq/Bolt.Flow/Editor/Units/UnitGeneratorUtility.cs:56)
Ludiq.LinqUtility+d__20`1[T].MoveNext () (at Assets/Ludiq/Ludiq.Core/Runtime/Utilities/LinqUtility.cs:268)
Ludiq.Bolt.UnitGeneratorUtility+d__1.MoveNext () (at Assets/Ludiq/Bolt.Flow/Editor/Units/UnitGeneratorUtility.cs:45)
Ludiq.Bolt.PointerEventUnitGenerator+d__4.MoveNext () (at Assets/Ludiq/Bolt.Flow/Editor/Events/GUI/PointerEventUnitGenerator.cs:23)
System.Collections.Generic.List`1[T]..ctor (System.Collections.Generic.IEnumerable`1[T] collection) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <3e4da02cf86b4fc686ed0ac61bffc210>:0)
Ludiq.GraphMethodGenerationContext`2[TGraphMethodGenerationContext,TGraphMethodGenerationScope].GenerateMethodBody (System.Collections.Generic.IEnumerable`1[T] parameters, System.Func`2[T,TResult] generator) (at Assets/Ludiq/Ludiq.Graphs/Editor/Generation/GraphMethodGenerationContext.cs:76)
Ludiq.GraphMethodGenerationContext`2[TGraphMethodGenerationContext,TGraphMethodGenerationScope].GenerateMethod (Ludiq.CodeDom.CodeMemberModifiers modifiers, Ludiq.CodeDom.CodeTypeReference returnType, System.String name, System.Collections.Generic.IEnumerable`1[T] parameters, System.Func`2[T,TResult] generator) (at Assets/Ludiq/Ludiq.Graphs/Editor/Generation/GraphMethodGenerationContext.cs:44)
Ludiq.Bolt.EventUnitGenerator`2+d__19[TUnit,TArgs].MoveNext () (at Assets/Ludiq/Bolt.Flow/Editor/Events/EventUnitGenerator.cs:56)
Ludiq.GraphGeneratorUtility+d__1`1[TElement].MoveNext () (at Assets/Ludiq/Ludiq.Graphs/Editor/Generation/GraphGenerationUtility.cs:19)
System.Collections.Generic.List`1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable`1[T] collection) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
System.Collections.Generic.List`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] collection) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
Ludiq.Bolt.FlowGraphGenerator.PopulateGraphScript (Ludiq.GraphClassGenerationContext context) (at Assets/Ludiq/Bolt.Flow/Editor/FlowGraphGenerator.cs:55)
Ludiq.GraphGenerator`1[TGraph].GenerateGraphScript (Ludiq.GraphGenerationSystem generationSystem, System.String namePrefix) (at Assets/Ludiq/Ludiq.Graphs/Editor/Generation/GraphGenerator.cs:44)
Ludiq.GraphGenerator`1[TGraph].Generate (Ludiq.GraphGenerationSystem generationSystem, System.String namePrefix) (at Assets/Ludiq/Ludiq.Graphs/Editor/Generation/GraphGenerator.cs:23)
Ludiq.GraphGenerationSystem.GenerateGraph (Ludiq.IGraphParent graphParent) (at Assets/Ludiq/Ludiq.Graphs/Editor/Generation/GraphGenerationSystem.cs:59)
Ludiq.CodePreviewWindow.Generate () (at Assets/Ludiq/Ludiq.Graphs/Editor/Windows/CodePreviewWindow.cs:455)
Rethrow as GraphPingException:
UnityEngine.Debug:LogException(Exception)
Ludiq.CodePreviewWindow:OnGUI() (at Assets/Ludiq/Ludiq.Graphs/Editor/Windows/CodePreviewWindow.cs:297)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Bolt Version:
2.0.0a5
Unity Version:
2019.1.4f1
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Bolt 2
GOOD, I'M SATISFIED
Satisfaction mark by Aleksandr Ladenko 10 months ago

I just had the same Error.

Looks like TweenRotation is expecting a Quaternion but it is only accepting a Vector3 as Input on the node...

Pending Review

Thanks for the report, will have a look!

Fixed (Unreleased)

Hi,

Thanks on your patience! This will be fixed in the next version.