Exemplo n.º 1
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();
                }
            }
        }
Exemplo n.º 2
0
        private void DrawAtlasTextureField()
        {
            EditorGUI.BeginChangeCheck();
            {
                this.autotileTexture = RotorzEditorGUI.AutotileArtworkField(this.autotileTexture, s_SelectedAutotileLayout, s_InnerJoins);
            }
            if (EditorGUI.EndChangeCheck())
            {
                if (this.autotileTextureUncompressed != null)
                {
                    Object.DestroyImmediate(this.autotileTextureUncompressed);
                }

                this.autotileTextureUncompressed = EditorInternalUtility.LoadTextureUncompressed(this.autotileTexture);

                this.RecalculateTileSize();
                this.RecalculateMetrics();
            }
        }