當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。