Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

Button as a child of a button

$
0
0
I've been using Unity in about five months now, and I've been working on a project for last few weeks, and it's almost finished. And I want to implement shop UI for my project. And when I attached a button as a child of my shop UI and add a listener to it from a script. it did work. But when I clicked on a parent button the child button is also clicked. So I want my parent button just to change a color for my model as preview, and the child button to buy/set the color if already owned. So the question is. Is there something wrong with my design or it was my script? or I just can't have a button as a child of another button? Thanks before, any help would be appreciated. Here is my code to add a on click listeners void SetShopButtons() { int i = 0; foreach (Transform t in colorViewport) { int currentIndex = i; Button b1 = t.GetComponent

Viewing all articles
Browse latest Browse all 4709

Trending Articles



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