mirror of
https://github.com/0x7c13/Pal3.Unity.git
synced 2026-11-26 17:38:10 +08:00
Cover SCE command contracts, binary readers, resource layouts and full local CPK decompression for PAL3 and PAL3A. Fix CVD time rebasing, binary read bounds and short reads, and CPK/NAV validation. Standardize first-party copyright headers, preserve correct creation years, and update console source generation. Validate both variants in Unity and verify all live CPK entries.
75 lines
2.4 KiB
C#
75 lines
2.4 KiB
C#
// ------------------------------------------------------------------------
|
|
// Copyright (c) 2021-2026, Jiaqi (0x7c13) Liu. All rights reserved.
|
|
// See LICENSE file in the project root for license information.
|
|
// ------------------------------------------------------------------------
|
|
|
|
namespace Engine.Utilities
|
|
{
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public static class UnitySupportedVideoFormats
|
|
{
|
|
public static readonly HashSet<string> WindowsSupportedVideoFormats = new (StringComparer.OrdinalIgnoreCase)
|
|
{
|
|
".asf",
|
|
".avi",
|
|
".dv",
|
|
".m4v",
|
|
".mov",
|
|
".mp4",
|
|
".mpg",
|
|
".mpeg",
|
|
".ogv",
|
|
".vp8",
|
|
".webm",
|
|
".wmv",
|
|
};
|
|
|
|
public static readonly HashSet<string> MacOSSupportedVideoFormats = new (StringComparer.OrdinalIgnoreCase)
|
|
{
|
|
".dv",
|
|
".m4v",
|
|
".mov",
|
|
".mp4",
|
|
".mpg",
|
|
".mpeg",
|
|
".ogv",
|
|
".vp8",
|
|
".webm",
|
|
};
|
|
|
|
public static readonly HashSet<string> LinuxSupportedVideoFormats = new (StringComparer.OrdinalIgnoreCase)
|
|
{
|
|
".ogv",
|
|
".vp8",
|
|
".webm",
|
|
};
|
|
|
|
public static readonly HashSet<string> AndroidSupportedVideoFormats = new (StringComparer.OrdinalIgnoreCase)
|
|
{
|
|
".webm",
|
|
".mp4",
|
|
};
|
|
|
|
public static readonly HashSet<string> iOSSupportedVideoFormats = new (StringComparer.OrdinalIgnoreCase)
|
|
{
|
|
".webm",
|
|
".mp4",
|
|
};
|
|
|
|
public static HashSet<string> GetSupportedVideoFormats(RuntimePlatform platform)
|
|
{
|
|
return platform switch
|
|
{
|
|
RuntimePlatform.WindowsPlayer or RuntimePlatform.WindowsEditor => WindowsSupportedVideoFormats,
|
|
RuntimePlatform.OSXPlayer or RuntimePlatform.OSXEditor => MacOSSupportedVideoFormats,
|
|
RuntimePlatform.LinuxPlayer or RuntimePlatform.LinuxEditor => LinuxSupportedVideoFormats,
|
|
RuntimePlatform.IPhonePlayer => iOSSupportedVideoFormats,
|
|
RuntimePlatform.Android => AndroidSupportedVideoFormats,
|
|
_ => new HashSet<string> (StringComparer.OrdinalIgnoreCase) {".mp4" }
|
|
};
|
|
}
|
|
}
|
|
} |