UnityEditor.LightingWindowLightmapPreviewTab.UpdateLightmapSelection C# (CSharp) Method

UpdateLightmapSelection() public method

public UpdateLightmapSelection ( ) : void
return void
        public void UpdateLightmapSelection()
        {
            MeshRenderer renderer;
            Terrain terrain = null;
            if ((Selection.activeGameObject == null) || (((renderer = Selection.activeGameObject.GetComponent<MeshRenderer>()) == null) && ((terrain = Selection.activeGameObject.GetComponent<Terrain>()) == null)))
            {
                this.m_SelectedLightmap = -1;
            }
            else
            {
                this.m_SelectedLightmap = (renderer == null) ? terrain.lightmapIndex : renderer.lightmapIndex;
            }
        }