Search Unity

error CS1061

Discussion in 'Scripting' started by WalterTheDev, Feb 18, 2021.

  1. WalterTheDev

    WalterTheDev

    Joined:
    Feb 10, 2020
    Posts:
    2
    Solved
     
    Last edited: Feb 18, 2021
  2. mopthrow

    mopthrow

    Joined:
    May 8, 2020
    Posts:
    348
    Can't really tell the line number because you cut out half of your code. Please paste the whole BuildSystem.cs if the error persists.

    It's saying your BuildSystem script refers to something called 'Block' on line 24, but 'Block' doesn't contain any field or property called 'IsSolid'.
     
  3. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,664
  4. mopthrow

    mopthrow

    Joined:
    May 8, 2020
    Posts:
    348
    Yeah, as @Mauri says.

    Your Block class doesn't have anything called IsSolid that your BlockSystem script can access on line 122.
     
  5. WalterTheDev

    WalterTheDev

    Joined:
    Feb 10, 2020
    Posts:
    2
    Sorry for my dumb questions. I just started programming :) Thanks for the help!
     
  6. mopthrow

    mopthrow

    Joined:
    May 8, 2020
    Posts:
    348
    It's fine, it's not dumb ;)
     
  7. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,664
    What I saw in that script: The
    currentBlock.isSolid
    at line 83 has a small i, whereas the one at line 122 (where the error happened) has a capitalized one.