Not a Bug

OnDrawGizmos with Object Variables throws exception

Felix Herbst 3 years ago updated by Lazlo Bonin (Lead Developer) 3 years ago 1
The following graph immediately throws exceptions:

Seems it is not possible to access the Object Variable "gizmoSize" (a Vector3) in the Editor during the OnDrawGizmos event.

Exception thrown is:

NotSupportedException: Operation is not supported. Ludiq.ComponentHolderProtocol.GetComponent[Variables] (UnityEngine.Object uo) (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Runtime/Utilities/ComponentHolderProtocol.cs:70) Ludiq.ComponentHolderProtocol.GetOrAddComponent[Variables] (UnityEngine.Object uo) (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Runtime/Utilities/ComponentHolderProtocol.cs:55) Bolt.Variables.Object (UnityEngine.GameObject go) Bolt.GetVariable.Get (Ludiq.Recursion recursion) Bolt.Unit+<>c__DisplayClass56_0`1[System.Object].b__0 (Ludiq.Recursion recursion) Bolt.ValueOutput.GetValue (Ludiq.Recursion recursion) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):
Not a Bug

Hi Felix,

Is your graph running on a macro?

Currently, in-editor events fired from macros cannot access variables.