Hi, I am trying to paint tilemaps faster. Does anyone know, how to trigger an event, when the activeTilemap is changed. I have custom GameObject Brushes and want them to automatically read some values, when you select a certain tilemap. For example sortingOrder.
Greeting,
John Schneddi
I have found the Action GridPaintingState.paletteChanged and am trying to to listen to it, however, nothing is happeneng, when I assing a function to the action.
[InitializeOnLoad]
public class CalculateTilemapTemplateCenterPosition : MonoBehaviour
{
static CalculateTilemapTemplateCenterPosition()
{
GridPaintingState.paletteChanged += test2;
Debug.Log("Init");
}
private static void test2(GameObject palette)
{
Debug.Log("Hurray");
}
}
Ok, it works with
GridPaintingState.scenePaintTargetChanged