27 lines
735 B
C#
27 lines
735 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Video;
|
|
/*******************************************************************************
|
|
*Create By CG
|
|
*Function
|
|
*******************************************************************************/
|
|
namespace ZXK.LouDiXvMuNiu
|
|
{
|
|
public class VideoRawTextureClearCtrl : MonoBehaviour
|
|
{
|
|
RenderTexture _renderTexture;
|
|
private void Awake()
|
|
{
|
|
_renderTexture = transform.GetComponent<VideoPlayer>().targetTexture;
|
|
}
|
|
private void OnEnable()
|
|
{
|
|
_renderTexture.Release();
|
|
}
|
|
private void OnDisable()
|
|
{
|
|
_renderTexture.Release();
|
|
}
|
|
}
|
|
} |