Search Unity

How To Access LOD?

Discussion in 'Scripting' started by renman3000, Feb 3, 2020.

  1. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699
    Hi there,
    I want to know how much of a Mesh Renderer is exposed to the camera. 50%, 10%?

    A likely solution I have found is Unity's LOD Groups, specifically the LOD Group Selection Bar, as it seems to provide a detailed and accurate account of this, in the inspector.

    Trick is, I am having difficulty accessing this value via my code. So, how can I access the LOD Group Selection Bar data?

    Thanks
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    There is a
    .size
    component on the LODGroup object... does that help you? Not sure how that value should be interpreted and I've not used it personally.