Set Color#
Set / Set Color
Description#
Sets a Color value
Parameters#
| Name | Description |
|---|---|
| Set | Where the value is stored |
| Value | The value to store |
Code#
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Title("Set Color")]
[Image(typeof(IconColor), ColorTheme.Type.Pink)]
[Description("Sets a Color value")]
[Category("Set/Set Color")]
[Parameter("Set", "Where the value is stored")]
[Parameter("Value", "The value to store")]
[Keywords("Set", "Change", "Modify", "Assign")]
[Serializable]
public class InstructionCoreSetColor : Instruction
{
[SerializeField] private SetColor m_Set = new SetColor();
[SerializeField] private GetColor m_Value = new GetColor();
protected override string GetTitle(GameObject source) => $"{this.m_Set} = {this.m_Value}";
protected override Awaitable Run(Args args)
{
Color value = this.m_Value.Get(args);
this.m_Set.Set(value, args);
return Done;
}
}
}