steamvr_unity_plugin icon indicating copy to clipboard operation
steamvr_unity_plugin copied to clipboard

Hand: NullReference if attachementFlag set to DetachFromOtherHand and second hand is missing

Open tettogreen opened this issue 8 years ago • 4 comments

Error Line: Hand.cs 349

Actual Code: if (attachedObject.HasAttachFlag(AttachmentFlags.DetachFromOtherHand))

Expected Code: if (attachedObject.HasAttachFlag(AttachmentFlags.DetachFromOtherHand) && otherHand)

tettogreen avatar Sep 30 '18 11:09 tettogreen

I believe otherHand should always be defined. If the controller hasn’t been turned on yet it should still have a reference to the script instance

keithbradner avatar Oct 02 '18 16:10 keithbradner

Are you seeing a scenario where this is not true?

keithbradner avatar Oct 05 '18 17:10 keithbradner

Hi, sorry for long answer. In my case it was fallback hand.

tettogreen avatar Oct 08 '18 20:10 tettogreen

Duplicate of #130

keithbradner avatar Oct 25 '18 17:10 keithbradner