Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

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,517
    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,517
    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,517
    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?