Click or drag to resize

Meshes.CreateCylinder Method

Creates a cylinder.

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 CreateCylinder(
	float diameter,
	float length,
	Material material,
	Transform parent,
	Colliders.PrimitiveCollider colliderType = Colliders.PrimitiveCollider.None
)
Request Example View Source

Parameters

diameter
Type: System.Single
XY of the cylinder.
length
Type: System.Single
Z-axis of the cylinder.
material
Type: UnityEngine.Material
Material for the primitive.
parent
Type: UnityEngine.Transform
Parent transform to attach primitive to.
colliderType (Optional)
Type: KSPDev.ModelUtils.Colliders.PrimitiveCollider
Type of the collider to create on the primitive.

Return Value

Type: GameObject
Cylinder game object.
See Also