Unity graph tool solution based on different implementation now focused on Unity.Experimental.Graphview
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
635 B

using System.Collections.Generic;
using TNodeCore.Runtime.Models;
using UnityEngine;
namespace TNodeCore.Runtime{
public static class NodeLogger{
public static Dictionary<string, INodeLoggerImpl> Loggers = new Dictionary<string, INodeLoggerImpl>();
public static void Log(this NodeData t,string message){
if (!Loggers.ContainsKey(t.id)) return;
var nodeLoggerImpl = Loggers[t.id];
nodeLoggerImpl.Log(message);
}
}
public interface INodeLoggerImpl{
public void Log(string message);
void LogTexture(Texture2D texture2D);
}
}