Its will be awesome to have opportunity to categorise attributes. In Unreal/Unity we have 2 different implementations:
- Unity - using decorators like [Header(“something”)], [Space(20)]
- Unreal - using macro UPROPERTY(Category) works like collapsable list, list depth depends on split symbols “|”
So in playcanvas attributes categorisation feature missing, will be awesome to have any, its can be implemented like this:
- unreal-like - add new arg
category
toattributes.add()
TestScript.attributes.add("va1",
{ type: "string", category: "Character | Movement" }
);
- unity-like - add new function
attributes.header()/attributes.space()
imho easier to implement and display in editor
const TestScript = pc.createScript("testScript");
TestScript.attributes.header("Some category name", { type: "string" });
TestScript.attributes.add("va1", { type: "string" });
TestScript.attributes.space(20);
TestScript.attributes.header("Some category name 2", { type: "string" });