Unity DAY AND NIGHT In 6 Minutes!

Поделиться
HTML-код
  • Опубликовано: 29 янв 2025

Комментарии • 192

  • @lildgamedev6885
    @lildgamedev6885 4 года назад +161

    If anyone's wondering why their game is super dark at night with this method, it's probably because your environment lighting source was set to skybox. I chose color and then this works great! I also added a fog density variable with thicker fog at night which is a nice touch.

    • @Rubberduckerino
      @Rubberduckerino 3 года назад

      Wait how do you do this because i see under light in the inspector I see the color thingy but how do i change it to not be so dark?

    • @zekerton7262
      @zekerton7262 3 года назад +10

      @@Rubberduckerino Window -> Rendering -> Lighting -> Environment -> Source

    • @thunderx2153
      @thunderx2153 2 года назад

      can you explain how you did it pls?

    • @lildgamedev6885
      @lildgamedev6885 2 года назад +2

      @@thunderx2153 Comment above u tells u how to switch to lighting source to color

    • @pursuer7632
      @pursuer7632 2 года назад

      how can we slow the proces down like suppose i want 1 day in my game to be like 1 minute long?

  • @c0d3d85
    @c0d3d85 5 лет назад +39

    Dang if only I had seen this before the end of the ludem dare compo It would have really added some polish. Great channel btw.

    • @618Lonewolf
      @618Lonewolf  5 лет назад +1

      Glad you liked it :D Thanks!

  • @AvitheTiger
    @AvitheTiger 4 года назад +6

    This looks so cool! I've my own Day/Night script that changes out directional lights, skyboxes, and fog colors. This looks so much smoother!

    • @ndejesus34800
      @ndejesus34800 4 года назад +1

      @Avi the Tiger
      Do you have github to see how it's work ?

    • @jackal9393
      @jackal9393 10 месяцев назад

      @@ndejesus34800he just told how it’s working

  • @lildgamedev6885
    @lildgamedev6885 4 года назад +22

    Bruh this dude is like a coding GOD. I paused like 50 times trying to keep up lol

  • @odd-man1
    @odd-man1 2 года назад +4

    I love the people that give code for free, don't stop coding!

  • @Orionhart
    @Orionhart 11 месяцев назад

    Awesome stuff! Just put it into my game and it's working great. I have a custom time system since my game is realtime but we wanted the days to be sped up, but thankfully I created enough pure functions for translating the timing that made this almost instant to pop in.

  • @VRwithAndrew
    @VRwithAndrew 5 лет назад +5

    Nice work, Glynn! Simple, and certainly looks good enough to get the job done. :)

    • @618Lonewolf
      @618Lonewolf  5 лет назад

      Thanks a bunch! I love the simpleness of it and how quick you can change the colours :D

  • @Palerider1011
    @Palerider1011 5 лет назад +6

    Really great tutorial! Thanks for putting it together for us. I just found your channel and immediately subscribed ;-). Short, single-topic tutorials make the world a better place for everyone.

    • @618Lonewolf
      @618Lonewolf  5 лет назад +2

      Thanks I'm glad you liked it :D I feel that too, alot of hour long tutorials out there XD

  • @sadravin1
    @sadravin1 3 года назад +3

    Excellent, this is exactly what I was looking for, and it is simple to use. Thank you.

  • @SnutiHQ
    @SnutiHQ 5 лет назад +3

    Very nice tutorial, like how you structured the data and used validators, never kneew this was even possible! 😱 This is awesome!! 😁👍 🌜🌞

    • @618Lonewolf
      @618Lonewolf  5 лет назад +2

      Thanks, I'm glad it had some useful tidbits! :D

  • @joshvanwyk4987
    @joshvanwyk4987 2 года назад +1

    Thanks for this great video! Really easy to follow and does it's job wonderfully

  • @SuperDutchrutter
    @SuperDutchrutter 3 года назад +2

    Fantastic walkthrough! Thank you :D

  • @mathiasbruin3336
    @mathiasbruin3336 4 года назад +4

    Straight to the point and a clear explanation, great tutorial

  • @Zukomazi
    @Zukomazi 4 года назад +1

    Thanks this works perfect for a open world project I'm developing

  • @theuniverse.9867
    @theuniverse.9867 Год назад

    This is a really good tutorial, thank you bro

  • @capybaratech377
    @capybaratech377 3 года назад

    Thank you for your help Mr. Glynn. God bless

  • @Roxy_Rox
    @Roxy_Rox 2 месяца назад

    amazing tutorial
    all I changes was a I added a public float to change the day length in editor

  • @ElectroGehirn
    @ElectroGehirn 2 года назад +13

    Hello, i have a question, how do i make the sun slower?
    Edit, found it my self:
    By setting in line 22 "TimeOfDay %= 24f;" to 600 and in line 23 "UpdateLighting(TimeOfDay / 24f);" to 600 the day and night is longer
    and dont forgot it in line 10 and 27 to change to your custom number... so like at me 600
    600 = 10 min, so if u want 12 mins or so search for 12 min in secconds

    • @beorgames7802
      @beorgames7802 2 года назад

      Hey, I tried it, but I prefered dividing the time added by 10, like this: timeofDay += Time.deltaTime / 10;
      And leaving the Update Lighting /24 :D

    • @ElMoy
      @ElMoy Год назад +2

      @@beorgames7802 Why not just multiply the value of timeOfDay by some speed variable?

    • @dattebayo2000
      @dattebayo2000 11 месяцев назад +1

      i am a beginner so do we set TimeOfDay% = 600f or just erase it all and write 600

    • @ElectroGehirn
      @ElectroGehirn 11 месяцев назад

      @@dattebayo2000 Hi, i am no longer into unity stuff i forget everything about that, sorry

    • @dattebayo2000
      @dattebayo2000 11 месяцев назад

      its alright :)@@ElectroGehirn

  • @nevercanyoucant
    @nevercanyoucant 3 года назад +4

    I cant figure out how to get those multi colored gradients at 1:52.... ;___;

  • @SuHomunculoRiko
    @SuHomunculoRiko 4 года назад +3

    This is perfect for my project, thx!

  • @serkidedan
    @serkidedan 4 года назад +6

    Slight issue with mine. I made colors as close as I could to the video, but when it gets to the later side of the night it's basically pitch black on screen. I tried adjusting the colors to grey where it was pitch black but that didn't help at all.

  • @mikesellers4355
    @mikesellers4355 3 года назад +10

    I took the script from the video, along with changes made by @cuckoo gaming below, and made some additional changes. This script now speeds up the late night hours, increases the directional light & softens the shadows toward noon. The rest of the class from the original script remains the same. (This was made using Unity 2019.4.19f1 LTS.)
    public class LightingManager : MonoBehaviour
    {
    //Scene References
    [SerializeField] private Light DirectionalLight;
    [SerializeField] private LightingPreset Preset;
    //Variables
    [SerializeField, Range(0, 24)] private float TimeOfDay;
    [SerializeField, Range(-10, 10)] private float speedMultiplier; // used to adjust the cycle time. Note that values < 0 will reverse it!
    [SerializeField, Range(1, 10)] private float nightSpeed; // how much to speed up late-night hours
    [SerializeField] private float maxIntensity = 1.5f;
    private float baseIntensity = 0f;
    [SerializeField] private float maxShadowStrength = 1f;
    [SerializeField] private float minShadowStrength = 0.2f;
    private float nightSpeedUpStart = 20f;
    private float nightSpeedUpEnd = 4f;
    private float dawn = 6f;
    private float dusk = 18f;
    private float noon = 12f;

    private void Start()
    {
    // default values
    speedMultiplier = 0.1f;
    nightSpeed = 10.0f;
    baseIntensity = maxIntensity / 2f;
    }
    private void Update()
    {
    if (Preset == null)
    return;
    if (Application.isPlaying)
    {
    //(Replace with a reference to the game time)
    // speed up the time in dead of night
    if (TimeOfDay > nightSpeedUpStart || TimeOfDay < nightSpeedUpEnd) // speed up the passage of night from 9pm to 3am
    {
    // TimeOfDay += Time.deltaTime * speedMultiplier * nightSpeed;
    TimeOfDay += Time.deltaTime * nightSpeed;
    }
    else
    {
    TimeOfDay += Time.deltaTime * speedMultiplier;
    // adjust light intensity and shadow softness for time of day
    if (TimeOfDay >= dawn && TimeOfDay noon && TimeOfDay

    • @franmartiini3862
      @franmartiini3862 2 года назад

      saved my life, Thanks S2

    • @ghostarda6355
      @ghostarda6355 2 года назад

      hi thx but the lightingupdate does not exist can someone help pls??

  • @samisalama3033
    @samisalama3033 3 года назад

    DUDE thank you so so so so so much you are life saver thanks for the tutorial thank you so much

  • @csab_csab123
    @csab_csab123 Год назад

    Great tutorial, thank you so much! :)

  • @ElCurios
    @ElCurios 3 года назад +2

    Everything works fine, except when the "sun" is at its 0 the floor turns completely black and that doesnt look that great, any idea?

  • @pausenabre1077
    @pausenabre1077 5 лет назад +7

    Thanks for this great Tutorial. It's awesome. I made it work in my project, the directional light moves and it cast the shadows correctly, but the sun movement seems to not be properly configured so it doesn't animate. I have always the same sky. Any tips?

  • @bennetkonig2713
    @bennetkonig2713 5 лет назад

    Just the right thing i need for Ludum Dare 45 xD
    thx m8

  • @johnabend7042
    @johnabend7042 6 месяцев назад

    the hardest part of this video is figuring out how you actually got that screen to pop up in the inspector.

  • @CraigHoward
    @CraigHoward 4 года назад +3

    Hey man, thanks for putting such an awesome tutorial together. I binged watched all your dev logs off the back of this. I love the farming game genre at the moment, nice and relaxing!
    I'm trying to figure out how best to implement an arc in the directional light throughout the day, so it's not just a fixed up and over journey (Later on down the line i'd like to attach this to change with seasons etc..but just for right now...)
    Any idea where you'd begin with adding an arc to this cycle?
    Keep it up, best of luck with the project and hope you're safe with everything that's going on at the moment!

  • @squadsquad
    @squadsquad 4 года назад +1

    I copied your exact script but unity doesn’t give me the option to create a scriptable, is it because I have an earlier version?

  • @holyxskillz1793
    @holyxskillz1793 3 года назад +2

    I have a problem. The script works on the terrain before generating lighting, after I generate though, the ambient color doesn't apply anymore. Any fix for this?

  • @hva3422
    @hva3422 4 года назад

    wild tutorial I love it thanks so much

  • @Dragon-ki2xl
    @Dragon-ki2xl 4 года назад +3

    1:52 the fart

  • @pursuer7632
    @pursuer7632 2 года назад +1

    how can we slow the proces down like suppose i want 1 day in my game to be like 1 minute long?

  • @dyl3841
    @dyl3841 3 года назад +2

    i cant add the directional light to the lighting section in the inspector and I also cant seem to find the 'time of day' the only thing on the lighting manager is the directional light which I cant add but I have on in my scene and also the preset which is added fine any help I would appreciate

  • @konainthetech8920
    @konainthetech8920 5 лет назад +3

    Thanks You Bro..You Help Me a lot..🥰

  • @Tudvari
    @Tudvari 5 лет назад +1

    Thanks, bookmarked!

  • @Ben-gp1dm
    @Ben-gp1dm 4 года назад +5

    Does anybody know how I can use this script to affect ambient sound? So when it will play an audio source during the day then swap to a new one at night.
    Great tutorial by the way I know nothing about coding and got this to work easily so thank you

    • @michealt6837
      @michealt6837 3 года назад +2

      when the time of day = a certain time play a new sound

  • @aw_dev
    @aw_dev 4 года назад +12

    How do you make the cycle slower?

  • @arashsh4513
    @arashsh4513 5 лет назад +6

    hi thank you for tutorial. i have 3 question. 1- how make day and night longer? 2- how set start game from Day not Night? 3- how set moon for night? sorry for my english

    • @618Lonewolf
      @618Lonewolf  5 лет назад +15

      Hi, 1: This depends on how much you are adding to the TimeOfDay in Update, here I just add the Time.deltaTime, which is the time in seconds that has passed (between the last Update() call), so since TimeOfDay is between 0 and 24 it would take 24 seconds for the full cycle. You could write a method that multiplies/divides Time.deltaTime by a factor that would slow down or speed up the time it takes for a cycle (e.g. Time.deltaTime/2 means it would take 48 seconds for a cyle, or 2 seconds per hour), this could also check if the time was day or night and use a different multiplier.
      2. The start time is dependent on what TimeOfDay is, so you could either set it using the slider in the inspector, or set the value in the Start() or Awake() function.
      3. You could either get a custom shader for the skybox that would display a moon, or put an object in the sky to represent the moon. Since the directional light already rotates with the time of day you could then move it to the center of your scene and add the moon object as a child object so when the directional light rotates it would also move the moon, then just reposition the moon to be in the correct place when it's night time. As long as the pivot point, in this case the directional light, is in the center it should rotate the moon comfortably around the sky.
      Hope that helps, Your english is pretty good!

  • @manuelsarmentero9895
    @manuelsarmentero9895 4 года назад +2

    please help me.
    I followed the instructions of the tutorial, but I keep getting the same error
    CS0246 "The type or namespace name 'LightingPreset' could not be found (are you missing a using directive or an assembly reference?"

    • @matyiherpai3772
      @matyiherpai3772 4 года назад +3

      Bc ur script dont named LightingPreset

  • @mygamingimagination8173
    @mygamingimagination8173 4 года назад +3

    Hey so when i made my preset it all worked but one main thing. When i look above the ambient color where it says script. Theres nothing in the script box and it wont let me put the lighting preset script into it. Can you please help?
    Also like how make the tutorial easy to follow thank you

    • @mr.ndreson3759
      @mr.ndreson3759 3 года назад +1

      You need to create an empty game object and assign the lightnin manager script to it. You cant directly assign objects to the script

  • @bogdanel5843
    @bogdanel5843 5 лет назад +1

    I LOVE ITTT!! THX SO MUCHHHH!! New Subbbb

  • @alexorbh7
    @alexorbh7 4 года назад +3

    Hello. I have a question:
    In the Lightning settings, what kind of environment lighting should I use? Source from skybox, gradient or color?
    I'm working on Unity 2018.4.9f1.
    Thank you very much for the tutorial. Works really well and the code is clean and easy. Congrats.

    • @618Lonewolf
      @618Lonewolf  4 года назад +2

      Hi, I'm using just the color source in this tutorial. You could also use the skybox material if you had some way to change the material color (with the procedural skybox this can be done by rotating the directional light).
      Thanks!

  • @Crazmer
    @Crazmer 4 года назад +7

    How to slow down the speed of time of day function

    • @juli12345istRecorsi
      @juli12345istRecorsi 4 года назад +6

      I just created a speed multiplier like this:
      [SerializeField] private float speedMultiplier;
      private void Update()
      {
      if (preset == null)
      return;
      if(Application.isPlaying)
      {
      timeOfDay += Time.deltaTime * speedMultiplier;
      timeOfDay %= 24; //clamp between 0-24
      UpdateLighting(timeOfDay / 24f);
      }
      else
      {
      UpdateLighting(timeOfDay / 24f);
      }
      }
      Set it to 0.x to slow down the time of day

    • @Steelersfan355
      @Steelersfan355 4 года назад

      can also add just a float i.e MinutesInDay = 1f. then just change the TimeOfDay = Time.deltaTime to Time.deltaTime / (MinutesInDay * 60f) which will give you a 30 min day cycle

  • @adi-chandra
    @adi-chandra 4 года назад

    Thanks Glynn! :D

  • @bananaaudio
    @bananaaudio 2 года назад

    Not sure why, but the changes are not parsing in the editor, only when I hit play.

  • @michaelchurch2957
    @michaelchurch2957 5 лет назад +5

    I followed the script but when it becomes night everything is red, even though I didn’t set the color to red. Any tips on how to fix?

    • @funnyvideoslive9721
      @funnyvideoslive9721 4 года назад +1

      its been 5 months and dude still hasn’t got an answer

    • @oozly9291
      @oozly9291 4 года назад

      @@funnyvideoslive9721 it’s been 9 months now

    • @m0dd3dtut0rials5
      @m0dd3dtut0rials5 3 года назад

      @Crimson Gaming 1 year and 6 months

    • @redcoin4853
      @redcoin4853 3 года назад

      @@m0dd3dtut0rials5 1 year and 7 months XD

    • @diggerpy
      @diggerpy 2 года назад

      @@redcoin4853 2 years

  • @McSirrington
    @McSirrington 3 года назад

    Great video thank you so much sir

  • @barbosaur
    @barbosaur 4 года назад +2

    Tutorial is nice. Can you give me your lighting preset please?

  • @riftcutter
    @riftcutter 4 года назад +1

    nice work, you earn a sub

  • @Red-de5jg
    @Red-de5jg 5 лет назад +2

    I've followed just about everything but how do you get to the menu that allows you to control the time of day?

    • @Hikk
      @Hikk 4 года назад +2

      If you still need help with this i just figured it out, click on create empty on your hierarchy then add the lighting manager to it

    • @Miska19
      @Miska19 4 года назад +1

      @@Hikk Thank you so much for that because I was racking my brain on that!!

    • @pauntum
      @pauntum 3 года назад

      @@Hikk Thank you so much!

  • @ludovicoleardi2268
    @ludovicoleardi2268 3 года назад +12

    hey, really nice and helpful tutorial, idiot question (i'm new to unity, don't blast me LMAO): is there a way to slow down the cycle? Thanks a lot
    EDIT: I found out the way to do it, if someone else needs it, you just need to multiply the Time.deltaTime in the TimeOfDay assignment for a number (if you want to slow it down it must be a number below 1, if you want to speed it up you'll need a number higher than 1)

    • @paulwhitelock5895
      @paulwhitelock5895 3 года назад +3

      ngl i stared at a red line in my code for 5 minutes before i released i had typed 0.1 and not 0.1f lol. Thanks for the help!

  • @НиколайНикакоюс-л2ь
    @НиколайНикакоюс-л2ь 2 года назад +1

    Подтверждаю - работает. Автор молодец

  • @velvaraart1007
    @velvaraart1007 3 года назад

    Is there a way to change the selected preset settings from the object with the script attached? kind of like how you can change a material's settings when you have selected an object in the scene that has that material asigned?

  • @Shotnoms
    @Shotnoms Год назад

    thanks really nice tutorial but how do i change the speed of it ?

  • @SonsOfMars-Game
    @SonsOfMars-Game Год назад +1

    any way to stop the light from clipping through the world when it turns night?

  • @ross673
    @ross673 4 года назад

    awesome, thanks youfor your video)

  • @knos2938
    @knos2938 3 года назад

    The time and day cyclus works but there is an error in the script
    (Error message) Invalid token in class, struct or interface member decleration

  • @normancollonvilleburger9668
    @normancollonvilleburger9668 4 года назад +1

    Hey! Good tutorial, thanks!
    How can I change lighting preset with a unity event?
    For example, I'm triggering rain with an event with delay, and I want to change the Lighting Preset to a more rainy sky colors. How can I do that?

    • @racking570
      @racking570 3 года назад

      probably make a second light that has a rain lighting, when its not raining have the normal one activated, otherwise activate the rain lighting.

  • @mutlugameofhalit
    @mutlugameofhalit 3 месяца назад

    Also it looks dark blue (even with color option), how can i solve this?

  • @squadsquad
    @squadsquad 4 года назад +2

    It would help me out if you showed what you opened from going to the script to the world because now I’m totally stuck

  • @Dertres
    @Dertres 4 года назад

    I cant seem to put the directional light into the Directional light slot? idk whats called, in the Lighting Manager, im new to lighting and need help

  • @marcodianti4399
    @marcodianti4399 4 года назад

    in the video misses the part where "SceneManagement" object is created (or i missed it)... i'm new to unity and i don't know what kinf of object scenmanagement is and how is created

    • @Jary921
      @Jary921 4 года назад +2

      I think it's using "create empty" to create an GameObject and add the script on it

    • @MarcoDianti
      @MarcoDianti 4 года назад

      @@Jary921 it worked, thanks

  • @Freno.99
    @Freno.99 Год назад

    plz help. the Lightning Manager doesn't recognize my preset. it says me that it doesn't match filename

  • @zarojanualexandru1503
    @zarojanualexandru1503 3 года назад

    Hi!I have a question.I copied the exact same code that you put in the link but when i try to put LightingPreset script to Directional light it says "Script´s type not found".What can I do?

  • @johnjonnzz419
    @johnjonnzz419 Месяц назад

    how do you make the gradients? and where did you attach the scripts? 😅

  • @ArcadeRenegade
    @ArcadeRenegade 3 года назад

    Is it possible to have a day/night cycle with baked lighting? I don't need to adjust the direction, just the ambient light color.

    • @618Lonewolf
      @618Lonewolf  3 года назад

      You can do it with precomputed realtime global illumination by just changing the ambient color, but to do the same with just baked global illumination you would probably need to write a custom shader.

    • @ArcadeRenegade
      @ArcadeRenegade 3 года назад +1

      @@618Lonewolf I was used mixed lighting mode and seems to work just fine.

  • @brunobelli5541
    @brunobelli5541 4 года назад

    Hey Glynn, awesome tutorial! I have a problem, the object in my hand changes color with the ambient color, and I can't find a way to solve this, if you could help me that would be awesome

  • @brucemashbat7378
    @brucemashbat7378 3 года назад +2

    How do you change the speed of the cycle?

    • @mohammadtausifrafi8277
      @mohammadtausifrafi8277 3 года назад +1

      By dividing or multiplying Time.deltatime for TimeOfDay by a number. Dividing or multiplying it by a number greater than 1 will slow the cycle down.

  • @saturn3150
    @saturn3150 2 года назад +1

    What app are you using to code, just curious.

    • @XRVR__0
      @XRVR__0 2 года назад +1

      Visual Studio 2022

  • @CAESAR_IS_GOD_mohammadisaloser
    @CAESAR_IS_GOD_mohammadisaloser 3 года назад

    Do you need a sun in order for it to work? code checks out no errors but the scroll does nothing on mine

  • @LuquidLumination
    @LuquidLumination 4 года назад

    i'm so confused... i'm running 2020 and i did all this coding and... now i'm getting errors on Gradient and Gameobject.... what did i do wrong?

  • @Slort_
    @Slort_ 3 года назад

    Don't know what I'm doing wrong, but the sky doesn't change color for me.. I did everything the way you did and the lighting works, but the sky itself is one constant color

  • @tudypie
    @tudypie 4 года назад +1

    Hey do you know also how I can add the time that displays in the game?

  • @Wonderchocolate
    @Wonderchocolate 3 года назад

    What if you use Hdrp because it has no skybox and I can’t set it to Color?

  • @heroalireza90
    @heroalireza90 4 года назад

    Hi great video it really helped me but I had some questions
    1- can I do something like this if it turns night I can turn on some lights something like this if (timeofday == 20)
    {Findobjectoftype.getcomponent .setactive (true)
    2-is there a way to add a moon and stars too the sky at night time really looks wired

    • @squadsquad
      @squadsquad 4 года назад

      How did you get yours to work? It wont let me create a scriptable for the Lightingmanager

    • @heroalireza90
      @heroalireza90 4 года назад

      @@squadsquad i had no problem with the scriptable object

  • @QRO-STUDIO
    @QRO-STUDIO 6 месяцев назад

    ive did this, but the settings for the colors n that, my world is just all blue? i copied ur color settings

  • @alikaangul5602
    @alikaangul5602 2 года назад

    How would I program this to show many days have passed?

  • @mikethegamedev
    @mikethegamedev 4 года назад

    Thank you!

  • @jepubepu9570
    @jepubepu9570 5 лет назад

    i followed your script code (which i only understand a little) but when writing the LightingManager script i cant use "[SerializeField] private LightingPreset Preset;" because it says that it cannot be found

    • @618Lonewolf
      @618Lonewolf  5 лет назад

      It might be that you do not have the lighting preset script/class, or that there's no "using UnityEngine;" import at the top of the lighting manager script?

    • @jepubepu9570
      @jepubepu9570 5 лет назад

      @@618Lonewolf I did and i made the preset i can even control it and added it on the preset manager, ill try watching your video again thanks for the reply

    • @jepubepu9570
      @jepubepu9570 5 лет назад

      @@618Lonewolf Hey i finally got it working, but theres a problem with the shadows because whenever the sun gets to the low point there is shadow from the objects that are pointing up

    • @jepubepu9570
      @jepubepu9570 5 лет назад

      im guessing it's because im using a plane as a terrain, do u have any fix for this?

    • @618Lonewolf
      @618Lonewolf  5 лет назад +1

      @@jepubepu9570 Good to hear! Hmm you could probably either limit the angle that the sun can go down to, or reduce the light intensity of the directional light as it rotates towards that angle?

  • @fianDev
    @fianDev 2 года назад

    I encountered an error while creating the asset menu, please help me

  • @Animework
    @Animework 4 года назад

    Thank you.

  • @bryvoydatch8805
    @bryvoydatch8805 Год назад

    I know this is an older video, but everything still seems to work great. I have a question if anyone is able/willing to help. Unity's UI is pretty different now so I'm not sure where these scripts should go. I put the lighting manager on the directional light and that made it work, but should it be elsewhere (maybe a game manager empty object)?

    • @bryvoydatch8805
      @bryvoydatch8805 Год назад

      @Slumpy_is_here lighting manager on the light has been working well for me!

    • @natalia2795
      @natalia2795 Год назад

      @@bryvoydatch8805so did you put the lightning manager on the directional light? I'm also using unity and it looks different now. Changing the colors or the time of day doesn't do anything in my game, it stays the same color. I added it on the directional light

  • @supergoo_
    @supergoo_ 3 года назад

    epically

  • @LordBaaleos
    @LordBaaleos 4 года назад

    Might sound stupid.... but should it not be 0-23, since 0 is midnight n all? Doesn't this give you 25 hour days then?

    • @618Lonewolf
      @618Lonewolf  4 года назад +1

      I think you're thinking of integer values when you include both 0 and 24 (inclusive), since this is a float and the upper value is not included/exclusive (24 % 24 is 0) it's more of a range of 0 - 23.99999*.

  • @callit6801
    @callit6801 3 года назад

    trying to know why the lighting does not affect my background (I'm doing a mobile game so it's a 2D background)

  • @runedova126
    @runedova126 3 года назад

    Can anyone here help. My ground texture doesn't seem to change to a darker tone when it reaches night-time.

  • @djkaalo248
    @djkaalo248 4 года назад +1

    does this work in URP template?

  • @goohbr
    @goohbr Год назад

    thanks man.

  • @NjecolinaHranjec
    @NjecolinaHranjec 9 месяцев назад

    Does this work for 2D game environments, too?

  • @FC12CGaming
    @FC12CGaming 4 года назад +1

    How do i get the DefaultPreset?

  • @rkplanet4079
    @rkplanet4079 4 года назад

    Thank you sooooo much

  • @rheakim2949
    @rheakim2949 2 года назад

    how to put a time text on the scenne?

  • @xenen9797
    @xenen9797 3 года назад

    I can't drag the lighting preset into the box

  • @Wabbaxt
    @Wabbaxt 4 года назад

    do you use directional light for this ?

  • @OpxGames
    @OpxGames 4 месяца назад

    problem is the shadows, make no sence they go everywhere

  • @josephgonzalezgarrido153
    @josephgonzalezgarrido153 4 года назад

    is there a way to add a moon that illuminates?

    • @velvaraart1007
      @velvaraart1007 3 года назад +1

      I did that by adding a second light facing the opposite direction, then making it a child of the sun. you might need to toggle between them to avoid shadow glitches.

  • @gmg-merlinserbe7464
    @gmg-merlinserbe7464 4 года назад

    is it Posible, 80% day and 20% night?

  • @Gejam_GameDev
    @Gejam_GameDev 3 года назад

    thanks