Apply To VFX Graph
This component allows for a MediaPlayer video to be used as input to a Visual Effect Graph (requires the Visual Effect Graph
package).
Properties
Property | Function |
---|---|
Media Player | The MediaPlayer component to apply to the material |
Default Texture | The texture to display during times when there is no video texture to display (eg during video loading) |
Visual Effect | The VisualEffect component to apply the video texture to |
Texture Property Name | The name of the exposed texture variable to set. |
Installing
This is an extension as it requires the optional Visual Effect Graph package from the Package Manager, so it requires some setup the first time you use it:
- Add the Visual Effect Graph package to your project from the Package Manager.
- Add the Visual Effect Graph package assembly
Unity.VisualEffectGraph.Runtime
to the_AVProVideo.Extensions.VisualEffectGraph
assembly definition references. - Add
AVPRO_PACKAGE_VFXGRAPH
to your player Preprocessor Defines to enable the scripts to be compiled (you can also edit ApplyToVfxGraph.cs and comment in the#define AVPRO_PACKAGE_VFXGRAPH
line at the top).