Runs the MLComponent automatically when the object or component it's on is enabled.
If disabled, the Component will stop enacting its behavior.
Controls the inference mode that MLComponent will run in. For example, GPU, CPU, etc.
ReadonlyisReturns true if this Component, its SceneObject, and all of that SceneObjects parents are enabled.
Binary ML model supplied by the user.
Bind a function that is triggered when the component fails to load a model.
Function that gets called when model loading is finished.
Bind a function that is triggered when the component fails to run a model.
Function that gets called when the model stops running.
Render order of the MLComponent.
ReadonlysceneThe SceneObject this component is on.
ReadonlystateReturns the current status of the neural network model.
ReadonlyuniqueBuilds the MLComponent model when all placeholders are determined. Config is an array of Input and Output placeholders.
Build the MLComponent asynchronously.
Stops running the MLComponent. The onRunningFinished callback will not be executed.
Destroys the component.
Returns an array of InputPlaceholders of the MLComponent's model with default settings. Returns empty array if the model asset is not set.
Returns the OutputPlaceholder with the matching name.
Returns an array of OutputPlaceholders of MLComponent's model with default settings. Returns empty array if the model is not set.
Returns the SceneObject the component is attached to.
Returns the end time of the scheduled MLComponent run.
Returns the start time of the scheduled MLComponent run.
Returns the Transform this component is attached to.
Returns the name of this object's type.
Returns true if the object matches or derives from the passed in type.
Returns true if running is requested on each frame.
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Runs the MLComponent once.
Schedules the MLComponent to run at the start timing and terminate at the end timing. The scheduled running will recur if recurring is true.
Stops running the MLComponent.
If loading asynchronously, makes the entire system wait until loading is finished.
If running asynchronously, makes the entire system wait until the last run is finished.
Used to integrate machine learning models into a Lens.
Remarks
This component allows developers to use neural networks for processing inputs such as textures or data arrays to produce specific outputs, which could be in the form of processed textures or data alterations. The MLComponent relies on MLAsset that defines the neural network model used. It supports tasks like image classification, object detection, etc.
See
MLComponent Overview.
Example