limoka / DSP-Mods

An example how to add a custom model with your mesh and animations
MIT License
32 stars 10 forks source link

[BUG] - Camera-related NRE after using undo #52

Closed MrNukealizer closed 1 year ago

MrNukealizer commented 2 years ago

Whenever I use the undo feature after deleting something, it seems to cause an exception when exiting delete mode.

Reproduction steps:

  1. Place a building
  2. Delete the building
  3. Press ctrl+Z
  4. Exit delete mode (or activate it and exit it if you exited it before pressing ctrl+Z)

The Unity log shows:

(Filename: D:\unity\Runtime/Export/Debug.bindings.h Line: 45)

bad query

(Filename: D:\unity\Runtime/Export/Debug.bindings.h Line: 45)

Look rotation viewing vector is zero

(Filename:  Line: 84)

NullReferenceException: Object reference not set to an instance of an object
  at BuildTool_BlueprintPaste.OnCameraPostRender (UnityEngine.Camera cam) [0x0004d] in <41b85be4a4694276afce9cdc6f3b0564>:0 
  at (wrapper delegate-invoke) System.Action`1[UnityEngine.Camera].invoke_void_T(UnityEngine.Camera)
  at MainCamera.OnPostRender () [0x00007] in <41b85be4a4694276afce9cdc6f3b0564>:0 

(Filename: <41b85be4a4694276afce9cdc6f3b0564> Line: 0)

NullReferenceException: Object reference not set to an instance of an object
  at BuildTool_BlueprintPaste.OnCameraPostRender (UnityEngine.Camera cam) [0x0004d] in <41b85be4a4694276afce9cdc6f3b0564>:0 
  at (wrapper delegate-invoke) System.Action`1[UnityEngine.Camera].invoke_void_T(UnityEngine.Camera)
  at MainCamera.OnPostRender () [0x00007] in <41b85be4a4694276afce9cdc6f3b0564>:0

The last exception then repeats many times per second and is shown in-game.

The BepInEx log has nothing related to the error.

limoka commented 1 year ago

Fixed in v1.5.7