Hello,
I have been successfully using the following snippet to figure out the bounds of an object in my scene on the x axis:
transform.renderer.bounds.max.x
However, when I use that snippet of code on an object I have instantiated from a prefab, that value is 0 (the size and extents are also 0). But, if I just drop that prefab into the scene prior to runtime and call the same code on it, I seem to get the proper values.
Is there something I may be doing incorrectly when it comes to instantiating objects and properly setting up their renderers?
Thanks,
Joe