Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Quazaar_studios · Jan 22, 2021 at 09:05 PM · inputmultiplayercontrollers

Local Multiplayer with new Input System problems

Hello everyone! I'm banging my head on a couple of problems on my local multiplayer project. The current problem is I cannot read input from a controller, and there is a weird bug when spawning new players.

This is how my Input Actions asset is set up. (Note: The controllers are set up correctly and the unity debugger shows all joysticks and buttons work) alt text

This is how my Player Input Manager is set up: alt text

The player input of the prefab i'm trying to spawn has the input actions asset I showed before, as well as the player's camera and the scheme set to PS4 and the default map as Movement.

That prefab has a simple script as well:

 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine.InputSystem;
 
 public class PlayerInputManager : MonoBehaviour
 {
 
     public static Vector2 LeftJoystick;
 
     public static Vector2 RightJoystick;
 
     public static bool JumpButton;
 
     private void OnMove(InputValue value) {
         Debug.Log("Moving!");
     }
 
 
 }



The purpose of this script is to print the message whenever the OnMove function is called (The behavior in the player input is set to Send messages) but I run into a couple of problems:

  1. When the object spawns, the Input Actions field inside the Player Input component is empty, and does not have the PS4 settings I associated with it on the prefab.

  2. Sometimes after editing the prefab the players will not spawn no matter the button I press, so then i add the prefab to the scene, run it, delete the prefab from the scene and the players start spawning once again after pressing the buttons on my PS4 controller.

  3. There are no prints on the console whenever I move the joystick on my controller, the function isn't running at all.


What have I tried:

  1. Invoking unity events instead of sending messages, as well as broadcasting messages and invoking C# events.

  2. Making a whole new unity project and bringing all of my assets there and reinstalling the new input system and setting everything up again.

  3. Using context.performed as in this brackeys tutorial https://www.youtube.com/watch?v=p-3S73MaDP8 , which made the controller work perfectly, but when I spawned other players they were all controlled by the same controller, so this doesn't work for local multiplayer.

I've watched tens of tutorials and tried everything to fix this problem but sadly there is little documentation of the new input system and local multiplayer. I would really really REALLY appreciate someone's help, this problem has been insane and has stopped completely the progress in my project, thank you so much for reading this and your help everyone, I wish you all the best! <3

screenshot-2021-01-22-144452.png (24.2 kB)
screenshot-2021-01-22-144452.png (24.2 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Quazaar_studios · Jan 22, 2021 at 11:44 PM

Update: Tried using another controller from an example on my player and that worked flawlessly, but when I use the new one I made it doesn't work, any ideas? Thanks everyone!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

218 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Help needed! My Prefab won't spawn if it has input actions :( 1 Answer

[New Player Input System] Separate players in scene 0 Answers

Help In Making a SphereCast for 3D Tire! Working RayCast Script included! 0 Answers

How do I standardize my game's input to different types of controllers? 1 Answer

How set vive controller with input manager? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges