Search Unity

iOS Calendar Identifier - What is this?

Discussion in 'Scripting' started by SAZ_1, Jun 9, 2017.

  1. SAZ_1

    SAZ_1

    Joined:
    Mar 26, 2013
    Posts:
    6
    Hi,

    I was wondering if i could access the iOS calendar to display the date in my app.

    I could only really find old posts from years back which weren't much help on if this is possible but i noticed the 'Calendar Identifier' and 'Calendar Unit' options in the scripting reference guide.

    does anyone know what this is and how to use them (or am i completely off here and its not possible to access the calendar functions?). i've tried printing these functions to text but they just print those words exactly, so as an example --> CalendarDate.text = UnityEngine.iOS.CalendarUnit.Day.ToString(); just prints "Day" in text and not the actual date day.

    any help on this would be much appreciated and also apologies but I'm not a proper coder!

    many thanks.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    Both of those are just enums, i.e., typed lists of numbers starting with zero. They probably go with some other API calls but it's not obvious which ones. Someone more knowledgeable in C# can probably tell you how to search the UnityEngine API looking for objects that take or return either CalenderUnit or CalenderIdentifier.