#Burst is enable to use a property getter

1 messages · Page 1 of 1 (latest)

young panther
#

Hello !
I encountered a very strange error in one of my burst compiled functions : Burst error BC1055: Unable to resolve the definition of the method VoxelMesh.get_Radius(). I don't understand why that specific property can't be accessed, could this be a bug ?

Here are my functions, the error comes from float meshRadius = mesh.Radius; (but the other properties (float3 center = mesh.Center; and float3 size = mesh.Size; work fine) :

private static bool MainCameraFrustrumCulling(in VoxelMesh mesh, in float3 position, in NativeArray<Plane> cameraPlanes)
{
    float3 center = mesh.Center;
    float3 size = mesh.Size;
    float3 normal = NormalVectors.vectors[(int)mesh.normal];

    // Ignore meshes that are invisible because of their normal
    if (math.dot(center - normal * size - position, normal) > 0) return false;

    // Ignore meshes outside of camera view
    foreach (Plane plane in cameraPlanes)
    {
        float3 normalSign = math.sign(plane.normal);
        float3 closestPoint = center + (size * normalSign);
        if (math.dot(closestPoint, plane.normal) + plane.distance < 0) return false;
    }

    return true;
}


private static bool MinimapCameraFrustrumCulling(in VoxelMesh mesh, in float2 position, float radius)
{
    // Ignore meshes that are invisible because of their normal
    if (mesh.normal != CubeNormal.yPositive) return false;

    // Ignore meshes outside of camera view
    float2 relativePos = mesh.Center.xz - position;
    float meshRadius = mesh.Radius;
    return math.dot(relativePos, relativePos) < (radius + meshRadius) * (radius + meshRadius);
}

And here are the properties of VoxelMesh :

public float3 Center => (position + new float3(minX + maxX, minY + maxY, minZ + maxZ) / 2) * WorldManager.blockSize;

public float3 Size => (new float3(maxX - minX, maxY - minY, maxZ - minZ) / 2) * WorldManager.blockSize;

public float Radius => math.length(Size);

Would anyone have an idea how I could fix this ?

#

Nevermind, I copy pasted Size's code in math.length() and it now works 🙂

wary steeple
#

that does kind of sound like a burst bug; you should post it in the burst forum (or with the burst tag or whatever)

#

(burst people don't hang out here too regularly last i checked)

young panther
#

Oh no I can't reproduce it notlikethis