IsRendering Detection
IsRendering Detection
Sets an "IsRendering" parameter to true when being looked at
⬇️ Download Latest Version
📦 Add to VRChat Creator Companion
</div>How it works
- The prefab contains a sub-animator, a sender, a receiver, and a renderer.
- The sub-animator constantly animates the sender on, setting
IsRenderingto true. - When the renderer is not in view, the sub-animator stops running and will no longer animate the sender on.
- The main-animator can then animate the sender off, setting
IsRenderingto false.
Install guide
https://github.com/VRLabs/IsRendering-Detection/assets/76777936/b51ac145-17a8-47eb-acbf-883242073b6b
- Merge the Animator Controller
IsRendering FXto your own FX Controller, using the Avatars 3.0 Manager tool. - Drag & Drop the
IsRendering Detectionprefab into the base of your Hierarchy. - Right click and unpack the prefab, then drag & drop it onto your avatar.
- Expand the prefab hierarchy and find
Culling Animator->Renderer. - Modify the bounds of the renderer to fit the view target such as your avatar.
[!NOTE]
When building for Quest, you will have to remove unsupported components and shaders
How to use
- Add the
RenderingDetection/IsRenderingbool parameter to any of your Playable Layers. The value will beTruewhenRendereris in view, and false when outside of view.- You can use this bool to build your own systems in your FX Controller.
- In the prefab's hierarchy, the
IsRendering Containeris enabled when in view.IsNotRendering Containeris enabled when not in view.- You can put your own objects into the containers to show or hide them accordingly
- The containers include a cube and sphere for previewing and confirming that the system works; feel free to delete them.
Performance stats
Contact Receivers: 1
Contact Senders: 1
FX Animator Layers: 1
Skinned Renderers: 1
Sub Animators: 1
Hierarchy layout
IsRendering Detection
|-IsRendering Container
| |-Cube
|-NotRendering Container
| |-Sphere
|-Culling Animator
| |-Sender
| |-Receiver
| |-Renderer
Contributors
License
IsRendering Detection is available as-is under MIT. For more information see LICENSE.
<div align="center"><img src="https://github.com/VRLabs/Resources/raw/main/Icons/VRLabs.png" width="50" height="50"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Empty.png" width="10"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Discord.png" width="50" height="50"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Empty.png" width="10"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Patreon.png" width="50" height="50"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Empty.png" width="10"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Twitter.png" width="50" height="50">
</div>Keywords
No keywords found.Install via VCC
Package ID
dev.vrlabs.isrendering-detectionUnity Version
2022.3Unity Release
undefinedVRChat Version
undefined