Script.StartCoroutine(function coroutineFunction, [optionalArguments] args)
Starts the passed function as a coroutine function.
Parameters:
Name | Type | Description |
---|---|---|
coroutineFunction | function | The name of the function to be started as a coroutine. Must have at least one coroutine.yield() call with in it. |
args | [optionalArguments] | Arguments to passed as parameters to the coroutine function. |
Usage
---@type Script
local script;
---@type function
local coroutineFunction;
---@type [optionalArguments]
local args;
script.StartCoroutine(coroutineFunction, args)