Error CS0246 The type or namespace name 'IUnityCompiledFacade' could not be found (are you missing a using directive or an assembly reference?)

Viewed 2535

I will try to summarize my problem the best as I can ^^ So, I did a project in Unity and Vuforia (pretty new to this) and it worked just fine, I saved in on an external drive and changed my Windows and reinstalled Unity, now when I opened the project I get this error.

Severity Code Description Project File Line Suppression State Error CS0246 The type or namespace name 'IUnityCompiledFacade' could not be found (are you missing a using directive or an assembly reference?)
This is the scrip where I have this error.

    /*===============================================================================
Copyright (c) 2019 PTC Inc. All Rights Reserved.

Confidential and Proprietary - Protected under copyright and other laws.
Vuforia is a trademark of PTC Inc., registered in the United States and other 
countries.
===============================================================================*/

using System;
using UnityEngine;
using UnityEditor.Compilation;


namespace Vuforia.UnityCompiled
{
    public class RuntimeOpenSourceInitializer
    {
        static IUnityCompiledFacade sFacade;

        [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
        static void OnRuntimeMethodLoad()
        {
            InitializeFacade();
        }

        static void InitializeFacade()
        {
            if (sFacade != null) return;

            sFacade = new OpenSourceUnityCompiledFacade();
            UnityCompiledFacade.Instance = sFacade;
        }

        class OpenSourceUnityCompiledFacade : IUnityCompiledFacade
        {
            readonly IUnityRenderPipeline mUnityRenderPipeline = new UnityRenderPipeline();

            public IUnityRenderPipeline UnityRenderPipeline
            {
                get { return mUnityRenderPipeline; }
            }
        }

        class UnityRenderPipeline : IUnityRenderPipeline
        {
            public event Action<Camera[]> BeginFrameRendering;
            public event Action<Camera> BeginCameraRendering;

            public UnityRenderPipeline()
            {
#if UNITY_2018_3
                UnityEngine.Experimental.Rendering.RenderPipeline.beginFrameRendering += OnBeginFrameRendering;
                UnityEngine.Experimental.Rendering.RenderPipeline.beginCameraRendering += OnBeginCameraRendering;
#else
                UnityEngine.Rendering.RenderPipelineManager.beginFrameRendering += OnBeginFrameRendering;
                UnityEngine.Rendering.RenderPipelineManager.beginCameraRendering += OnBeginCameraRendering;
#endif
            }

#if UNITY_2018_3
            void OnBeginCameraRendering(Camera camera)
#else
            void OnBeginCameraRendering(UnityEngine.Rendering.ScriptableRenderContext context, Camera camera)
#endif
            {
                if (BeginCameraRendering != null)
                    BeginCameraRendering(camera);
            }

#if UNITY_2018_3
            void OnBeginFrameRendering(Camera[] cameras)
#else
            void OnBeginFrameRendering(UnityEngine.Rendering.ScriptableRenderContext context, Camera[] cameras)
#endif
            {
                if (BeginFrameRendering != null)
                    BeginFrameRendering(cameras);
            }
        }
    }
}
0 Answers
Related