Your comments

Bolt is an editor only tool. So, no, runtime display of Bolt graphs is not possible unless you code it yourself. 

It's a Unity thing, if you're not focused on Game window and are doing things in other windows, it won't Play. It's not a bug. Click on Game window and it'll receive input.

When testing Bolt 2, you have to test in generated mode since builds run from generated C# only. You're likely testing in editor's Live mode which runs from reflection and is about 20+ times slower. Live mode let's you code and save the changes made while in Play mode at the cost of some performance but it's an editor only mode.

Bolt 1, however, only runs from reflection so it incurs the performance cost you're seeing. 

I'm not familiar with Playmaker's implementation but what I know of it, it consists of actions that are pieces of custom code. So everything needs to be a custom action, from 3rd party tool implementations to anything that's not present in the base library or community library. 

Bolt is a lot more flexible and effortlessly integrates any 3rd party asset or your own C# code automatically via reflection. No need to write your own custom actions. So you lose some performance but gain a lot of flexibility. Bolt also doesn't force you to stick to the state machine only paradigm since it has both flow graphs and state graphs.Trade-offs. 

 Another error from trying to invoke a singleton class event from a component class.

NullReferenceException: Object reference not set to an instance of an object
Ludiq.Bolt.Generated.ItemSlot.OnPointerClick (UnityEngine.EventSystems.PointerEventData onPointerClick) (at Assets/Ludiq.Generated/Transient/Scripts/ItemSlot.cs:156)
Ludiq.Bolt.EventBus.Invoke[TArgs] (Ludiq.Bolt.EventHook hook, TArgs args) (at Assets/Ludiq/Bolt.Core/Runtime/Events/EventBus.cs:153)
UnityEngine.Debug:LogException(Exception, Object)
Ludiq.Bolt.EventBus:Invoke(EventHook, PointerEventData) (at Assets/Ludiq/Bolt.Core/Runtime/Events/EventBus.cs:157)
Ludiq.Bolt.EventBus:Invoke(EventHookID, GameObject, PointerEventData) (at Assets/Ludiq/Bolt.Core/Runtime/Events/EventBus.cs:169)
Ludiq.Bolt.PointerEventProxy:OnPointerClick(PointerEventData) (at Assets/Ludiq/Bolt.Core/Runtime/Events/Proxies/PointerEventProxy.cs:37)
UnityEngine.EventSystems.EventSystem:Update() (at C:/GameDev/UnityEngine/2019.3.4f1/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:377)

The null Reference error comes from component class trying to set itself as a singleton variable.

