概要
using UnityEditor; using UnityEditor.SceneManagement; using UnityEngine; using UnityEngine.Tilemaps; [CustomEditor(typeof(Tilemap))] public sealed class TilemapEditor : Editor { public override void OnInspectorGUI() { base.OnInspectorGUI(); var tilemap = target as Tilemap; if ( GUILayout.Button( "Refresh All Tiles" ) ) { tilemap.RefreshAllTiles(); EditorSceneManager.MarkSceneDirty( tilemap.gameObject.scene ); } } }