Version: 2022.3
言語: 日本語

Tilemap

class in UnityEngine.Tilemaps

/

継承:GridLayout

マニュアルに切り替える

説明

The Tilemap stores Sprites in a layout marked by a Grid component.

変数

animationFrameRateThe frame rate for all Tile animations in the Tilemap.
cellBoundsReturns the boundaries of the Tilemap in cell size.
colorThe color of the Tilemap layer.
editorPreviewOriginThe origin of the Tilemap in cell position inclusive of editor preview Tiles.
editorPreviewSizeThe size of the Tilemap in cells inclusive of editor preview Tiles.
layoutGridGets the Grid associated with this Tilemap.
localBoundsReturns the boundaries of the Tilemap in local space size.
orientationOrientation of the Tiles in the Tilemap.
orientationMatrixOrientation Matrix of the orientation of the Tiles in the Tilemap.
originThe origin of the Tilemap in cell position.
sizeThe size of the Tilemap in cells.
tileAnchorGets the anchor point of Tiles in the Tilemap.

Public 関数

AddTileAnimationFlagsAdds the TileAnimationFlags onto the Tile at the given position.
AddTileFlagsAdds the TileFlags onto the Tile at the given position.
BoxFillDoes a box fill with the given Tile on the Tilemap. Starts from given coordinates and fills the limits from start to end (inclusive).
ClearAllEditorPreviewTilesClears all editor preview Tiles that are placed in the Tilemap.
ClearAllTilesClears all Tiles that are placed in the Tilemap.
CompressBoundsCompresses the origin and size of the Tilemap to bounds where Tiles exist.
ContainsTileReturns true if the Tilemap contains the given Tile. Returns false if not.
DeleteCellsRemoves cells from within the Tilemap's bounds.
EditorPreviewBoxFillDoes an editor preview of a box fill with the given Tile on the Tilemap. Starts from given coordinates and fills the limits from start to end (inclusive).
EditorPreviewFloodFillDoes an editor preview of a flood fill with the given Tile to place. on the Tilemap starting from the given coordinates.
FloodFillDoes a flood fill with the given Tile to place. on the Tilemap starting from the given coordinates.
GetAnimationFrameRetrieves the current animation frame for a Tile at the given position.
GetAnimationFrameCountRetrieves the number of animation frames for a Tile at the given position.
GetAnimationTimeRetrieves the current running animation time for a Tile at the given position.
GetCellCenterLocalGets the logical center coordinate of a Grid cell in local space. The logical center for a cell of the Tilemap is defined by the Tile Anchor of the Tilemap.
GetCellCenterWorldGets the logical center coordinate of a Grid cell in world space. The logical center for a cell of the Tilemap is defined by the Tile Anchor of the Tilemap.
GetColliderTypeGets the Collider type of a Tile given the XYZ coordinates of a cell in the Tilemap.
GetColorGets the Color of a Tile given the XYZ coordinates of a cell in the Tilemap.
GetEditorPreviewColorGets the Color of an editor preview Tile given the XYZ coordinates of a cell in the Tilemap.
GetEditorPreviewSpriteGets the Sprite used in an editor preview Tile given the XYZ coordinates of a cell in the Tilemap.
GetEditorPreviewTileGets the editor preview Tile at the given XYZ coordinates of a cell in the Tilemap.
GetEditorPreviewTileFlagsGets the TileFlags of the editor preview Tile at the given position.
GetEditorPreviewTransformMatrixGets the transform matrix of an editor preview Tile given the XYZ coordinates of a cell in the Tilemap.
GetInstantiatedObjectGets the GameObject instantiated by a Tile given the XYZ coordinates of a cell in the Tilemap.
GetObjectToInstantiateGets the GameObject which will be instantiated by a Tile given the XYZ coordinates of a cell in the Tilemap.
GetSpriteGets the Sprite used in a Tile given the XYZ coordinates of a cell in the Tilemap.
GetTileGets the Tile at the given XYZ coordinates of a cell in the Tilemap.
GetTileAnimationFlagsGets the TileAnimationFlags of the Tile at the given position.
GetTileFlagsGets the TileFlags of the Tile at the given position.
GetTilesBlockRetrieves an array of Tiles with the given bounds.
GetTilesBlockNonAllocRetrieves an array of Tiles with the given bounds.
GetTilesRangeCountRetrieves the number of Tiles within the given range, inclusive of the Cells at both the starting position and the ending positions. This method begins at the given starting position and iterates through all available Z Positions, then iterates through the X and Y positions until it reaches the ending position.
GetTilesRangeNonAllocRetrieves an array of Tiles within the given range, inclusive of the Cells at both the starting position and the ending positions. This method begins at the given starting position and iterates through all available Z Positions, then iterates through the X and Y positions until it reaches the ending position.
GetTransformMatrixGets the transform matrix of a Tile given the XYZ coordinates of a cell in the Tilemap.
GetUsedSpritesCountGets the total number of different Sprites used in the Tilemap.
GetUsedSpritesNonAllocFills the given array with the total number of different Sprites used in the Tilemap and returns the number of Sprites filled.
GetUsedTilesCountGets the total number of different Tiles used in the Tilemap.
GetUsedTilesNonAllocFills the given array with the total number of different Tiles used in the Tilemap and returns the number of Tiles filled.
HasEditorPreviewTileReturns whether there is an editor preview Tile at the position.
HasTileReturns whether there is a Tile at the position.
InsertCellsInserts cells into the Tilemap.
RefreshAllTilesRefreshes all Tiles in the Tilemap. The Tilemap will retrieve the rendering data, animation data and other data for all tiles and update all relevant components.
RefreshTileRefreshes a Tile at the given XYZ coordinates of a cell in the Tilemap.
RemoveTileAnimationFlagsRemoves the TileAnimationFlags from the Tile at the given position.
RemoveTileFlagsRemoves the TileFlags from the Tile at the given position.
ResizeBoundsResizes Tiles in the Tilemap to bounds defined by origin and size.
SetAnimationFrameSets the current animation frame for a Tile at the given position.
SetAnimationTimeSets the running animation time for a Tile at the given position.
SetColliderTypeSets the Collider type of a Tile given the XYZ coordinates of a cell in the Tilemap.
SetColorSets the color of a Tile given the XYZ coordinates of a cell in the Tilemap.
SetEditorPreviewColorSets the color of an editor preview Tile given the XYZ coordinates of a cell in the Tilemap.
SetEditorPreviewTileSets an editor preview Tile given the XYZ coordinates of a cell in the Tilemap.
SetEditorPreviewTransformMatrixSets the transform matrix of an editor preview Tile given the XYZ coordinates of a cell in the Tilemap.
SetTileSets a Tile at the given XYZ coordinates of a cell in the Tilemap.
SetTileAnimationFlagsSets the TileAnimationFlags onto the Tile at the given position.
SetTileFlagsSets the TileFlags onto the Tile at the given position.
SetTilesSets an array of Tiles at the given XYZ coordinates of the corresponding cells in the Tilemap.
SetTilesBlockFills bounds with array of Tiles.
SetTransformMatrixSets the transform matrix of a Tile given the XYZ coordinates of a cell in the Tilemap.
SwapTileSwaps all existing Tiles of changeTile to newTile and refreshes all the swapped Tiles.

