Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


LightProbeGroup

Specifies where and how to bake a list of light probes.
Read time 6 minutesLast updated 3 days ago

Definition

public sealed class LightProbeGroup : Behaviour

Remarks

Light Probe Groups act only as input for Unity’s light baking system and have no direct impact on rendering.
Light Probe Groups do not affect probes used by other systems such as Reflection Probes or the Adaptive Probe Volumes.
Additional Resources: LightProbes.

Examples

using System.Collections.Generic;using UnityEngine;// This script generates uniform grids of light probes. Add it to a game// object and use the context menu of the script to update the positions// of the probes in the associated Light Probe Group.[RequireComponent(typeof(LightProbeGroup))]public class ProbePlacement : MonoBehaviour{ public uint SizeX = 8; public uint SizeY = 4; public uint SizeZ = 4; [ContextMenu("Update Positions")] void Place() { var positions = new List<Vector3>(); for (uint x = 0; x < SizeX; x++) { for (uint y = 0; y < SizeY; y++) { for (uint z = 0; z < SizeZ; z++) { positions.Add(new Vector3(x, y, z)); } } } gameObject.GetComponent<LightProbeGroup>().probePositions = positions.ToArray(); }}

Properties

Property

Description

deringRemoves ringing from probes if enabled (Editor only).
probePositionsEditor only function to access and modify probe positions.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.