Search Unity

Accessing SkinnedMeshRenderer update when offscreen

Discussion in 'Scripting' started by Marc, Feb 29, 2008.

  1. Marc

    Marc

    Joined:
    Oct 4, 2007
    Posts:
    499
    Greetings

    I have been looking a little around in the documentation for the Update When Offscreen bool that can be set in the inspector on the SkinnedMeshRenderer component, but i cant seem to find it?

    I am trying to make an editor script which can enable or disabled the option.

    Where is the Update When Offscreen bool hiding?

    Regards,
    Marc
     
  2. besuser

    besuser

    Joined:
    Oct 9, 2007
    Posts:
    292
    Hey there =). Couldn't find anything myself (at least not in the few minutes I looked), but can you use the

    OnBecameVisible
    and
    OnBecameInvisible

    functions to accomplish what you want?

    Sounds like they are called as an object enters or exits any camera's view frustum, though I don't know this for certain.

    Hope this helps
     
  3. Marc

    Marc

    Joined:
    Oct 4, 2007
    Posts:
    499
    No im afraid i cannot. I have models which sadly need that enabled. I can do it manually, just wondered why its not in the API?