The returned interface pointer is NOT AddRef'd; the caller should not Release it.
- po:A pointer to an ITrigmlDocument object.
- guid:The GUID of the element.
ITrigmlElement* ITRIGMLDOCUMENT_GetElementByGuid(ITrigmlDocument* po, uint32 guid)
A pointer to the element identified by the id parameter. NULL if no such element exists.
The GUIDs assigned to your elements are at the discretion of the player and should not be relied upon to be consistent between different executions of the same content. However, it is useful to be able to fetch an element by its GUID when writing a Lua library for use with TrigPlayer, because every Lua table representing a TrigML element will return that element's GUID when indexed with the key "_gid". (Use ILUA_GetTable() when querying the GUID, not ILUA_RawGet()).
_root always has GUID 0, but it is faster to call ITRIGMLDOCUMENT_GetRoot() to access the root element. MAX_UINT32 is never used as a GUID.