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

Scene Asset#

  • Can Read

  • Cannot Write

Description#

A Scene object reference

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]
    
    [Title("Scene Asset")]
    [Category("Scene Asset")]
    
    [Description("A Scene object reference")]
    [Image(typeof(IconUnity), ColorTheme.Type.Gray)]
    
    [Keywords("Value", "Constant", "Object", "Instance")]
    
    [Serializable]
    public class TypeSceneInstance : TypeScene
    {
        [SerializeField] private SceneReference m_Scene = new SceneReference();

        public override int GetPreview(GameObject source) => this.m_Scene.Index;

        public override int Get(Args args)
        {
            return this.m_Scene.Index;
        }

        public override string ToString()
        {
            return this.m_Scene.ToString();
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnEditorChange;
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.