Installation trouble

Original Discord Post by charlieg5733 | 2024-09-13 19:25:50

I am really keen to get the convai sdk working in Unity for VR. I have a number of issues when I try and install it through package manager. I get an error from the readyplayermeimporter script every time I add the package, even in a fresh project. If I delete that script I can proceed but get other errors when trying to add the VR package.

Reply by k3kalinix | 2024-09-13 19:26:33

Hello <@1050505151674323004> :wave:t2:

Reply by k3kalinix | 2024-09-13 19:26:38

Welcome to Convai Community!

Reply by k3kalinix | 2024-09-13 19:28:18

using System;
using Convai.Scripts.Runtime.LoggerSystem;
using UnityEditor;
using UnityEditor.PackageManager.Requests;
using Random = UnityEngine.Random;
#if !READY_PLAYER_ME
using UnityEditor.PackageManager;
using UnityEditor.PackageManager.Requests;
#endif


namespace Convai.Scripts.Editor.CustomPackage
{
    [InitializeOnLoad]
    public class ReadyPlayerMeImporter
    {
        private static AddRequest _request;

        static ReadyPlayerMeImporter()
        {
#if !READY_PLAYER_ME
        ConvaiLogger.DebugLog("Ready Player Me is not installed, importing it", ConvaiLogger.LogCategory.Editor);
        _request = Client.Add("https://github.com/readyplayerme/rpm-unity-sdk-core.git");
        EditorUtility.DisplayProgressBar("Importing Ready Player Me", "Importing.....", Random.Range(0,1f));
        EditorApplication.update += UnityEditorUpdateCallback;

#endif
        }

#if !READY_PLAYER_ME
        private static void UnityEditorUpdateCallback()
        {
            if (_request == null) return;
            if (!_request.IsCompleted) return;
            switch (_request.Status)
            {
                case StatusCode.Success:
                    ConvaiLogger.DebugLog( "Ready Player Me has been imported successfully", ConvaiLogger.LogCategory.Editor);
                    break;
                case StatusCode.Failure:
                    ConvaiLogger.Error($"Ready Player Me has failed to import: {_request.Error.message}", ConvaiLogger.LogCategory.Editor);
                    break;
                case StatusCode.InProgress:
                    ConvaiLogger.DebugLog("Ready Player Me is still importing...", ConvaiLogger.LogCategory.Editor);
                    break;
                default:
                    throw new ArgumentOutOfRangeException();
            }
            EditorApplication.update -= UnityEditorUpdateCallback;
            EditorUtility.ClearProgressBar();
        }
#endif
    }
}

Assets\Convai\Scripts\Editor\CustomPackage\ReadyPlayerMeImporter.cs

Reply by k3kalinix | 2024-09-13 19:28:26

Could you update this script with this code?

Reply by charlieg5733 | 2024-09-14 07:06:33

Thank you that seems to have fixed that issue, I do now have some other errors…When I added the VR package I have the “Assets\Convai\Scripts\Runtime\Core\ConvaiInputManager.cs(14,11): error CS0535: ‘ConvaiInputManager’ does not implement interface member ‘Controls.IPlayerActions.OnEnterPress(InputAction.CallbackContext)’”

Reply by k3kalinix | 2024-09-14 07:47:16

Hello <@1050505151674323004>,

Reply by k3kalinix | 2024-09-14 07:48:49

Double click on this error and replace the code with this one (Line 167)

if (Input.GetKeyDown(TextSendKey) || Input.GetKeyDown(TextSendAltKey)) sendText?.Invoke();

Reply by charlieg5733 | 2024-09-14 08:19:09

