本文整理汇总了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--;
}
}
示例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);
}