First Person Starter's input system doesn't work on WebGL

Hi,
I have actually created another thread with the same issue on Cinemachine forum since I don’t know where should I put this. You can tell me to delete one of them if you want me to. I’m trying to run the First Person Starter on WebGL and it can’t move using the WSAD+mouse input like in the PC/Mac/Linux build. It said this:

This is the faulty line:

        private void Start()
        {
            _controller = GetComponent<CharacterController>();
            _input = GetComponent<StarterAssetsInputs>();
#if ENABLE_INPUT_SYSTEM && STARTER_ASSETS_PACKAGES_CHECKED
            _playerInput = GetComponent<PlayerInput>();
#else
            Debug.LogError( "Starter Assets package is missing dependencies. Please use Tools/Starter Assets/Reinstall Dependencies to fix it");
#endif

            // reset our timeouts on start
            _jumpTimeoutDelta = JumpTimeout;
            _fallTimeoutDelta = FallTimeout;
        }

Does anybody have any idea how to fix this? Thanks.

Hi,
So after browsing some more, I found out that we should also install the Starter Assets - First Person Character Controller from the Asset Store. It is working now. Thanks.

For me the fix was to add this script symbol to WebGL in the Player settings for the project

8311155--1090443--upload_2022-7-25_22-21-51.png

13 Likes

I get the error message even when I try to run the game in the editor.
Downloaded and imported the First Person Controller from the Package Manager. Used Tools → Reset First Person Controller to use it.
Reinstalling dependencies did not help.
Unity 2021.5.f1

SOLVED: The problem was that I had not enabled the New Input System

Had the same issue in the Third Person Controller Demo. As [devonpmack]( First Person Starter's input system doesn't work on WebGL members/devonpmack.1611078/) pointed out, adding the STARTER_ASSETS_PACKAGES_CHECKED to the Scripting Define Symbols worked.

1 Like

Just add this to in script compilation STARTER_ASSETS_PACKAGES_CHECKED

This is solved on the Editor with me whenever I add the STARTER_ASSETS_PACKAGES_CHECKED, yet when I build the project and run it. It is not fixed in the browser, please find a solution for that

any solution?

It works also with third person controller !!! Thank you so much for your help, you saved my life :slight_smile: