Splitscreenutils Pc
Based on game build 714014 | Last updated: 2026-03-10
Overview
Splitscreenutils Pc is a utility module that supplies split-screen-related constants and helper functions for PC builds. It defines a set of instance identifiers (Instances) and returns fixed boolean values to indicate that split-screen mode is always disabled on PC platforms. This file exists solely to prevent merge conflicts between PC and console code branches — its console counterpart (splitscreenutils.lua) likely provides different behavior.
Usage example
local splitscreen = require "splitscreenutils_pc"
if splitscreen.IsSplitScreen() then
-- This will never execute on PC
print("Split-screen is active")
end
if splitscreen.IsGameInstance(splitscreen.Instances.Player1) then
print("Current instance is Player1")
end
Dependencies & tags
Components used: None identified
Tags: None identified
Properties
No public properties
Main functions
IsGameInstance(instance_id)
- Description: Returns
trueif the giveninstance_idequalsInstances.Player1, otherwisefalse. Used to determine if the current execution context corresponds to Player1 in a multi-instance setup. - Parameters:
instance_id(number) — an identifier constant from theInstancestable. - Returns:
boolean—trueonly forInstances.Player1,falsefor all other values includingInstances.Player2,Instances.Server, etc.
IsSplitScreen()
- Description: Always returns
falsefor PC builds. Indicates whether split-screen mode is currently active. - Parameters: None.
- Returns:
boolean— alwaysfalsein this PC-specific implementation.
HaveMultipleViewports()
- Description: Always returns
falsefor PC builds. Indicates whether the game is rendering multiple simultaneous viewports (e.g., local co-op split-screen). - Parameters: None.
- Returns:
boolean— alwaysfalsein this PC-specific implementation.
Events & listeners
Not applicable