当前位置: 首页>>代码示例>>C#>>正文


C# Renderer.GetClosestReflectionProbes方法代码示例

本文整理汇总了C#中UnityEngine.Renderer.GetClosestReflectionProbes方法的典型用法代码示例。如果您正苦于以下问题:C# Renderer.GetClosestReflectionProbes方法的具体用法?C# Renderer.GetClosestReflectionProbes怎么用?C# Renderer.GetClosestReflectionProbes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UnityEngine.Renderer的用法示例。


在下文中一共展示了Renderer.GetClosestReflectionProbes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnGUI

			internal void OnGUI(Renderer renderer, bool useMiniStyle)
			{
				if (this.m_UseLightProbes != null)
				{
					EditorGUI.BeginDisabledGroup(LightmapEditorSettings.IsLightmappedOrDynamicLightmappedForRendering(renderer));
					if (!useMiniStyle)
					{
						EditorGUILayout.PropertyField(this.m_UseLightProbes, this.m_UseLightProbesStyle, new GUILayoutOption[0]);
					}
					else
					{
						ModuleUI.GUIToggle(this.m_UseLightProbesStyle, this.m_UseLightProbes);
					}
					EditorGUI.EndDisabledGroup();
				}
				if (!useMiniStyle)
				{
					this.m_ReflectionProbeUsage.intValue = (int)((ReflectionProbeUsage)EditorGUILayout.EnumPopup(this.m_ReflectionProbeUsageStyle, (ReflectionProbeUsage)this.m_ReflectionProbeUsage.intValue, new GUILayoutOption[0]));
				}
				else
				{
					ModuleUI.GUIPopup(this.m_ReflectionProbeUsageStyle, this.m_ReflectionProbeUsage, Enum.GetNames(typeof(ReflectionProbeUsage)));
				}
				bool flag = this.m_ReflectionProbeUsage.intValue != 0;
				if ((this.m_UseLightProbes != null && this.m_UseLightProbes.boolValue) || flag)
				{
					EditorGUI.indentLevel++;
					if (!useMiniStyle)
					{
						EditorGUILayout.PropertyField(this.m_ProbeAnchor, this.m_ProbeAnchorStyle, new GUILayoutOption[0]);
					}
					else
					{
						ModuleUI.GUIObject(this.m_ProbeAnchorStyle, this.m_ProbeAnchor);
					}
					if (flag)
					{
						renderer.GetClosestReflectionProbes(this.m_BlendInfo);
						RendererEditorBase.Probes.ShowClosestReflectionProbes(this.m_BlendInfo);
					}
					EditorGUI.indentLevel--;
				}
			}
开发者ID:guozanhua,项目名称:UnityDecompiled,代码行数:43,代码来源:RendererEditorBase.cs

示例2: OnGUI

 internal void OnGUI(UnityEngine.Object[] targets, Renderer renderer, bool useMiniStyle)
 {
   bool disabled1 = SceneView.IsUsingDeferredRenderingPath();
   bool flag1 = disabled1 && UnityEngine.Rendering.GraphicsSettings.GetShaderMode(BuiltinShaderType.DeferredReflections) != UnityEngine.Rendering.BuiltinShaderMode.Disabled;
   bool disabled2 = false;
   if (targets != null)
   {
     foreach (Renderer target in targets)
     {
       if (LightmapEditorSettings.IsLightmappedOrDynamicLightmappedForRendering(target))
       {
         disabled2 = true;
         break;
       }
     }
   }
   if (this.m_UseLightProbes != null)
   {
     EditorGUI.BeginDisabledGroup(disabled2);
     if (!useMiniStyle)
     {
       if (disabled2)
         EditorGUILayout.Toggle(this.m_UseLightProbesStyle, false, new GUILayoutOption[0]);
       else
         EditorGUILayout.PropertyField(this.m_UseLightProbes, this.m_UseLightProbesStyle, new GUILayoutOption[0]);
     }
     else if (disabled2)
       ModuleUI.GUIToggle(this.m_UseLightProbesStyle, false);
     else
       ModuleUI.GUIToggle(this.m_UseLightProbesStyle, this.m_UseLightProbes);
     EditorGUI.EndDisabledGroup();
   }
   EditorGUI.BeginDisabledGroup(disabled1);
   if (!useMiniStyle)
   {
     if (flag1)
       EditorGUILayout.EnumPopup(this.m_ReflectionProbeUsageStyle, (Enum) (ReflectionProbeUsage) (this.m_ReflectionProbeUsage.intValue == 0 ? 0 : 3), new GUILayoutOption[0]);
     else
       EditorGUILayout.Popup(this.m_ReflectionProbeUsage, this.m_ReflectionProbeUsageOptions, this.m_ReflectionProbeUsageStyle, new GUILayoutOption[0]);
   }
   else if (flag1)
     ModuleUI.GUIPopup(this.m_ReflectionProbeUsageStyle, 3, this.m_ReflectionProbeUsageNames);
   else
     ModuleUI.GUIPopup(this.m_ReflectionProbeUsageStyle, this.m_ReflectionProbeUsage, this.m_ReflectionProbeUsageNames);
   EditorGUI.EndDisabledGroup();
   bool flag2 = !this.m_ReflectionProbeUsage.hasMultipleDifferentValues && this.m_ReflectionProbeUsage.intValue != 0 || this.m_UseLightProbes != null && !this.m_UseLightProbes.hasMultipleDifferentValues && this.m_UseLightProbes.boolValue;
   if (flag2)
   {
     if (!useMiniStyle)
       EditorGUILayout.PropertyField(this.m_ProbeAnchor, this.m_ProbeAnchorStyle, new GUILayoutOption[0]);
     else
       ModuleUI.GUIObject(this.m_ProbeAnchorStyle, this.m_ProbeAnchor);
     if (!flag1)
     {
       renderer.GetClosestReflectionProbes(this.m_BlendInfo);
       RendererEditorBase.Probes.ShowClosestReflectionProbes(this.m_BlendInfo);
     }
   }
   bool flag3 = !this.m_ReceiveShadows.hasMultipleDifferentValues && this.m_ReceiveShadows.boolValue;
   if ((!disabled1 || !flag3) && (!flag1 || !flag2))
     return;
   EditorGUILayout.HelpBox(this.m_DeferredNote.text, MessageType.Info);
 }
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:63,代码来源:RendererEditorBase.cs


注:本文中的UnityEngine.Renderer.GetClosestReflectionProbes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。