1
This commit is contained in:
@@ -3,12 +3,29 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using BITKit;
|
||||
using BITKit.Core.Tuple;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
namespace BITKit
|
||||
{
|
||||
|
||||
[Serializable]
|
||||
public sealed class CommandConfigProvider:IConfigProvider
|
||||
{
|
||||
[SerializeField] private UnityTuple<string, string>[] pairs;
|
||||
public string GetConfig(params object[] args)
|
||||
{
|
||||
return string.Join("\n",pairs);
|
||||
}
|
||||
|
||||
public void Configure(params object[] args)
|
||||
{
|
||||
foreach (var pair in pairs)
|
||||
{
|
||||
BITCommands.Excute($"set {pair.Item1} {pair.Item2}");
|
||||
}
|
||||
}
|
||||
}
|
||||
public class ScriptableExec : MonoBehaviour
|
||||
{
|
||||
[SerializeReference,SubclassSelector] private IConfigProvider configProvider;
|
||||
|
Reference in New Issue
Block a user