Thanks , I now get a number of errors saying Assets\Convai\Scripts\Editor\Setup\CharacterImporter\CharacterImporterLogic.cs(3,7): error CS0246: The type or namespace name ‘ReadyPlayerMe’ could not be found (are you missing a using directive or an assembly reference?) (prior to adding VR package )I also get this error at runtime <color=red>[Error][GRPC]: failed: 500 (Internal Server Error)
[Stack Trace - Method: MoveNext, at Line: 172 in File: E:\Unity Projects\convai test2\Assets\Convai\Scripts\Runtime\PlayerStats\API\LongTermMemoryAPI.cs]
UnityEngine.Debug:LogError (object)
Convai.Scripts.Runtime.LoggerSystem.ConvaiLogger:LogMessage (string,Convai.Scripts.Runtime.LoggerSystem.ConvaiLogger/LogLevel,Convai.Scripts.Runtime.LoggerSystem.ConvaiLogger/LogCategory,object) (at Assets/Convai/Scripts/Runtime/LoggerSystem/ConvaiLogger.cs:93)
Convai.Scripts.Runtime.LoggerSystem.ConvaiLogger:Error (string,Convai.Scripts.Runtime.LoggerSystem.ConvaiLogger/LogCategory,object) (at Assets/Convai/Scripts/Runtime/LoggerSystem/ConvaiLogger.cs:140)
Convai.Scripts.Runtime.PlayerStats.API.LongTermMemoryAPI/d__14:MoveNext () (at Assets/Convai/Scripts/Runtime/PlayerStats/API/LongTermMemoryAPI.cs:172)
UnityEngine.UnitySynchronizationContext:ExecuteTasks ()

Reply by k3kalinix | 2024-09-14 08:19:34

restart the project

Reply by charlieg5733 | 2024-09-14 08:30:30

ok, restarting now, asking me to enter safe mode

Reply by k3kalinix | 2024-09-14 08:30:48

Ignore

Reply by charlieg5733 | 2024-09-14 08:31:22

it has loaded

Reply by k3kalinix | 2024-09-14 08:31:33

Please share screenshot

Reply by charlieg5733 | 2024-09-14 08:32:05

Images:

Reply by k3kalinix | 2024-09-14 08:32:49

Embedded Content:
Ready Player Me Avatar and Character Creator | Game Toolkits | Unit…
Get the Ready Player Me Avatar and Character Creator package from Ready Player Me and speed up your game development process. Find this & other Game Toolkits options on the Unity Asset Store.
Link: Ready Player Me Avatar and Character Creator | Game Toolkits | Unity Asset Store

Reply by k3kalinix | 2024-09-14 08:32:53

Can you import this asset?

Reply by k3kalinix | 2024-09-14 08:34:12

It looks like Ready Player Me was not automatically added to your project.

Reply by charlieg5733 | 2024-09-14 08:34:15

doing that now

Reply by charlieg5733 | 2024-09-14 08:40:32

so that has fixed those errors, but I still get this when entering play mode <color=red>[Error][GRPC]: 500 (Internal Server Error)
[Stack Trace - Method: MoveNext, at Line: 172 in File: E:\Unity Projects\convai test2\Assets\Convai\Scripts\Runtime\PlayerStats\API\LongTermMemoryAPI.cs]
UnityEngine.Debug:LogError (object)
Convai.Scripts.Runtime.LoggerSystem.ConvaiLogger:LogMessage (string,Convai.Scripts.Runtime.LoggerSystem.ConvaiLogger/LogLevel,Convai.Scripts.Runtime.LoggerSystem.ConvaiLogger/LogCategory,object) (at Assets/Convai/Scripts/Runtime/LoggerSystem/ConvaiLogger.cs:93)
Convai.Scripts.Runtime.LoggerSystem.ConvaiLogger:Error (string,Convai.Scripts.Runtime.LoggerSystem.ConvaiLogger/LogCategory,object) (at Assets/Convai/Scripts/Runtime/LoggerSystem/ConvaiLogger.cs:140)
Convai.Scripts.Runtime.PlayerStats.API.LongTermMemoryAPI/d__14:MoveNext () (at Assets/Convai/Scripts/Runtime/PlayerStats/API/LongTermMemoryAPI.cs:172)
UnityEngine.UnitySynchronizationContext:ExecuteTasks ()