Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public GameObject wordPrefab;
- public Transform wordCanvas;
- public WordDisplay SpawnWord()
- {
- Vector3 randomPosition = new Vector3(Random.Range(-2.0f, 2.0f), 7.0f, 0);
- GameObject wordObj = Instantiate(wordPrefab,randomPosition, Quaternion.identity, wordCanvas);
- WordDisplay wordDisplay = wordObj.GetComponent<WordDisplay>();
- return wordDisplay;
- }
Add Comment
Please, Sign In to add comment