editor
editor copied to clipboard
Attributes categories
Its will be awesome to have opportunity to categorise attributes. In Unreal/Unity we have 2 different implementations
-
Unity - using decorators like
HeaderandSpace
-
Unreal - using macro
UPROPERTY(Category)works like collapsable list, list depth depends on split symbols “|”
So in playcanvas editor attributes categorisation feature missing, will be awesome to have any, its can be implemented like this:
unreal-like- add new argcategorytoattributes.add()
TestScript.attributes.add("va1", { type: "string", category: "Character | Movement" });
unity-like- add new functionsattributes.header("My Header")attributes.space(20)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" });
Related: #774