Table of Contents

Class EntityBuildingElement

Namespace
VoxelPlayground.Entity
Assembly
GamePlay.dll
public class EntityBuildingElement : EntityAttachmentItem
Inheritance
object
EntityBuildingElement
Inherited Members
Extension Methods

Fields

AdditionalPhysicsIteration

public int AdditionalPhysicsIteration

Field Value

int

AttachOnStart

public bool AttachOnStart

Field Value

bool

AttachPointsRoot

public Transform AttachPointsRoot

Field Value

Transform

bounds

[SuffixLabel("Auto", false)]
public Transform bounds

Field Value

Transform

craftingInfo

[NonSerialized]
public CraftingRecipe craftingInfo

Field Value

CraftingRecipe

damageDysfunctionPercentage

[TabGroup("Event", false, 0)]
public float damageDysfunctionPercentage

Field Value

float

elementVolume

[FormerlySerializedAs("elementMarchingCube")]
public VoxelVolume elementVolume

Field Value

VoxelVolume

hasDysfunctionEvent

[TabGroup("Event", false, 0)]
public bool hasDysfunctionEvent

Field Value

bool

isFreePlacement

public bool isFreePlacement

Field Value

bool

isGridBuildingModule

public bool isGridBuildingModule

Field Value

bool

isPlacingPivotInCenter

public bool isPlacingPivotInCenter

Field Value

bool

isWall

public bool isWall

Field Value

bool

JointData

public JointInfoData JointData

Field Value

JointInfoData

OnDysfunction

[TabGroup("Event", false, 0)]
public DysfunctionEvent OnDysfunction

Field Value

DysfunctionEvent

previewVolume

[FormerlySerializedAs("previewMarchingCube")]
public VoxelVolume previewVolume

Field Value

VoxelVolume

Properties

DamagePercentage

public float DamagePercentage { get; }

Property Value

float

Methods

Awake()

protected override void Awake()

CheckPlacementOverlap(Quaternion, ref PlacementOverlapResult, float, Vector3, Vector3)

public void CheckPlacementOverlap(Quaternion placingRot, ref EntityBuildingElement.PlacementOverlapResult result, float overlapExpand = 0.01, Vector3 kernelExpand = default, Vector3 kernelMinAxis = default)

Parameters

placingRot Quaternion
result EntityBuildingElement.PlacementOverlapResult
overlapExpand float
kernelExpand Vector3
kernelMinAxis Vector3

ControlledUpdate(float)

public override void ControlledUpdate(float deltaTime)

Parameters

deltaTime float

ConvertToPreviewState(GameObject, EntityAttachmentItem, bool)

Convert an entity to preview state (no collision, kinematic, ignore raycast). Used for placing preview items.

public static void ConvertToPreviewState(GameObject rootObject, EntityAttachmentItem item, bool usePreviewMaterial = false)

Parameters

rootObject GameObject
item EntityAttachmentItem
usePreviewMaterial bool

CreatePreviewInstance(GameObject)

public static EntityBuildingElement CreatePreviewInstance(GameObject prefab)

Parameters

prefab GameObject

Returns

EntityBuildingElement

OnVoxelModified(VoxelVolume)

public void OnVoxelModified(VoxelVolume mc)

Parameters

mc VoxelVolume

SpawnAndPlace(GameObject, Vector3, Quaternion, EntityBuildingElement, List<EntityBuildingElement>, bool, Vector3?, Quaternion?, Vector3?, Vector3?, Action<EntityBuildingElement>, uint)

public static EntityBuildingElement SpawnAndPlace(GameObject prefab, Vector3 position, Quaternion rotation, EntityBuildingElement attachTo, List<EntityBuildingElement> otherAttachTargets, bool isGround, Vector3? attachPos = null, Quaternion? attachRot = null, Vector3? myAttachLocal = null, Vector3? targetAttachLocal = null, Action<EntityBuildingElement> onComplete = null, uint fallbackVoxelId = 0)

Parameters

prefab GameObject
position Vector3
rotation Quaternion
attachTo EntityBuildingElement
otherAttachTargets List<EntityBuildingElement>
isGround bool
attachPos Vector3?
attachRot Quaternion?
myAttachLocal Vector3?
targetAttachLocal Vector3?
onComplete Action<EntityBuildingElement>
fallbackVoxelId uint

Returns

EntityBuildingElement

Start()

protected override void Start()