0
Fixed

InstantiateNest has null GraphReference

Matthew Horton 2 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 3

After upgrading to v.1.4.1b2 and Unity 2018.3, I keep having an EnsureThat exception when instantiating a new state machine. The extension method in WuConstants adds a StateMachine component and switches it to a specified macro; this was fine in the previous version of Bolt but it looks like the machine doesn't get a GraphReference in time?

ArgumentNullException: Value cannot be null.

Parameter name: instance

Ludiq.EnsureThat.IsNotNull[T] (T value) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Runtime/Ensure/EnsureThat.Objects.cs:29)

Ludiq.GraphInstances.Instantiate (Ludiq.GraphReference instance) (at <1fcb44e0b5304caabbd528dc3868eca9>:0)

Ludiq.Machine`2[TGraph,TMacro].InstantiateNest () (at <1fcb44e0b5304caabbd528dc3868eca9>:0)

Bolt.EventMachine`2[TGraph,TMacro].InstantiateNest () (at <0424d63d8ed147d3b784111cc7fa81b2>:0)

Ludiq.Machine`2[TGraph,TMacro].Awake () (at <1fcb44e0b5304caabbd528dc3868eca9>:0)

Bolt.EventMachine`2[TGraph,TMacro].Awake () (at <0424d63d8ed147d3b784111cc7fa81b2>:0)

UnityEngine.GameObject:AddComponent()

Wu.Utility:BuildStateMachineFromMacro(GameObject, StateMacro) (at Assets/Scripts/Data/WuConstants.cs:89)

Bolt Version:
1.4.1b2
Unity Version:
2018.3
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
GOOD, I'M SATISFIED
Satisfaction mark by Matthew Horton 2 years ago