public override bool GetDropLocation(Type itemType, int?childIndex, ref SerializedProperty array, ref int arrayIndex) { // Drop bindings into binding array. if (typeof(BindingTreeItem).IsAssignableFrom(itemType)) { array = bindingsArrayProperty; // Indexing by tree items is relative to each action but indexing in // binding array is global for all actions in a map. Adjust index accordingly. // NOTE: Bindings for any one action need not be stored contiguously in the binding array // so we can't just add something to the index of the first binding to the action. arrayIndex = InputActionSerializationHelpers.ConvertBindingIndexOnActionToBindingIndexInArray( array, name, childIndex ?? -1); return(true); } // Drop other actions next to us. if (itemType == typeof(ActionTreeItem)) { array = arrayProperty; arrayIndex = this.arrayIndex + 1; return(true); } return(false); }