Type Function Return value none Revision Release 2024.3703 Keywords on-demand resources, onDemandResources, setEventListener See also onDemandResources.request() onDemandResources.*
Sets a "global" listener function that will receive "lowDiskSpace"
.
If you're not interested in "lowDiskSpace"
events, you can ignore this method and simply use individual listener references within request calls.
onDemandResources.setEventListener( listener )
local odr = require( "plugin.onDemandResources" ) -- Function to receive events from all on-demand resources calls local function odrGlobalListener( event ) print( "Received on-demand resources event" ) print( "Type: " .. event.type ) print( "Tag: " .. event.tag ) end odr.setEventListener( odrGlobalListener )