28 lines
892 B
C#
28 lines
892 B
C#
|
using UnityEngine;
|
|||
|
|
|||
|
/*
|
|||
|
* Instantiate(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
|||
|
*/
|
|||
|
public class Lesson_5 : MonoBehaviour
|
|||
|
{
|
|||
|
public GameObject[] gameObjects;
|
|||
|
private GameObject inst_Object;
|
|||
|
|
|||
|
private void Start()
|
|||
|
{
|
|||
|
for(uint i = 0; i < gameObjects.Length; i++)
|
|||
|
{
|
|||
|
var clone = Instantiate(gameObjects[(int)Random.Range(0, 2f)],
|
|||
|
gameObjects[(int)Random.Range(0, 2f)].transform.position,
|
|||
|
Quaternion.identity);
|
|||
|
ControllerLessons.Instance.Lesson_3.createObjList.Add(clone);
|
|||
|
}
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
inst_Object = Instantiate(gameObjects[2], new Vector3(10,10,10), Quaternion.identity);
|
|||
|
inst_Object.name = "my";
|
|||
|
inst_Object.GetComponent<Renderer>().material.color = Color.red;
|
|||
|
ControllerLessons.Instance.Lesson_3.createObjList.Add(inst_Object);
|
|||
|
}
|
|||
|
}
|