Here is an action to change emission global illumination.
// __ECO__PLAYMAKER__ACTION__
using UnityEngine;
using ParticlePlayground;
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory("Lights")]
[Tooltip("Updates target emission GI.")]
public class UpdateEmissionGI : FsmStateAction
{
// the renderer that needs to update
public FsmGameObject target;
public FsmColor targetColor;
public bool everyFrame;
public override void Reset()
{
target = null;
targetColor = null;
}
public override void OnEnter()
{
DynamicGI.SetEmissive (target.Value.GetComponent<MeshRenderer>(), targetColor.Value);
if (!everyFrame)
{
Finish();
}
}
public override void OnUpdate()
{
DynamicGI.SetEmissive (target.Value.GetComponent<MeshRenderer>(), targetColor.Value);
}
}
}