Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Resolved First Person Starter couldn't work on WebGL.

Discussion in 'Cinemachine' started by bawenang, Jun 17, 2022.

  1. bawenang

    bawenang

    Joined:
    Aug 18, 2012
    Posts:
    119
    Hi,
    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:
    Code (CSharp):
    1.         private void Start()
    2.         {
    3.             _controller = GetComponent<CharacterController>();
    4.             _input = GetComponent<StarterAssetsInputs>();
    5. #if ENABLE_INPUT_SYSTEM && STARTER_ASSETS_PACKAGES_CHECKED
    6.             _playerInput = GetComponent<PlayerInput>();
    7. #else
    8.             Debug.LogError( "Starter Assets package is missing dependencies. Please use Tools/Starter Assets/Reinstall Dependencies to fix it");
    9. #endif
    10.  
    11.             // reset our timeouts on start
    12.             _jumpTimeoutDelta = JumpTimeout;
    13.             _fallTimeoutDelta = FallTimeout;
    14.         }
    15.  
    Does anybody have any idea how to fix this? Thanks.
     
  2. bawenang

    bawenang

    Joined:
    Aug 18, 2012
    Posts:
    119
    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.
     
    Gregoryl likes this.