Unreal Plugin - Use the plugin with new projects

Learn how to use the plugin in new projects

F
Written by Faisal Ramady
Updated over a week ago

To use the plugin in a new project:

  1. Create a new C++ based Unreal Project

  2. Copy the 3D Repo Plugin into the Plugins folder

  3. Add the plugin to the PrivateDependencyModuleNames list in the Project's Build.cs file

  4. Generate the Visual Studio solution

  5. Implement your logic in your primary game module (see the repounreal sample)

  6. Copy in the Material Assets from the Samples project (and create derivatives, if desired)

  7. Update the Additional Asset Directories to Cook, if intending to build PAKs

  8. Start the Editor or Game and import assets as shown in the sample

You can copy either a built plugin or the plugin source to a new project, but it is recommended to use a build. The Additional Asset Directories to Cook property can be found in Project Settings > Project -> Packaging.

Materials

The plugin creates materials for imported meshes based on Instanced Materials provided by the developer. The importer will create Dynamic Instances of the Instanced Materials and set a number of pre-defined Parameterised Properties.

The importer takes two materials: one each for opaque and translucent surfaces. These assets are referenced by name, using the singleton AssetManager.

To create a new material, use RepoMaterial and RepoMaterialTranslucent as a starting point.

Beware when building your own projects, that these assets must be explicitly included in the project. To do this, add the directory containing the asset (e.g. Content) to the Additional Asset Directories to Cook list under Edit -> Project Settings -> Project -> Packaging. This is already done in the sample.

Converting to Static Types

3drepoimport will create a scene in the World Outliner using transient types: ProceduralMesh and transient Textures. To serialise a scene (e.g. to save the scene, inspect further in the Editor, or package to a PAK), the command 3drepoconvert can be used to convert the meshes and textures static/serialisable types (StaticMesh, and non-transient textures) and save them as Assets.

Did this answer your question?