Download

4.26 Custom Anim Graph Nodes "Editor Only" warning

Seems like something changed in 4.26.

I used to have a C++ module with custom anim nodes. I had a separate Editor module with the AnimGraph nodes. In 4.26 I started seeing this warning. I tried forcing my Editor module to be Runtime and UncookedOnly just to see what happens and the warning is still there. I wonder if this is a bug introduced in 4.26? Not too many people make custom anim nodes so maybe it somehow fell through?

The node ‘<Node Name Goes Here>’ is from an Editor Only module, but is placed in a runtime blueprint! K2 Nodes should only be defined in a Developer or UncookedOnly module.

If I understand right, Developer is being deprecated as of a few versions ago too.

Same happens to me. The problem is in FBlueprintEditorUtils::ValidateEditorOnlyModules() (BlueprintEditorUtils.cpp) where this warning message is printed if node is in editor-only package and NOT in “uncooked-only” or “developer”. Since “developer” is already deprecated, the solution is to set the module as “uncooked-only”.
In my case, I’ve added:
OverridePackageType = PackageOverrideType.GameUncookedOnly;
to module-rules constructor in <module-name>.Build.cs.
Hope this helps.

Oh wow, I didn’t know about the OverridePackageType.

I was setting my module as UncookedOnly, and even tried Runtime in the .uplugin file. I wonder why that didn’t work. I guess I’ll dig into that BlueprintEditorUtils.cpp file later when I have the chance.

These happen to be some of the most underdocumented parts of Unreal. It gets really tough to do some of these more advanced things. The docs actually still say: “Type” sets the type of Module. Valid options are Runtime, RuntimeNoCommandlet, Developer, Editor, EditorNoCommandlet, and Program."
Despite all the types that exist now, and that Developer is deprecated. No mention of UncookedOnly.

https://docs.unrealengine.com/en-US/…ins/index.html

In fact all the tutorials online for making custom anim nodes are from a few years ago and all have been saying the correct thing has been to add the animgraphnode objects into an editor module. And I’ve had it this way for years. Now it suddenly changed in 4.26 without much notice.

Oh so actually rebuilding the modules after you change their type in uplugin seemed to help the error go away.

This is the answer. Emphasis on REBUILD, not just recompile. Visual Studio will not detect that it needs to rebuild after changing the module type. Exact syntax:

“Modules”:
{
“Name”: “CustomEditorOnlyModule”,
“Type”: “UncookedOnly”,

},

… = whatever else was already there.

Apologies for bumping an old thread, but I think I have a very similar problem and would appreciate some insight.

I had a small project on 4.25 that was set up with a game module and an editor module. The game module contained the anim node, and the editor module the graph node. Now I am trying to do this again with a 4.26 project and running into the same warning @illYay mentioned above. I have a project configured as follows:

uproject file:



"Modules": 
  { "Name": "SpaceGame", "Type": "Runtime", "LoadingPhase": "Default", "AdditionalDependencies":  "Engine", "UMG" ] },
  { "Name": "SpaceGameEditor", "Type": "Editor", "LoadingPhase": "PostEngineInit" }
]


My SpaceGameEditor target has


Type = TargetType.Editor;

in the Target.cs file. Right now the animation node itself does nothing (pass through).

Whenever I run my project (in editor mode) I get the following errors:



Fri Mar 19 15:33:04 PDT 2021 Warning LogLinker [AssetLog] C:\ ... \FirstPerson_AnimBP.uasset: Failed to load '/Script/SpaceGameEditor': Can't find file.


And the node vanishes from my graph. I can add it back and save, but on re-launch it will be gone again.

Additionally, when running the game in standalone mode it looks like something odd is happening. Specifically my mesh is rotated 90 degrees, but only in the animation state that uses the custom node (like the graph is indeed broken due to the missing node, or something to that effect). If I just remove the custom node, it works fine in standalone mode.

I tried two of the things listed above:

  1. Add UncookedOnly in the uproject
  2. Set UncookedOnly in the build.cs file

However neither appears to fix either issue (the error still prints in editor mode, and the animation is broken). Any thoughts?

Update for anybody else that has this issue. I ultimately did the following and it worked:

  • Make sure UncookedOnly is specified in **both **the uproject and build.cs file (Maybe I missed this before?)
  • Make sure the run-time module is specified to load before the content so that the anim node is loaded before the graph itself (I put it in PreLoadingScreen, which achieved this)
  • Do a clean build to make sure things are getting rebuilt.