|
My objective is to determine the total dimensions of a scene. Will I need to write a script to iterate through each object in the scene and continue adding each to an iteratively expanded "box", or is there a more elegant method available? Thanks, -Aubrey
(comments are locked)
|
|
I don't think there is a more elegant method, but then, that script should be pretty short:
If you want to do this every frame, you may consider caching the array of renderers, since FindObjectsOfType is slow, though. Excellent! Far more elegant than the script I was envisioning :) Thanks again! Yes, I only plan to run this script once
Dec 06 '09 at 06:04 PM
Aubrey Falconer
if you have objects that they have colliders without renderers, you should take care of them
Dec 06 '09 at 06:49 PM
Ashkan_gc
You need to set the initial value of Bounds b based on the first Renderer. Otherwise, b.min values might stay zero if there are no negative coords. Similar for b.max if there aren't positive coords.
Sep 08 '10 at 12:09 AM
HeywoodFloyd
(comments are locked)
|
