Click or drag to resize

MeshesCreateBox Method

Creates a box.

Namespace:  KSPDev.ModelUtils
Assembly:  KSPDev_Utils.2.5 (in KSPDev_Utils.2.5.dll) Version: 2.5 for KSP v1
Syntax
C#
public static GameObject CreateBox(
	float width,
	float height,
	float length,
	Material material,
	Transform parent,
	CollidersPrimitiveCollider colliderType = CollidersPrimitiveCollider.None
)
Request Example View Source

Parameters

width
Type: SystemSingle
X-axis of the box.
height
Type: SystemSingle
Y-axis of the box.
length
Type: SystemSingle
Z-axis of the box.
material
Type: UnityEngineMaterial
Material for the primitive.
parent
Type: UnityEngineTransform
Parent transform to attach primitive to.
colliderType (Optional)
Type: KSPDev.ModelUtilsCollidersPrimitiveCollider
Type of the collider to create on the primitive.

Return Value

Type: GameObject
Box game object.
See Also