Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Resolved Scheduling job with custom code from ISystem

Discussion in 'Entity Component System' started by xVergilx, Aug 8, 2022.

  1. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,292
    With SystemBase, you could use "this."Job.WithCode;

    How to schedule a custom job from the ISystem?

    Edit: Okay, time to stop working for today;
    Use "new LambdaSingleJobDescription()" or write a non-lambda custom job.
     
    Last edited: Aug 8, 2022
  2. bilalakil

    bilalakil

    Joined:
    Jan 28, 2018
    Posts:
    68
    Curious, did this work for you in a
    [BurstCompile] ISystem.OnUpdate
    ?
     
  3. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,292
    Haven't tried burst compiling main thread of ISystem's yet, because a lot of stuff is not really compatible yet with Burst.
    Such as native collections (e.g. scheduled Dispose and such). So no idea.
     
    Last edited: Aug 10, 2022
    bilalakil likes this.