[SOLVED] Executing fullscreen from a javascript block?

I was trying to call the setFullScreen() method of the gdjs.RuntimeGamePixiRenderer as described in the gdevelop javascript reference (https://4ian.github.io/GD-Documentation/GDJS%20Runtime%20Documentation/gdjs.RuntimeGamePixiRenderer.html#setFullScreen).

But I can not figure out how to call it, what object is this a method of ? I have tried a bunch of stuff (runtimeScene.getRenderer() etc), and can’t seem to find an object which has this method anywhere.

Anyone have a way of calling this through a JS code block ?

Try this:
runtimeScene.getGame().getRenderer().setFullScreen(true);

1 Like

That doesn’t work :frowning: - it just throws a wobbly;

code0.js:420 Uncaught TypeError: runtimeScene.getRenderer(…).setFullScreen is not a function

Check the code agian, I was forget to add getGame() there :wink:

1 Like

Now it works! :smiley:
Thanks heaps! you’ve been so helpful answering all my questions today! thanks a LOT!