コード例 #1
0
        private void RecalculateTileSize()
        {
            if (this.autotileTextureUncompressed == null)
            {
                return;
            }

            AutotileExpanderUtility.EstimateTileSize(s_SelectedAutotileLayout, this.autotileTextureUncompressed, s_InnerJoins, ref this.tileWidth, ref this.tileHeight);
            this.ExpandAutotileArtwork();
        }
コード例 #2
0
        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();
                }
            }
        }