Class ComponentRegistry
Keeps track of all the custom components.
Inheritance
Inherited Members
Namespace: PiTung.Components
Assembly: PiTung.dll
Syntax
public static class ComponentRegistry
Methods
| Improve this Doc View SourceCreateNew(Mod, String, String, Builder)
Deprecated, use CreateNew(String, String, Builder).
Declaration
[Obsolete("The parameter 'mod' is no longer required.")]
public static CustomComponent CreateNew(Mod mod, string name, string displayName, Builder builder)
Parameters
Type | Name | Description |
---|---|---|
Mod | mod | |
System.String | name | |
System.String | displayName | |
Builder | builder |
Returns
Type | Description |
---|---|
CustomComponent |
CreateNew(String, String, Builder)
Registers a new custom component with no update handler.
Declaration
public static CustomComponent CreateNew(string name, string displayName, Builder builder)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The component's "ugly" name. This name will be used to uniquely identify the component, so make sure that no other mods will use it. |
System.String | displayName | The name that will be shown in the components menu. |
Builder | builder | The builder that you use to create the structure of the component. See PrefabBuilder. |
Returns
Type | Description |
---|---|
CustomComponent | A CustomComponent instance. You don't need to store this. |
CreateNew<THandler>(Mod, String, String, Builder)
Deprecated, use CreateNew<THandler>(String, String, Builder).
Declaration
[Obsolete("The parameter 'mod' is no longer required.")]
public static CustomComponent<THandler> CreateNew<THandler>(Mod mod, string name, string displayName, Builder builder)
where THandler : UpdateHandler
Parameters
Type | Name | Description |
---|---|---|
Mod | mod | |
System.String | name | |
System.String | displayName | |
Builder | builder |
Returns
Type | Description |
---|---|
CustomComponent<THandler> |
Type Parameters
Name | Description |
---|---|
THandler |
CreateNew<THandler>(String, String, Builder)
Registers a new custom component with an update handler of type THandler
.
Declaration
public static CustomComponent CreateNew<THandler>(string name, string displayName, Builder builder)
where THandler : UpdateHandler
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The component's "ugly" name. This name will be used to uniquely identify the component, so make sure that no other mods will use it. |
System.String | displayName | The name that will be shown in the components menu. |
Builder | builder | The builder that you use to create the structure of the component. See PrefabBuilder. |
Returns
Type | Description |
---|---|
CustomComponent | A CustomComponent<THandler> instance. You don't need to store this. |
Type Parameters
Name | Description |
---|---|
THandler | The update handler type. |