Class LDtkNeighbour
Properties
| Improve this Doc View SourceDir
Type | Description |
---|---|
System.String | A lowercase string tipping on the level location ( |
Identifier
Type | Description |
---|---|
System.String | User defined unique identifier |
IsAbove
Type | Description |
---|---|
System.Boolean | Returns true if this neighbour has a lesser depth |
IsBelow
Type | Description |
---|---|
System.Boolean | Returns true if this neighbour has a greater depth |
IsEast
Type | Description |
---|---|
System.Boolean | Returns true if this neighbour is to the right of the relative level. |
IsNorth
Type | Description |
---|---|
System.Boolean | Returns true if this neighbour is above the relative level. |
IsOverlap
Type | Description |
---|---|
System.Boolean | Returns true if this neighbour overlaps the other |
IsSouth
Type | Description |
---|---|
System.Boolean | Returns true if this neighbour is below the relative level. |
IsWest
Type | Description |
---|---|
System.Boolean | Returns true if this neighbour is to the left of the relative level. |
LevelIid
Type | Description |
---|---|
System.String | Neighbour Instance Identifier |
Methods
| Improve this Doc View SourceFindLevel()
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.
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.