Adding new hooks to the "Add New" menu in the editor?

I am trying to figure out how to register custom entries into the “Add New…” button in the content browser. I have been trying to dissect how Paper2D does it, but so far have been unable to figure it out.

Does anyone know of any examples on how to set this up?

Best as I can tell, looking at Paper2D, in the module startup it grabs a pointer to AssetTools, then registers a new asset category. It then uses that to register new type actions, and passes in a AssetTypeActions class. I’ve pretty much verified this is correct by putting a breakpoint in the AssetTypeActions->GetName() for Paper2D and as expected it gets called when I open the Add New… button.

However when I try to duplicate this in my own plugin, it doesn’t seem to work and the GetName is never called. As far as I can tell I have exactly duplicated how Paper2D is doing it, so I am not sure what I am missing.

So I was missing a “Factory” class. Adding that with an overridden FactoryCreateNew was the missing piece and now it shows up in the menu :smiley: