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

how to parenting gameobject to UI element without crashing android device

$
0
0
Hi, i try to instantiate a gameObject in my UI. the gameobject has a transform and the target object has a rectTransform but In using this line of code: borderMap = Instantiate(bordureGrp, bgMap)..GetComponent(); it works perfercty on PC but crashes on mobile device. if i use a gameObject out from the UI (with a Transform) or i remove the target it works fine. borderMap = Instantiate(bordureGrp)..GetComponent(); works. i tried to use a target with a simple Transform in the UI to see and it's crashes too parenting after the instanciation borderMap = Instantiate(bordureGrp).GetComponent(); borderMap .SetParent(bgMap); Same result... I don't know how to do :-( thank's to help me

Viewing all articles
Browse latest Browse all 302

Trending Articles



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