User Tools

Site Tools


components

Differences

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


components [2020/07/08 10:21] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== Components ======
 +Components are small modules used to define the behavior of any game object. Game objects can have any number of components, but can have only one of each type.
  
 +See the [[api:#Component Classes|list of all available components]]. You can also define [[:custom-classes#Custom components|your own custom components]].
 +
 +----
 +
 +Components can be added to any FBX node with the ''mod:registerPrefabComponent'' function.
 +
 +<file lua mod.lua>
 +mod:registerPrefabComponent("models/MithrilFactory.fbx/Prefab/MithrilFactory/ExtensionB/RootPart", {
 + DataType = "COMP_DIRT_RECTANGLE",
 + Size = {8, 8}
 +})
 +</file>
 +
 +See mod Example 02 for more examples.
components.1576710305.txt.gz · Last modified: 2019/12/18 18:05 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki