Search Unity

GameObject does not contain a definition

Discussion in 'Scripting' started by Dofyto, Nov 7, 2020.

  1. Dofyto

    Dofyto

    Joined:
    Aug 5, 2020
    Posts:
    10
    Can someone help me with this i've tried looking at the mistake but i don't understand what's wrong

    Assets\Script\Characters.cs(14,54): error CS1061: 'GameObject' does not contain a definition for 'activeInHierarcy' and no accessible extension method 'activeInHierarcy' accepting a first argument of type 'GameObject' could be found (are you missing a using directive or an assembly reference?)

    upload_2020-11-7_13-11-44.png
     
  2. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    In 22 out 21 such cases you should check your spelling. You misspelled hierarchy
     
    Dofyto likes this.
  3. Dofyto

    Dofyto

    Joined:
    Aug 5, 2020
    Posts:
    10
    owh
    thanks i didn't notice i misspelled it
     
  4. Bunny83

    Bunny83

    Joined:
    Oct 18, 2010
    Posts:
    3,990
    You use VisualStudio, so just press CTRL + space to force autocomplete to show up for the expression at your cursor.
     
    Dofyto and Vryken like this.
  5. Dofyto

    Dofyto

    Joined:
    Aug 5, 2020
    Posts:
    10
    i see i will try it thanks for the tips