Class VideoTexture
ChatGPT told me that extending UnityEngine.Object directly is not recommended. So I made this ScriptableObject wrapper around RenderTexture.
Inherited Members
ScriptableObject.SetDirty()
ScriptableObject.CreateInstance<T>()
Object.GetEntityId()
Object.GetInstanceID()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Scene)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Object.ToString()
Object.name
Object.hideFlags
Namespace: Glitch9
Assembly: Glitch9.dll
Syntax
public sealed class VideoTexture : ScriptableObject
Fields
| Edit this page View SourcerenderTexture
Declaration
public RenderTexture renderTexture
Field Value
| Type | Description |
|---|---|
| RenderTexture |
url
Declaration
public string url
Field Value
| Type | Description |
|---|---|
| string |
Properties
| Edit this page View Sourceheight
Declaration
public float height { get; }
Property Value
| Type | Description |
|---|---|
| float |
width
Declaration
public float width { get; }
Property Value
| Type | Description |
|---|---|
| float |
Methods
| Edit this page View SourceCreate(string, int, int, int, RenderTextureFormat, int)
Declaration
public static VideoTexture Create(string url, int width = 512, int height = 512, int depth = 0, RenderTextureFormat fmt = RenderTextureFormat.ARGB32, int aa = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| string | url | |
| int | width | |
| int | height | |
| int | depth | |
| RenderTextureFormat | fmt | |
| int | aa |
Returns
| Type | Description |
|---|---|
| VideoTexture |
FromFilePath(string, int, int, int, RenderTextureFormat, int)
Declaration
public static VideoTexture FromFilePath(string path, int width, int height, int depth = 0, RenderTextureFormat fmt = RenderTextureFormat.ARGB32, int aa = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | |
| int | width | |
| int | height | |
| int | depth | |
| RenderTextureFormat | fmt | |
| int | aa |
Returns
| Type | Description |
|---|---|
| VideoTexture |
Release()
Declaration
public void Release()
SetSize(int, int)
Declaration
public void SetSize(int width, int height)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | |
| int | height |
ToBackgroundImage()
Declaration
public StyleBackground ToBackgroundImage()
Returns
| Type | Description |
|---|---|
| StyleBackground |
ToBase64()
Declaration
public string ToBase64()
Returns
| Type | Description |
|---|---|
| string |
ToByteArray()
Declaration
public byte[] ToByteArray()
Returns
| Type | Description |
|---|---|
| byte[] |