GameObject.Instantiate(游戏体的实例化),角色的选择

Posted LT.C#

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了GameObject.Instantiate(游戏体的实例化),角色的选择相关的知识,希望对你有一定的参考价值。

using UnityEngine;
using System.Collections;

public class CharacterCreation : MonoBehaviour {
public GameObject[] CharacterPrefabs;
private GameObject[] CharacterGameObject;
public UIInput NameInput;
private int length;
private int SelectIndex=0;
// Use this for initialization
void Start () {
length = CharacterPrefabs.Length;
CharacterGameObject = new GameObject[length];
for (int i = 0; i < length; i++)
{ 
CharacterGameObject[i]=GameObject.Instantiate(CharacterPrefabs[i],transform.position,transform.rotation)as GameObject;
}
showGameObject();


}

注意技术分享

以上是关于GameObject.Instantiate(游戏体的实例化),角色的选择的主要内容,如果未能解决你的问题,请参考以下文章