Is Debug.Log string objects in Burst job

I know that string literal were ok in burst job but Im not seeing any errors using string objects. Is this supported now or is my bust job quietly pouting ?

Read the manual!

https://docs.unity3d.com/Packages/com.unity.burst@1.3/manual/index.html#language-support

Under Partial support for strings and Debug.Log

1 Like

I did indeed read the manual, this is why I’m confused. Im passing in object.value with no burst errors after update to 2020.1 etc

Mmmm Even ToString() is not giving me any errors …idk

Show code if you think something is wrong

I gave up last night trying to break this , i just check out my project and restarted unity which now gives me an error but this was the job. I still dont know why it worked … looong shot … maybe it something to do with it being a generic job and maybe burst never actually ran … Idk

public struct GetColorMap : IMeshFactory<int>
{
    [ReadOnly] public BlobAssetReference<GraphData> GraphInput; 
    [ReadOnly] public BlobAssetReference<IntTableData> TableInput;
    [ReadOnly] public NativeArray<int> InputX; 
    [ReadOnly] public NativeArray<int> InputY;
    [ReadOnly] public NativeArray<int> Input; 
    [WriteOnly] public NativeHashMap<int, int> Output; 

    public bool IsDone(int index)
    {
        if (InputX.Length <= 0) return true;
        return index >= Input.Length;
    }

    public void SetOutput(int index, )
    {
        Debug.Log( "Break me " +  index);
        int3 verts = GetGraphTriangleVertices(ref GraphInput, Input[index]);
        for (var i = 0; i < 3; i++)
        {
            var key = verts[i];
            var value = DataTableUtils.GetIntFromTable(InputX[key], InputY[0], TableInput.Value.TableWidth, ref TableInput.Value.TableData);
            Output.TryAdd(key, value);
        }
    }
}

Thank you Thank you!! SOOOO Much!