24 lines
534 B
C#
24 lines
534 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class SpawnerGestureInteraction : MonoBehaviour
|
||
|
{
|
||
|
public List<GameObject> objects;
|
||
|
|
||
|
public Transform rightHandTransform;
|
||
|
|
||
|
public void SpawnObject(string objectName)
|
||
|
{
|
||
|
Debug.Log(objectName);
|
||
|
foreach (var item in objects)
|
||
|
{
|
||
|
if (item.name == objectName)
|
||
|
{
|
||
|
Instantiate(item, rightHandTransform.position, Quaternion.identity);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|