ドキュメント

Unity Engine

Unity Engine

MarkProbePositionsDirty()

Informs the Light Probe Editor tool that you have modified the probe positions.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

public static void MarkProbePositionsDirty()

Remarks

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.

Examples

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(); }}