Error while importing Character

 public async Task DownloadCharacter(string characterID)
 {
     if (!ConvaiAPIKeySetup.GetAPIKey(out string apiKey)) return;

     try
     {
         EditorUtility.DisplayProgressBar("Connecting", "Collecting resources...", 0f);

         GetResponse getResponseContent = await GetCharacterDataAsync(characterID, apiKey);
         string modelLink = getResponseContent.ModelDetail.ModelLink;
         string characterName = getResponseContent.CharacterName.Trim();


         AvatarObjectLoader avatarLoader = new()
         {
             AvatarConfig = Resources.Load<AvatarConfig>("ConvaiRPMAvatarConfig")
         };

         DirectoryUtility.DefaultAvatarFolder = $"Convai/Characters/Mesh Data/{characterName}";

         CompletionEventArgs args = await LoadAvatarAsync(avatarLoader, modelLink, characterName);

         AvatarLoaderSettings avatarLoaderSettings = Resources.Load<AvatarLoaderSettings>("ConvaiAvatarLoaderSettings");
         string path = Path.Combine("Assets", "Avatars", AvatarCache.GetAvatarConfigurationHash(avatarLoaderSettings.AvatarConfig).ToString(), args.Avatar.name);

         GameObject avatar = PrefabHelper.CreateAvatarPrefab(args.Metadata, path, avatarConfig: avatarLoaderSettings.AvatarConfig);

         SetupCharacter(characterID, characterName, avatar, args);

         ConvaiLogger.DebugLog($"Character '{characterName}' downloaded and set up successfully.", ConvaiLogger.LogCategory.Character);
     }
     catch (WebException e)
     {
         EditorUtility.ClearProgressBar();
         ConvaiLogger.Error(e.Message + "\nPlease check if Character ID is correct.", ConvaiLogger.LogCategory.Character);
     }
     catch (Exception e)
     {
         EditorUtility.ClearProgressBar();
         ConvaiLogger.Error(e.Message, ConvaiLogger.LogCategory.Character);
     }
 }

This is from the CharacterImporterLogic.cs. I have changed the DirectoryUtility to Path combine based on a post here. [‘DirectoryUtility’ does not contain a definition for ‘GetRelativeProjectPath’ - #4 by Niall_Mc_Cann](https://DirectoryUtility bug)

Hello @bomiao42,

You need to use Convai version 3.2.3, the latest update. However, please note that the Character Importer currently does not support importing Avatar Studio characters from Playground.

If you want to use Ready Player Me characters, you can design your character on Ready Player Me’s website and import it using the RPM SDK, which is already included in the Convai SDK.

Let us know if you need any further assistance!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.