Easy Build System
Asset StoreSupportTwitterDiscord
  • Introduction
  • Getting Started
    • Getting Started
    • Common Issues
  • Tutorials
    • Beginners Guides
      • Modular Building Guide
      • Upgrading Guide
    • Advanced Guides
  • Components
    • Building Area
    • Building Group
    • Building Manager
      • Building Collection
      • Building Saver
    • Building Part
      • Building Conditions
    • Building Placer
      • Editor Building Placer
    • Building Socket
    • Building Linkable Surface
  • Integrations
    • Game Creator 2
      • Game Creator 2 - Inventory
    • Game Kit Controller
    • PlayMaker
    • PUN 2
    • Mirror
    • Fish-Net
    • RPG Builder
    • uSurvival
    • Rewired
  • Supports
    • XR Interaction Toolkit Support
  • Addons
    • Advanced Buildings
    • Buggy Constructor
    • Circular Building Menu
    • House Buildings
    • Survival Buildings
  • Annex
    • Compatibility
    • Refund Policy
Powered by GitBook
On this page

Was this helpful?

  1. Components

Building Socket

You can find all the information about Building Socket here.

PreviousEditor Building PlacerNextBuilding Linkable Surface

Last updated 1 year ago

Was this helpful?

Handles the snapping of according they offset position, rotation or scale.

It is possible to create new snapping points within each socket to enable snapping of a specific onto it.

When a is occupied by a Building Part, it becomes reserved for that "Type". This meaning that no other of the same type can be attached to it as long as the is present on the socket.

Explore fields description in the Inspector by hovering your cursor over them. You can find more information about this here: .


API

You can access this class by including the following namespace:

using EasyBuildSystem.Features.Runtime.Buildings.Socket;

Here is a list of all the events and methods of this component that can be called:

Methods

/// <summary>
/// Get the snapping point settings that can fit the specified Building Part.
/// </summary>
/// <param name="part">The Building Part to check for snapping points.</param>
/// <returns>The snapping point settings that can fit the Building Part.</returns>
SnappingPointSettings snapSettings = GetOffset(BuildingPart part);

/// <summary>
/// Snap a preview to a specified snapping point settings with an offset rotation.
/// </summary>
/// <param name="buildingPart">The Building Part to be snapped.</param>
/// <param name="offsetSettings">The snapping point settings to snap to.</param>
/// <param name="offsetRotation">The offset rotation to apply to the snapped Building Part.</param>
/// <returns>True if the snap operation is successful, false otherwise.</returns>
Snap(BuildingPart buildingPart, SnappingPointSettings offsetSettings, Vector3 offsetRotation);

/// <summary>
/// Check if this Building Part can fit with the specified Building Part.
/// </summary>
/// <param name="buildingPart">The Building Part to check for fit.</param>
/// <returns>True if the Building Part can fit, false otherwise.</returns>
bool canFit = IsFitting(BuildingPart buildingPart);

/// <summary>
/// Check if the socket is busy with the specified Building Part.
/// </summary>
/// <param name="part">The Building Part to check for occupancy.</param>
/// <returns>True if the socket is busy, false otherwise.</returns>.
bool isBusy = IsBusy(BuildingPart buildingPart);

All of the methods related to this component can be found in the file "BuildingSocket.cs". If you have any specific questions about the API, feel free to contact us.

Building Parts
Building Part
Building Socket
Building Parts
Building Part
Tooltip Attribute