How to transfer asset (blueprint) between client/server in session

Hi ! I’m here because i want to made possible to add new blueprint from a client to a server and server to client, i want the player to add some asset to the game and add it to all player after that. Excuse me if i made somes error, i don’t speak english natively, and thanks in advance.

PS : i have advanced session and file system library plugins installed.

Hi :slight_smile:
Everyone (both client and server) has access to all blueprints in the project. I assume you want to spawn an Actor though.

The way to do it is as follows:

  1. You need the actor you want to spawn to be replicated.
  2. You need the client to call a RPC. (run on server event)
  3. Let your server spawn the actor in the RPC and it should appear for everyone since it is replicated.
    Be aware that you can only call RPCs from the player controller or the possessed pawn.

Edit: If you don’t need replicated actors (if you are just spawning static meshes for instance) you can get away without point 1 but you will have to call a multicast event from the server to spawn the actors on all clients too.

1 Like

This would work with any actor:

You wont need the multicast event if the actor you spawn is replicated.

No, it’s about a blueprint that’s not in the other clients, the uasset if u prefer, well if not blueprint it could be good with static mesh too, and a default blueprint that i’ll use for it. I think chunkdownloader can be what i search but not sure, i attempt to made the game to have the possibility to add mod/content in game and transfert to the host and other player temporarily and, if in dungeon, if you obtain item from a mod/content you don’t have originally, it save it definitively.
And thanks for ur answers.

I’m not even sure that this is possible without some heavy engineering because when you can create blueprints/assets the game (and the server) is not running.

If the game is running, you no longer can create new blueprints.

It seems to me that you want to make part of the Unreal Editor internal part of your game.

If I were to guess where to start, it would probably be the editor code and the blueprint interpreter.

Couldn’t be possible with pak files ?

The blueprint data itself should not be the problem. You can copy an event graph and paste it in a text editor, meaning that the BP descriptions can be boiled down to plain text.

The problem will come from the following:

  • Building a BP runtime means that the BP editor must be part of your game.
  • You have to populate the editor with nodes which is probably not trivial.
  • Interpreting a BP on the other machine. (assuming it has all dependencies)

so the real problem here is to create a bp in runtime ? like can’t i use a reference bp that i convert to pak file and changing the name of the blueprint when i load it ? or when i convert it ? if i do that i’ll surely have to change some reference in the bp in this case ?