public void AssignThemAll(LPPVTool tool) { foreach (var g in FindThemAll(tool)) { var r = g.GetComponent <Renderer>(); r.lightProbeUsage = UnityEngine.Rendering.LightProbeUsage.UseProxyVolume; r.lightProbeProxyVolumeOverride = tool.Volume.gameObject; } }
public List <GameObject> FindThemAll(LPPVTool tool) { var result = new List <GameObject>(); foreach (var r in tool.transform.GetComponentsInChildren <Renderer>()) { if ((GameObjectUtility.GetStaticEditorFlags(r.gameObject) & StaticEditorFlags.LightmapStatic) == StaticEditorFlags.LightmapStatic) { continue; } result.Add(r.gameObject); } return(result); }