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

Can 3d objects be children of a canvas?

$
0
0
[Providing an answer to this question based on my own research and experimentation to save others the hassle] Technically yes, but the behavior probably won't be what you are expecting, especially if you are using overlay or camera rendering. Important things that won't work as you expect: 1. If you disable the canvas (enabled = false), the 3d object will still render. To overcome this, you can use a foreach loop or other method to access child objects and SetActive to false manually. 2. The object will not render based on it's position in the canvas, but rather it's position in the world relative to the camera. This basically means that your object will not appear to be part of the UI, and if it ever renders, it will be because the camera has coincidentally arrived at a position that includes your object, which is almost certainly not what you intend. Hope this helps someone!

Viewing all articles
Browse latest Browse all 302

Trending Articles



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