using System.Collections; using System.Collections.Generic; using UnityEngine; public class SpawnerGestureInteraction : MonoBehaviour { public List objects; public Transform rightHandTransform; public void SpawnObject(string objectName) { foreach (var item in objects) { if (item.name == objectName) { Instantiate(item, rightHandTransform.position, Quaternion.identity); Debug.Log(objectName); } } } }