private void Load() { foreach (var element in m_Current) { CuiManager.Create().Load(element); } }
public void Paste() { if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.V) && clipboardBuffer != null) { foreach (var element in clipboardBuffer) { var cui = CuiManager.Create(); var pixelComponent = element.Components.OfType <RectPixelComponent>().FirstOrDefault(); if (pixelComponent != null) { element.Components.Remove(pixelComponent); } cui.Load(element); if (pixelComponent == null) { element.Components.Add(pixelComponent); var rTransform = cui.GetComponent <RectTransformComponent>(); rTransform.SetPixelLocalPosition(pixelComponent.Position); rTransform.SetPixelSize(pixelComponent.Size); } } } }