forked from GER-Space/Kerbal-Konstructs
-
Notifications
You must be signed in to change notification settings - Fork 11
Variant Switching:
Christian Bronk edited this page Jan 20, 2019
·
5 revisions
You can define in a model .cfg file variants of your model, whithout the need to export different .mu for each variant.
Features:
- Deactivation of sub-meshes of an object (child gameObjects)
- You can retexture parts of the Object with different textures and apply new colors. (Builtin:/ textures are possible)
- You can specify a complete new mesh (.mu) to be used.
Rules:
- The first variant specified is the default
- If no variant is specified, the model will be used as-is.
- Nothing needs to be specified, except for a name.
`
// first one is the default
VARIANT
{
name = DisableTest
deactiateTransforms = default // , seperated list of transforms to disable
}
// Variant with everathing enabled and no fancy stuff happening
VARIANT
{
name = AllOn
}
// Mesh switching... be warned all static modules will try to apply thier config
VARIANT
{
name = SwtichTest
newMeshName = threshold6 // name of the .mu what to spawn instead
}
// Texture replacing Demo
VARIANT
{
name = TextureTest
// There can be many texture sets
TextureSet
{
transforms = default // , seperated list of transforms to alter
texture = BUILTIN:/ksc_exterior_terrain_ground // Optional new texture
color = 0.64,0.73,0.171,0.728999972 // Optional new base color
}
}