Quantcast
Channel: Questions in topic: "parenting"
Viewing all articles
Browse latest Browse all 302

How do I unparent an object by scripting

$
0
0
How do I unparent the object once i stop holding down the mouse button? if (Input.GetKeyDown(KeyCode.Mouse1)) { GameObject.transform.parent = gameObject.transform; } else if (Input.GetKeyUp(KeyCode.Mouse1)) { GameObject.transform.parent = gameObject.transform; }

Viewing all articles
Browse latest Browse all 302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>