---
tags:
    - "Set"
    - "Change"
    - "Modify"
    - "Assign"
    - "Int"
    - "Integer"
    - "Float"
    - "Value"
    - "Decimal"
---

# Set Number

[Set](index.md) / **Set Number**

## Description

Sets a numeric value

## Parameters

| Name | Description |
| :--- | :---------- |
| Set | Where the value is stored |
| Value | The value to store |

## Code

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

namespace VisualScript.Runtime
{
    [Title("Set Number")]
    [Image(typeof(IconNumber), ColorTheme.Type.Teal)]
    
    [Description("Sets a numeric value")]
    [Category("Set/Set Number")]
    
    [Parameter("Set", "Where the value is stored")]
    [Parameter("Value", "The value to store")]
    
    [Keywords("Set", "Change", "Modify", "Assign")]
    [Keywords("Int", "Integer", "Float", "Value", "Decimal")]
    
    [Serializable]
    public class InstructionCoreSetNumber : Instruction
    {
        [SerializeField] private SetNumber m_Set = new SetNumber();
        [SerializeField] private GetNumber m_Value = new GetNumber();

        protected override string GetTitle(GameObject source) => $"{this.m_Set} = {this.m_Value}";

        protected override Awaitable Run(Args args)
        {
            double value = this.m_Value.Get(args);
            this.m_Set.Set(value, args);
            
            return Done;
        }
    }
}
```

