Skip to content

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:

  1. The first variant specified is the default
  2. If no variant is specified, the model will be used as-is.
  3. Nothing needs to be specified, except for a name.

` STATIC { mesh = KKflagDemo.mu module = Part scale = 1 static = true DefaultLaunchPadTransform = author = Spanner title = Billboard with mission flag category = none cost = 0 manufacturer = SM Marine description = KKflagDemo A billboard featuring your mission flag name = KKflagDemo DefaultFacilityType = none keepConvex = true

VARIANT 
{
	name = newMesh
	newMeshName = threshold6
}
VARIANT 
{
	name = DisablePartsTest
	deactiateTransforms = default
}
VARIANT 
{
	name = TextureTest
	TextureSet
	{		
		transforms = default
		texture = BUILTIN:/ksc_exterior_terrain_ground
		color = 0.64,0.73,0.171,0.728999972
	}
	TextureSet
	{		
		transforms = Something_else
		texture = newTexture
	}

}

} `