Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Feedback Add more time based options to the "SearchContentSortBy" enum

Discussion in 'Unity User-Generated Content' started by Tirt, Jul 17, 2023.

  1. Tirt

    Tirt

    Joined:
    Jul 11, 2022
    Posts:
    9
    The enum for reference:

    Code (CSharp):
    1.  public enum SearchContentSortBy
    2. {
    3.         /// <summary>
    4.         /// By name
    5.         /// </summary>
    6.         Name,
    7.         /// <summary>
    8.         /// By project id
    9.         /// </summary>
    10.         ProjectId,
    11.         /// <summary>
    12.         /// By content version
    13.         /// </summary>
    14.         Version,
    15.         /// <summary>
    16.         /// By content visibility
    17.         /// </summary>
    18.         Visibility,
    19.         /// <summary>
    20.         /// By created date
    21.         /// </summary>
    22.         CreatedAt,
    23.         /// <summary>
    24.         /// By last updated date
    25.         /// </summary>
    26.         UpdatedAt,
    27.         /// <summary>
    28.         /// By ratings count
    29.         /// </summary>
    30.         ContentEnvironmentStatistics_Data_RatingsCount_AllTime,
    31.         /// <summary>
    32.         /// By average rating
    33.         /// </summary>
    34.         ContentEnvironmentStatistics_Data_RatingsAverage_AllTime,
    35.         /// <summary>
    36.         /// By subscriptions count
    37.         /// </summary>
    38.         ContentEnvironmentStatistics_Data_SubscriptionsCount_AllTime,
    39.         /// <summary>
    40.         /// By downloads count
    41.         /// </summary>
    42.         ContentEnvironmentStatistics_Data_DownloadsCount_AllTime
    43. }
    There are 4 "time-based" filters above. I think it would be ideal to also include the last 30 days, last week, basically all the options that are supported by the CountStat class (or at least those ones ^):

    Code (CSharp):
    1.  public class CountStat
    2. {
    3.         /// <summary>
    4.         /// Creates an instance of CountStat.
    5.         /// </summary>
    6.         /// <param name="allTime">allTime param</param>
    7.         /// <param name="past365Days">past365Days param</param>
    8.         /// <param name="past180Days">past180Days param</param>
    9.         /// <param name="past90Days">past90Days param</param>
    10.         /// <param name="past60Days">past60Days param</param>
    11.         /// <param name="past30Days">past30Days param</param>
    12.         /// <param name="past14Days">past14Days param</param>
    13.         /// <param name="past7Days">past7Days param</param>
    14.         /// <param name="pastDay">pastDay param</param>
    15.         [Preserve]
    16.         public CountStat(int allTime = default, int past365Days = default, int past180Days = default, int past90Days = default, int past60Days = default, int past30Days = default, int past14Days = default, int past7Days = default, int pastDay = default)
    17.         {
    18.             AllTime = allTime;
    19.             Past365Days = past365Days;
    20.             Past180Days = past180Days;
    21.             Past90Days = past90Days;
    22.             Past60Days = past60Days;
    23.             Past30Days = past30Days;
    24.             Past14Days = past14Days;
    25.             Past7Days = past7Days;
    26.             PastDay = pastDay;
    27.         }
    28. }
     
  2. zjebali

    zjebali

    Unity Technologies

    Joined:
    Jun 3, 2021
    Posts:
    20
    Noted , we've added this to one of our upcoming releases.

    Appreciate the feedback.
     
    Tirt likes this.