User Tools

Site Tools


foundation-library-functions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
foundation-library-functions [2026/02/23 16:53] polymorphgamesfoundation-library-functions [2026/08/03 17:10] (current) maxime
Line 62: Line 62:
 Creates a new instance of a data type Creates a new instance of a data type
  
-''void **myMod:createData**(//instanceData//)''+''data **myMod:createData**(//instanceData//)''
  
 ^ Name ^ Type ^ Description ^ ^ Name ^ Type ^ Description ^
Line 74: Line 74:
     ...     ...
 } }
-foundation.createData(instanceData )+local newData = foundation.createData(instanceData
 +</code> 
 + 
 +---- 
 + 
 +===== createAsset ===== 
 + 
 +Creates a new runtime instance of an asset type 
 + 
 +''[[api:ASSET|ASSET]] **myMod:createAsset**(//instanceAssetData//)'' 
 + 
 +^ Name ^ Type ^ Description ^ 
 +| //''instanceAssetData''// | ''table'' | the data defining the new runtime asset instance. The table must contain at least the instance's type (''DataType'', see [[api|API]] for the complete list) | 
 + 
 +==== Example ==== 
 + 
 +<code lua> 
 +local assetData = { 
 +    DataType = "DATA_TYPE", 
 +    ... 
 +
 +local newAsset = foundation.createAsset(assetData)
 </code> </code>
  
foundation-library-functions.1771883590.txt.gz · Last modified: 2026/02/23 16:53 by polymorphgames

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki