Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Changing SunStudy at Runtime.

Discussion in 'Unity Reflect' started by FinlayFCBS, Jan 5, 2022.

  1. FinlayFCBS

    FinlayFCBS

    Joined:
    Jan 5, 2022
    Posts:
    2
    In Reflect, I am struggling to change the SunStudy at Runtime (lerp between times of day, and days in the year), I think this is because it is then controlled by the long/lat values. Currently the only solution I have found is via Animations, however this doesn't really do the trick.

    In the meantime I am using the SunLight - Hessburg plugin that is working great.

    Many thanks,

    Finlay
     
  2. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
  3. FinlayFCBS

    FinlayFCBS

    Joined:
    Jan 5, 2022
    Posts:
    2
  4. Gublu

    Gublu

    Unity Technologies

    Joined:
    Dec 17, 2020
    Posts:
    9
    Hi Finlay,
    I don't understand what didn't work exactly with SunStudy. When I look into the code, if you simply use SunStudy.SetDayOfYear() and SunStudy.SetMinuteOfDay(), it should update Latitude & Longitude automatically every frame through Update() function.