playMaker

Author Topic: Ambient Sky Intensity  (Read 30 times)

zelmund

  • Playmaker Newbie
  • *
  • Posts: 18
    • View Profile
Ambient Sky Intensity
« on: November 14, 2017, 02:15:02 AM »
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: [Select]
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;
  }
  }
 }

could you please add this to echo system? i just wont loose it. usefull for making weather system.