I get this error message when clicking the New button from a Visual Effect component, or creating a new visual effect asset from the right click menu. This seems to have started after upgrading to .34f1, and persists even after upgrading to .35f1.
If I try to do anything with the package manager on the VFX Graph package, like installing samples, it fixes the issue temporarily, but it will return to this empty screen after a restart or after some time.
This seems to only affect this project, as I am able to access the menu normally on other projects. How can I fix this in my main project?
did you try removing and readding the package?
closing project, delete library, reopen project?
Yes, have tried all of these.
Removing and readding the package broke all of my VFX graphs and I had to open and re-save every one of them to get them working again.
Just tried deleting ./Library instead of just Library/PackageCache like before and it still shows the same errors.
Hi,
I’m sorry for the issue you are facing. A support ticket has been created to track this issue.
A fix is being worked on, but it would help if you could copy/paste the error messages as plain text so we get all the relevant information.
Thanks.
Hi, there’s 2 errors I’m getting:
NullReferenceException: Object reference not set to an instance of an object
SamplesLinkPackageManagerExtension.UnityEditor.PackageManager.UI.IPackageManagerExtension.OnPackageSelectionChange (UnityEditor.PackageManager.PackageInfo packageInfo) (at ./Library/PackageCache/com.unity.terrain-tools@d4bcf51a280e/Editor/SamplesLinkPackageManagerExtension.cs:73)
UnityEditor.VFX.VFXTemplateWindow.TryFindSample (System.String sampleName, UnityEditor.PackageManager.UI.Sample& sample) (at ./Library/PackageCache/com.unity.visualeffectgraph@947cc2b7941c/Editor/TemplateWindow/VFXTemplateWindow.cs:230)
UnityEditor.VFX.VFXTemplateWindow.CreateGUI () (at ./Library/PackageCache/com.unity.visualeffectgraph@947cc2b7941c/Editor/TemplateWindow/VFXTemplateWindow.cs:120)
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <191a1970a53948f9819ac1d2e4f5c72e>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <191a1970a53948f9819ac1d2e4f5c72e>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <191a1970a53948f9819ac1d2e4f5c72e>:0)
UnityEditor.UIElements.DefaultEditorWindowBackend.Invoke (System.String methodName) (at <440ef95092dc402283338101458784af>:0)
UnityEditor.VisualEffectAssetEditorUtility:CreateVisualEffectAsset() (at ./Library/PackageCache/com.unity.visualeffectgraph@947cc2b7941c/Editor/VFXAssetEditorUtility.cs:124)
and
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.VFX.VFXTemplateWindow.CollectTemplates () (at ./Library/PackageCache/com.unity.visualeffectgraph@947cc2b7941c/Editor/TemplateWindow/VFXTemplateWindow.cs:412)
UnityEditor.VFX.VFXTemplateWindow.LoadTemplates () (at ./Library/PackageCache/com.unity.visualeffectgraph@947cc2b7941c/Editor/TemplateWindow/VFXTemplateWindow.cs:166)
UnityEditor.VFX.VFXTemplateWindow.Setup (UnityEditor.VFX.UI.VFXView vfxView, UnityEditor.VFX.VFXTemplateWindow+CreateMode mode, System.Action`1[T] callback) (at ./Library/PackageCache/com.unity.visualeffectgraph@947cc2b7941c/Editor/TemplateWindow/VFXTemplateWindow.cs:104)
UnityEditor.VFX.VFXTemplateWindow.ShowInternal (UnityEditor.VFX.UI.VFXView vfxView, UnityEditor.VFX.VFXTemplateWindow+CreateMode mode, System.Action`1[T] callback) (at ./Library/PackageCache/com.unity.visualeffectgraph@947cc2b7941c/Editor/TemplateWindow/VFXTemplateWindow.cs:94)
UnityEditor.VFX.VFXTemplateWindow.PickTemplate (System.Action`1[T] callback) (at ./Library/PackageCache/com.unity.visualeffectgraph@947cc2b7941c/Editor/TemplateWindow/VFXTemplateWindow.cs:89)
UnityEditor.VisualEffectAssetEditorUtility.CreateVisualEffectAsset () (at ./Library/PackageCache/com.unity.visualeffectgraph@947cc2b7941c/Editor/VFXAssetEditorUtility.cs:124)
Thanks.
Did you try using an older version of the package?
Thanks for the additional details, it helped a lot in pin-pointing the source of the issue.
If you are not using the Terrain tools in your project, could you uninstall it until the fix is released?
Let me know if it makes the issue go away.
Thanks.
Somehow, this bug has magically fixed itself this morning without doing anything new.
If it comes back, I’ll try doing those and update this thread.
Hey,
for me, the issue persists.
As soon as I remove terrain tools, it works.
Side Note:
I also had the case that is somehow started to work in another project. (Terrain Tools installed)
But this caused the unity editor to randomly crash as soon as I actually created the VFX graphs.
Back then I didn’t see the connection between VFX and Terrain Tools so I lived with a randomly crashing Editor.
Here are the console logs.
NullReferenceException: Object reference not set to an instance of an object
SamplesLinkPackageManagerExtension.UnityEditor.PackageManager.UI.IPackageManagerExtension.OnPackageSelectionChange (UnityEditor.PackageManager.PackageInfo packageInfo) (at ./Library/PackageCache/com.unity.terrain-tools@d4bcf51a280e/Editor/SamplesLinkPackageManagerExtension.cs:73)
UnityEditor.VFX.VFXTemplateWindow.TryFindSample (System.String sampleName, UnityEditor.PackageManager.UI.Sample& sample) (at ./Library/PackageCache/com.unity.visualeffectgraph@69d444715da0/Editor/TemplateWindow/VFXTemplateWindow.cs:230)
UnityEditor.VFX.VFXTemplateWindow.CreateGUI () (at ./Library/PackageCache/com.unity.visualeffectgraph@69d444715da0/Editor/TemplateWindow/VFXTemplateWindow.cs:120)
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <eb0ef51e5908461ca908fdf6b2dbd966>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <eb0ef51e5908461ca908fdf6b2dbd966>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <eb0ef51e5908461ca908fdf6b2dbd966>:0)
UnityEditor.UIElements.DefaultEditorWindowBackend.Invoke (System.String methodName) (at <71bb777be9234aca978b3a42dbd3de8b>:0)
UnityEditor.VisualEffectAssetEditorUtility:CreateVisualEffectAsset() (at ./Library/PackageCache/com.unity.visualeffectgraph@69d444715da0/Editor/VFXAssetEditorUtility.cs:124)
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.VFX.VFXTemplateWindow.CollectTemplates () (at ./Library/PackageCache/com.unity.visualeffectgraph@69d444715da0/Editor/TemplateWindow/VFXTemplateWindow.cs:416)
UnityEditor.VFX.VFXTemplateWindow.LoadTemplates () (at ./Library/PackageCache/com.unity.visualeffectgraph@69d444715da0/Editor/TemplateWindow/VFXTemplateWindow.cs:166)
UnityEditor.VFX.VFXTemplateWindow.Setup (UnityEditor.VFX.UI.VFXView vfxView, UnityEditor.VFX.VFXTemplateWindow+CreateMode mode, System.Action`1[T] callback) (at ./Library/PackageCache/com.unity.visualeffectgraph@69d444715da0/Editor/TemplateWindow/VFXTemplateWindow.cs:104)
UnityEditor.VFX.VFXTemplateWindow.ShowInternal (UnityEditor.VFX.UI.VFXView vfxView, UnityEditor.VFX.VFXTemplateWindow+CreateMode mode, System.Action`1[T] callback) (at ./Library/PackageCache/com.unity.visualeffectgraph@69d444715da0/Editor/TemplateWindow/VFXTemplateWindow.cs:94)
UnityEditor.VFX.VFXTemplateWindow.PickTemplate (System.Action`1[T] callback) (at ./Library/PackageCache/com.unity.visualeffectgraph@69d444715da0/Editor/TemplateWindow/VFXTemplateWindow.cs:89)
UnityEditor.VisualEffectAssetEditorUtility.CreateVisualEffectAsset () (at ./Library/PackageCache/com.unity.visualeffectgraph@69d444715da0/Editor/VFXAssetEditorUtility.cs:124)
Please fix this.
Please share your Unity and VFX Graph version as well as the SRP that you are using.
This has been fixed here so you might have something else.
Thanks and have a great day
Did you happen to have multiple scripts called SamplesLinkPackageManagerExtension?
edit: these scripts are in the Packages folder, not Assets.
We just had this issue too because both the VFX Graph package and the Terrain Tools package used the same name for a package manager extension. When trying to open the VFX Graph template window it would try to call all SamplesLinkPackageManagerExtension including the one from the terrain tools and cause an error.
I managed to write a temporary patch in our project by intercepting these PackageManagerExtensions and redirecting the Terrain Tools SamplesLinkPackageManagerExtension calls.
