Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Destroying the instance crashes the game

A topic by matoro342 created Jun 10, 2018 Views: 385 Replies: 2
Viewing posts 1 to 2

Hi,

I'm trying this out and can't seem to reliably turn this browser on/off as many times as I like in game, which I want to be able to do. 

I used your obj_chromium_demo_browser and it works great and is very cool. But using instance_destroy does not work properly, this crashes the game. instance_create_layer can successfully create the browser by spawning the demo object. I just need to be able to delete it without exiting the game.

How do I remove an instance of this browser?

Thanks!

Developer (1 edit)

I don't recommend starting up and shutting down chromium. I haven't figured out all the memory leaks.  However, you can achieve the effect by just leaving the chromium instance running in the background, and show and hide the browser rendering window.  This is also a faster way of doing it as you don't incur the speed penalty of having to start up and shut down the browser every time; and chromium doesn't take any CPU when it's not rendering (when you don't run the chromium_step() function).

I've uploaded a demo of how to do this called gm_chromium_1.2_instance_demo.yyz

This mean we should just stop the running of chromium_step() and that is like disabling it?