Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Created June 16, 2016 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsubaki/b6796f22418aa4085b4e7dbf9593dba6 to your computer and use it in GitHub Desktop.
Save tsubaki/b6796f22418aa4085b4e7dbf9593dba6 to your computer and use it in GitHub Desktop.
プレハブの生成
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