Skip to content

Instantly share code, notes, and snippets.

@jeffvella
Created April 6, 2020 14:20
Show Gist options
  • Select an option

  • Save jeffvella/98d35b4ecaab5ba93bbc4ba20e14d923 to your computer and use it in GitHub Desktop.

Select an option

Save jeffvella/98d35b4ecaab5ba93bbc4ba20e14d923 to your computer and use it in GitHub Desktop.
public class Test1 : SystemBase
{
protected override void OnUpdate()
{
var someCDFE = GetComponentDataFromEntity<Translation>();
int externalVal = 2;
Entities.ForEach((Entity e) =>
{
var a = someCDFE[e];
if (externalVal == 2)
throw new Exception("It Works!");
}).Run();
}
}
public class Test2 : SystemBase
{
protected override void OnUpdate()
{
var someCDFE = GetComponentDataFromEntity<Translation>();
Entities.ForEach((Entity e) =>
{
var a = someCDFE[e];
}).Run();
}
}
public class Test3 : SystemBase
{
protected override void OnUpdate()
{
int externalVal = 2;
Entities.ForEach((Entity e)=>
{
if (externalVal == 2)
throw new Exception("It Works!");
}).Run();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment