Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

Video Player Error Received#

Video / Video Player / Video Player Error Received

Description#

Executes whenever the Error Received event of Video Player component is invoked

Parameters#

Name Description
Source

Code#

// <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 Error Received")]
    [Category("Video/Video Player/Error Received")]
    [Description("Executes whenever the Error Received event of Video Player component is invoked")]
    
    [Image(typeof(IconVideo), ColorTheme.Type.Blue)]
    [Keywords("Movie, Film")]
    
    [Parameter("Source")]
    
    [Serializable]
    public class GenTriggerVideoPlayer_ErrorReceived : TriggerSourceComponentBase<VideoPlayer>
    {
        
        public GenTriggerVideoPlayer_ErrorReceived() : base(new GenTypeGameObject_VideoPlayer())
        { }
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Error Received");
            return $"{this.SourceName} {member}";
        }
        
        protected override void OnSourceChanged(VideoPlayer previousSource, VideoPlayer newSource)
        {
            if (previousSource != null)
            {
                previousSource.errorReceived -= this.Run;
            }
            
            if (newSource != null)
            {
                newSource.errorReceived += this.Run;
            }
        }
        
        private void Run(VideoPlayer value1, string value2)
        {
            using Args args = Args.Get(
                this.Component,
                this.m_CurrentSource
            );
            
            this.Run(args);
        }
    }
}

Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.