Revision Difference
game.MountGMA#549782
<function name="MountGMA" parent="game" type="libraryfunc">
<description>
Mounts a GMA addon from the disk.
Can be used with <page>steamworks.DownloadUGC</page>
<note>Any error models currently loaded that the mounted addon provides will be reloaded.
Any error materials currently loaded that the mounted addon provides will NOT be reloaded. That means that this cannot be used to fix missing map materials, as the map materials are loaded before you are able to call this.</note>
</description>
<realm>Shared</realm>
<args>
<arg name="path" type="string">Location of the GMA file to mount, retrieved from <page>steamworks.DownloadUGC</page>. This file does not have to end with the .gma extension, but will be interpreted as a GMA.</arg>
<arg name="path" type="string">Location of the GMA file to mount, retrieved from <page>steamworks.DownloadUGC</page> or relative to the `garrysmod/` directory (ignores mounting). This file does not have to end with the .gma extension, but will be interpreted as a GMA.</arg>
</args>
<rets>
<ret name="" type="boolean">success</ret>
<ret name="" type="table">If successful, a table of files that have been mounted</ret>
</rets>
</function>
<example>
<description>Downloads the Playable Piano addon and mounts the content.</description>
<code>
steamworks.DownloadUGC( 104548572, function( path )
game.MountGMA( path )
end)
</code>
</example>