So i have the following code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ItemBox : MonoBehaviour
{
public enum ItemType
{
Pistol,
AK47,
UMP45
}
[Header("Values")]
[SerializeField] ItemType itemtype;
[SerializeField] int itemAmount;
[SerializeField] GameObject Prefab;
[SerializeField] Transform[] PrefabTransform;
public ItemType Type { get { return itemtype; } }
public int Amount { get { return itemAmount; } }
void Start()
{
for(int i = 0; i < itemAmount; i++)
{
Instantiate(Prefab,PrefabTransform_.position, PrefabTransform*.rotation);*_
Prefab.transform.SetParent(transform);
Prefab.gameObject.AddComponent();
}
}
void Update()
{
}
}
[137144-capture2.png|137144]_
and in the inspector i am not able to edit the transform directly
i would like to be able to edit each value of rotation ,position of the array elements
in the inspector
images attached for more clarity
alt text
_
,