Events

tilemapPositionsChangedCallback when Tiles on a Tilemap have changed.
tilemapTileChangedCallback when Tiles on a Tilemap have changed.

継承メンバー

変数

enabled有効であれば更新され、無効であれば更新されません。
isActiveAndEnabledReports whether a GameObject and its associated Behaviour is active and enabled.
gameObjectこのコンポーネントはゲームオブジェクトにアタッチされます。コンポーネントはいつもゲームオブジェクトにアタッチされています。
tagゲームオブジェクトのタグ
transformThe Transform attached to this GameObject.
cellGapThe size of the gap between each cell in the layout.
cellLayoutThe layout of the cells.
cellSizeThe size of each cell in the layout.
cellSwizzleThe cell swizzle for the layout.
hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameオブジェクト名

Public 関数

BroadcastMessageゲームオブジェクトまたは子オブジェクトにあるすべての MonoBehaviour を継承したクラスにある methodName 名のメソッドを呼び出します。
CompareTagChecks the GameObject's tag against the defined tag.
GetComponentGets a reference to a component of type T on the same GameObject as the component specified.
GetComponentInChildrenGets a reference to a component of type T on the same GameObject as the component specified, or any child of the GameObject.
GetComponentInParentGets a reference to a component of type T on the same GameObject as the component specified, or any parent of the GameObject.
GetComponentsGets references to all components of type T on the same GameObject as the component specified.
GetComponentsInChildrenGets references to all components of type T on the same GameObject as the component specified, and any child of the GameObject.
GetComponentsInParentGets references to all components of type T on the same GameObject as the component specified, and any parent of the GameObject.
SendMessageゲームオブジェクトにアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します
SendMessageUpwardsゲームオブジェクトと親(の親、さらに親 ... )にアタッチされているすべての MonoBehaviour にある methodName と名付けたメソッドを呼び出します
TryGetComponentGets the component of the specified type, if it exists.
CellToLocalConverts a cell position to local position space.
CellToLocalInterpolatedConverts an interpolated cell position in floats to local position space.
CellToWorldConverts a cell position to world position space.
GetBoundsLocalReturns the local bounds for a cell at the location.
GetLayoutCellCenterGet the default center coordinate of a cell for the set layout of the Grid.
LocalToCellConverts a local position to cell position.
LocalToCellInterpolatedConverts a local position to cell position.
LocalToWorldConverts a local position to world position.
WorldToCellConverts a world position to cell position.
WorldToLocalConverts a world position to local position.
GetInstanceIDGets the instance ID of the object.
ToStringReturns the name of the object.

Static 関数

DestroyRemoves a GameObject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindAnyObjectByTypeRetrieves any active loaded object of Type type.
FindFirstObjectByTypeRetrieves the first active loaded object of Type type.
FindObjectOfTypeタイプ type から最初に見つけたアクティブのオブジェクトを返します
FindObjectsByTypeRetrieves a list of all loaded objects of Type type.
FindObjectsOfTypeGets a list of all loaded objects of Type type.
Instantiateoriginal のオブジェクトをクローンします

Operator

boolオブジェクトが存在するかどうか
operator !=二つのオブジェクトが異なるオブジェクトを参照しているか比較します
operator ==2つのオブジェクト参照が同じオブジェクトを参照しているか比較します。
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961