Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

LightProbeGroupEditorUtility.MarkProbePositionsDirty

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static void MarkProbePositionsDirty();

Description

Informs the Light Probe Editor tool that you have modified the probe positions.

This method refreshes the preview Tetrahedra visible in the Scene View, representing the current state. If no Probes are being edited, this method doesn't do anything.

using UnityEditor;
using UnityEditor.Rendering;
using UnityEngine;

public static class ProbeEditingDemo { [MenuItem("Example/Move first probe up by 1Y")] private static void CenterFirstProbe() { if (!LightProbeGroupEditorUtility.probesAreBeingEdited) { Debug.Log("No probes are being edited"); return; } var selection = Selection.activeGameObject.GetComponent<LightProbeGroup>(); Vector3[] probePositions = new Vector3[selection.probePositions.Length]; selection.probePositions.CopyTo(probePositions, 0); probePositions[0].y += 1; selection.probePositions = probePositions; // If you comment out the following call, the Tetrahedra will continue to show the old state LightProbeGroupEditorUtility.MarkProbePositionsDirty(); } }