Search Unity

Getting skinnedmeshes screen rect cheaply

Discussion in 'Scripting' started by zedz, Oct 18, 2021.

  1. zedz

    zedz

    Joined:
    Aug 31, 2013
    Posts:
    253
    Sorry to link to another thread but it has diagrams
    https://stackoverflow.com/questions...s-the-2d-box-immediately-from-the-3d-pipeline

    Since this thread is a couple of years old, has this changed in the meantime?
    Am I able to get this info from unity? As I assume it needs to know if an gameobjects skinned mesh can be seen by a camera, if not then unity doesn't spend time uipdating its meshes etc

    At the moment I have to do a lot of calculations myself for a single skinned mesh to work out its bounding rectangle, and theres often lots of skinned meshes on screen, thus I'ld prefer not to spend the time unnecessarily

    Cheers zed