Unity 3D Day And Night Cycle Simple
DIRECT DOWNLOAD HERE
THIS IS BACKUP IN TEXT FORM TUTORIAL 2015/S1
THIS IS C# scrip: GOOD 4 2D GAMES !
--------------------------------------------------------------------------------------
1. Create New C# and name it : DayNightCycle
2. Copy & Past this text and save C# :
---------------------------------------------------------------------------------
using UnityEngine;
using System.Collections;
public class DayNightCycle : MonoBehaviour
{
public Light DirectionLight;
public Texture2D LightColor;
public Texture2D SkyColor;
public Texture2D AmbientColor;
public float TimeOfDay = 1;
[Range(0, 1)]
public float Timer = 0;
private float timeTemp = 0;
private float fade = 0;
public bool FadeTime = true;
public float MaxFade = 20;
void Start ()
{
timeTemp = Time.time;
fade = Timer;
}
void Update ()
{
if (Network.isServer || (!Network.isClient && !Network.isServer)) {
if (FadeTime) {
float timeperfade = TimeOfDay / MaxFade;
if (Time.time >= timeTemp + timeperfade) {
timeTemp = Time.time;
fade += 1.0f / MaxFade;
}
if (fade > 1.0f) {
fade = 0;
Timer = 0;
}
Timer += (fade - Timer) / 10f;
} else {
if (Timer > 1) {
Timer = 0;
} else {
Timer += (1.0f * Time.deltaTime) * (1.0f / TimeOfDay);
}
}
}
Color skyColor = SkyColor.GetPixelBilinear (Timer, 0);
RenderSettings.skybox.SetColor ("_Tint", skyColor);
RenderSettings.fogColor = skyColor;
RenderSettings.ambientLight = AmbientColor.GetPixelBilinear (Timer, 0);
DirectionLight.color = LightColor.GetPixelBilinear (Timer, 0);
}
}
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
P.S
1. Unplug from the Internet
2. GOOOO outside It's Summertime
3. In the Name of Summer4. Go out and Chill!
See you after summer !!! ,)
If someone asked you to pick 5 songs that best demonstrate the kind of music that you like best?
ReplyDeletehttp://musikandfilm.com/
Glad to visit your blog. Thanks for great post that you share to us...
DeleteWhich has better sound quality a headphone or speakers?
ReplyDeletemodern digital amplifier
i need good music suggestions...plz
ReplyDeleteGet Me The Ball
I have read many blogs in the net but have never come across such a well written blog. Good work keep it up
ReplyDeleteDrake - Hotline Bling
You got a really useful blog I have been here reading for about half an hour. I am a newbie and your post is valuable for me.
ReplyDeleteQuiet On The Set - Trail
I just came across to reading your blog it serve very useful information about the interiors thank u
ReplyDeleteR Mills - Now Get it
I would be grateful if you continue with the quality of what we are doing now with your blog ... I really enjoyed it
ReplyDeleteMeridians Horror Short Film
Thanks for the information you shared that's so useful and quite informative and i have taken those into consideration....
ReplyDeleteCover Song When we were young
Thanks for the information you shared that's so useful and quite informative and i have taken those into consideration....
ReplyDeleteOn My Way-Music Video
I have been reading a lot of stuff about it. but it is different presented, i loved to read this. keep it up.
ReplyDeleteMusic video for PLAY by Diola
Nice service there are just few who are providing this service great job.
ReplyDeleteAnna Madsen's song Palm Reader
You have a very good site, well constructed and very interesting i have bookmarked you, hopefully you keep posting new stuff, many thanks
ReplyDeleteViz Dawg - Get Me The Ball
I think most people would agree with your article. I am going to bookmark this web site so I can come back and read more articles. Keep up the good work!
ReplyDeleteSagittarius performed by Chris Balan
Hi I really appreciate all the great content you have here. I am glad I cam across it!
ReplyDeleteMusic Theory Lessons
Spot on with this article, I really think this website needs more attention. I'll probably be back to read more, thanks for the info.
ReplyDeleteTick Tock Music Video by Jaya Kosa
I visited your blog for the first time and just been your fan. I Will be back often to check up on new stuff you post!
ReplyDeletesay my name song by ceno
I have been reading your posts regularly. I need to say that you are doing a fantastic job. Please keep up the great work.
ReplyDeleteM PEARLS a.a.l The Movie Trailer
It's really a nice and helpful piece of information. I'm glad that you shared this helpful info with us. Please keep us informed like this.
ReplyDeleteGlib Golem What's Love song
I wanted to thank you for this great blog! I really enjoying every little bit of it and I have you bookmarked to check out new stuff you post.
ReplyDeleteEl Futuro Es One'
I like your post & I will always be coming frequently to read more of your post. Thank you very much for your post once more.
ReplyDeleteRiston Diggs ft. Sly Beats
Thanks for the information and links you shared this is so should be a useful and quite informative!
ReplyDeleteFitty Smallz
have read many blogs in the net but have never come across such a well written blog. Good work keep it up
ReplyDeleteMusic video for Lights On by Ivan Kelley
I really loved reading your thoughts, obviously you know what are you talking about! Your site is so easy to use too, I’ve bookmark it in my folder
ReplyDeleteHear u Talking C.G feat Hustle AllDay
This is easier and surely gives comfort to internet users. Thanks for sharing. Post like this offers great benefit. Thank you!
ReplyDeleteA.K-Logan Browning Song
I have been reading your posts regularly. I need to say that you are doing a fantastic job. Please keep up the great work.
ReplyDeleteBlue Dream Marijuana Strain Review
Spot on with this article, I really think this website needs more attention. I'll probably be back to read more, thanks for the info.
ReplyDeleteSinger/Songwriter
I wanted to thank you for this great read. Your blog is one of the finest blog . Thanks for posting this informative article.
ReplyDeletein ceiling center channel speaker
This is easier and surely gives comfort to internet users. Thanks for sharing. Post like this offers great benefit. Thank you!
ReplyDeleteStyle by Taylor Swift - Acoustic Cover by ATB
Its wonderful, looking at the time and effort you put into your weblog and detailed information you provide. I'll bookmark your weblog and visit it weekly for your new posts.
ReplyDeleteHustle by FDA Music Official Music Video
Truly superb blog, I don’t have actual words to praise in regards for this
ReplyDeleteOpera Singer Sheridan Archbold
Really!!! I am very impressed after reading this blog. thanks for providing deep information for
ReplyDeleteJustin Bieber "The feeling" Dance cover
Thanks for the information and links you shared this is so should be a useful and quite informative!
ReplyDeleteGasparilla's first release in 2016 Cuba Libre
Music produces a kind of pleasure which human nature cannot do withoutLife as Bebé - Episode 1
ReplyDeleteValuable service for individuals as well as businesses.
ReplyDeleteAshley Iona - Taking Me Under, feat. Kevin Davy White
I just came across to reading your blog it serve very useful information about the interiors thank u
ReplyDeleteWe Make It Work feat. KaCe The Producer
yes definitely this type of blogs are really help for people great job.
ReplyDeleteSAVE THE DATE By NABIL & JENAN
You have a very good site, well constructed and very interesting i have bookmarked you, hopefully you keep posting new stuff, many thanks
ReplyDeleteGave you my Heart by Heather Walker
Wow, what a blog! I mean, you just have so much guts to go ahead and tell it like it is. Youre what blogging needs, an open minded superhero who isnt afraid to tell it like it is. This is definitely something people need to be up on. Good luck in the future, man
ReplyDeleteJustin Bieber - Love Yourself (Paul Butcher Cover)
There is a lot of info on this blog: very helpful
ReplyDeleteThe Dishes Song - David W Taylor
thanks… I’ve been bookmarking them for a while now and just decided to create a post to provide them to others…
ReplyDeleteSilverbird - Smile (Official Video)
There are certainly a lot of details like that to take into consideration.
ReplyDeleteGudda Mane Streetz - So Good
I wanted to thank you for this great read!! I definitely enjoying every little bit of it.I have you bookmarked to check out new stuff you post.
ReplyDeleteCharles Cossetti - Go Hard
Thanks for sharing info. Keep up the good work...We hope you will visit our blog often as we discuss topics of interest to you
ReplyDeleteKooly Bros - Rhythm Of The Night
I really loved reading your thoughts, obviously you know what are you talking about! Your site is so easy to use too, I’ve bookmark it in my folder
ReplyDeleteThe Wild by Paul Maged
This is easier and surely gives comfort to internet users. Thanks for sharing. Post like this offers great benefit. Thank you!
ReplyDeleteJustin Bieber - Sorry Cover by Alex J
wow i love t hat SO much... can i cut and paste it into my blog?? but give u credit, of course???
ReplyDeleteBody Rock - Woodbury
Wow! Thank you! I always wanted to write in my site something like that. Can I take part of your post to my blog?
ReplyDeleteStonelove J - Urkel video
Nice article and informative as well. for few of people like me this article is really helpful.
ReplyDeletemusic post
I really love your weblog, Its great to find not absolutely everyone is just posting a ton of rubbish these days!
ReplyDeleteelectronic music
your site layout is very good
ReplyDeleteamazing music video
I wanted to thank you for this great read. Your blog is one of the finest blog . Thanks for posting this informative article.
ReplyDeletePerspective by Emmanuel Jenkins
I really like the fresh perpective you did on the issue. I will be back soon to check up on new posts! Thank you!
ReplyDeleteRMP - FLEXIN Music Video
Wow, what a blog! I mean, you just have so much guts to go ahead and tell it like it is. Youre what blogging needs, an open minded superhero who isnt afraid to tell it like it is. This is definitely something people need to be up on. Good luck in the future, man
ReplyDeletemix hip hop mixtapes
I really like the fresh perpective you did on the issue. I will be back soon to check up on new posts! Thank you!
ReplyDeleteNo Control by Laura Mendes
I think this post will be a fine read for my blog readers too, could you please allow me to post a link to my blog. I am sure my guests will find that very useful.
ReplyDeletedance violinist
The blog article very surprised to me! Your writing is good. In this I learned a lot! Thank you!
ReplyDeleteBorderline feat. Joyce Sterling
I really like the fresh perpective you did on the issue. I will be back soon to check up on new posts! Thank you!
ReplyDeleteAmie Penwell - Dogfight On The Moon
There is a lot of info on this blog: very helpful
ReplyDeleteRadiohead Cover Creep by Chonna Cristelle
have read many blogs in the net but have never come across such a well written blog. Good work keep it up
ReplyDeletebuy rap beats
your site layout is very good
ReplyDeleteMr. Shammi_Time Machine (Official Video)
I wanted to thank you for this great read!! I definitely enjoying every little bit of it.I have you bookmarked to check out new stuff you post.
ReplyDeleteVillian - KD
This is really great news. Thank you for sharing it with us!
ReplyDeleteMichael Blu Music
NIce article this article has been my favorite, interesting and informative article.
ReplyDeleteSTEM Performance New York
I would be grateful if you continue with the quality of what we are doing now with your blog ... I really enjoyed it
ReplyDeleteSleeping ArtbyEoin
This is really great news. Thank you for sharing it with us!
ReplyDeleteCan't Stop the feeling by Justin Timberlake
Wow, what a blog! I mean, you just have so much guts to go ahead and tell it like it is. Youre what blogging needs, an open minded superhero who isnt afraid to tell it like it is. This is definitely something people need to be up on. Good luck in the future, man
ReplyDeleteNew Video RomeVice- da way
yes it would be, once my friend gave me lecture about modesty it was amazing and heart touching.
ReplyDeletePaul Maged - "The Wild" (Official Music Video)
I think this post will be a fine read for my blog readers too, could you please allow me to post a link to my blog. I am sure my guests will find that very useful.
ReplyDeleteHow To Play Arpeggios
This is a brilliant writing and very pleased to find this site. I couldn’t discover to much different information on your blog. I will surely be back again to look at some other important posts that you have in future.
ReplyDeleteNo Other Bagger by Chiro Music video
I like your post & I will always be coming frequently to read more of your post. Thank you very much for your post once more.
ReplyDeleteBlack Rock Revival-If You Want It
I was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post.
ReplyDeleteEnglish Language for movies and songs
Great blog with a very interesting information about the music well done and keep posting.
ReplyDeleteDirty Bourbon River Show - Passion
Wow!what a nice and great information about the music and i really love this blog.
ReplyDeleteNadel Paris Performance
Remarkable blog and i really enjoy this very much. i really appreciate your work which you have done about the music.
ReplyDeleteHip Hop Songs
Very informative article which is about the music and i must bookmark it, keep posting interesting articles.
ReplyDeleteHip hop Songs
I feel very thankful for this really amazing blog about music,.
ReplyDeleterap songs
I really love your music blog all the music and sounds tracks are rocking , I have bookmark it.Good job.
ReplyDeleteDanny Boy piano music video
I visited your blog for the first time and just been your fan and the music is awesome.
ReplyDeleteMoney Really Counts
Your blog is very useful, I am truly to this blog which is specially design about the music.
ReplyDeleteGreat job.
Harp Samuels new Song
Keep it up,
ReplyDeleteIt's really a wonderful blog about the music,.
completely relaxing Sounds
This blog is fabulous about the detail and the info about music amazing. Good job.
ReplyDeleteVan Breda Songs
I appreciate your blog and another helpful blog about the music and song thank you for sharing this.
ReplyDeleteMUD TIRES by VIRGINIA MAN
Your blog is a very nice entertainment because i got many information about the music and also get many songs from your blog thank you for sharing it.
ReplyDeleteDavid Owens - Asleep Again
Nice blog and the description about it very amazing I really liked it.
ReplyDeleteHip hop Songs
Its really wonderful and watchable. I like to share it with all my friends and hope they will definitely like it.
ReplyDelete