GestureDetector.cs Unsubscribe issue

GestureDetector.cs Unsubscribe issue

flyingaudioflyingaudio Member Posts: 1
Currently, the GestureDetector.cs subscribes to the related delegate on Awake, but only unsubscribes when OnDestroy() is called. That means it is alive during the whole scene.

It would be better to unsubscribe with OnDisable(), which I have done in my code, so, that way an object with a GestureDectector would no longer be called when disabled, by another GestureDetector. 

Comments

  • Michael@Bose[email protected] Member Posts: 66
    Hi Flying Audio,

    Great feedback - thank you! We've shared internally, and encourage you to continue providing useful suggestions and making us aware of potential issues when possible!

    Michael @ Bose
  • Michael@Bose[email protected] Member Posts: 66
    Hi @flyingaudio - there's an update to the SDK that is now live on the site that has actually incorporated this feedback that you provided, so thank you for that!

    As per the changenotes here, "GestureDetector now will properly subscribe/unsubscribe for the given gesture when enabled/disabled"

    Thanks again!

    Michael @ Bose 
Sign In or Register to comment.