‘DirectoryUtility’ does not contain a definition for ‘GetRelativeProjectPath’

I’m receiving this error when using WebGL for Unity - I’ve tried 3 different Unity versions and have gotten the error on all 3? Any ideas?

Assets\Convai\Scripts\Editor\Character\ConvaiCharacterImporter.cs(179,45): error CS0117: ‘DirectoryUtility’ does not contain a definition for ‘GetRelativeProjectPath’

Thanks

Hello @Niall_Mc_Cann,

Welcome to the Convai Developer Forum!

Could you let us know which version of the Convai SDK you are using? Additionally, please share a screenshot of your Console Logs showing all errors. This will help us diagnose the issue more effectively.

Convai_Unity_WebGL_SDK_v2.0.0.unitypackage

The only error was:

Assets\Convai\Scripts\Editor\Character\ConvaiCharacterImporter.cs(179,45): error CS0117: ‘DirectoryUtility’ does not contain a definition for ‘GetRelativeProjectPath’

I’ve modified the code in “ConvaiCharacterImporter.cs” and removed the broken code to bypass the issue for now, as I do not need the code that was broken.

Not really sure why this error was appearing for me…

I may need more assistance, the issue seems to be persistent.

Could you please replace the lines (178–179) containing DirectoryUtility in ConvaiCharacterImporter.cs with the following code?

string path = Path.Combine("Assets", "Avatars", AvatarCache.GetAvatarConfigurationHash(avatarLoaderSettings.AvatarConfig).ToString(), args.Avatar.name);

I’m now having a separate issue - Assets\Convai\Scripts\Runtime\Core\PlayerInteractionManager.cs(14,17): error CS0246: The type or namespace name ‘ConvaiInputManager’ could not be found (are you missing a using directive or an assembly reference?)

The error you’re encountering is not typical and often arises due to issues between the Code Compiler and Unity. This indicates that the problem is likely on your side. A similar issue occurred in your previous error as well.

  1. Start a Fresh Project:
  • Create a new Unity project without importing any additional SDKs initially.
  1. Check IDE Configuration:
  • Ensure your IDE (e.g., Visual Studio, Rider) is properly configured for Unity development.
  1. Try on a Different Device:
  • If the problem persists, test on a different device to rule out hardware or environment-specific issues.

Funny thing is, i tested on two different machines, same issue persists. No idea where i’m going wrong, such an annoying issue! :smiley:

I tested it on my side, I did not encounter this InputManager issue.

Let’s move step by step. Create a new project. And import the Convai WebGL SDK.

same issue after updating realilussion

Could you clarify which issue you’re experiencing and why you’re updating Reallusion?

I just opened my project today and a message appeared in the unity Editor suggesting an Realilusion update… after installing it, I got the message Assets\Convai\Scripts\Editor\Character\ConvaiCharacterImporter.cs(179,45): error CS0117: ‘DirectoryUtility’ does not contain a definition for ‘GetRelativeProjectPath’

You mean Ready Player Me?

you are right , ready player me

Thank you for sharing the issue in detail.

It’s now clear that the problem isn’t specific to the WebSDK or Core SDK. A few hours ago, Ready Player Me released a major update that caused changes affecting the character import script. As a result, we need to release an update to address this.

Temporary Fix:

To solve the problem temporarily, replace the line that shows the error with this code.

string path = Path.Combine("Assets", "Avatars", AvatarCache.GetAvatarConfigurationHash(avatarLoaderSettings.AvatarConfig).ToString(), args.Avatar.name);

Also, make sure to include the System.IO namespace in your script:

using System.IO;

Thank you for reporting this issue! We appreciate your patience while we work on a permanent fix. :blush:

1 Like

If it helps, from a previous backup copy, this time I rejected the Ready Player Me update and everything seems to work* as before, thank you.

Glad i helped to raise this :slight_smile: I can progress with my project using the fix. Thanks!

after i replace the line, i still got an error.

Assets\Convai\Scripts\Editor\Setup\CharacterImporter\CharacterImporterLogic.cs(121,31): error CS0103: The name ‘Path’ does not exist in the current context

what should i do ?

this issue is fixxed, i forget to use using System.IO