Unity-Technologies / com.unity.demoteam.hair

An integrated solution for authoring / importing / simulating / rendering strand-based hair in Unity.
Other
719 stars 97 forks source link

'HairRenderer' could not be found in 2023.1.0a7 (HDRP) #12

Closed Roland09 closed 1 year ago

Roland09 commented 2 years ago

When you import the project into 2023.1.0a7 (HDRP) these errors show up in the console:

Library\PackageCache\com.unity.demoteam.hair@7aa92e2cf9\Runtime\HairInstance.cs(84,12): error CS0246: The type or namespace name 'HairRenderer' could not be found (are you missing a using directive or an assembly reference?)

and

Library\PackageCache\com.unity.demoteam.hair@7aa92e2cf9\Runtime\HairInstance.cs(190,11): error CS0246: The type or namespace name 'HairRendererGroup' could not be found (are you missing a using directive or an assembly reference?)

bacimen commented 2 years ago

It looks like the project does not recognize the scripting symbols. Double click on the error, you will see a conditional compilation line like this: `

if HAS_PACKAGE_UNITY_HDRP_15

Change it with this:

if !HAS_PACKAGE_UNITY_HDRP_15

` After changing the two errors you mentioned, you should see more errors but do the same thing until all errors are gone.

matt-tuatara commented 2 years ago

Same issue here with Unity 2023.1.0a6 It seems that HDRP 15 doesn't include any HairRender and/or HairRendererGroup class.

ddreams-anne commented 2 years ago

Same issue here with Unity 2023.1.0a6 It seems that HDRP 15 doesn't include any HairRender and/or HairRendererGroup class.

Follow the instructions by @bacimen and it should work.

matt-tuatara commented 2 years ago

Thanks for the answer. This should indeed fix the issue by excluding the HairRenderer and HairRendererGroup variables and references but I would like to try the high quality strands using the upcoming compute-based HDRP hair renderer [ depends on Unity >= 2023.1 ] mentionned in com.unity.demoteam.hair. Does this workaround enables this feature ?