- Home /
how I can hide a canvas in Unity and shows it after some days using C# Script ?
I want a script which helps me to hide the whole canvas for example the first day when I will start playing my game the Canvas will be shown after 5 days , with the help of a button which was disabled since the first day and this button will be enabled after 5 days ( the button Also was hided with canvas ) so when the day that I want comes the button will be enabled and when I click on it it will show the canvas which was hided .
Thank you so much , and I hope that somone Helps me because I really need it !!
,I want a script which helps me to hide a Canvas ( UI ) and Shows it after some days may be after 5 days or more , so when that day come , I can show that canvas using a Button which was disabled since the first day , thank you so much , I really want the help !
Answer by Rynbernsz · Aug 31, 2018 at 11:12 PM
There are many ways to do it, whether you want to use real system time or your own clock in Unity. If you make your own clock in Unity, check out this time page in Unity documents: here.
This thread will help for you getting real time values. You can get the date from the start of first game and calculate the time at certain steps. When 5 days hits, your function runs. This might be a couple ways to go about it. And Unity documentation and forums are definitely a huge help!