Template:Table ComponentMethods

Template page
Revision as of 07:20, 15 July 2024 by Bluigi (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


This template intends to replace Template:Table ComponentTriggers for displaying the table of methods on Component pages. It adds support for marking methods as hidden by the inspector, and simplifies the description of parameters in a way that would be incompatible with the old template which required manual formatting.

Powered by Module:ComponentMethods.

Usage

Each row may be specified on a single or multiple lines:

{{Table ComponentMethods
|<method>|<params>|<description>
-- or
|<method>
|<param>
;<param>
;<param>
|<description>
}}

where

  • params is a ; semicolon-separated list,
  • each param is a : colon-separated group of name, types and description,
  • and types is a , comma-separated list (in case a method is overloaded with different types) of simple type names or explicit page links as required. Simple type names will be rendered as a link to Type:<type name>; explicit links (determined by double brackets) will be used as-is.

params may also be left blank and will then be rendered as "none".

A method that is (without the use of a modded client) not listed in the inspector should be marked as "invisible" with an * asterisk after the closing ). Marking any method as invisible will add a footnote below the table accordingly.

Examples

{{Table ComponentMethods
|Resize(size, filtering)
|size:int,int2:Scaling factor.
;filtering:Filtering:Resampling method.
|Replaces the 2D texture with a scaled copy, resampled using the given filtering method. Scales separately on the X and Y axes when an int2 is passed.
}}
Methods
Method Parameters Description
Resize(size, filtering)

size : int or int2
Scaling factor.

filtering : Filtering
Resampling method.

Replaces the 2D texture with a scaled copy, resampled using the given filtering method. Scales separately on the X and Y axes when an int2 is passed.

{{Table ComponentMethods
|BakeMesh()||Stores a snapshot of this procedural mesh and replaces this component with a [[Component:StaticMesh|StaticMesh]].
|SetupRenderer()*||Attaches components for a default [[PBS_Metallic]] material and [[Component:MeshRenderer|MeshRenderer]] referencing this mesh.
}}
Methods
Method Parameters Description
BakeMesh() none Stores a snapshot of this procedural mesh and replaces this component with a StaticMesh.
SetupRenderer() * none Attaches components for a default PBS_Metallic material and MeshRenderer referencing this mesh.

* Methods marked with an asterisk are invisible in the inspector by default.