3.1.1 Errors (Unity)

Original Discord Post by catboiler | 2024-09-13 18:45:49

When importing 3.1.1 into Unity (using 2022.3.28f1, I get the following errors:
Assets\Convai\Scripts\Editor\CustomPackage\ReadyPlayerMeImporter.cs(20,9): error CS0103: The name ‘ConvaiLogger’ does not exist in the current context - 9 of those. I can’t seem to downgrade back to 3.1.0. any more, so as a work around I’ve deleted that script

Reply by enormousvampire | 2024-09-13 18:47:28

Heyy we have acknowledged the issue and will be uploading a hotfix update to the asset store by tomorrow. Really sorry for the mishap on our end

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

Hello <@178079698574639104>,

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

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:47

Could you update this script with this code?

Reply by catboiler | 2024-09-13 20:42:49

No worries dude. I’ll do that in the morning :slightly_smiling_face:

Reply by catboiler | 2024-09-13 20:42:57

I wasn’t sure if you were aware, but thought you probably were :slightly_smiling_face:

Reply by k3kalinix | 2024-09-13 20:51:47

Thank you <@178079698574639104>

This conversation happened on the Convai Discord Server, so this post will be closed.