Skip to main content

Console, logging and analytics

Types in Alta.Console, Alta.Console.Commands, Alta.Logging, Alta.Analytics and Alta.QATools. 139 types, 16 with a hand-written page.

See the overview for what the columns mean and how this list is made.

Alta.Analytics​

TypeKindBasePublic membersDocumented in, or what it is
Analyticsstatic class2Obsolete static analytics sender. SendRecord is now empty, so nothing it is given goes anywhere.
AnalyticsOptionsenum5Obsolete flags for which extra fields (timestamp, user ID, server ID, game time) the old analytics system adds to events.
AnalyticsRecordAttributeclassAttribute0Obsolete. Marked a field or property for the old AnalyticsTools.Serialize to include.
AnalyticsRecordForAllAttributeclassAttribute2Obsolete. Marked a class or struct so the old AnalyticsTools.Serialize includes all its fields and properties, with extra options.
AnalyticsToolsstatic class1Obsolete reflection serializer that turned records into the old DynamoDB-style JSON for Analytics.SendRecord. Builds and caches one serializer per type.
AnalyticsTypeenum6Old analytics record categories (combat hit, teleportation, device stats and so on), each mapped to an endpoint name. Analytics.SendRecord is empty in this build.
DeviceStatRecordclass19Obsolete analytics record of the player's hardware, filled from Unity's SystemInfo.
TeleportationRecordstruct3Obsolete analytics record for a teleport, from the old analytics system.

Alta.Analytics.UserSettingsAnalytics​

TypeKindBasePublic membersDocumented in, or what it is
UserSettingsAnalyticsReporterclassIInitializable, IIsolate3Sends a one-off report of the player's settings after login, if the addressable config's end date has not passed and this report title was not already sent. Client side; built by VContainer.
UserSettingsAnalyticsReporterConfigurationclassScriptableObject2Asset that sets the title and cut-off date of a user settings analytics report. Read by UserSettingsAnalyticsReporter.
UserSettingsReportclass3Collects the logged-in player's playtime, platform and many comfort, locomotion and graphics settings, and sends them as one analytics event.

Alta.Console​

