Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created July 6, 2018 12:48
Show Gist options
  • Save todorok1/03ada8746a3f9f8598ad1f47d1e5c6fc to your computer and use it in GitHub Desktop.
Save todorok1/03ada8746a3f9f8598ad1f47d1e5c6fc to your computer and use it in GitHub Desktop.
登録されていないタグはセットできるか?
string tagName = "TagImport";
void Start(){
GameObject prefab = (GameObject) Resources.Load("Prefabs/TagTest/TagCube");
Instantiate(prefab, Vector3.zero, Quaternion.identity);
getByTagObj = GameObject.FindGameObjectWithTag(tagName);
rb = getByTagObj.AddComponent<Rigidbody>();
isRigidbodyAttached = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment