PlayMaker Feedback > Action Requests
Ambient Sky Intensity
(1/1)
zelmund:
hi there.
missing an option for "Ambient sky intensity" https://docs.unity3d.com/ScriptReference/RenderSettings-ambientIntensity.html
so i did myself one for this using copy/paste and some edit strokes:
--- Code: ---using UnityEngine;
using UnityEngine.Rendering;
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.RenderSettings)]
[Tooltip("Sets the RenderSettings Ambient Sky Intensity.")]
public class SetAmbientSkyIntensity : FsmStateAction
{
[RequiredField]
[Tooltip("The Ambient Sky Intensity")]
public FsmFloat ambientSkyIntensity;
[Tooltip("Repeats every frame")]
public bool everyFrame;
public override void Reset()
{
ambientSkyIntensity = null;
everyFrame = false;
}
public override void OnEnter()
{
DoSetAmbientSkyIntensity();
if (!everyFrame) {
Finish();
}
}
public override void OnUpdate()
{
DoSetAmbientSkyIntensity();
}
void DoSetAmbientSkyIntensity()
{
RenderSettings.ambientIntensity = ambientSkyIntensity.Value;
}
}
}
--- End code ---
could you please add this to echo system? i just wont loose it. usefull for making weather system.
jeanfabre:
Hi,
ok, this is up, thanks :)
I renamed it for consistency and I did a getter and setter.
Bye,
Jean
Navigation
[0] Message Index
Go to full version