Show / Hide Table of Contents

Class LDtkNeighbour

Properties

| Improve this Doc View Source

Dir

Type Description
System.String

A lowercase string tipping on the level location (north, south, west, east).
Since 1.4.0, this value can also be lessThan (neighbour depth is lower), greaterThan (neighbour depth is greater) or o (levels overlap and share the same world depth).
Since 1.5.3, this value can also be nw,ne,sw or se for levels only touching corners.

| Improve this Doc View Source

Identifier

Type Description
System.String

User defined unique identifier

| Improve this Doc View Source

IsAbove

Type Description
System.Boolean

Returns true if this neighbour has a lesser depth

| Improve this Doc View Source

IsBelow

Type Description
System.Boolean

Returns true if this neighbour has a greater depth

| Improve this Doc View Source

IsEast

Type Description
System.Boolean

Returns true if this neighbour is to the right of the relative level.

| Improve this Doc View Source

IsNorth

Type Description
System.Boolean

Returns true if this neighbour is above the relative level.

| Improve this Doc View Source

IsOverlap

Type Description
System.Boolean

Returns true if this neighbour overlaps the other

| Improve this Doc View Source

IsSouth

Type Description
System.Boolean

Returns true if this neighbour is below the relative level.

| Improve this Doc View Source

IsWest

Type Description
System.Boolean

Returns true if this neighbour is to the left of the relative level.

| Improve this Doc View Source

LevelIid

Type Description
System.String

Neighbour Instance Identifier

Methods

| Improve this Doc View Source

FindLevel()

Returns
Type Description
LDtkIid

Finds the iid Level GameObject.

Remarks

This function uses Object.FindObjectsOfType if a cached component is not found, so it is slow and not recommended to use every frame. However if the object is found, it is cached.
In most cases you can use GetLevel() instead as long as the object you are looking for is active. If the object you are looking for is inactive, you can try this.

| Improve this Doc View Source

GetLevel()

Returns
Type Description
LDtkIid

Gets the neighbour gameobject that matches the iid.

Remarks

The objects are only available after their OnEnable. Otherwise, try using FindLevel().
If the iid component exists but this returned null, then make sure the referenced component is active and accessed after it's OnEnable.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX