CPlace+ was an improvement to my CPlace tool, where I sought to improve the tools usability and efficiency when having to modify many scenes and larger regions within scenes.
This improved tool was compared to other available tools on the Unity Asset Store to determine how beneficial these changes were.
The key features of the tool are:
A custom editor window holding all editable variables,
A Palette window, allowing the user to define asset groups and individual assets, all using their own weightings,
A Zone window, allowing the user to create zone types and add an associated palette to them, these may then be used to place zone(s) within a scene.
An in scene zone placement tool to place vertices defining the user made zone for the currently selected zone/subzone.
As done previously, the Palette makes use of an editor window with bindings to a serializable object, this time making use of some new variables to allow for palettes to be saved, loaded in for modification, and zone creation.
The Palette editor has had the brush size and type fields removed as the new tool does not make us of brush based placement.
The Zone editor window includes a zone list field for adding new zones, a zone palette field for adding an associated palette to a selected zone, zone UI colour for the colour of the vertices / connecting lines within the scene for a zone, scene parent (one per zone) and active sub zone, allowing users to have many disconnected zones within a scene all making use of the same palette and UI colours.
The Updated placement system still makes use of ray casts. However, these casts are based on zone vertex positions (min & max) alongside palette density, creating a grid where each x/y intersection is a ray cast, these casts are then randomly modified on the x and z axis to provide noise in the placement.
This noise takes into account palette density and zone size to prevent repeated placement within a zone forming object circles.
Update: PD01
The ray-casts are done via ray-cast commands, allowing the large amount of casts to be done in parallel, speeding up placement.
As for object placement, hidden template objects are present for all objects within a palette within the active scene. The templates are used on object placement, replacing prefab instantiation with regular instantiate calls.
Equally, prefab height data is cached, removing the GetComponent calls on placing each individual object.
Finally, the most significant change was the removal of the individual undo.recordObject. These were being used to record object placement / deletion and then merged into a single call at the end to allow the user to undo and redo tasks done with the tool. These had a significant effect on performance.
These were replaced with higher level recordHierarchy calls, removing both the individual calls for each object, but also the merging stage for each undo action.
This update has reduced the average time taken to paint an individual, large sub-zone by 96%.
The project required a greater focus on UX/UI design and considerations than previously, with more care given to making the tool usable, efficient and a more polished, finalised product.
I came to understand the importance of UX in tools, especially when the tool is going to be used by individuals unfamiliar with the tool or with limited time to learn and implement the tool within their workflow.
As before, I made use of plans using GitHub Projects and a Gantt chart to create a development timeline and keep track of developments, including bugs, tweaks and suggested features.
Were I to continue working on this, I would add an option for the user to use the old brush system instead, where they can paint using the currently loaded palette within the UI, equally, the user could both paint and place a zone at the same time using this method, potentially reducing the setup time of the tool on smaller scenes.