using System.Collections; using System.Collections.Generic; using UnityEngine; using Cysharp.Threading.Tasks; namespace BITKit { public sealed class TranslateComponent : Provider { [Header(Constant.Header.Settings)] public TranslateSO so; public bool async; [Header(Constant.Header.Output)] public Provider output; [TextArea] public string result; public override string Get() { throw new System.NotImplementedException(); } public override async void Set(string t) { if (async) { await UniTask.SwitchToThreadPool(); } output.Set(result = so.Get(t, false)); } } }