NullReferenceException: Object reference not set to an instance of an object
Ludiq.Bolt.GeneratedClass`1[TShell].BindVariable[T] (System.String guid) (at Assets/Ludiq/Bolt.Core/Runtime/Generation/GeneratedClass.cs:34)
Ludiq.Bolt.Generated.Singleton.Bind () (at Assets/Ludiq.Generated/Transient/Scripts/Singleton.cs:43)
Ludiq.Bolt.BoltClassShellTrait.InstantiateGenerated (System.Func`2[T,TResult] instantiator) (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/BoltClassShellTrait.cs:395)
Ludiq.Bolt.BoltClassShellTrait.InitializeGenerated[T] () (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/BoltClassShellTrait.cs:387)
Ludiq.Bolt.GeneratedComponentHolderProtocol+Protocol.AddComponent[T] (UnityEngine.Object uo) (at Assets/Ludiq/Bolt.Core/Runtime/Generation/GeneratedComponentHolderProtocol.cs:28)
Ludiq.Bolt.GeneratedComponentHolderProtocol.AddGeneratedComponent[T] (UnityEngine.Object uo) (at Assets/Ludiq/Bolt.Core/Runtime/Generation/GeneratedComponentHolderProtocol.cs:37)
Ludiq.Bolt.BoltSingletonContainer.GetInstance[T] () (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/BoltSingletonContainer.cs:39)
Ludiq.Bolt.GeneratedSingletonComponent`1[T].get_Instance () (at Assets/Ludiq/Bolt.Core/Runtime/Generation/GeneratedSingletonComponent.cs:11)
Ludiq.Bolt.Generated.TestClassTwo.Start () (at Assets/Ludiq.Generated/Transient/Scripts/TestClassTwo.cs:153)
Ludiq.Bolt.Generated.TestClassTwo.<activateimplementation>b__20_0 (Ludiq.Bolt.EmptyEventArgs args) (at Assets/Ludiq.Generated/Transient/Scripts/TestClassTwo.cs:69)
Ludiq.Bolt.EventBus.Invoke[TArgs] (Ludiq.Bolt.EventHook hook, TArgs args) (at Assets/Ludiq/Bolt.Core/Runtime/Events/EventBus.cs:153)
UnityEngine.Debug:LogException(Exception, Object)
Ludiq.Bolt.EventBus:Invoke(EventHook, EmptyEventArgs) (at Assets/Ludiq/Bolt.Core/Runtime/Events/EventBus.cs:157)
Ludiq.Bolt.BoltClassShellTrait:InvokeEvent(EventHookID) (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/BoltClassShellTrait.cs:870)
Ludiq.Bolt.BoltUnityClassShellTrait:Start() (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/BoltUnityClassShellTrait.cs:30)
Ludiq.Bolt.BoltComponent:Start() (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/BoltComponent.cs:121)
</activateimplementation>

Posting another warning I get from the graph after generating C# scripts for documenting purposes. I'll see if this keep happening in the next alpha.





Failed to infer type of ValueOutput#self
System.InvalidOperationException: Could not infer class for graph: Setup#07700696#725737216
at Ludiq.Bolt.XBoltClassGraph.GetClass (Ludiq.Bolt.IGraph graph) [0x00011] in C:\GameDev\Bolt2a10\Assets\Ludiq\Bolt.Core\Runtime\Architecture\IBoltClassGraph.cs:76
at Ludiq.Bolt.Self.InferType () [0x00001] in C:\GameDev\Bolt2a10\Assets\Ludiq\Bolt.Flow\Runtime\Units\Misc\Self.cs:25
at Ludiq.Bolt.ValueOutput.InferType () [0x00010] in C:\GameDev\Bolt2a10\Assets\Ludiq\Bolt.Flow\Runtime\Ports\ValueOutput.cs:63
UnityEngine.Debug:LogWarning(Object)
Ludiq.Bolt.ValueOutput:InferType() (at Assets/Ludiq/Bolt.Flow/Runtime/Ports/ValueOutput.cs:67)
Ludiq.Bolt.ValueOutput:AssignInferredType() (at Assets/Ludiq/Bolt.Flow/Runtime/Ports/ValueOutput.cs:90)
Ludiq.Bolt.Unit`1:OnGraphStructureChanged() (at Assets/Ludiq/Bolt.Flow/Runtime/Units/Unit.cs:267)
Ludiq.Bolt.FlowGraph:OnStructureChanged(Boolean) (at Assets/Ludiq/Bolt.Flow/Runtime/Graphs/FlowGraph.cs:71)
Ludiq.Bolt.Graph:OnElementsChanged(Object, NotifyCollectionChangedEventArgs) (at Assets/Ludiq/Bolt.Core/Runtime/Graphs/Graph.cs:209)
Ludiq.ParentMergedCollection`3:OnCollectionChanged(Object, NotifyCollectionChangedEventArgs) (at Assets/Ludiq/Ludiq.Core/Runtime/Collections/ParentMergedCollection.cs:53)
Ludiq.Bolt.GraphElementMergedCollection:Add(IEnumerable`1) (at Assets/Ludiq/Bolt.Core/Runtime/Graphs/GraphElementMergedCollection.cs:41)
Ludiq.Bolt.Graph:OnAfterDependenciesDeserialized() (at Assets/Ludiq/Bolt.Core/Runtime/Graphs/Graph.cs:168)
Ludiq.Serialization:CheckIfDependenciesMet(ISerializationDepender) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:906)
Ludiq.Serialization:AwaitDependencies(ISerializationDepender) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:832)
Ludiq.Bolt.Graph:OnAfterDeserialize() (at Assets/Ludiq/Bolt.Core/Runtime/Graphs/Graph.cs:162)
Ludiq.Bolt.FlowGraph:OnAfterDeserialize() (at Assets/Ludiq/Bolt.Flow/Runtime/Graphs/FlowGraph.cs:50)
Ludiq.OdinSerializer.BaseFormatter`1:Deserialize(IDataReader) (at C:/Users/lazlo/Projects/LudiqOdinSerializer/OdinSerializer/Core/Formatters/BaseFormatter.cs:256)
Ludiq.OdinSerializer.BaseFormatter`1:Ludiq.OdinSerializer.IFormatter.Deserialize(IDataReader) (at C:/Users/lazlo/Projects/LudiqOdinSerializer/OdinSerializer/Core/Formatters/BaseFormatter.cs:175)
Ludiq.OdinSerializer.ComplexTypeSerializer`1:ReadValue(IDataReader) (at C:/Users/lazlo/Projects/LudiqOdinSerializer/OdinSerializer/Core/Serializers/ComplexTypeSerializer.cs:294)
Ludiq.OdinSerializer.ListFormatter`1:DeserializeImplementation(List`1&, IDataReader) (at C:/Users/lazlo/Projects/LudiqOdinSerializer/OdinSerializer/Core/Formatters/ListFormatter.cs:91)
Ludiq.OdinSerializer.BaseFormatter`1:Deserialize(IDataReader) (at C:/Users/lazlo/Projects/LudiqOdinSerializer/OdinSerializer/Core/Formatters/BaseFormatter.cs:222)
Ludiq.OdinSerializer.ComplexTypeSerializer`1:ReadValue(IDataReader) (at C:/Users/lazlo/Projects/LudiqOdinSerializer/OdinSerializer/Core/Serializers/ComplexTypeSerializer.cs:366)
Ludiq.OdinSerializer.Serializer`1:ReadValueWeak(IDataReader) (at C:/Users/lazlo/Projects/LudiqOdinSerializer/OdinSerializer/Core/Serializers/Serializer.cs:261)
Ludiq.OdinSerializer.UnitySerializationUtility:DeserializeUnityObject(Object, IDataReader) (at C:/Users/lazlo/Projects/LudiqOdinSerializer/OdinSerializer/Unity Integration/UnitySerializationUtility.cs:1726)
Ludiq.OdinSerializer.UnitySerializationUtility:DeserializeUnityObject(Object, SerializationData&, DeserializationContext, Boolean, List`1) (at C:/Users/lazlo/Projects/LudiqOdinSerializer/OdinSerializer/Unity Integration/UnitySerializationUtility.cs:1451)
Ludiq.OdinSerializer.UnitySerializationUtility:DeserializeUnityObject(Object, SerializationData&, DeserializationContext) (at C:/Users/lazlo/Projects/LudiqOdinSerializer/OdinSerializer/Unity Integration/UnitySerializationUtility.cs:1171)
Ludiq.Serialization:OdinDeserializeInto(SerializationData, Object&) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:434)
Ludiq.Serialization:OnAfterDeserializeImplementation(LudiqAsset, FullSerializationData, SerializationData, Boolean&) (at Assets/Ludiq/Ludiq.Core/Runtime/Serialization/Serialization.cs:728)
Ludiq.LudiqAsset:UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize() (at Assets/Ludiq/Ludiq.Core/Runtime/Unity/LudiqAsset.cs:26)

Another example of the issue that's not related to Bolt Assets:

Setup:


1. Create a new Bolt Class
2. Add a behavior graph, a function graph, a List <GameObject> class variable, a class variable of type GameObject.
3. Invoke the function graph in behavior graph:



Function graph looks like this:



4. Generate C# scripts.

After domain reload proxy from function input and index from for loop breaks:

Another example of how a proxy to debug.log inside the same function based on the same Bolt Asset also breaks after domain reload.