UnityEditor.TerrainInspector.LoadDetailIcons C# (CSharp) Method

LoadDetailIcons() private method

private LoadDetailIcons ( ) : void
return void
        private void LoadDetailIcons()
        {
            DetailPrototype[] detailPrototypes = this.m_Terrain.terrainData.detailPrototypes;
            this.m_DetailContents = new GUIContent[detailPrototypes.Length];
            for (int i = 0; i < this.m_DetailContents.Length; i++)
            {
                this.m_DetailContents[i] = new GUIContent();
                if (detailPrototypes[i].usePrototypeMesh)
                {
                    Texture assetPreview = AssetPreview.GetAssetPreview(detailPrototypes[i].prototype);
                    if (assetPreview != null)
                    {
                        this.m_DetailContents[i].image = assetPreview;
                    }
                    if (detailPrototypes[i].prototype != null)
                    {
                        this.m_DetailContents[i].text = detailPrototypes[i].prototype.name;
                    }
                    else
                    {
                        this.m_DetailContents[i].text = "Missing";
                    }
                }
                else
                {
                    Texture prototypeTexture = detailPrototypes[i].prototypeTexture;
                    if (prototypeTexture != null)
                    {
                        this.m_DetailContents[i].image = prototypeTexture;
                    }
                    if (prototypeTexture != null)
                    {
                        this.m_DetailContents[i].text = prototypeTexture.name;
                    }
                    else
                    {
                        this.m_DetailContents[i].text = "Missing";
                    }
                }
            }
        }