18 lines
594 B
C#
18 lines
594 B
C#
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); });
|
|
}
|
|
|
|
}
|