Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
0.8.3:assetsmanager [2022/04/08 09:36] – [TGorillaInventoryAsset] admin | 0.8.3:assetsmanager [2022/04/08 14:06] (current) – [Storing your assets package at runtime] admin | ||
---|---|---|---|
Line 133: | Line 133: | ||
==== TGorillaPrefabAsset ==== | ==== TGorillaPrefabAsset ==== | ||
- | Holds a prefab file in a TMemoryStream and writes those as *.prefab file to zip-archive. | + | Holds a prefab file in a TMemoryStream and writes those as *.prefab |
===== DesignTime ===== | ===== DesignTime ===== | ||
Line 139: | Line 139: | ||
In the next step we need to create a new package in " | In the next step we need to create a new package in " | ||
+ | |||
+ | Setting the filename of a package will initiate the IDE to load the package into memory. | ||
+ | |||
+ | **WARNING**: | ||
+ | |||
+ | To use relative paths on packages, we provide a set of preset values: | ||
+ | |||
+ | ^Placeholder^Description^ | ||
+ | |' | ||
+ | |' | ||
+ | |' | ||
+ | |' | ||
+ | |' | ||
+ | |' | ||
+ | |' | ||
+ | |' | ||
+ | |||
+ | **Notice**: Called internal functions of TPath are platform dependent. | ||
+ | Please take a look at Embarcadero documentation for further information, | ||
+ | |||
+ | |||
+ | Set the " | ||
+ | |||
+ | //" | ||
+ | |||
+ | <file pascal> | ||
+ | TGorillaAssetsPackage.Filename := ' | ||
+ | </ | ||
===== Example ===== | ===== Example ===== | ||
Line 175: | Line 203: | ||
Of course you are allowed to store the assets package you've setup. | Of course you are allowed to store the assets package you've setup. | ||
Easily use the provided SaveToFile method of each package instance. | Easily use the provided SaveToFile method of each package instance. | ||
+ | |||
+ | //Notice: In case your are working with a file-based package and the destination location is the same, nothing will be stored. | ||
+ | If the destination differs from currently loaded package, it will create a copy of the file package.// | ||
+ | |||
+ | //Notice: In case you are working with an in-memory package, it will be stored to file, but it stays in memory for further work. | ||
+ | If you want to load the stored in-memory package, you have to use the TGorillaAssetsManager.LoadPackageFromFile() method.// | ||
<file pascal Form1.pas> | <file pascal Form1.pas> |