25 lines
475 B
C#
25 lines
475 B
C#
|
|
using System.Collections;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
public class EnableOnChristmas : MonoBehaviour
|
||
|
|
{
|
||
|
|
// Start is called before the first frame update
|
||
|
|
private void Awake()
|
||
|
|
{
|
||
|
|
//get the date
|
||
|
|
System.DateTime date = System.DateTime.Now;
|
||
|
|
//check if it's Christmas
|
||
|
|
if (date.Month == 12 && date.Day == 25)
|
||
|
|
{
|
||
|
|
//enable the object
|
||
|
|
gameObject.SetActive(true);
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
//disable the object
|
||
|
|
gameObject.SetActive(false);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|