Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Resolved [Fixed] Memory Profiler 0.2.3-preview.2 doesn't compile in Unity 2019.4.0f1

Discussion in 'Profiler Previews' started by MFG-jkhoo, Jun 9, 2020.

  1. MFG-jkhoo

    MFG-jkhoo

    Joined:
    Jul 15, 2016
    Posts:
    19
    Library/PackageCache/com.unity.memoryprofiler@0.2.3-preview.2/Editor/MemoryProfilerWindow.cs(1031,17): error CS0103: The name 'EditoUtilityCompatibilityHelper' does not exist in the current context

    The contents of EditorUtilityCompatibilityHelper.cs are compiled-out because of:
    Code (CSharp):
    1. #if !UNITY_2019_4_OR_NEWER
    2. using System;
    3. using UnityEngine.Internal;
    4.  
    5. namespace UnityEditor
    6. {
    7.     internal static class EditoUtilityCompatibilityHelper
    8.     {

    so this code doesn't compile:

    Code (CSharp):
    1.         void TakeCapture()
    2.         {
    3.             if (EditorApplication.isCompiling)
    4.             {
    5.                 Debug.LogError("Unable to snapshot while compilation is ongoing");
    6.                 return;
    7.             }
    8.  
    9.             if (EditoUtilityCompatibilityHelper.DisplayDialog(Content.HeapWarningWindowTitle, Content.HeapWarningWindowContent, Content.HeapWarningWindowOK, EditoUtilityCompatibilityHelper.DialogOptOutDecisionType.ForThisMachine, MemoryProfilerSettings.HeapWarningWindowOptOutKey))
    10.             {
    11.                 this.StartCoroutine(DelayedSnapshotRoutine());
    12.             }
    13.             EditorGUIUtility.ExitGUI();
    14.         }
     
  2. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,261
    Thanks for alerting us to this issue. It has since also been reported as a bug. A fix is on it's way.
     
  3. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,261
    This is fixed in 0.2.4-preview.1.
     
  4. Zaskar7777

    Zaskar7777

    Joined:
    Oct 17, 2020
    Posts:
    36
    I am on Unity 2020.2.1 and having the same issue. Should I upgrade to higher Unity version?
     
  5. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,261
    Hi @Zaskar7777 ,
    Which Version of the Package are you using and have you tried updating the package via the Package Manager?

    If that doesn't help, are you getting the exact same error message / code location for the compilation error?