Use inline or burst compile attribute?

Hi there,
Noob here so hoping to get information from experienced folks…
I used to have methods like these as inline,however with burst compile, what should i do? remove inline or keep both or whats the right way when im using these methods in both job and non job ways…

     [MethodImpl(MethodImplOptions.AggressiveInlining), BurstCompile]
        public static int Calculate1DIndex(in int currentRow_or_y, in int currentColumn_or_x, in int columns_or_width)
        {
            return currentColumn_or_x + currentRow_or_y * columns_or_width;
        }

Don’t use BurstCompile on static methods unless you intend to use them in a function pointer or are trying to make a Burst-compiled entry point that isn’t a job. Static methods called from a Burst-compiled context are Burst-compiled, even without the attribute.

2 Likes

Ok so for above method, i should still be using inlining
and if i call this static method from Job System then it will automatically b bursted and if oop traditional C# then it will be inlined.

1 Like