StreamableUtil
This item only works when running on the client. Client
A utility library for the Streamable class.
local StreamableUtil = require(packages.Streamable).StreamableUtil
Functions
Compound
Creates a compound streamable around all the given streamables. The compound streamable's observer handler will be fired once all the given streamables are in existence, and will be cleaned up when any of the streamables disappear.
local s1 = Streamable.new(workspace, "Part1")
local s2 = Streamable.new(workspace, "Part2")
local compoundTrove = StreamableUtil.Compound({S1 = s1, S2 = s2}, function(streamables, trove)
local part1 = streamables.S1.Instance
local part2 = streamables.S2.Instance
trove:Add(function()
print("Cleanup")
end)
end)