Loading the demo Unreal project
Clone the project, and enter the
Right-click the .uproject file and select
Generate Visual Studio project files. This will build a Visual Studio solution in the same directory.
Open the Visual Studio solution.
repounrealproject as the start-up project, and
Start Debugging. This will open the Editor with the debugger attached, which thereafter can be interacted with normally.
The project will have the demo account web configuration hardcoded in, when you are using your own account you can confirm the URL/API are correct in repounreal.cpp:
Confirm that these two string variables in the
SampleGameModulecalled URL and apiKey have the correct values
It should match the details that were displayed in this section
Loading a model
The sample code registers two command console commands: 3drepoimport & 3drepoconvert.
Open the console, press the Tilde
¬key, or open the Output Log (
Window > Developer Tools > Output Log)
Make sure you have the model ids and revision ready. Refer to this section for more details
Give the command:
3drepoimport [teamspace] [model id] [revision tag]. Where a revision tag is optional. For example,
3drepoimport Repo3DDemo 01713310-2286-11eb-93c1-296aba26cc113drepoimport Repo3DDemo 011382b0-2286-11eb-93c1-296aba26cc11 r1
The model will be imported as a new Actor in the world.
The 3drepoimport command can be given at design-time (in Editor) or in-game (e.g. in Play-In-Editor mode).
A couple of points on how units are applied to models in the plugin:
Scaling will be applied to take the model from the source units to the destination units of the Unreal engine
The units of the model in 3D Repo can be seen in the setting panel of the model
Unreal world units are in cm
The scale is applied to the Transform of the top level `ARepoSupermeshActor object
Packaging the Plugin
Use the Package... option in the Plugins dialog in the Editor to do this. By default, support for Mac is disabled via the WhitelistPlatforms property to allow building on a standalone PC. Configure remote-compilation to build for Mac.
repounreal project (under Solution -> Games) has the plugin (under the Plugins folder), and project code (under the Source folder).
The plugin can be packaged and redistributed. The plugin is registered as a dependency in the project code's
repounreal.Build.cs as it would be in any third-party project.
The code under Source demonstrates how to use the plugin. This is what would be replaced in a real application. The demonstration of the plugin's API is in
ImportModel. The sample registers this method with the Console Manager under the command