![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | gon123 |
I cannot spot my error, I have started thinking there is a bug with the function “get_custom_data_by_layer_id()” from “TileData”.
I have the following code where I first get the cell data and then I get the custom data with the layer of that cell, but custom data is always null except for layer id “1”:.
for layer in layers:
var data = get_cell_tile_data(layer, coords)
if data != null:
var result = {
"coords": coords,
"layer": layer,
"data": data.get_custom_data_by_layer_id(layer)}
print(result)
for layer1 in layers:
print("Layer: ", layer1, ". Data: ", data.get_custom_data_by_layer_id(layer1))
return result
This will always print:
{ "coords": (3, 3), "layer": 2, "data": <null> }
Layer: 3. Data: <null>
Layer: 2. Data: <null>
Layer: 1. Data: <null>
Layer: 0. Data: 0
I’ve been searching for a way to set the custom data selecting the layer, but I couldn’t find anything.
I haven’t found neither any info about this bug.
Thank you!