全站通知:

命令行参数

阅读

    

2023-12-26更新

    

最新编辑:丸丸辣

阅读:

  

更新日期:2023-12-26

  

最新编辑:丸丸辣

来自UnturnedWIKI_BWIKI_哔哩哔哩
跳到导航 跳到搜索
页面贡献者 :
小小柠檬真的酸


可以在 Steam 中添加命令行参数:

  1. Steam 库中右键 Unturned
  2. 点击 属性 ---> 通用
  3. 找到 启动选项
  4. 使用空格分隔启动项. 例如输入 “-FallbackGizmos -Width=1920 -Height=1080” 来启用 FallbackGizmos 声明, 并设置窗口宽度与高度分别为 1920 、 1080.


游戏启动选项


某些命令行参数主要用于 Unturned 专用服务器应用程序.

声明 参数 描述
+connect 示例 Connect to a server, in the format of +connect <ip address>:<port>.
-DisableCullingVolumes 示例 Disable object culling distance overrides. Please refer to Manual Object Culling for more details.
-DisableLightLODs 示例 Disable fadeout of dynamic lights. Could be useful for high-quality screenshots.
-FullscreenMode= 示例 Window mode override.
-FallbackGizmos 示例 Use 3D Unity line renderer component for debug visualization rather than pixel-perfect lines. Performance with these is lower than the default, so only intended for cases where the default is unimplemented.
-FarClipDistance float [16.0, 2048.0] overrides the maximum draw distance in the graphics menu. By default the lowest max draw distance is 614.4 meters which is slightly higher than the network distance of 512.0 meters. Useful for players who are willing to gain performance at a significant gameplay disadvantage.
-ForceTrustClient 示例 Disables movement validation (e.g., position difference between ticks matches speed) for vehicles. Using this is not recommended! It is easier for cheaters to fly cars with movement limits disabled. This flag should eventually be removed when(/if) vehicle movement is made server authoritative.
-FrameRateLimit= int Overrides the frame rate limit specified in the display menu. Negative values disable the limit. Useful if game is running at thousands of FPS on the loading screen and overheats.
-GameSense 示例 GameSense integration.
-Glazier= enum (IMGUI) Use the legacy IMGUI rather than the default uGUI.
-h int Alias of -height.
-height int Override in-game resolution height.
-Holiday= enum (AprilFools, Christmas, Halloween, HW, PrideMonth, Valentines, XMAS) Override the active holiday.
-HostPlayerLimit= int Clamps max number of players to this number. Useful for hosting providers.
-LegacyConsole 示例 Use the legacy console rather than the default threaded console.
-LogAssemblyResolve 示例 Log when the resolution of an assembly fails. Useful when working with non-Rocket plugins.
-LogBadMessages 示例 Log when the game ignores a network message, including from whom. This is only recommended if trying to narrow down whether a connection is trying to waste time on the game thread by potentially exploiting something. By default the server automatically disconnects clients that are sending invalid messages, whereas the instances logged by this option could potentially be false positives.
-LogLevelBatchingTextureAtlasExclusions 示例 Please refer to Level Batching for more details.
-NetTransport= enum (SteamNetworking, SteamNetworkingSockets) SteamNetworkingSockets was used to enable the ISteamNetworkingSockets networking API, but this has since become default. SteamNetworking can be used to revert to the older, deprecated ISteamNetworking networking API.
-NoDefaultLog 示例 Disables log file creation unless a plugin calls setLogFilePath.
-NoDeferAssets 示例 Disable the deferring of loading vehicles and level objects until map load time, and instead load on startup.
-NoSteamTextFiltering 示例 Disable Steam text filter, and instead revert to the old naïve filter.
-NoWorkshopSubscriptions 示例 Disable loading of all Steam Workshop subscriptions. This can be helpful when troubleshooting issues.
-OfflineOnly 示例 Disables requests to the internet. For LAN servers, it skips the Steam backend connection and uses locally-cached Workshop items.
-PreviewLevelBatchingTextureAtlas 示例 Please refer to Level Batching for more details.
-RazerChroma 示例 Enable Razer Chroma integration on compatible devices.
-RefreshRate= 示例 Monitor refresh rate override.
-SkipAssets 示例 Disable loading asset bundles and Workshop content. This is useful for quickly iterating on serverside code.
-ui_scale 示例 UI scale override. A common usage is to set UI scale back to its default scaling, with -ui_scale 1.
-UseLevelBatching bool 示例 Overrides whether level batching can be enabled. Per-level support for level batching is still required. For example -UseLevelBatching=false disables it. Please refer to Level Batching for more details.
-ValidateAssets 示例 Perform additional health checks on assets during start-up.
-ValidateLevelBatchingUVs 示例 Please refer to Level Batching for more details.
-w int Alias of -width.
-width int Override in-game resolution width.

Unity 启动选项


Unity 提供的内部命令行参数优先级高于 Unturned 等效参数. 下面将提到一些更相关的 Unity 参数,其他参数可在《Unity 用户手册》中找到.

设置 格式 描述
-batchmode 批处理模式运行.
-force-glcore 强制使用 OpenGL 着色器.
-force-vulkan 强制使用 Vulkan 着色器.
-nographics 批处理模式运行时不初始化图形设备.