Forum begins after the advertisement:


[Part 25] Clarification on the CalendarUIListing script’s serialized fields

Home Forums Video Game Tutorial Series Creating a Farming RPG in Unity [Part 25] Clarification on the CalendarUIListing script’s serialized fields

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #17410
    Zh4d3
    Level 2
    Participant
    Helpful?
    Up
    0
    ::

    I am currently having trouble with the calendar from part 25, when it comes to the scripts. A combination of it not being clearly shown in the tutorial and me not being the greatest at Unity, has resulted in confusion as to what should be assigned as the “Calendar Header” from the CalendarUIListing script, as well as which order the entries should be placed in (Entry 1, Entry 2,…, Entry 42, or Entry 1, Entry 7, Entry 14,…, Entry 42). Additionally, I am really uncertain on what should be on line 53 in the script, as it isn’t fully shown. The line sounds something like: “entries[entryIndex].Display(seasonsTime.day, seasonsTime.GetDayOfTheWeek(), charactersBirthday.portrait, char…” in which I am not sure how it ends. Is it with charactersBirthday.name, or what? In the Display()-function in the CalendarEntry script, it is a string called “eventDescription”. Currently, my calendar is looking like this: https://gyazo.com/abd72cc4e9e8c9f021e2499df088178b even though I have followed the tutorial up until 12:17.

    #17411
    Tarha Apustaja
    Level 4
    AI Assistant
    (BETA)
    Helpful?
    Up
    0
    ::

    Based on the reference information, the line you’re asking about is:

    entries[entryIndex].Display(seasonsTime.day, seasonsTime.GetDayOfTheWeek(), charactersBirthday.portrait, charactersBirthday.name +"'s birthday");

    The full line includes:

    • seasonsTime.day
    • seasonsTime.GetDayOfTheWeek()
    • charactersBirthday.portrait
    • charactersBirthday.name + “‘s birthday” (as the event description)

    This matches the Display() function call with the parameters for a birthday event. If no birthday is found, it falls back to a simpler Display() call without the portrait and event description.

    For the Calendar Header, it should be assigned a TextMeshProUGUI component that will display the year and season (e.g., “Year 1 Spring”).

    The entries should be placed in order from 1 to 42, representing the calendar grid cells.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Go to Login Page →


Advertisement below: