Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 641 Bytes

File metadata and controls

40 lines (31 loc) · 641 Bytes

UEA0013: UseNonAllocMethods

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);
    }
}