Hello, I am trying to add the LeapRTS script onto a prefab that I can instantiate during runtime. I set up my prefab by dragging the PinchDetector_L and PinchDetector_R into the public fields, but when I drag a new instance of the prefab into my scene or instantiate during runtime, the fields are blank. I am trying to figure out how to set these within the LeapRTS script and my first thought was to do this:
pinchDetectorA = GameObject.Find("PinchDectorL"); (it is spelled "PinchDector_L")
But I get the error: Cannot implicitly convert type 'UnityEngine.GameObject' to 'Leap.Unity.PinchUtility.LeapPinchDetector'
so I tried:
_pinchDetectorA = Leap.Unity.CapsuleHand.FindObjectOfType();
and this will add the the PinchDector_R like I want, but I am not sure how to get the Left vs the Right
I am not very familiar with traversing namespaces and do not exactly know what I am doing here. Any help is appreciated.