2. Conveyor Manager Functions - Theuntextured/AsyncConveyorPlugin GitHub Wiki

image

Async vs non-async

As you may notice above, most nodes have their async counter-part. It is suggested that the async nodes are used, in order to avoid crashes. Only use the normal nodes if you know what you are doing. The "Completed" execute will run after the return values are ready to be used. NOTE: May not be on the same frame.

Extract Item

image

  • Location: the location where the item should be extracted from.
  • Tolerance: search radius for the nearest node/item (set to a negative number for unbound)
  • Force Closest: disabling it will return the first item found, while enabling it will return the closest one. Set to false for better performance, but to true for more precision.
  • Node Extract: will find a node to extract from before searching for items. Can sometimes improve speed.
  • Success: was an item found?
  • Return Value/Item: The item which was extracted

Insert Item

image

Insert a specified item into the conveyor system.

  • Item: The item to add
  • Location: the location where the item should be
  • Tolerance: search radius for the nearest node/item (set to a negative number for unbound)
  • Force Closest: disabling it will return the first item found, while enabling it will return the closest one. Set to false for better performance, but to true for more precision.
  • Return Value: Was the item successfully added? Can return false if no node was added or if the spot is currently occupied.

Get Item At Location

image

  • Location: the location where the item should be
  • Tolerance: search radius for the nearest node/item (set to a negative number for unbound)
  • Force Closest: disabling it will return the first item found, while enabling it will return the closest one. Set to false for better performance, but to true for more precision.
  • Node Extract: will find a node to check from before searching for items. Can sometimes improve speed. *Include Added Offset: Should the transform be global space or should it exclude the added transform specified in the GetItemVisuals function?
  • Found/Item: The item which was found
  • Item Transform: the transform of the instance on the conveyor.

Get Save Data

image

Returns an array of item save data which can be stored in a SaveGame Object.

Set Item Cull Distance

Sets the item cull distance to a specified value. The function will wait for the current processing cycle to finish before changing the value, so it might be slow. Don't change often. It is intended to be used when changing game settings (For example distance scaling).

Load Item Data

image

Loads in Items from an array of item save data structures.

Since v5.1, this function has a bool parameter called async. Enabling this moves loading items off the game thread.