UNPKG

hytopia

Version:

The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.

64 lines (31 loc) 1.09 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [server](./server.md) &gt; [AssetsLibrary](./server.assetslibrary.md) &gt; [syncAsset](./server.assetslibrary.syncasset.md) ## AssetsLibrary.syncAsset() method Synchronizes an asset from the assets library to the local assets directory. **Signature:** ```typescript syncAsset(assetPath: string): void; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> assetPath </td><td> string </td><td> The path of the asset to copy to local assets. \*\*Requires:\*\* Assets library must be available (development only). \*\*Side effects:\*\* Writes files into the local `assets/` directory. \*\*Category:\*\* Assets </td></tr> </tbody></table> **Returns:** void ## Remarks Syncs an asset from the assets library to local assets in development. The assets library is unavailable in production, so assets must be local to the project.