0
Not a Bug

2.0.0a8 NullReferenceException: Object reference not set to an instance of an object

Ex-Crow 2 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 2

It works in Live mode but has issues with running the code in Generated mode

Assets\Ludiq.Generated\Transient\Scripts\ItemSlot.cs(60,13): error CS0119: 'NullCheck' is a type, which is not valid in the given context
Assets\Ludiq.Generated\Transient\Scripts\ItemSlot.cs(60,13): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement

RefreshSlot graph: https://imgur.com/1CIOdFj

NullReferenceException: Object reference not set to an instance of an object
Ludiq.Bolt.Generated.Inventory.ItemSlot.RefreshSlot () (at Assets/Ludiq.Generated/Transient/Scripts/ItemSlot.cs:60)
Ludiq.Bolt.Generated.Inventory.Inventory.RefreshUI () (at Assets/Ludiq.Generated/Transient/Scripts/Inventory.cs:88)
Ludiq.Bolt.Generated.Inventory.Inventory.Start () (at Assets/Ludiq.Generated/Transient/Scripts/Inventory.cs:76)
Ludiq.Bolt.Generated.Inventory.Inventory.b__20_0 (Ludiq.Bolt.EmptyEventArgs args) (at Assets/Ludiq.Generated/Transient/Scripts/Inventory.cs:63)
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.ClassHost:InvokeEvent(EventHookID) (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/ClassHost.cs:823)
Ludiq.Bolt.UnityClassHost:Start() (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/UnityClassHost.cs:29)
Ludiq.Bolt.ClassComponent:Start() (at Assets/Ludiq/Bolt.Core/Runtime/Architecture/ClassComponent.cs:85)



Bolt Version:
2.0.0a8
Unity Version:
2019.2.19
Platform(s):
PC
Scripting Backend:
Mono
.NET Version (API Compatibility Level):
.NET 4.x
Bolt 2
Not a Bug

Yep, that graph you posted would not have the offending C#. 

I'll close this and look into the other issue as the root cause.