Why i could not switch light Peobes set at run time,it always seems the same set of light probes,But it is fine when not at run time.
any wrong with my code?
void OnGUI()
{
if (GUI.Button(rect[0], "Switch to LightProbes 1"))
{
LightmapSettings.lightProbes=Instantiate( lp1) as LightProbes;
}
if (GUI.Button(rect[1], "Switch to LightProbes 2"))
{
LightmapSettings.lightProbes = Instantiate( lp2) as LightProbes;
}
}