Skip to content

Adding Creator Mode Objects

Creator Mode Objects are objects that can be manipulated in the game world by an admin in "Creator Mode". These can be anything from berry bushes to AI characters.

Video tutorial here:

Adding a New Creator Mode Object

  1. Create a blueprint which will be your new object. Somewhere in the Blueprints directory, create a new blueprint of any actor inheriting from ICreatorModeActor. In this example we are using a rock, and naming the blueprint BP_CreatorModeRock. Ensure the actor has atleast one static or skinned mesh component.

creator_mode_actorcreatore_mode_rock_bp

  1. Open the blueprint editor for BP_CreatorModeRock (or the actor you created), and set Replicates to true. It must be set to true, or else the object will not spawn on clients. set_replicates_true

  2. In the Blueprints/CreatorModeObjects folder, create a new data asset inheriting Creator Mode Object Data Asset. Name it something such as "CMO_CreatorModeRock". Open it to edit the values. create_new_data_assetsearch_creator_mode_data_asset

  3. The Object field must be set to the Creator Mode Object you created in step 1.

  4. Configure the data asset to your liking. Here is an explanation of what all the variables do:

  • Object The Creator Mode Object that the data asset will load when selected.
  • Proxy Actor An Actor that is spawned on the server to run a function on to determine different things, i.e. if the object can be spawned. Create an actor derived from ICreatorModeProxyActor in order to create one of these.
  • Placement Cost The cost that the object will use when placed. This is recommended to be set to 0 for non-permanent objects (like meat chunks) and 10 for permanent objects (like berry bushes).
  • Display Name The display name of the Creator Mode Object.
  • Icon Texture The icon to display for this object in the Creator Mode Object Browser.
  • Can Be Placed Determines if new instances of the object can be spawned. (For example, water can not be placed but can be edited)
  • Can Be Deleted Determines if instances of the object can be deleted. (For example, water can not be deleted but can be edited)
  • Can Be Dragged Determines if instances of the object can be dragged.
  • Rotate To Terrain Determines if the object will rotate to the terrain when placing or dragging. (For example, Characters can not use this)
  • Use Proxy Object to Determine if Placeable If true, the server will spawn the specified proxy actor and use its function to determine if the object can be placed. Useful for objects which rely on different things in the world in order to be spawnable or not.
  • Category The category for the object to be sorted with. This is localized. Here is the setup for this example: example_setup_details
  1. In the settings for BP_CreatorModeRock, select the Creator Mode Component component, and set the Creator Mode Data Asset variable to your data asset. set_creator_mode_component

  2. Test! If something goes wrong, make sure you backtrack through the steps and make sure everything is configured correctly. If all goes well, you should be able to select your object in the Objects creator mode window, and place it! test_creator_mode_object

  3. If you select the object, you might notice it doesn't have an outline. To fix this, in the event graph, override the functions Event On Become Focus Target and Event On Stop Being Focus Target. on_focus_target_event

  4. Now, you need to set up the render depth and stencil values for the meshes in the actor. There is only one static mesh in this example, so we will use that. Drag the static mesh variable into the event graph, and pull off from its pin to search. Search for Set Render Custom Depth and add the node to the graph, and link the Execute pin of Event On Become Focus Target to it. Set bValue to true.

  5. Do the same for Event On Stop Being Focus Target, except with bValue being false.

  6. From the Event On Become Focus Target execution path, add another node from the StaticMesh called SetCustomDepthStencilValue. Set Value to 255. set_render_custom_depth

  7. Now, your selected objects should have outlines! outlined_object

  8. Now that you have a creator mode object, you can go on to add some editable properties to it. With those, as an admin you can edit variables of the blueprint directly. Tutorial can be found here.

Footer Image

4a581e9