Hello!
I'm wondering something. Why can't we do this (it does an error saying that Burst can't read from non-readonly static variables) :
[BurstCompile]
class Test{
public static NativeArray<int> someArray;
[BurstCompile]
public static int Function(){
return someArray[0];
}
public void CallFunction{
Function();
}
}
if we can do that :
[BurstCompile]
class Test{
public static NativeArray<int> someArray;
[BurstCompile]
public static int Function(ref NativeArray<int> someArray){
return someArray[0];
}
public void CallFunction{
Function(ref someArray);
}
}
?
It does the same right? But it's so annoying to have to pass everything with ref 😫