Enhance Your Development Workflow: Customizing the Player Application
When developing game features and configurations, testing the UI directly in the game engine is often crucial to ensure everything works as intended. However, setting up, compiling, and running the engine for preview purposes can take hours.
Thankfully, the Player application provides a faster alternative with predefined command-line arguments, allowing you to replicate the game engine environment for UI testing.
Why Test with the Game Engine?
Certain scenarios require testing in the actual game environment, such as:
- Running the UI with a different rendering backend (e.g., OpenGL, DirectX 12).
- Scaling the UI in a borderless fullscreen window.
These tasks can be achieved using the following Player arguments:
Complete List of Command-Line Arguments
-
--url <path>: Load a specific UI resource. Example:--url coui://uiresources/foo.html. -
--root <path>: Define the root directory forcoui://. -
--vsync=<bool>: Enable/disable VSync. Disabling VSync may freeze your computer due to extremely high FPS. -
--enable-complex-css=bool: Enable complex CSS selectors likediv > .class. -
--debugger-port <port>: Set the debugging port (default: 9444). Access it via Chrome athttp://localhost:<port>. Use-1to disable. -
--log-verbosity <level>: Set log verbosity. Options:trace,debug,info,warning,assert,error(default:info). -
--input <mode>: Define input type. Options:mouse(default) ortouch. -
--width=X: Set the Player width (minimum: 300px; default: 1280px). -
--height=X: Set the Player height (minimum: 300px; default: 720px). -
--fullscreen-borderless: Launch in fullscreen borderless mode (overrides width/height settings). -
--no-resize: Disable resizing of the Player window. -
--no-performance-logs: Disable performance logs. -
--renderer opengl/dx11: Specify the rendering backend (OpenGL or DirectX 11). Support for DirectX 12 and Vulkan is coming soon. -
--mtrender/--no-mtrender: Enable or disable multithreaded rendering. -
--no-layout-thread: Process all layout operations on the main thread instead of a worker thread. -
--redraw-all: Force the UI to redraw fully for each frame. -
--enable-ime: Enable Windows IME for complex text input. -
--sim-tasksys: Simulate a task system, processing jobs on dedicated worker threads. -
--default-font=<FontFamilyName>: Apply a default font family to all DOM elements without a specified font. -
--track-alloc: Track CPU allocations and visualize them in the Player’s title bar. The remaining allocations will be logged upon closing the Player, which is useful to catch potential memory leaks. -
--complex-text: Enable proper grammar rendering for languages like Chinese, Japanese, and Hebrew. -
--hdr <scrgb/hdr10>: Enable HDR rendering using the specified format. -
--linear: Enable linear rendering of the UI. -
--gamma=<NumericValue>: Specify a gamma multiplier(default is 2.2) for colors when--linearis enabled. -
--immediate-layout: Enable immediate layout processing globally. -
--global-simple-opacity: Enable simple opacity rendering globally. -
--enable-compositor: Enable the compositor feature to visualize elements with thecoh-composition-idstyle. -
--surface-partitioning: Enable the surface partitioning feature in the Player.
Looking Ahead
This comprehensive list demonstrates how you can fine-tune the Player application to simulate your game engine’s environment. Stay tuned for future posts where we’ll dive deeper into extending the Player using the PlayerOverrides project to add even more customization and features.
Happy UI development & testing!
Please sign in to leave a comment.
Comments
0 comments