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. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    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.