Split Screen Questions

GearedGeek

Active member
I have got Split screen somewhat working. The guide is only showing how to set up the cameras but not the default UI that comes with the asset. What's the best way to go about settings up the UI for split screen?

I noticed with using the FPS Mesh asset and starting the scene the arms and head and not showing up. But when that player dies and respawns the arms/head is showing up. Is there something with UCC or the FPS Mesh asset?

Also I have noticed 2 warnings with the split screen,
Code:
Cameras array resized. For best performance increase the size of the Start Camera Count variable within the Kinematic Object Manager to a value of at least 2.
UnityEngine.Debug:LogWarning(Object)
Opsive.UltimateCharacterController.Game.KinematicObjectManager:RegisterCameraInternal(CameraController) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:542)
Opsive.UltimateCharacterController.Game.KinematicObjectManager:RegisterCamera(CameraController) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:530)
Opsive.UltimateCharacterController.Camera.CameraController:OnEnable() (at Assets/Opsive/UltimateCharacterController/Scripts/Camera/CameraController.cs:381)
and
Code:
Characters array resized. For best performance increase the size of the Start Character Count variable within the Kinematic Object Manager to a value of at least 2.
UnityEngine.Debug:LogWarning(Object)
Opsive.UltimateCharacterController.Game.KinematicObjectManager:RegisterCharacterInternal(UltimateCharacterLocomotion) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:514)
Opsive.UltimateCharacterController.Game.KinematicObjectManager:RegisterCharacter(UltimateCharacterLocomotion) (at Assets/Opsive/UltimateCharacterController/Scripts/Game/KinematicObjectManager.cs:502)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:OnEnable() (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:628)
 
The guide is only showing how to set up the cameras but not the default UI that comes with the asset. What's the best way to go about settings up the UI for split screen?
On the various UI monitors you just need to specify the character that the monitors belong to. I'll add it to the docs.

I noticed with using the FPS Mesh asset and starting the scene the arms and head and not showing up. But when that player dies and respawns the arms/head is showing up. Is there something with UCC or the FPS Mesh asset?
I never actually tested killing another split screen character.. I'll try it out and if there's something wrong will get it fixed in 2.2.1.

Also I have noticed 2 warnings with the split screen,
Those warnings are normal and in that message it shows what parameter to adjust :)
 
The included SkyCar won't work with split screen since it uses Unity's standard input. But from the character controller perspective the drive ability will work with split screen.
 
If player 1 enters as the driver, what will happens with player 2 when entering? Will the code know to move player 2 to passenger and make sure to let the driver drive?
 
No, the drive ability doesn't allow for multiple players. You'll need to create a ride ability in this case.
 
Hi,

Thanks for the great work on this asset.
I've just starting setting up a split-screen scene myself, and had some implementation questions.

My character was started from a clone of the demo Nolan prefab. This character had no ThirdPersonObject components, which it seems is required by the MaterialSwapper. It wasn't mentioned in the documentation, so Im not sure if I've added them in the correct spots everywhere. I believe it should be any of the Renderers that had the InvisibleShadowCaster material, those should get the ThirdPersonObject component, correct? And I want to also change that InvisibleShadowCaster material to the actual material for that object?

Second, my character does not start with any weapons equipped, and so the gameobjects with the
FirstPersonBaseObject components are not enabled when the MaterialSwapper is trying
// line 170 var firstPersonBaseObjects = character.GetComponentsInChildren<FirstPersonBaseObject>();

So Player 1's first person arms were visible to Player2. I've fixed that by passing true as the first argument (get disabled children as well).

This improves my situation, but Im left with both Player1 guns being visible to Player2, the pistol in the FirstPersonArms hierarchy, and the pistol in the rig hierarchy... so just was hoping for some clarification on these missing implementation details.

If I make the same change above in the CacheFirstPersonRenderers method,
var renderers = firstPersonObject.GetComponentsInChildren<Renderer>(true);
then my problem flips to Player1. Now both pistols are visible to Player1, but the issue is fixed for Player2 (Player2 only sees the one appropriate pistol of Player1's).

I will dig into it more when I have more time, I just figured you might know off-hand what the issue would be.
Thanks again
 
Last edited:
ok, sorry, I missed a call to GetComponentsInChildren() in MaterialSwapper, once changing all the calls to pass true (grab disabled children), my issue is fixed.
 
hi,

is anyone having problems with attaching a character to the CameraController at runtime after scene load? For me it seems to be the MaterialSwapper doesnt work quite right, my guns remain invisible. It works fine if I have InitCharacterOnAwake and a character attached before scene load. I havent narrowed down the issue yet though... any insight would be helpful. Thanks

I am basically doing the following
- instantiating my player prefab and setting it active
- setting camera active and calling cameraController.Character = character
 
Top