Class Helper
Inheritance
System.Object
Helper
Assembly: cs.temp.dll.dll
public static class Helper
Fields
Declaration
public const string AVProVideoVersion = "2.9.1"
Field Value
Type |
Description |
System.String |
|
Declaration
public const double MilliSecondsToHNS = 10000
Field Value
Type |
Description |
System.Double |
|
Declaration
public const double SecondsToHNS = 10000000
Field Value
Type |
Description |
System.Double |
|
UnityBaseTextureName
Declaration
public const string UnityBaseTextureName = "_MainTex"
Field Value
Type |
Description |
System.String |
|
UnityBaseTextureName_HDRP
Declaration
public const string UnityBaseTextureName_HDRP = "_BaseColorMap"
Field Value
Type |
Description |
System.String |
|
UnityBaseTextureName_URP
Declaration
public const string UnityBaseTextureName_URP = "_BaseMap"
Field Value
Type |
Description |
System.String |
|
Methods
Declaration
public static double ConvertFrameToTimeSeconds(int frame, float frameRate)
Parameters
Type |
Name |
Description |
System.Int32 |
frame |
|
System.Single |
frameRate |
|
Returns
Type |
Description |
System.Double |
|
Declaration
public static DateTime ConvertSecondsSince1970ToDateTime(double secondsSince1970)
Parameters
Type |
Name |
Description |
System.Double |
secondsSince1970 |
|
Returns
Type |
Description |
System.DateTime |
|
Declaration
public static int ConvertTimeSecondsToFrame(double seconds, float frameRate)
Parameters
Type |
Name |
Description |
System.Double |
seconds |
|
System.Single |
frameRate |
|
Returns
Type |
Description |
System.Int32 |
|
Declaration
public static double FindNextKeyFrameTimeSeconds(double seconds, float frameRate, int keyFrameInterval)
Parameters
Type |
Name |
Description |
System.Double |
seconds |
|
System.Single |
frameRate |
|
System.Int32 |
keyFrameInterval |
|
Returns
Type |
Description |
System.Double |
|
Declaration
public static string GetErrorMessage(ErrorCode code)
Parameters
Returns
Type |
Description |
System.String |
|
Declaration
public static string GetFilePath(string path, MediaPathType location)
Parameters
Returns
Type |
Description |
System.String |
|
Declaration
public static string GetFriendlyResolutionName(int width, int height, float fps)
Parameters
Type |
Name |
Description |
System.Int32 |
width |
|
System.Int32 |
height |
|
System.Single |
fps |
|
Returns
Type |
Description |
System.String |
|
Declaration
public static Matrix4x4 GetMatrixForOrientation(Orientation ori)
Parameters
Returns
Type |
Description |
Matrix4x4 |
|
Convert texture transform matrix to an enum of orientation types
Declaration
public static Orientation GetOrientation(float[] t)
Parameters
Type |
Name |
Description |
System.Single[] |
t |
|
Returns
Declaration
public static string GetPath(MediaPathType location)
Parameters
Returns
Type |
Description |
System.String |
|
Declaration
public static string GetPlatformName(Platform platform)
Parameters
Returns
Type |
Description |
System.String |
|
Declaration
public static string[] GetPlatformNames()
Returns
Type |
Description |
System.String[] |
|
GetReadableTexture(RenderTexture, Texture2D)
Declaration
public static Texture2D GetReadableTexture(RenderTexture inputTexture, Texture2D targetTexture = null)
Parameters
Type |
Name |
Description |
RenderTexture |
inputTexture |
|
Texture2D |
targetTexture |
|
Returns
Type |
Description |
Texture2D |
|
GetReadableTexture(Texture, Boolean, Orientation, Texture2D)
Declaration
public static Texture2D GetReadableTexture(Texture inputTexture, bool requiresVerticalFlip, Orientation ori, Texture2D targetTexture = null)
Parameters
Type |
Name |
Description |
Texture |
inputTexture |
|
System.Boolean |
requiresVerticalFlip |
|
Orientation |
ori |
|
Texture2D |
targetTexture |
|
Returns
Type |
Description |
Texture2D |
|
Declaration
public static TimeRange GetTimelineRange(double duration, TimeRanges seekable)
Parameters
Type |
Name |
Description |
System.Double |
duration |
|
TimeRanges |
seekable |
|
Returns
Declaration
public static string GetTimeString(double timeSeconds, bool showMilliseconds = false)
Parameters
Type |
Name |
Description |
System.Double |
timeSeconds |
|
System.Boolean |
showMilliseconds |
|
Returns
Type |
Description |
System.String |
|
Declaration
public static int GetUnityAudioSampleRate()
Returns
Type |
Description |
System.Int32 |
|
Declaration
public static int GetUnityAudioSpeakerCount()
Returns
Type |
Description |
System.Int32 |
|
Declaration
public static void LogInfo(string message, Object context = null)
Parameters
Type |
Name |
Description |
System.String |
message |
|
Object |
context |
|
Declaration
public static Matrix4x4 Matrix4x4FromAffineTransform(float[] affineXfrm)
Parameters
Type |
Name |
Description |
System.Single[] |
affineXfrm |
|
Returns
Type |
Description |
Matrix4x4 |
|