MTA:Eir/functions/engineGetActiveStreamingEntityCount

From Multi Theft Auto: Wiki
Revision as of 01:37, 12 January 2014 by Qaisjp (talk | contribs)
Jump to navigation Jump to search

This function returns how many entities are inside of the streaming garbage collection system. It is useful for performance debugging purposes. More uses come out of it if combined with other engine streaming functions.

Syntax

int engineGetActiveStreamingEntityCount ()

Returns

Returns the amount of entities that are registered inside of the streaming garbage collector.

Example

Click to collapse [-]
Client

This snippet draws the amount of active streaming entities on your screen.

addEventHandler( "onClientRender", root,
    function()
        local count = engineGetActiveStreamingEntityCount();

        dxDrawText( "#streaming-entities: " .. count, 100, 400 );
    end
);