User Tools

Site Tools


custom-asset

Differences

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

Link to this comparison view

Next revision
Previous revision
custom-asset [2022/03/30 10:16] – created - external edit 127.0.0.1custom-asset [2026/02/23 17:19] (current) – [Step 1: Defining an ASSET Object using a Lua Table] polymorphgames
Line 5: Line 5:
 ===== Creating & Using a Custom ASSET Object ===== ===== Creating & Using a Custom ASSET Object =====
 ==== Step 1: Defining an ASSET Object using a Lua Table ==== ==== Step 1: Defining an ASSET Object using a Lua Table ====
-To create a custom [[assets|ASSET]] object we will need to make use of the ''mod:registerClass(AssetTable)'' function providing it with an associated Lua Table.+To create a custom [[assets|ASSET]] object we will need to make use of the ''mod:registerClass([[:class-info|classInfo]])'' function providing it with an associated Lua Table.
  
 Here you decide what properties your custom [[assets|ASSET]] object will contain.  Here you decide what properties your custom [[assets|ASSET]] object will contain. 
Line 11: Line 11:
 local MY_ASSET_OBJECT = { local MY_ASSET_OBJECT = {
     TypeName = "MY_ASSET_OBJECT",     TypeName = "MY_ASSET_OBJECT",
-    DataType = "ASSET",+    ParentType = "ASSET",
     Properties = {     Properties = {
         { Name = "Property1", Type = "string", Default = "SomeString" },         { Name = "Property1", Type = "string", Default = "SomeString" },
custom-asset.1648649768.txt.gz · Last modified: 2022/03/30 10:16 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki