public void Initialize(MaterialEditor materialEditor, MaterialProperty[] properties, MaterialUIBlockList parent) { this.materialEditor = materialEditor; this.parent = parent; materials = materialEditor.targets.Select(target => target as Material).ToArray(); // We should always register the key used to keep collapsable state materialEditor.InitExpandableState(); }
public LayersUIBlock() { for (int i = 0; i < 4; i++) { layerUIBlocks[i] = new MaterialUIBlockList { new LayeringOptionsUIBlock(Styles.layeringOptionsExpandableBits[i], i), new LitSurfaceInputsUIBlock((Expandable)((uint)Expandable.MainInput + i), kMaxLayerCount, i, features: litInputsFeatures), new DetailInputsUIBlock((Expandable)((uint)Expandable.MainDetail + i), kMaxLayerCount, i, features: detailInputsFeatures), }; } }
/// <summary> /// Construct a sub ui block list by passing the parent ui block list (useful for layered UI where ui blocks are nested) /// </summary> /// <param name="parent"></param> public MaterialUIBlockList(MaterialUIBlockList parent) => this.parent = parent;