// This file is provided under The MIT License as part of Steamworks.NET. // Copyright (c) 2013-2022 Riley Labrecque // Please see the included LICENSE.txt for additional information. // This file is automatically generated. // Changes to this file will be reverted when you update Steamworks.NET #if !(UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || UNITY_STANDALONE_OSX || STEAMWORKS_WIN || STEAMWORKS_LIN_OSX) #define DISABLESTEAMWORKS #endif #if !DISABLESTEAMWORKS using System.Runtime.InteropServices; using IntPtr = System.IntPtr; namespace Steamworks { public static class SteamTimeline { /// /// Sets a description for the current game state in the timeline. These help the user to find specific /// moments in the timeline when saving clips. Setting a new state description replaces any previous /// description. /// Examples could include: /// * Where the user is in the world in a single player game /// * Which round is happening in a multiplayer game /// * The current score for a sports game /// Parameters: /// - pchDescription: provide a localized string in the language returned by SteamUtils()->GetSteamUILanguage() /// - flTimeDelta: The time offset in seconds to apply to this event. Negative times indicate an /// event that happened in the past. /// public static void SetTimelineStateDescription(string pchDescription, float flTimeDelta) { InteropHelp.TestIfAvailableClient(); using (var pchDescription2 = new InteropHelp.UTF8StringHandle(pchDescription)) { NativeMethods.ISteamTimeline_SetTimelineStateDescription(CSteamAPIContext.GetSteamTimeline(), pchDescription2, flTimeDelta); } } public static void ClearTimelineStateDescription(float flTimeDelta) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamTimeline_ClearTimelineStateDescription(CSteamAPIContext.GetSteamTimeline(), flTimeDelta); } /// /// Use this to mark an event on the Timeline. The event can be instantaneous or take some amount of time /// to complete, depending on the value passed in flDurationSeconds /// Examples could include: /// * a boss battle /// * a cut scene /// * a large team fight /// * picking up a new weapon or ammunition /// * scoring a goal /// Parameters: /// - pchIcon: specify the name of the icon uploaded through the Steamworks Partner Site for your title /// or one of the provided icons that start with steam_ /// - pchTitle & pchDescription: provide a localized string in the language returned by /// SteamUtils()->GetSteamUILanguage() /// - unPriority: specify how important this range is compared to other markers provided by the game. /// Ranges with larger priority values will be displayed more prominently in the UI. This value /// may be between 0 and k_unMaxTimelinePriority. /// - flStartOffsetSeconds: The time that this range started relative to now. Negative times /// indicate an event that happened in the past. /// - flDurationSeconds: How long the time range should be in seconds. For instantaneous events, this /// should be 0 /// - ePossibleClip: By setting this parameter to Featured or Standard, the game indicates to Steam that it /// would be appropriate to offer this range as a clip to the user. For instantaneous events, the /// suggested clip will be for a short time before and after the event itself. /// public static void AddTimelineEvent(string pchIcon, string pchTitle, string pchDescription, uint unPriority, float flStartOffsetSeconds, float flDurationSeconds, ETimelineEventClipPriority ePossibleClip) { InteropHelp.TestIfAvailableClient(); using (var pchIcon2 = new InteropHelp.UTF8StringHandle(pchIcon)) using (var pchTitle2 = new InteropHelp.UTF8StringHandle(pchTitle)) using (var pchDescription2 = new InteropHelp.UTF8StringHandle(pchDescription)) { NativeMethods.ISteamTimeline_AddTimelineEvent(CSteamAPIContext.GetSteamTimeline(), pchIcon2, pchTitle2, pchDescription2, unPriority, flStartOffsetSeconds, flDurationSeconds, ePossibleClip); } } /// /// Changes the color of the timeline bar. See ETimelineGameMode comments for how to use each value /// public static void SetTimelineGameMode(ETimelineGameMode eMode) { InteropHelp.TestIfAvailableClient(); NativeMethods.ISteamTimeline_SetTimelineGameMode(CSteamAPIContext.GetSteamTimeline(), eMode); } } } #endif // !DISABLESTEAMWORKS