---
tags:
    - "Gate"
    - "Logic"
    - "And"
    - "Or"
---

# Conditions

## Description

Returns the result of running a set of Conditions

## Code

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

namespace VisualScript.Runtime
{
    [Title("Conditions")]
    [Image(typeof(IconConditions), ColorTheme.Type.Yellow)]
    
    [Description("Returns the result of running a set of Conditions")]
    [Category("Conditions")]
    
    [Keywords("Gate", "Logic", "And", "Or")]
    [NestInnerList(nameof(m_Conditions))]
    
    [Serializable]
    public class ConditionCoreConditions : Condition
    {
        [SerializeField] private Conditions.Operation m_Mode = Conditions.Operation.AND;
        [SerializeField] private Conditions m_Conditions = new Conditions();

        protected override string GetTitle(GameObject source) => $"({this.m_Conditions.ToString(this.m_Mode)})";

        protected override bool Run(Args args)
        {
            return this.m_Conditions.Check(args, this.m_Mode);
        }
    }
}
```

