from github
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.XR.Interaction.Toolkit;
|
||||
|
||||
//this script attaches a listener function to a object to keep track of scaling functionallity
|
||||
|
||||
public class OBJScaler : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
XRGrabInteractable xRGrabInteractable = GetComponent<XRGrabInteractable>();
|
||||
xRGrabInteractable.onSelectEntered.AddListener((baseInteractor) => { GameObject.Find("ObjectSpawner").GetComponent<OBJGrabListener>().onGrab(gameObject); });
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user