Reimplement solo and mp rig switching

This commit is contained in:
2024-09-12 16:55:54 +02:00
parent e428d3a9f9
commit f8822831aa
9 changed files with 119 additions and 198 deletions

View File

@@ -70,6 +70,8 @@ public class HandMenuUI : NetworkBehaviour
private void Start()
{
this.Inject();
if (uiInput == null) return;
canvas = GetComponent<Canvas>();
@@ -88,14 +90,6 @@ public class HandMenuUI : NetworkBehaviour
settingsButton.onClick.AddListener(() => SettingsClicked());
}
public override void OnNetworkSpawn()
{
base.OnNetworkSpawn();
// Player components need to be injected manualy again, because NetworkManager doesn't inject them.
gameObject.Inject();
}
private void Update()
{
CheckInput();