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

Audio Source Is Virtual#

Audio / Audio Source / Audio Source Is Virtual

Description#

Compares the Is Virtual property of Audio Source component to another value

Parameters#

Name Description
Audio 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.Audio;

namespace VisualScript.Runtime
{
    [Title("Audio Source Is Virtual")]
    [Category("Audio/Audio Source/Is Virtual")]
    [Description("Compares the Is Virtual property of Audio Source component to another value")]
    
    [Image(typeof(IconAudioSource), ColorTheme.Type.Yellow)]
    [Keywords("Audio, Sound, Music, Ambient, Sfx")]
    
    [Parameter("Audio Source")]
    
    [Serializable]
    public class GenConditionBool_AudioSource_CheckIsVirtual : Condition
    {
        [SerializeField] private GetGameObject m_AudioSource = new GetGameObject(
            new GenTypeGameObject_AudioSource()
        );
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Is Virtual");
            return $"{this.m_AudioSource} {member}";
        }
        
        protected override bool Run(Args args)
        {
            AudioSource component = this.m_AudioSource.Get<AudioSource>(args);
            if (component == null) return false;
            
            return component.isVirtual;
        }
    }
}

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