Last updated
Was this helpful?
Last updated
Was this helpful?
The MakeOneWay method makes the calling AttachbleList a one-way list. In other words, it means that the AttachableList will still contain all of the objects that it contained before calling MakeOneWay; however, the contained elements will no longer know that they belong to this List. This essentially makes the AttachableList behave like a regular List - at least until new objects are added to the List, or until is called.
The MakeOneWay method is useful if you have a list of IAttachables (such as ) which you want to remove from their respective managers without having them removed from their List. In the following example, the element at index 0 will get removed:
To prevent the removal from the list, it can be made one way: