Source Scale#
Args / Source Scale
Can Read
Cannot Write
Description#
The Transform scale of the Source object
Code#
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Get]
[Title("Source Scale")]
[Category("Args/Source Scale")]
[Description("The Transform scale of the Source object")]
[Image(typeof(IconSource), ColorTheme.Type.Yellow)]
[Keywords("Self")]
[Serializable]
public class TypeVector3SourceScale : TypeVector3
{
public override Vector3 GetPreview(GameObject source)
{
return source != null ? source.transform.lossyScale : default;
}
public override Vector3 Get(Args args)
{
return args.Source != null ? args.Source.transform.lossyScale : Vector3.zero;
}
public override string ToString() => "Source Position";
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}