private void RecalculateTileSize() { if (this.autotileTextureUncompressed == null) { return; } AutotileExpanderUtility.EstimateTileSize(s_SelectedAutotileLayout, this.autotileTextureUncompressed, s_InnerJoins, ref this.tileWidth, ref this.tileHeight); this.ExpandAutotileArtwork(); }
private void DrawAtlasTextureField() { EditorGUI.BeginChangeCheck(); this.inputNewAutotileArtwork = RotorzEditorGUI.AutotileArtworkField(this.inputNewAutotileArtwork, this.autotileTileset.AutotileLayout, this.autotileTileset.HasInnerJoins); if (EditorGUI.EndChangeCheck()) { this.LoadUncompressedAutotileArtwork(this.inputNewAutotileArtwork); // Recalculate tile size and expand autotile artwork. if (this.inputNewAutotileArtworkUncompressed != null) { AutotileExpanderUtility.EstimateTileSize(this.autotileTileset.AutotileLayout, this.inputNewAutotileArtworkUncompressed, this.autotileTileset.HasInnerJoins, ref this.inputTileWidth, ref this.inputTileHeight); this.ExpandAutotileArtwork(); } } }