Skip to content

Nothing can be copied out of the console: the log is not selectable and the clipboard write path does not exist #194

Description

@wallstop

DISCLOSURE: LLM-GENERATED TEXT

Problem

Nothing can be copied out of the console. The log view is the only
place a message, a command echo, an argument error, or a variable
value ever appears, and none of it can be selected.

The package's only clipboard integration is the paste direction
(TextFieldPaste.cs reads GUIUtility.systemCopyBuffer). A
GUIUtility.systemCopyBuffer = ... write appears nowhere in Runtime/.

Evidence

  • Runtime/CommandTerminal/UI/TerminalUI.cs:2689 - every log line is
    built as a Label. A Label is not selectable, and no
    pointer-selection handler is registered anywhere in Runtime/.
    Styles/BaseStyles.uss styles it as plain text.
  • Runtime/CommandTerminal/UI/TerminalUI.cs:2713 and :2727 - the
    case TextField and case Button arms of the log refresh are dead
    branches; no code path creates either any more.
  • Runtime/CommandTerminal/Backend/BuiltinCommands.cs - the built-in
    set has clear-console and clear-history but nothing that reads the
    log out.
  • The command line has the same gap in the other direction: you can
    select half a line with shift+arrows and then not copy it, not cut
    it, and not undo the keystroke that replaced it. Nothing in the
    package implements an undo stack; the field is the engine's.

Why it matters

The paste feature that landed in #180 was justified by exactly this
case read backwards ("a developer copying a save name, a stack trace,
or a chat line has to type it"). The other direction is the same need:
you see Command 'give' threw ArgumentException: ... in a device build
and your options are to retype it or screenshot the game window.

What a fix has to choose

  1. Selection in the log. The honest fix: TextSelectable labels
    plus a pointer/keyboard selection model, and a Ctrl+C path. This is
    real work and it is the only option that gives selection semantics.
  2. Commands, not selection. copy-last and copy-log [n], which
    put the newest line (or the last n) on the system clipboard. Much
    smaller, covers the common case of "copy that one error", and does
    not need the log to be selectable.
  3. Both, with the commands first.

On WebGL the clipboard is unavailable, exactly as it is for paste
(#180): the command should answer that it could not, not silently do
nothing.

Acceptance

A developer in Play Mode can put a log line's text on the system
clipboard. On tvOS, or on a platform that will not answer, the attempt
reports that rather than failing silently. No selection regression: the
log still renders and still follows its tail (#194).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions