Editor.Components.SortingType
EnumUsed with Editor.Components.Canvas.
Index
Example
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
const scene = model.project.scene;
// Create a Canvas and set sorting type to Hierarchy
const obj = scene.createSceneObject('UICanvas');
const canvas = obj.addComponent('Canvas');
canvas.sortingType = Editor.Components.SortingType.Hierarchy;
console.log(`sortingType: ${canvas.sortingType}`);
Enumeration Members
Depth
Depth:
number
Sort child elements by their depth value.
Hierarchy
Hierarchy:
number
Sort child elements by their position in the hierarchy tree.