public synchronized void removeAllSceneObjects ( ) { final GVRCameraRig rig = getMainCameraRig ( ) ; final GVRSceneObject head = rig . getOwnerObject ( ) ; rig . removeAllChildren ( ) ; NativeScene . removeAllSceneObjects ( getNative ( ) ) ; for ( final GVRSceneObject child : mSceneRoot . getChildren ( ) ) { child . getParent ( ) . removeChildObject ( child ) ; } if ( null != head ) { mSceneRoot . addChildObject ( head ) ; } final int numControllers = getGVRContext ( ) . getInputManager ( ) . clear ( ) ; if ( numControllers > 0 ) { getGVRContext ( ) . getInputManager ( ) . selectController ( ) ; } getGVRContext ( ) . runOnGlThread ( new Runnable ( ) { @ Override public void run ( ) { NativeScene . deleteLightsAndDepthTextureOnRenderThread ( getNative ( ) ) ; } } ) ; }
Remove all scene objects .