how do I instantiate an object of another class? It’s been a while since I was using units and I’m losing
woods = new Wood[indexSize];
isMove = true;
for (int i = 0; i < indexSize; i++)
{
y += 0.5f;
Wood test = new Wood(copy.transformWood);//Instantiate(copy, new Vector3(0, y, 0), Quaternion.identity) as Wood;
woods[i] = test;
}
//print(woods[0].transform.name);
currentWood = woods[0];
Wood Class:
public class Wood
{
public bool isMove;
public Transform transformWood;
public Wood(Transform transform)
{
this.transformWood = transform;
isMove = true;
}
}