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

I need help with my coding.

Discussion in 'Scripting' started by MrMakes_games, May 9, 2020.

  1. MrMakes_games

    MrMakes_games

    Joined:
    May 8, 2020
    Posts:
    4
    I've been trying to make a first-person game but it will say when I put in the following code.
    Cursor.lockmode = CursorLockMode.Locked;
    It doesn't work because it says Cursor does not have the definition for Lock mode.
    Can you all please help?
     
  2. WarmedxMints

    WarmedxMints

    Joined:
    Feb 6, 2017
    Posts:
    1,035
    My guess would be that you have your own class in the project named Cursor
     
  3. DeanAseraf1

    DeanAseraf1

    Joined:
    Aug 3, 2018
    Posts:
    16
    maybe try lockState?
    Code (CSharp):
    1. Cursor.lockState = CursorLockMode.Locked;
     
  4. MrMakes_games

    MrMakes_games

    Joined:
    May 8, 2020
    Posts:
    4
    i will
     
  5. MrMakes_games

    MrMakes_games

    Joined:
    May 8, 2020
    Posts:
    4
    ok ill do that maybe
     
  6. MrMakes_games

    MrMakes_games

    Joined:
    May 8, 2020
    Posts:
    4
    oof when i wrote the page i put lockmode even tho its lockstate