public void Record() { Highlights.VideoHighlightParams param = new Highlights.VideoHighlightParams(); param.highlightId = "Record"; param.groupId = "Recorded_Group"; param.startDelta = -(int)(Time.realtimeSinceStartup * 1000); //param.startDelta = -10000; param.endDelta = 1000; Highlights.SetVideoHighlight(param, Highlights.DefaultSetVideoCallback); }
private IEnumerator RoundPlaying() { // As soon as the round begins playing let the players control the tanks. EnableTankControl(); // Clear the text from the screen. m_MessageText.text = string.Empty; // While there is not one tank left... while (!OneTankLeft()) { // Trigger the 'Heavy Duty Traveler' highlight if the tank has covered a specified distance if (!HeavyDutyTravelerAchievement && TraveledAGoodDistance()) { // Create a screenshot highlight 'Heavy Duty Traveler' and associate it with the 'Misc Group' group. Highlights.ScreenshotHighlightParams shp = new Highlights.ScreenshotHighlightParams(); shp.groupId = "MISC_GROUP"; shp.highlightId = "HEAVY_DUTY_TRAVELER"; Highlights.SetScreenshotHighlight(shp); HeavyDutyTravelerAchievement = true; } // ... return on the next frame. yield return(null); } // Trigger 'Kaboom' highlight every other round if (m_RoundNumber % 2 == 0) { // Create a screenshot highlight 'Kaboom' and associate it with the 'Shot Highlight Group' group. Highlights.ScreenshotHighlightParams shp = new Highlights.ScreenshotHighlightParams(); shp.groupId = "SHOT_HIGHLIGHT_GROUP"; shp.highlightId = "KABOOM"; Highlights.SetScreenshotHighlight(shp); } // Trigger 'Hurt Me Plenty' video highlight after the third round if (m_RoundNumber == 3) { // Create a video highlight 'Hurt Me Plenty' and associate it with the 'Shot Highlight Group' group. Highlights.VideoHighlightParams vhp = new Highlights.VideoHighlightParams(); vhp.groupId = "SHOT_HIGHLIGHT_GROUP"; vhp.highlightId = "HURT_ME_PLENTY"; // Provide start and end times for the video being captured. Negative values indicate events in the past. Unit is milliseconds vhp.startDelta = -3000; vhp.endDelta = 2000; Highlights.SetVideoHighlight(vhp); } }
internal static bool SaveHighlightMaybe(string player, g_Instance frame, string id) { string highlightGroupName = IsPlayerHighlightEnabled(player, frame); if (highlightGroupName.Length <= 0) { return(false); } Highlights.VideoHighlightParams vhp = new() { groupId = highlightGroupName, highlightId = id, startDelta = -(int)(Settings.Default.nvHighlightsSecondsBefore * 1000), endDelta = (int)(Settings.Default.nvHighlightsSecondsAfter * 1000) }; Highlights.SetVideoHighlight(vhp, videoCallback); return(true); }
public static void SaveHighlight(string highlightGroupName, string id, bool onlyAfter = false) { Highlights.VideoHighlightParams vhp = new Highlights.VideoHighlightParams(); vhp.groupId = highlightGroupName; vhp.highlightId = id; if (onlyAfter) { vhp.startDelta = -(int)((SparkSettings.instance.nvHighlightsSecondsBefore + SparkSettings.instance.nvHighlightsSecondsAfter) * 1000); vhp.endDelta = 0; } else { vhp.startDelta = -(int)(SparkSettings.instance.nvHighlightsSecondsBefore * 1000); vhp.endDelta = (int)(SparkSettings.instance.nvHighlightsSecondsAfter * 1000); } Highlights.SetVideoHighlight(vhp, videoCallback); }
public static void SaveRecording() { if (!Plugin.CurrentSettings.Enabled) { return; } TimeSpan difference = DateTime.Now - _startTime; Highlights.VideoHighlightParams vhp = new Highlights.VideoHighlightParams(); vhp.highlightId = "MAP_PLAY"; vhp.groupId = "MAP_PLAY_GROUP"; vhp.startDelta = (int)-difference.TotalMilliseconds; vhp.endDelta = 0; vhp.startDelta += Plugin.CurrentSettings.OffsetStart; vhp.endDelta += Plugin.CurrentSettings.OffsetEnd; Highlights.SetVideoHighlight(vhp, LogCallback); }