private void Start() { if (!PhotonNetwork.IsConnected) { this.enabled = false; Debug.LogWarning("not connected"); return; } this.inputSnapshots = this.systemManager.InputSnapshots; }
private void SetInputBasedOnPlatform() { IGameInput gameInput; #if UNITY_ANDROID gameInput = new AndroidInput(this.acceleratorPedal, this.leftButton, this.rightButton, this.brakeButton); #endif #if UNITY_STANDALONE gameInput = new PcInput(); #endif #if UNITY_EDITOR gameInput = new PcInput(); #endif foreach (var system in this.entityManager.World.Systems) { if (system is InputSystem inputSystem) { inputSystem.GameInput = gameInput; inputSystem.InputSnapshots = this.InputSnapshots = new InputSnapshots(); } } }