Commander
Workflow
Functional terminal/command app to call any kind of pre-defined command.
Commander app depends on its manager and command list. In order to add a new command, you can select the app and add a new command item to the list.
Scripting
using UnityEngine;
using Michsky.DreamOS;
public class SampleClass : MonoBehaviour
{
[SerializeField] private CommanderManager commanderApp;
void YourFunction()
{
// Add a new command
CommanderManager.CommandItem item = new CommanderManager.CommandItem();
item.commandName = "Never gonna give you up"; // Not important - only for editor
item.command = "/rickroll"; // Actual command - user needs to type this
item.feedbackText = "Never gonna let you down"; // Feedback text
item.feedbackDelay = 0.1f;
item.onProcessDelay = 0f;
item.onProcessEvent.AddListener(delegate
{
// Optional - you can add your events here
});
commanderApp.commands.Add(item); // Add new item to the manager
// Create a new text feedback
// Text, use typewriter, typewriter delay
commanderApp.AddToHistory("Your text here", false, 0);
// Clear history
commanderApp.ClearHistory();
// Set text and time color
commanderApp.textColor = Color.red;
commanderApp.timeColor = Color.green;
// Enable or disable typewriter effect
commanderApp.useTypewriterEffect = true;
commanderApp.typewriterDelay = 0.03f;
// Enable or disable help command
commanderApp.enableHelpCommand = true;
}
}
How can we help?
A premium WordPress theme with an integrated Knowledge Base,
providing 24/7 community-based support.