Wind Zone Wind Pulse Magnitude#
Miscellaneous / Wind Zone / Wind Zone Wind Pulse Magnitude
Can Read
Can Write
Description#
The Wind Pulse Magnitude property of the Wind Zone component
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;
namespace VisualScript.Runtime
{
[Get]
[Set]
[Title("Wind Zone Wind Pulse Magnitude")]
[Category("Miscellaneous/Wind Zone/Wind Pulse Magnitude")]
[Description("The Wind Pulse Magnitude property of the Wind Zone component")]
[Image(typeof(IconWind), ColorTheme.Type.Lime)]
[Keywords("Air, Blow")]
[Serializable]
public class GenTypeNumber_WindZone_WindPulseMagnitude : TypeNumber
{
[SerializeField] private GetGameObject m_WindZone = new GetGameObject(
new GenTypeGameObject_WindZone()
);
public override double GetPreview(GameObject source)
{
GameObject instance = this.m_WindZone.GetPreview(source);
if (instance == null) return default;
WindZone component = instance.GetComponent<WindZone>();
return component != null ? component.windPulseMagnitude : default;
}
public override double Get(Args args)
{
WindZone instance = this.m_WindZone.Get<WindZone>(args);
return instance != null
? instance.windPulseMagnitude
: default;
}
public override void Set(double value, Args args)
{
WindZone component = this.m_WindZone.Get<WindZone>(args);
if (component != null) component.windPulseMagnitude = (float) value;
}
public override string ToString()
{
return $"{this.m_WindZone} Wind Pulse Magnitude";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}