Search Unity

Can't reference script inside package? Heretic demo

Discussion in 'Scripting' started by Vectrex, Aug 17, 2020.

  1. Vectrex

    Vectrex

    Joined:
    Oct 31, 2009
    Posts:
    267
    I'm using the Human model from Unity and just trying to reference a script type. But no matter what I do, it doesn't recognise it.
    I'm not trying to change the script, I just want to mess with the imported demo guy's script instances.

    • The package's script


    • The script's namespace


    • My code. Doesn't matter if I use a 'using' or directly spell it out.


    • I've added these packages to my manifest.json
    "com.unity.demoteam.digital-human.sample": "https://github.com/Unity-Technologies/com.unity.demoteam.digital-human.sample.git",
    "com.unity.demoteam.digital-human": "https://github.com/Unity-Technologies/com.unity.demoteam.digital-human.git",
    "com.unity.demoteam.attributes": "https://github.com/Unity-Technologies/com.unity.demoteam.attributes.git"
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
    I'm curious. From your screenshot your IDE is certainly not recognizing the class. Is Unity itself recognizing it? Do you have the same compile error in Unity's console?
     
  3. Vectrex

    Vectrex

    Joined:
    Oct 31, 2009
    Posts:
    267
    Yep, Unity doesn't see it either.
     
  4. Vectrex

    Vectrex

    Joined:
    Oct 31, 2009
    Posts:
    267
    Ok, so I've copied the entire Heretic human into my project, then had to delete all the assembly files and set the player build to allow unsafe code and it works.
    I really didn't want to have to do that though, so I'd still like to know how to do it.
     
    Last edited: Aug 18, 2020