Show / Hide Table of Contents

Class RoomTemplateUtilsGrid2D

Inheritance
System.Object
RoomTemplateUtilsGrid2D
Namespace: Edgar.Unity
Assembly: cs.temp.dll.dll
Syntax
public static class RoomTemplateUtilsGrid2D

Methods

GetTilemaps(GameObject, Boolean)

Gets all the tilemap layers from the room template GameObject.

Declaration
public static List<Tilemap> GetTilemaps(GameObject roomTemplate, bool includeInactive = true)
Parameters
Type Name Description
GameObject roomTemplate

GameObject representing the room template.

System.Boolean includeInactive

Whether inactive tilemaps should be returned.

Returns
Type Description
System.Collections.Generic.List<Tilemap>
Remarks

Only tilemaps that are direct children of the tilemap root GameObject are returned. That means that if there is a tilemap that is not a direct child of the tilemaps root (e.g. it is part of a prefab that should be instantiated alongside the room template), it is not returned here and is not used to compute room template outlines.

GetTilemapsForCopying(ICollection<Tilemap>)

Gets tilemaps that should be used when copying room template tiles to shared tilemaps.

Declaration
public static List<Tilemap> GetTilemapsForCopying(ICollection<Tilemap> tilemaps)
Parameters
Type Name Description
System.Collections.Generic.ICollection<Tilemap> tilemaps
Returns
Type Description
System.Collections.Generic.List<Tilemap>

GetTilemapsForOutline(ICollection<Tilemap>)

Gets tilemaps that should be used when computing room template outline.

Declaration
public static List<Tilemap> GetTilemapsForOutline(ICollection<Tilemap> tilemaps)
Parameters
Type Name Description
System.Collections.Generic.ICollection<Tilemap> tilemaps
Returns
Type Description
System.Collections.Generic.List<Tilemap>

GetTilemapsRoot(GameObject)

Gets the GameObject that is the parent to all the tilemaps.

Declaration
public static GameObject GetTilemapsRoot(GameObject roomTemplate)
Parameters
Type Name Description
GameObject roomTemplate

GameObject representing the room template.

Returns
Type Description
GameObject
Remarks

If there is no child named GeneratorConstants.TilemapsRootName, the room template GameObject itself is returned to provide backwards compatibility.

GetUsedTiles(IEnumerable<Tilemap>)

Gets all tiles that are not null in given tilemaps.

Declaration
public static HashSet<Vector2Int> GetUsedTiles(IEnumerable<Tilemap> tilemaps)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Tilemap> tilemaps
Returns
Type Description
HashSet<Vector2Int>
In This Article
Back to top Generated by DocFX