Search Unity

Leap motion + Interaction Behaviour + Script

Discussion in 'AR/VR (XR) Discussion' started by minimax529, Feb 28, 2018.

  1. minimax529

    minimax529

    Joined:
    Feb 28, 2018
    Posts:
    1
    Hello,

    I have a gameObject. I must add an Interaction Behaviour by script. I can do that with :
    Code (CSharp):
    1. gameObject.AddComponent<InteractionBehaviour>();
    But now, I must add a new Event type (the EndGrasp). I can do it like below but not inside my script:

    Can someone help me to add this function trigger by OnGraspEnd by script?
     
  2. ZHUYuanju

    ZHUYuanju

    Joined:
    Nov 27, 2019
    Posts:
    1
    Hello, did you find the solution to your problem? I added this function trigger by a script but I could not see it in the inspector. But if I run Unity, I'm sure it is added.
     
  3. AAARies

    AAARies

    Joined:
    Sep 27, 2019
    Posts:
    1
    add "using Leap.Unity.Interaction;" at the beginning of your script.