Is there a way to find out which lightprobe is selected in the Editor via an EditorWindow script? The “Selection” shows always 1 object, no matter how many probes I select.
Or is there another way to change the positions by entering values?
Is there a way to find out which lightprobe is selected in the Editor via an EditorWindow script? The “Selection” shows always 1 object, no matter how many probes I select.
Or is there another way to change the positions by entering values?
The probePositions property is available to editor scripts. It won’t tell you which probe is selected but it does let you read and change the probes’ positions.
Thank you, but i cannot set any of probPosition[ ] locations. seem to be just for reading.
Are you using code something like the following?
probes.probePositions[i] = Vector3(x, y, z);
The probePositions variable is actually a property, so if you do this then it will just copy the array and you will only assign to the copy. You need to assign the array to a variable, change the desired element and then assign the whole array back:-
var pos = probes.probePositions;
pos[i] = Vector3(x, y, z);
probes.probePositions = pos;