Tilemap Color#
Tilemap / Tilemap Color
Description#
Compares the Color property of Tilemap component to another value
Parameters#
| Name | Description |
|---|---|
| Tilemap | |
| 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;
using UnityEngine.Tilemaps;
using Unity.Collections;
namespace VisualScript.Runtime
{
[Title("Tilemap Color")]
[Category("Tilemap/Color")]
[Description("Compares the Color property of Tilemap component to another value")]
[Image(typeof(IconTilemap), ColorTheme.Type.Purple)]
[Keywords("Tile, Map")]
[Parameter("Tilemap")]
[Parameter("Value")]
[Serializable]
public class GenConditionColor_Tilemap_CheckColor : Condition
{
[SerializeField] private GetGameObject m_Tilemap = new GetGameObject(
new GenTypeGameObject_Tilemap()
);
[SerializeField] private GetColor m_Value = new GetColor();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Color");
return $"{this.m_Tilemap} {member} = {this.m_Value}";
}
protected override bool Run(Args args)
{
Tilemap component = this.m_Tilemap.Get<Tilemap>(args);
if (component == null) return false;
return component.color == (Color) this.m_Value.Get(args);
}
}
}