UnityEditor.MaterialEditor.DefaultPreviewSettingsGUI C# (CSharp) Method

DefaultPreviewSettingsGUI() public method

public DefaultPreviewSettingsGUI ( ) : void
return void
        public void DefaultPreviewSettingsGUI()
        {
            if (ShaderUtil.hardwareSupportsRectRenderTexture)
            {
                this.Init();
                Material target = this.target as Material;
                PreviewType previewType = GetPreviewType(target);
                if ((base.targets.Length > 1) || (previewType == PreviewType.Mesh))
                {
                    Rect rect;
                    this.m_TimeUpdate = PreviewGUI.CycleButton(this.m_TimeUpdate, s_TimeIcons);
                    this.m_SelectedMesh = PreviewGUI.CycleButton(this.m_SelectedMesh, s_MeshIcons);
                    this.m_LightMode = PreviewGUI.CycleButton(this.m_LightMode, s_LightIcons);
                    if (this.PreviewSettingsMenuButton(out rect))
                    {
                        PopupWindow.Show(rect, this.m_ReflectionProbePicker);
                    }
                }
            }
        }

Usage Example

示例#1
0
 /// <summary>
 /// <para>Override for extending the functionality of the toolbar of the preview area or completly replace the toolbar by not calling base.OnMaterialPreviewSettingsGUI.</para>
 /// </summary>
 /// <param name="materialEditor">The MaterialEditor that are calling this method (the 'owner').</param>
 public virtual void OnMaterialPreviewSettingsGUI(MaterialEditor materialEditor)
 {
     materialEditor.DefaultPreviewSettingsGUI();
 }
All Usage Examples Of UnityEditor.MaterialEditor::DefaultPreviewSettingsGUI
MaterialEditor