Skip to content

Instantly share code, notes, and snippets.

@hiroki-o
Last active August 29, 2015 14:03
Show Gist options
  • Save hiroki-o/b92c43145ec7faddcb26 to your computer and use it in GitHub Desktop.
Save hiroki-o/b92c43145ec7faddcb26 to your computer and use it in GitHub Desktop.
Instantiate Error test
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
public GameObject enemyPrefab;
// Use this for initialization
void Start ()
{
// Create enemy
GameObject enemyObject = (GameObject)Instantiate(enemyPrefab);
enemyObject.transform.position = new Vector3(0.0f, 1.0f, 0.0f);
}
// Update is called once per frame
void Update () {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment