---
tags:
    - "Any"
    - "||"
    - "Add"
    - "Sum"
---

# OR

[Math](index.md) / **OR**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :red_circle: Cannot Write

</div>

## Description

Returns True if value 1 or value 2 is True

## Code

```cs
using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]
    
    [Title("OR")]
    [Category("Math/OR")]
    
    [Description("Returns True if value 1 or value 2 is True")]
    [Image(typeof(IconOR), ColorTheme.Type.Yellow)]
    
    [Keywords("Any", "||", "Add", "Sum")]
    
    [Serializable]
    public class TypeBoolMathOR : TypeBool
    {
        [SerializeField] private GetBool m_Value1 = new GetBool();
        [SerializeField] private GetBool m_Value2 = new GetBool();

        public override bool GetPreview(GameObject source)
        {
            bool value1 = this.m_Value1.GetPreview(source);
            bool value2 = this.m_Value1.GetPreview(source);

            return value1 || value2;
        }

        public override bool Get(Args args)
        { 
            bool value1 = this.m_Value1.Get(args);
            bool value2 = this.m_Value2.Get(args);
            
            return value1 || value2;
        }

        public override string ToString()
        {
            return $"{this.m_Value1} OR {this.m_Value2}";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
```

