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

Source Local Rotation#

Args / Source Local Rotation

  • Can Read

  • Can Write

Description#

The Transform local rotation of the Source object

Code#

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get, Set]
    
    [Title("Source Local Rotation")]
    [Category("Args/Source Local Rotation")]
    
    [Description("The Transform local rotation of the Source object")]
    [Image(typeof(IconSource), ColorTheme.Type.Yellow)]
    
    [Keywords("Self")]
    
    [Serializable]
    public class TypeQuaternionSourceLocalRotation : TypeQuaternion
    {
        public override Quaternion GetPreview(GameObject source)
        {
            return source != null ? source.transform.localRotation : Quaternion.identity;
        }

        public override Quaternion Get(Args args)
        {
            return args.Source != null ? args.Source.transform.localRotation : Quaternion.identity;
        }

        public override void Set(Quaternion value, Args args)
        {
            if (args.Source == null) return;
            args.Source.transform.localRotation = value;
        }

        public override string ToString() => "Source Local Rotation";

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