---
tags:
    - "Air, Blow"
---

# Wind Zone Wind Main

[Miscellaneous](../index.md) / [Wind Zone](index.md) / **Wind Zone Wind Main**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :green_circle: Can Write

</div>

## Description

The Wind Main property of the Wind Zone component

## Code

```cs
// <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 Main")]
    [Category("Miscellaneous/Wind Zone/Wind Main")]
    [Description("The Wind Main property of the Wind Zone component")]
    
    [Image(typeof(IconWind), ColorTheme.Type.Lime)]
    [Keywords("Air, Blow")]
    
    [Serializable]
    public class GenTypeNumber_WindZone_WindMain : 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.windMain : default;
        }
        
        public override double Get(Args args)
        {
            WindZone instance = this.m_WindZone.Get<WindZone>(args);
            return instance != null
                ? instance.windMain
                : default;
        }
        
        public override void Set(double value, Args args)
        {
            WindZone component = this.m_WindZone.Get<WindZone>(args);
            if (component != null) component.windMain = (float) value;
        }
        
        public override string ToString()
        {
            return $"{this.m_WindZone} Wind Main";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}


```

