2019 Scene visibility - scripting access

Unity 2019 has a new feature, allowing to hide parts of the scene without actually modifying it in any way. However this doesn’t work for custom renderers. What i’d need is a way how to read wheter the GameObject is visible or not, so I can skip the custom rendering in the script. I couldn’t find any scripting reference to the new feature, any ideas?

The class SceneVisibilityManager available since Unity 2019.2 is the way of go.

SceneVisibilityManager.instance.Hide( myGameObject , true );

with gameobject.activeInHierarchy function you can check whether gameobject is visible or not.