PreviewModel

AUTO-GENERATED FILE – DO NOT EDIT MANUALLY

This page documents the supported public API surface only. Private, internal, benchmark, test, and implementation-detail types are intentionally omitted.

Declaration

1
public class PreviewModel

Summary

Represents a preview model for placement operations.

This class contains the visual and spatial data needed to render a preview of where a placeable object will be placed.

Metadata

Namespace: GridPlacement.Core.Types

Source File: cs/Core/Types/PreviewModel.cs

Assembly: GridPlacement.Core

Type: class

Constructors

PreviewModel

1
public PreviewModel()

Initializes a new instance of the PreviewModel class.


Properties

Transform

1
public CoreVector3 Transform { get; set; }

Gets or sets the transform for the preview.


OccupiedCells

1
public List<CoreVector2I> OccupiedCells { get; set; }

Gets or sets the list of grid cells that will be occupied.


IsValidPlacement

1
public bool IsValidPlacement { get; set; }

Gets or sets whether the placement is valid.


IsVisible

1
public bool IsVisible { get; set; }

Gets or sets whether the preview should be visible.


ValidationStatus

1
public int ValidationStatus { get; set; }

Gets or sets the validation status code.


ValidationMessage

1
public string ValidationMessage { get; set; }

Gets or sets the validation message.


Methods

Visible

1
2
3
4
5
6
7
public static PreviewModel Visible(
    CoreVector3 transform,
    List<CoreVector2I> occupiedCells,
    bool isValid = true,
    int validationStatus = 1,
    string validationMessage = ""
)

Creates a visible preview model with the specified transform and cells.

Parameters

NameDescription
transformThe transform for the preview.
occupiedCellsThe cells that will be occupied.
isValidWhether the placement is valid.
validationStatusThe validation status code.
validationMessageThe validation message.

Returns

A new PreviewModel instance.


Hidden

1
public static PreviewModel Hidden()

Creates a hidden preview model.

Returns

A new hidden PreviewModel instance.