public override void DraggableDroppedOnto(BaseDragDrop other) { var inputElement = other as InputElementDragDrop; if (inputElement == null) { base.DraggableDroppedOnto(other); return; } InputDropSlot slotFit = null; foreach (var slot in this.inputSlots) { if (slot.AttemptToFitElement(inputElement, Input.mousePosition)) { slotFit = slot; break; } } if (!slotFit) { return; } (this.myScript as IScriptableWithInputs).SetInputElements(this.inputSlots .Select(slot => slot?.GetInputScript()) .ToList()); this.OnContainedUpdated(inputElement); slotFit.PassContainerUpdated(); }
public override void DraggableDroppedOnto(BaseDragDrop other) { Debug.Log($"Draggable {other.name} dropped onto {this.name}"); var inputElement = other as SeriesDragDrop; if (inputElement != null && this.ShouldNestDragged(inputElement)) { this.DropInNestedSeries(inputElement); return; } base.DraggableDroppedOnto(other); }
public abstract bool GetCompatabilityWithDraggable(BaseDragDrop draggable);
public bool GetCompatabilityWithDraggable(BaseDragDrop draggable) { throw new NotImplementedException(); }