TypeKindBasePublic membersDocumented in, or what it is
AliasAttributeclassAttribute2Gives a console module or command extra names it can be called by, such as mic for microphone.
AllowNullAttributeclassAttribute0Put on a command parameter (or a type converter) to let the parameter's converted value be null. Without it a null value fails parsing with value was null.
BasePartclass6Base of console command pieces that have a name and description: CommandPart and Parameter.
ClientOnlyAttributeclassRequirementAttribute2Console requirement: the module or command is only available when the current game mode is a client (or there is no game mode yet).
CommandclassCommandPart9Writing commands, Health and damage: Not created anywhere in the game's own code. TavernLib's kill command uses it.
CommandAttributeclassAttribute5Console, utilities and Alta assemblies
CommandCollectionclass8Writing commands: Get it from CommandService.CommandCollection.
CommandContextclass7Writing commands: One per console session: each websocket connection has its own, and Handle without a context uses one shared default.
CommandContextExtensionsstatic class1Debug helper for CommandContext.
CommandExceptionclassException1Exception a command can throw to report a failure. CommandService catches it separately from other exceptions.
CommandPartabstract classBasePart10Base for an entry in the console command tree: a module or a command. Holds its name, aliases, parent module and requirements.
CommandResultclass8Arguments and results: For an object result, Log() serializes it to JSON and, in the same line, copies that JSON to the system clipboard of the machine running the game.
CommandResult<T>classCommandResult4Arguments and results: For an object result, Log() serializes it to JSON and, in the same line, copies that JSON to the system clipboard of the machine running the game.
CommandResultSuccessenum5Outcome of matching console input to a command: success, or why the parameters didn't fit (too few, too many, wrong types, failed to parse). Carried on CommandSearchResult.
CommandSearchResultstruct8The outcome of matching console input to a command: which command was found, whether its arguments fit, and the parsed arguments.
CommandServicestatic class8Writing commands, Console, utilities and Alta assemblies: Main thread: every console the game has calls it from Unity's main thread, and you should too.
ConsoleEventabstract class5Base for a named event that websocket console users can subscribe to. Messages are queued and sent from a background task, not the main thread.
ConsoleEvent.ProcessorclassIDisposable2Background task that takes queued console event messages and raises each event's Invoked. One shared instance runs for all events.
ConsoleEvent<T>classConsoleEvent, IConsoleEvent4Console, utilities and Alta assemblies
ConsoleEventProcessorstatic class5Registry of named console events that websocket console clients can subscribe to. Its static constructor registers the log events and ConsoleEvents.
ConsoleEventsstatic class16The game's console events as static fields. Console (websocket) sessions subscribe to them by name. See the Console events guide for what raises each one.
ConsoleLogEventsstatic class1Publishes server log lines as console events (TraceLog to FatalLog) so websocket console clients can subscribe to them.
DevOnlyAttributeclassRequirementAttribute2Console requirement: the command (or settings property) is only for users whose identity token has the developer role.
DynamicCommandResultclassCommandResult<object>2Arguments and results
EditorOnlyAttributeclassRequirementAttribute2Console requirement: the command only runs outside play mode (in the Unity editor).
GroupPermissionAttributeclassRequirementAttribute2Console requirement: on a simple server the caller needs all the listed group permissions; on other servers it always passes. Fails on clients.
HashedItemInfoclass5A hash and name pair for console output, such as the list of spawnable prefabs. Converts from prefabs, items and hashed values.
IConsoleEventinterface3An event that server console (websocket) connections can subscribe to; registered with ConsoleEventProcessor.
JsonSerializerSettingsExtensionsstatic class1Adds Nullable versions of struct JSON converters to a serializer settings object. Used by the websocket console's JSON settings.
LoggedInOnlyAttributeclassRequirementAttribute2Console requirement: the command needs the game to be logged in to the Alta API.
ModuleclassCommandPart5Writing commands
ModuleAttributeclassAttribute3Console, utilities and Alta assemblies
NonSimpleServerAttributeclassRequirementAttribute3Console requirement: the command runs freely on non-simple servers; on a simple server the caller needs the listed policies (debug_features by default). Fails on clients.
NotAllowedInRemoteAttributeclassRequirementAttribute2Console requirement: the command can only be run by the locally logged-in user, not by a remote console user.
NullableStructSerializer<TStruct>classJsonConverter<TStruct?>2JSON converter for a nullable struct that writes null or hands the value to the struct's own converter. Created by AddNullableConverters.
ParamAttributeclassAttribute2Gives a console command parameter a description, shown in the command's help.
ParameterclassBasePart9One parameter of a console Command, built from the method's ParameterInfo.
PlayOnlyAttributeclassRequirementAttribute2Console requirement: the command only runs in play mode.
PriorityAttributeclassAttribute2Sets a console command overload's priority. When several commands match, higher priority wins among equally successful matches.
ProgressiveHandlerclass0Empty marker type. A console command whose first parameter is a ProgressiveHandler is flagged as progressive; it must be the first parameter or registration throws.
RequirementAttributeabstract classAttribute2Base attribute for a condition a console command (method or whole module class) needs before it can run. Subclasses override Check.
ServerOnlyAttributeclassRequirementAttribute2Console requirement: the command only runs on a server (when ServerHandler.Current exists).
StringTypeConverterclassJsonConverter<Type>3Write-only JSON converter that writes a Type as its name string.
Vector2TypeConverterclassJsonConverter<Vector2>2JSON converter that writes a Vector2 as a two-number array and reads it back.
Vector3ConverterclassTypeConverter2TypeConverter that parses an x,y,z string into a Vector3.
Vector3TypeConverterclassJsonConverter<Vector3>2JSON converter that writes a Vector3 as a three-number array and reads it back.
Vector4TypeConverterclassJsonConverter<Vector4>2JSON converter that writes a Vector4 as a four-number array and reads it back.
WebSocketCommandHandlerclassIRemoteConsoleHandler8Remote console: One per websocket connection. WebSocketRemoteConsole.Handlers (a static list) holds every one, logged in or not.
WebSocketCommandHandler.Requeststruct2A command request sent by a websocket console client, parsed from JSON.
WebSocketCommandHandler.ResponseDataclass7One message sent to a remote console client over the WebSocket: a system message, subscription event or command result, serialized to JSON.
WebSocketCommandHandler.ResponseTypeenum3Kind of message the remote console websocket sends back: a system message (such as the auth result), a subscription event, or the result of a command.
WebSocketCommandHandler.SubscriptionResultenum3Result of a websocket console subscribe or unsubscribe: done, no change (already in that state) or the event type wasn't found.
WebSocketConsoleCommandModuleclass3Console module websocket: lets a websocket console client list and subscribe to console events.
WebsocketContractResolverclassDefaultContractResolver1JSON contract resolver for websocket console replies that drops DevOnly members from the output, based on the calling user's policies.
WebSocketRemoteConsoleclassIRemoteConsole7The server's websocket remote console: a Fleck server on port 1760 that makes a WebSocketCommandHandler per connection.
WithGroupPermissionsOnlyAttributeclassRequirementAttribute3Console requirement: the caller needs all the listed group permissions, on any server type.
WithPermissionOnlyAttributeclassRequirementAttribute4Console requirement: the caller needs all the listed policies (for example server_owner).

Alta.Console.Commands​

