Part variants hold information on how a part looks. It will only allow visual changes, so it will hold information regarding materials or models. A part is allowed to have mutiple variants if needed, the user can toggle this variants in the VAB/SPH when building a vessel. Or in the part selector with a small button in the corner. This class needs to be serialized so it can be copy its properties correctly to part instances.
More...
|
Transform | FindChild (Transform parent, string childName) |
|
string | GetExtraInfoValue (string name) |
|
void | Load (ConfigNode node) |
| Load will read a Variant node in the PartVariants module. You can set the values of the base variant in the root node, and then define each variant seperately. More...
|
|
| PartVariant (string name, string displayName, List< AttachNode > attachNodes) |
| Empty constructor, all the other parameters have to be set manually. More...
|
|
| PartVariant (string name, string displayName, List< AttachNode > attachNodes, AttachNode srfAttachNode) |
| Empty constructor, all the o ther parameters have to be set manually. More...
|
|
| PartVariant (PartVariant baseVariant) |
| A constructor that will copy the properties of other variant, that way when its loaded the base stays the same. More...
|
|
void | Save (ConfigNode node) |
| No need to save anything about variants, they wont persist. More...
|
|
bool | TryCopyMaterial (Material baseMaterial) |
| Will try to add a copy a material as a variant property, if it already exists it will be skipped. More...
|
|
void | UpdateMaterialFromExtraInfo (Material material) |
| Updates the current materials with the custom information of a texture node. You can specify a shader, its properties and what material is the target. More...
|
|
void | UpdateModel (Transform partRoot) |
|
|
List< AttachNode > | AttachNodes [get] |
| Stack Attach Nodes More...
|
|
AttachRules | AttachRules [get, set] |
| Attach Rules More...
|
|
float | Cost [get, set] |
| The additional cost of this variant. This value is ADDED to the base item's cost. More...
|
|
List< string > | DisabledAnimations [get, set] |
| Which ModuleAnimateGeneric modules should be disabled when this variant is active. ModuleAnimateGeneric modules are identified by their animationName. More...
|
|
List< string > | DisabledEvents [get, set] |
| Which Event modules should be disabled when this variant is active. Event modules are identified by their name. More...
|
|
string | DisplayName [get, set] |
| The name displayed in the UI More...
|
|
List< PartGameObjectInfo > | InfoGameObjects [get] |
| The url of this variant .mu file (empty if not needed) More...
|
|
float | Mass [get, set] |
| The additional mass of this variant. This value is ADDED to the base item's mass. More...
|
|
List< Material > | Materials [get] |
| The templetes materials for this part variant. Generated from the Texture node. More...
|
|
string | Name [get, set] |
| The name of this variant More...
|
|
string | PrimaryColor [get, set] |
| The primary color of the PAW button. More...
|
|
string | SecondaryColor [get, set] |
| The secondary color of the PAW button. More...
|
|
string | SizeGroup [get, set] |
| The sizegroup of this variant, they are used to filter out other variants that dont match in dimensions and there are things surface attached More...
|
|
AttachNode | SrfAttachNode [get] |
| Surface AttachNode More...
|
|
Part variants hold information on how a part looks. It will only allow visual changes, so it will hold information regarding materials or models. A part is allowed to have mutiple variants if needed, the user can toggle this variants in the VAB/SPH when building a vessel. Or in the part selector with a small button in the corner. This class needs to be serialized so it can be copy its properties correctly to part instances.
PartVariant.PartVariant |
( |
string |
name, |
|
|
string |
displayName, |
|
|
List< AttachNode > |
attachNodes |
|
) |
| |
|
inline |
Empty constructor, all the other parameters have to be set manually.
PartVariant.PartVariant |
( |
string |
name, |
|
|
string |
displayName, |
|
|
List< AttachNode > |
attachNodes, |
|
|
AttachNode |
srfAttachNode |
|
) |
| |
|
inline |
Empty constructor, all the o ther parameters have to be set manually.
A constructor that will copy the properties of other variant, that way when its loaded the base stays the same.
- Parameters
-
baseVariant | The variant used as reference to copy the information from. |
Transform PartVariant.FindChild |
( |
Transform |
parent, |
|
|
string |
childName |
|
) |
| |
|
inline |
string PartVariant.GetExtraInfoValue |
( |
string |
name | ) |
|
|
inline |
Load will read a Variant node in the PartVariants module. You can set the values of the base variant in the root node, and then define each variant seperately.
- Parameters
-
Implements IConfigNode.
No need to save anything about variants, they wont persist.
- Parameters
-
Implements IConfigNode.
bool PartVariant.TryCopyMaterial |
( |
Material |
baseMaterial | ) |
|
|
inline |
Will try to add a copy a material as a variant property, if it already exists it will be skipped.
- Parameters
-
material | The material that will be tried to be copied. |
void PartVariant.UpdateMaterialFromExtraInfo |
( |
Material |
material | ) |
|
|
inline |
Updates the current materials with the custom information of a texture node. You can specify a shader, its properties and what material is the target.
- Parameters
-
partMaterial | The part material that holds the custom information on what to update. |
void PartVariant.UpdateModel |
( |
Transform |
partRoot | ) |
|
|
inline |
string PartVariant.themeName |
The additional cost of this variant. This value is ADDED to the base item's cost.
List<string> PartVariant.DisabledAnimations |
|
getset |
List<string> PartVariant.DisabledEvents |
|
getset |
Which Event modules should be disabled when this variant is active. Event modules are identified by their name.
string PartVariant.DisplayName |
|
getset |
The name displayed in the UI
The url of this variant .mu file (empty if not needed)
The additional mass of this variant. This value is ADDED to the base item's mass.
List<Material> PartVariant.Materials |
|
get |
The templetes materials for this part variant. Generated from the Texture node.
string PartVariant.PrimaryColor |
|
getset |
The primary color of the PAW button.
string PartVariant.SecondaryColor |
|
getset |
The secondary color of the PAW button.
string PartVariant.SizeGroup |
|
getset |
The sizegroup of this variant, they are used to filter out other variants that dont match in dimensions and there are things surface attached
The documentation for this class was generated from the following file: