GetSelectedLightProbes()
Retrieves the currently selected probes, as indexes.
阅读时间1 分钟最后更新于 21 天前
Definition
- Type: Method
- Namespace: UnityEditor.Rendering
- Assembly: UnityEditor.CoreModule
public static ReadOnlyCollection<int> GetSelectedLightProbes()
Returns
Type | Description |
|---|---|
| ReadOnlyCollection<int> | The indexes to the probes currently being selected. |
Remarks
To modify the positions of the probes, use the indexes with the Probe Positions field on the LightProbeGroup component. This method returns an empty list if no Probes are being edited.
Additional Resources: LightProbeGroup.probePositions.
Examples
using UnityEditor;using UnityEditor.Rendering;using UnityEngine;public static class LogSelectedLightProbes{ [MenuItem("Example/Log Selected Light Probes")] private static void LogProbes() { foreach (var probe in LightProbeGroupEditorUtility.GetSelectedLightProbes()) Debug.Log(probe); }}