No announcement yet.

Automatically update defaults BP_Sky_Sphere material every x seconds

  • Filter
  • Time
  • Show
Clear All
new posts

    Automatically update defaults BP_Sky_Sphere material every x seconds

    Hey there,
    I am trying to get the default BP_Sky_Sphere blueprint to refresh its material automatically every x seconds (the Directional Light is moved via C++ code) without having to click on "Refresh Material" everytime I moved my light.
    Since I am not familar with Blueprints, would anyone be so nice to tell me, how to edit the Refresh Material function of the BP_Sky_Sphere to add something like a tick which makes it update automatically every x seconds (the time I set the tick to)?

    As you can see here I already checked the "Update Material" box as well as I set the tick intervall to 1 sec but still the Sky doesn't change if the Directional Light is rotated.
    Thanks in advance!

    The Refresh Material method also sets the "Refresh Material" boolean to be false after it finishes, so just go ahead and set it to true and then call the method every Tick.

    The reason for the checkbox is to give level designers a quick 'button' kind of function. You hav eto click it each time or force it on tick or timer in the Event Graph.

    Attached Files
    iTween For UE4
    Procedural pathed animation for actors, components & UMG - $0
    Runtime DataTable
    DataTables dynamically loaded from text or Google Sheets while your game is running!
    Fast, cheap, and accurate CSV parsing at runtime!


      Thanks for your answer!
      But would you be so kind to explain to me, how I can do what you told me to do?
      As I said, I am a total beginner when it comes to Blueprints :/

      Where do I need to add the Nodes you posted above?

      Edit: Okay, Never mind,I found it! Thank you very much! )
      Last edited by CryLagg; 10-06-2020, 08:31 AM.