If was mentioned that there was a way force the removal of a screen from the stack. Apparently it hasn’t made it into the documentation yet. Can someone from Roku let me know what the syntax is?
To remove a screen from the display stack, you would just call the Close() method on the screen:
Void Close()
Close the screen and delete the associated object. Useful for avoiding screen flicker when the display order of your screens does not resemble a stack.
Exactly what I needed. Thanks Kevin.
Is there any way to manage this operation today?
I can not remove my roScreen from the stack, the suggest method does not work this days (Close() is no longer part of roScreen object I guess)
@tBibi , why do you think this no longer works? Close() is certainly still there. What are you trying to do? You shouldn’t have multiple roSGScreens in a stack. Use scenes instead.
Caveat: I am no expert on scene graph as I absolutely hate it.
I am using the 2D api roScreen and not the sg one. The function does not exists on that component as I understand.
I think setting the screen to invalid effectively closes and removes it from the stack. I have never had a reason to use more than one roScreen. I have had to rebuild the roScreen after displaying an ad though.
