UEA0013: UseNonAllocMethods
October 2, 2019 ยท View on GitHub
| Property | Value |
|---|---|
| Id | UEA0013 |
| Category | GC |
| Severity | Warning |
| Version | 5.3 -> |
Example
Code with Diagnostic
using UnityEngine;
class Example : MonoBehaviour
{
void Start()
{
Physics2D.CircleCastAll(Vector2.zero, 5, Vector2.one);
}
}
Code with Fix
using UnityEngine;
class Example : MonoBehaviour
{
void Start()
{
var results = new RaycastHit2D[X];
Physics2D.CircleCastNonAlloc(Vector2.zero, 5, Vector2.one, results);
}
}