Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void testCreateObject() // Testing Instantiate
- {
- float x = Random.Range(-3, 3);
- float y = Random.Range(-3, 3);
- Vector3 position = new Vector3(x, y, 0);
- Debug.Log("Before Instantiate");
- GameObject obj = GameObject.Instantiate(sourceObject, position, Quaternion.identity);
- Debug.Log("After Instantiate");
- obj.transform.SetParent(playSpace);
- Debug.Log("After SetParent");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement