---
tags:
    - "Movie, Film"
---

# Video Player Prepare

[Video](../index.md) / [Video Player](index.md) / **Video Player Prepare**

## Description

Executes the Prepare method on the Video Player component

## Code

```cs
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>

using System;
using UnityEngine;
using VisualScript.Icons;
using UnityEngine.Video;

namespace VisualScript.Runtime
{
    [Title("Video Player Prepare")]
    [Category("Video/Video Player/Prepare")]
    [Description("Executes the Prepare method on the Video Player component")]
    
    [Image(typeof(IconVideo), ColorTheme.Type.Blue)]
    [Keywords("Movie, Film")]
    
    [Serializable]
    public class GenInstructionVideoPlayer_Prepare_0 : Instruction
    {
        [SerializeField] private GetGameObject m_VideoPlayer = new GetGameObject(
            new GenTypeGameObject_VideoPlayer()
        );
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Prepare");
            return $"{this.m_VideoPlayer} {method}";
        }
        
        protected override Awaitable Run(Args args)
        {
            VideoPlayer component = this.m_VideoPlayer.Get<VideoPlayer>(args);
            if (component == null) return Done;
            
            component.Prepare();
            
            return Done;
        }
    }
}


```