TypeKindBasePublic membersDocumented in, or what it is
AltaSelectionclass2The entity a console user has selected, kept on their CommandContext as Selection.
AudioCommandModulestatic class0Console module audio for audio input and output settings. Client only, in play.
AudioCommandModule.Microphonestatic class0Console module audio microphone (alias mic) for the local microphone in Vivox voice chat.
BaseCommandsstatic class5Console module help: lists, searches and describes modules and commands.
ChunkInfoclass2Small result object for console commands that shows a chunk by its identifier.
DebuggingCommandModulestatic class0Console module debug with developer commands for counting objects, logging entities, server stats, frame rate limits and test spawns.
DebuggingCommandModule.StaticCommandSubModulestatic class0Console module debug static for modifiable static objects such as bridges and stairs. Server only, in play.
DebuggingCommandModule.Trackingstatic class3Console module debug tracking for following an entity by a name you give it. Needs the server_owner permission.
EntityInfoclass8A summary of a network entity returned by console commands: IDs, prefab, position and rotation. Any NetworkEntity converts to it.
GameCommandModulestatic class1Console module game (alias g) for finding, joining, starting and stopping servers from the client. Needs a logged in user, in play, and isn't allowed from the remote console.
InfoCommandModulestatic class0Console module info about game systems. Needs the server_owner permission. Only version and player-mode print anything in this build.
Inventoryclass6Console result object that lists what a player holds: hand items, back and belt dock items, and their child items.
LeaderboardCommandModulestatic class6Console module leaderboard for setting up course leaderboards and their checkpoints. Server only. The board and checkpoint commands act on the selected object.
LoggingCommandModulestatic class1Console module logs: commands that change NLog rules at runtime, print the logging config and open the log folder.
LoginCommandModulestatic class0Console module login: signs in to the game with a username and password through LoginManager. Play mode only.
LogoutCommandModulestatic class0Console module logout: signs the current user out through LoginManager.
MaintenanceCommandModulestatic class0Console module maintenance: memory housekeeping commands (garbage collection, unloading unused Unity assets). Play mode only.
ModCommandsstatic class8Console module mods: manages the game's built-in C# script mods (the .cs files DemoLoadScripts loads from the mods folder). Needs the server_owner permission.
ModInfoclass4A row returned by the mod list console command: a loaded script bundle's name and whether it is active.
NetworkEntityInfoclass3A short summary of a network entity (ID and name) returned by console commands such as spawn. Any NetworkEntity converts to it.
PrefabInfoDumpclass4Server: one prefab's entry in the spawn infodump command output, with its hash, name and the network entities inside it.
PrefabInfoDump.NetworkEntityInfoDumpclass4One network entity inside a prefab, as listed by PrefabInfoDump.
PrefabInfoDump.SavableInfoDumpclass3One savable component type on an entity, as listed by PrefabInfoDump.
ProfilingCommandModulestatic class1Console module profiling: Unity profiler samples, heap dumps and memory snapshots. Play mode only, needs server_owner.
ProgressCommandModulestatic class1Console module progress: server commands that skip world progression, such as finishing repair boxes, filling books, forging blades and generating caves. Server and play mode only.
QualityCommandModuleclass3Console module quality: LOD bias and chunk streaming distance multipliers.
QuitCommandModulestatic class0Console module quit: closes the application. Play mode only.
RepairBoxModulestatic class5Console module repair-box: spawns a repair box at a player that takes up to three item inputs and produces a chosen prefab. Server and play mode only; on simple servers needs debug_features.
RepeatCommandModulestatic class0Console module repeat: runs the next command typed a set number of times at an interval, or reruns the last command.
SavingCommandModulestatic class1Console module save: server commands to save the world and to wipe the world, caves, community storage or player saves. Play mode only.
SelectionCommandModulestatic class0Console module select (alias s): picks a networked entity as the console's current selection and moves, snaps, exports or destroys it. On simple servers needs debug_features.
SelectionCommandModule.MovingModulestatic class0Console submodule select move (alias m): moves the selected entity along world axes and forces a position sync.
SelectionCommandModule.RotatingModulestatic class0Console submodule select rotate (alias r): rotates the selected entity and forces a position sync.
ServerCommandModulestatic class0Console module server: starts servers, proxies commands to other servers over their websocket console, and runs a spot-instance migration. Needs login, play mode and server_owner.
SettingsCommandModulesstatic class0Console module settings: reads and changes game or server settings by name, toggles settings, and sets info board text.
SettingsCommandModules.PopulationSettingsstatic class3Console submodule settings population: checks and overrides how often a population respawns. Server only.
SocialCommandModulestatic class3Console module social: adds, removes and lists friends through the Alta API. Needs login, play mode and server_owner.
SpawnCommandModulestatic class3Console module spawn: spawns prefabs, saved-object strings and population areas in front of players. Play mode only; on simple servers needs debug_features. Spawned entities become the console selection.
SpawnCommandModule.MouldDefinitionInfoclass2A row in the mould list console command.
SpawnCommandModule.Mouldsstatic class0Console submodule spawn moulds: spawns casting moulds for a given mould definition. Marked as under construction in the code.
SpawnCommandModule.Packagesstatic class0Console submodule spawn package: drops named spawn packages through PackageManager.
SpawnCommandModule.PageCollectionInfoclass3A row in the page collection list console command.
SpawnCommandModule.Pagesstatic class0Console submodule spawn pages: spawns every page of a page collection as paper.
SpawnCommandModule.PopulationTypeenum3Shape of the population area the spawn population command spawns: disk, sphere or directional. Each picks a different built-in prefab.
SpawnCommandModule.SpawnListsstatic class0Console submodule spawn list: lists what can be spawned.
TimeCommandModulestatic class0Console module time: sets and reads the time of day and advances real (timeline) time. Server and play mode only.
TradeCommandModulestatic class0Console module trade: empties trade decks and sends spawned items to a player's post box. Play mode only.
TradeCommandModule.ATMCommandModulestatic class3Console submodule trade atm: reads and changes a player's ATM (bank) gold balance, even when they are offline.
TrialCommandModulestatic class0Console module trial: lists, advances and resets active combat trials. Server and play mode only.
UserInfoDetailedclassUserInfo13A UserInfo with a player's body, chunk and head and hand transforms, returned by console commands that report player details.
UsersCommandModulestatic class0Console module users: user statistics from the Alta API. Needs login and server_owner.
WackyCommandModulestatic class1Console module wacky: odd fix-up and debug commands the code itself calls "not necessarily safe/functional", such as replacing broken entities, mass destroys and cleaning offline player saves. Play mode only.
WorldCommandModulestatic class0Console module world: holder for the world forest and world caves submodules (forest info, teleport and reset; cave reset and teleport). Server and play mode only.
WorldCommandModule.CaveCommandModulestatic class1Caves: The world caves module.
WorldCommandModule.ForestCommandModulestatic class2Forest: The world forest module.

