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

# Video Player Frame Rate

[Video](../index.md) / [Video Player](index.md) / **Video Player Frame Rate**

## Description

Compares the Frame Rate property of Video Player component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Video Player |  |
| Compare |  |
| Value |  |

## 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 Frame Rate")]
    [Category("Video/Video Player/Frame Rate")]
    [Description("Compares the Frame Rate property of Video Player component to another value")]
    
    [Image(typeof(IconVideo), ColorTheme.Type.Blue)]
    [Keywords("Movie, Film")]
    
    [Parameter("Video Player")]
    [Parameter("Compare")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenConditionNumber_VideoPlayer_CheckFrameRate : Condition
    {
        [SerializeField] private GetGameObject m_VideoPlayer = new GetGameObject(
            new GenTypeGameObject_VideoPlayer()
        );
        
        [SerializeField] private CompareNumber m_Compare = new CompareNumber();
        
        [SerializeField] private GetNumber m_Value = new GetNumber();
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Frame Rate");
            return $"{this.m_VideoPlayer} {member} {this.m_Compare} {this.m_Value}";
        }
        
        protected override bool Run(Args args)
        {
            VideoPlayer component = this.m_VideoPlayer.Get<VideoPlayer>(args);
            if (component == null) return false;
            
            return this.m_Compare.Compare(component.frameRate, (float) this.m_Value.Get(args));
        }
    }
}


```

