MTA:Eir/functions/engineStreamingIsElementManaged: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ This function returns whether the given element is managed by the Streaming garbage collector. If an entity is managed, its Ren...") |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{*Client_function}} | |||
__NOTOC__ | __NOTOC__ | ||
This function returns whether the given element is managed by the [[GTA:SA_Streaming_Garbage_Collection|Streaming garbage collector]]. If an entity is managed, its RenderWare data can be deallocated once the engine is lacking available '''streaming memory''' (an option found in your game settings under the Video tab). | This function returns whether the given element is managed by the [[GTA:SA_Streaming_Garbage_Collection|Streaming garbage collector]]. If an entity is managed, its RenderWare data can be deallocated once the engine is lacking available '''streaming memory''' (an option found in your game settings under the Video tab). |
Revision as of 01:58, 12 January 2014
This function returns whether the given element is managed by the Streaming garbage collector. If an entity is managed, its RenderWare data can be deallocated once the engine is lacking available streaming memory (an option found in your game settings under the Video tab).
Syntax
bool engineStreamingIsElementManaged ( element entity )
Arguments
- entity: an entity that is streamed in and has a visible game representation
Returns
Returns true if the given entity is being managed by the engine Streaming GC system. Returns false if the entity type is not being managed at all, entity does not have a visible game representation or entity is not passed as valid parameter.
Example
Click to collapse [-]
ClientThis snippet returns every object that is managed by the Streaming GC system.
function getStreamingManagedObjects() local objects = getElementsByType( "object" ); local managedObjects = {}; local num = 1; for m,n in ipairs( objects ) do if ( engineStreamingIsElementManaged( n ) ) then managedObjects[num] = n; num = num + 1; end end return managedObjects, num; end