Unity - Scripting API: Search.QueryEngine_1.GetOperator
QueryEngine<T0>.GetOperator
Success!
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Parameters
| Parameter | Description |
|---|---|
| op | The operator identifier. |
Description
Get a custom operator added on the QueryEngine.
// Get an operator based on its token and add some handlers on it.
var operatorToken = "%";
var operatorObject = queryEngine.GetOperator(operatorToken);
if (operatorObject.valid)
operatorObject.AddHandler((float ev, float fv) => Math.Abs(ev % fv) < 0.0000001f);