Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Null error in particle attachment in standalone build
#1
Bug 
I'm attaching an ObiParticleAttachment to my ropes at runtime by AddComponent and I then set the target (among other things). In the editor this works fine but in a standalone build I get this error:

Code:
NullReferenceException: Object reference not set to an instance of an object
  at Obi.ObiParticleAttachment.Disable (Obi.ObiParticleAttachment+AttachmentType type) [0x00001] in C:\Users\Matthew\Documents\repos\Radical-Relocation\Assets\Obi\Scripts\Common\Utils\ObiParticleAttachment.cs:337
  at Obi.ObiParticleAttachment.Bind () [0x00001] in C:\Users\Matthew\Documents\repos\Radical-Relocation\Assets\Obi\Scripts\Common\Utils\ObiParticleAttachment.cs:221
  at Obi.ObiParticleAttachment.set_target (UnityEngine.Transform value) [0x00019] in C:\Users\Matthew\Documents\repos\Radical-Relocation\Assets\Obi\Scripts\Common\Utils\ObiParticleAttachment.cs:52
  at Winglett.RR.Vehicles.DropRope+<MakeRope>d__35.MoveNext () [0x004ff] in C:\Users\Matthew\Documents\repos\Radical-Relocation\Assets\_Core\Content\Season 03\Vehicles\Scripts\Rope\DropRope.cs:157
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <4756199cf52a4f14b33cdcc5659f782e>:0
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in <4756199cf52a4f14b33cdcc5659f782e>:0
  at UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () [0x00002] in <09bef5ecb05c47869e8650c7594390b8>:0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEngine.WorkRequest:Invoke()
UnityEngine.UnitySynchronizationContext:Exec()
UnityEngine.UnitySynchronizationContext:ExecuteTasks()

I'm using the latest Obi version, Unity 2019.4.10f1, and HDRP 7.4.3.
Reply


Messages In This Thread
Null error in particle attachment in standalone build - by mr-matt - 29-09-2020, 05:58 AM