3Ducttapes(); Yvo von Berg | CG Toolsmith blog | C++, Python

Tycoon C++ UI updates

UI cleanup

I just finished another pass on the UI for Tycoon. Most of the options are now persistent, when drawing the UI I lookup the previous values from the current tycoon collection actor.

I have also added actor inputs to my slate UI, these were tricky to find in the Unreal documentation, here is an example on how to use them:

SObjectPropertyEntryBox

    [
        SAssignNew(MainMeshInputWidget, SObjectPropertyEntryBox)
        // Only allow and show these object types
        .AllowedClass(UStaticMesh::StaticClass())

        // The Unreal UAsset path e.g. '/game/mesh/cube.cube'
        // This is the actual value that the field saves
        .ObjectPath(this, &FTycoonToolEdModeToolkit::GetPathMain)

        //  Whether the asset can be 'None' 
        .AllowClear(true)

        // Callback changing the asset, 
        // you can lookup the AssetData from the selected asset here.
        .OnObjectChanged(
            this, 
            &FTycoonToolEdModeToolkit::ChangeAssetDataMain
        )
    ]

New UI, I have used this great app to create the wireframe: whimsical

demo

Reload fixes

  • Tycoon will now remember the position and rotation of the first piece so it doesn’t reset back to the origin when you reload.
  • You can now place different meshes in the track while building.

Attachment features

  • Enable/Disable attachments for different sections of the track.
  • Control the minimum ground height.
  • Amount of pillars for each piece.
  • Control the local offset of each row.
  • Switch between attachment calculation from the track piece down or from the ground up until the system reaches the track piece.
  • Tycoon will generate a normal Unreal spline from the entire track, I’m planning on creating some Unreal blueprints or Houdini engine examples on how you can fully customize the attachments.

I’m currently thinking of ways on how I can make the building more dynamic, so stay tuned.