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

Vector3#

Vector3 / Vector3

  • Can Read

  • Cannot Write

Description#

The Vector3 in the specified string format

Parameters#

Name Description
Vector The Vector3 value converted to text
Format The numeric format specifier used for each axis. 'F2' if left empty

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]

    [Title("Vector3")]
    [Category("Vector3/Vector3")]

    [Description("The Vector3 in the specified string format")]
    [Image(typeof(IconVector3), ColorTheme.Type.Lime)]

    [Parameter("Vector", "The Vector3 value converted to text")]
    [Parameter("Format", "The numeric format specifier used for each axis. 'F2' if left empty")]

    [Keywords("Vector", "Axis", "X", "Y", "Z", "Text", "Convert")]

    [Serializable]
    public class TypeStringVector3Get : TypeString
    {
        private const string FORMAT = "F2";

        [SerializeField] private GetVector3 m_Vector = new GetVector3();
        [SerializeField] private string m_Format = FORMAT;

        public override string GetPreview(GameObject source) => Format(
            this.m_Vector.GetPreview(source),
            this.m_Format
        );

        public override string Get(Args args) => Format(this.m_Vector.Get(args), this.m_Format);

        private static string Format(Vector3 vector, string format)
        {
            return vector.ToString(string.IsNullOrEmpty(format) ? FORMAT : format);
        }

        public override string ToString()
        {
            return this.m_Vector.ToString();
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.