34 lines
848 B
C#
34 lines
848 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class CreateStacksFromCode : MonoBehaviour {
|
|
|
|
public GameObject[] prefabs;
|
|
|
|
// Use this for initialization
|
|
void Start () {
|
|
|
|
for (int i = 0; i < 5; i++)
|
|
{
|
|
StackUtility.CreateStack(
|
|
"Stack" + i, //name
|
|
new Vector3(-7 + 3.5f*i, 0, 0), //position
|
|
0, //rotation
|
|
5, //count
|
|
prefabs,
|
|
2, //start scale
|
|
1, //end scale
|
|
0, //scale variation
|
|
0, //random position offset
|
|
0, //start rotation variance
|
|
0, //object rotation variance
|
|
10, //object rotation offset
|
|
0, //pYOffset
|
|
false //Create compound collider
|
|
);
|
|
}
|
|
}
|
|
|
|
}
|