Class EntityBuildingElement
- Namespace
- VoxelPlayground.Entity
- Assembly
- GamePlay.dll
public class EntityBuildingElement : EntityAttachmentItem
- Inheritance
-
objectEntityBuildingElement
- 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
bounds
[SuffixLabel("Auto", false)]
public Transform bounds
Field Value
craftingInfo
[NonSerialized]
public CraftingRecipe craftingInfo
Field Value
damageDysfunctionPercentage
[TabGroup("Event", false, 0)]
public float damageDysfunctionPercentage
Field Value
- float
elementVolume
[FormerlySerializedAs("elementMarchingCube")]
public VoxelVolume elementVolume
Field Value
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
OnDysfunction
[TabGroup("Event", false, 0)]
public DysfunctionEvent OnDysfunction
Field Value
previewVolume
[FormerlySerializedAs("previewMarchingCube")]
public VoxelVolume previewVolume
Field Value
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
placingRotQuaternionresultEntityBuildingElement.PlacementOverlapResultoverlapExpandfloatkernelExpandVector3kernelMinAxisVector3
ControlledUpdate(float)
public override void ControlledUpdate(float deltaTime)
Parameters
deltaTimefloat
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
rootObjectGameObjectitemEntityAttachmentItemusePreviewMaterialbool
CreatePreviewInstance(GameObject)
public static EntityBuildingElement CreatePreviewInstance(GameObject prefab)
Parameters
prefabGameObject
Returns
OnVoxelModified(VoxelVolume)
public void OnVoxelModified(VoxelVolume mc)
Parameters
mcVoxelVolume
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
prefabGameObjectpositionVector3rotationQuaternionattachToEntityBuildingElementotherAttachTargetsList<EntityBuildingElement>isGroundboolattachPosVector3?attachRotQuaternion?myAttachLocalVector3?targetAttachLocalVector3?onCompleteAction<EntityBuildingElement>fallbackVoxelIduint
Returns
Start()
protected override void Start()