Forum Discussion

Lee_Probert's avatar
Lee_Probert
Copper Contributor
Feb 09, 2024

Content Performance Analyser is no longer loading

Since updating to the Mesh Unity Toolkit (v5.2315.6), the Content Performance Analyser window no longer opens in the Editor. The error message is:

NullReferenceException: Object reference not set to an instance of an object
Microsoft.Mesh.Toolkit.CPA.Editor.AnalyzerWindow.CreateGUI () (at ./Library/PackageCache/com.microsoft.mesh.toolkit@5.2315.6/mesh.toolkit.cpa/Editor/AnalyzerWindow.cs:96)

 This is the `c#` code it fails on:

var window = windowTemplate.Instantiate()

 ... and this looks like it is a VisualTreeAsset object from Unity UI Toolkit

private VisualTreeAsset windowTemplate;

 

7 Replies

    • CameronMicka's avatar
      CameronMicka
      Icon for Microsoft rankMicrosoft

      Good and bad news I wasn't able to reproduce this in v5.2315.6 - but I want to learn how we can fix it for you (and likely others).

       

      If you select the AnalyzerWindow script in the Mesh Toolkit package, do you see a valid "Window Template" specified in the inspector? Or is it set to none?

       

      Unity editor

      • Weald_Spatial's avatar
        Weald_Spatial
        Copper Contributor

        CameronMicka 

        Apologies for the confusion ... I am logged in with another account and cannot find a way to switch accounts on this forum.
        I have another project using Mesh that is working fine. It has the same Unity version and the same SDK.
        Here's a screenshot of the Inspector with the file you have shown above selected. As you can see, there is something definitely wrong with the compilation of that script.

         

        Do you think it is the capitalisation of CPA in the namespace?

         

Resources