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

Constant Force 2D Force#

Physics 2D / Effectors / Constant Force 2D / Constant Force 2D Force

Description#

Compares the Force property of Constant Force 2D component to another value

Parameters#

Name Description
Constant Force 2D
Value

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
{
    [Title("Constant Force 2D Force")]
    [Category("Physics 2D/Effectors/Constant Force 2D/Force")]
    [Description("Compares the Force property of Constant Force 2D component to another value")]
    
    [Image(typeof(IconWeight), ColorTheme.Type.Lime, typeof(Badge2D))]
    [Keywords("Physics, 2D")]
    
    [Parameter("Constant Force 2D")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenConditionVector2_ConstantForce2D_CheckForce : Condition
    {
        [SerializeField] private GetGameObject m_ConstantForce2D = new GetGameObject(
            new GenTypeGameObject_ConstantForce2D()
        );
        
        [SerializeField] private GetVector2 m_Value = new GetVector2();
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Force");
            return $"{this.m_ConstantForce2D} {member} = {this.m_Value}";
        }
        
        protected override bool Run(Args args)
        {
            ConstantForce2D component = this.m_ConstantForce2D.Get<ConstantForce2D>(args);
            if (component == null) return false;
            
            return component.force == (Vector2) this.m_Value.Get(args);
        }
    }
}

Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.