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

Turning Direction Light off at rotation point.

Discussion in 'Scripting' started by Reaxgrim, Feb 15, 2014.

  1. Reaxgrim

    Reaxgrim

    Joined:
    Feb 15, 2014
    Posts:
    16
    Hi guys.

    complete newb when it comes to c# coding. so bare with me.

    Been messing about with a day night cycle.I have a directional light rotating and i noticed you can only have 1 directional light giving off shadows.

    so i am trying to turn the "sun" light off when it goes below land and turn on a "moon" light as it comes up.


    Any tips on how to do this?


    Cheers.
     
  2. jister

    jister

    Joined:
    Oct 9, 2009
    Posts:
    1,749
  3. Reaxgrim

    Reaxgrim

    Joined:
    Feb 15, 2014
    Posts:
    16
    Thanks mate not sure how i missed that one.