DataFeed is a reimagining of the standard Unity console.
The functionality of DataFeed is divided into two windows:
- Log viewer window
- Command input window (Auxiliary to the first and optional)
Logs are displayed in a practical table format
Support for customizable layers and tags for logs and filtering entries by them
Auxiliary optional entries:
- Entry indicating a significant time difference between entries (useful for turn-based games)
- Entry combining non-passed filter entries into a collapsible group
Log export to .xlsx and .csv is accessible by console window menu.
- The exported logs will be located in the
ProjectFolder/Logsfolder. - Default font for .xlsx tables is Consolas, you can change it in the DataFeed config.
In addition to the command input line, it has a completion list. The list consists of two parts:
- Left - displays completions based on existing commands and their arguments.
- Right - displays a list of suitable commands based on previously entered commands.
In addition to mouse clicks, the list fully supports keyboard control:
Shift+U- Focus on input windowTab- Toggle focus between input line and listArrows- Move through the completion listuhjk- Alternative toArrows. You can change these keys in the config
DataFeed class is responsible for console message output:
DataFeed.Log("Hello World!");
DataFeed.LogLayer("Hello World!", "Game", tag:"SomeTag");You can access config file by following Tools/Pukpukpuk/Open DataFeed Config in Unity menu bar.
The config is located here: Assets/Plugins/Pukpukpuk/DataFeed/Resources/DataFeed/
You can write a sequence of commands that will be executed when you start the game (works only in the editor). Field for this sequence located in the config.
You must call this sequence execution manually at end of the game initialization with this code:
DataFeed.ExecuteStartUpCommands();Each command must inherit the Pukpukpuk.DataFeed.Input.Command class and have Pukpukpuk.DataFeed.Input.CommandInfo attribute. There is no need to register the command additionally.
The operation of the command is specified in the Execute_hided() method, and the list of completions in GetCompletions(). Other information is specified in the xml-comments of the Command class.
Command code example:
using System.Collections.Generic;
using System.Linq;
using Pukpukpuk.DataFeed.Input;
// False means that the command can be called not only while game is running
[CommandInfo("sum", false)]
public class SumCommand : Command
{
private static readonly List<string> SuggestedNumbers = new() {"1", "2", "3"};
// Command must return an output message after end of its work.
protected override string Execute_hided(string[] args, out bool isError)
{
// If isError is true, command output will be marked as error.
isError = true;
if (args.Length == 0) return "Not enough arguments!";
var result = 0;
foreach (var arg in args)
{
if (!int.TryParse(arg, out var i))
{
return "One of the arguments is not an integer!";
}
result += i;
}
isError = false;
return $"Sum: {result}";
}
public override List<string> GetCompletions(
string lastArgument,
int lastArgumentIndex,
List<string> args)
{
return SuggestedNumbers
.Where(number => !args.Contains(number))
.ToList();
}
}