Alta.Logging​

TypeKindBasePublic membersDocumented in, or what it is
CommandLineArgsLoggerclassMonoBehaviour0Logs the command line arguments at startup, to both the Unity log and NLog.

Alta.Logging.Targets​

TypeKindBasePublic membersDocumented in, or what it is
ConsoleCommandsLogTargetclassTargetWithLayout2NLog target ConsoleCommandsTarget that raises static events for each log line. Remote console connections listen to it to send logs to their client.
FullStackTraceRendererclassLayoutRenderer, IUsesStackTrace1NLog layout renderer ${fullstacktrace}: the full stack trace with file and line for each frame.
LogHandlerdelegate0Event handler for a formatted log line and its level. Used by ServerConsoleLogTarget.LogSent and ConsoleCommandsLogTarget.LogSent.
MainMenuTargetclassTargetWithLayout0Logging
NetworkEntityChunkRendererclassNetworkEntityRenderer0NLog layout renderer ${entity-chunk}: the chunk of a NetworkEntity passed as the first log parameter, or n/a.
NetworkEntityIdentifierRendererclassNetworkEntityRenderer0NLog layout renderer ${entity-id}: the identifier of a NetworkEntity passed as the first log parameter, or n/a.
NetworkEntityOwnedRendererclassNetworkEntityRenderer0NLog layout renderer ${entity-owned} for a NetworkEntity passed as the first log parameter, or n/a.
NetworkEntityParentRendererclassNetworkEntityRenderer0NLog layout renderer ${entity-parent}: the parent of a NetworkEntity passed as the first log parameter, or n/a.
NetworkEntityPrefabRendererclassNetworkEntityRenderer0NLog layout renderer ${entity-prefab}: the prefab of a NetworkEntity passed as the first log parameter, or n/a.
NetworkEntityRendererabstract classLayoutRenderer0Base for NLog layout renderers that print something about a NetworkEntity passed as the log message's first parameter (its prefab, parent, owner, identifier or chunk).
RawLogHandlerdelegate0Event handler for a raw NLog event. Used by the LogSentRaw events on ServerConsoleLogTarget and ConsoleCommandsLogTarget.
ServerConsoleLogTargetclassTargetWithLayout2NLog target ServerConsoleTarget that raises static events for each log line. The console display, runtime console, console log events and client log sender listen to it.
UnityConsoleLogTargetclassTargetWithLayout2Logging

Alta.QATools​

TypeKindBasePublic membersDocumented in, or what it is
DebugLoadMarkerclass1QA helper that keeps the chunks around an entity force loaded as it moves, as if a player stood there. Made by a debugging console command through Setup.
DebugLoadMarker.IChunkLoaderinterface1Picks which chunks a DebugLoadMarker keeps loaded around its entity. There is an optimised version for simple servers and a normal one.