pax, почему не создается куб при нажатии на кнопку?
using UnityEngine;
using System.Collections;
public class setstart : MonoBehaviour {
public string ScriptCreateCube;
public Transform CreateCube;
// Use this for initialization
void Start ()
{
}
// Update is called once per frame
void Update ()
{
}
void OnGUI ()
{
ScriptCreateCube = GUI.TextArea(new Rect(10,10,200,100), ScriptCreateCube, 200);
if(GUI.Button(new Rect(10, 50, 80, 20), "Create"))
{
if(ScriptCreateCube == "CreateCube")
{
Instantiate(CreateCube, new Vector3(10, 25, 10), Quaternion.identity);
}
}
}
}