Created
June 16, 2016 16:27
-
-
Save tsubaki/b6796f22418aa4085b4e7dbf9593dba6 to your computer and use it in GitHub Desktop.
プレハブの生成
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class Spawn : MonoBehaviour { | |
[SerializeField] | |
RectTransform obj; | |
void Start () { | |
var result = GameObject.Instantiate<RectTransform>(obj); | |
result.SetParent(transform, true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment