Search Unity

Job.WithCode Deprecated Warning

Discussion in 'Entity Component System' started by JupiterOP, May 30, 2020.

  1. JupiterOP

    JupiterOP

    Joined:
    Mar 5, 2019
    Posts:
    6
    I'm creating a simple system that inherits SystemBase and after following the basic setup for Job.WithCode, from here, I get a deprecated warning in Visual Studio. I can still run the code. Should I be using something else or is this just a bug? I'm using Jobs 0.2.10 and entities 0.11.0.

    Code (CSharp):
    1. Job.WithCode(() => { }).Schedule();
     
  2. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
    From mobile now, but iirc it deprecated (Schedule naming) as we have ScheduleSingle and ScheduleParallel, which much more clear than Schedule.
     
  3. vildauget

    vildauget

    Joined:
    Mar 10, 2014
    Posts:
    121
    Neither documentation nor change log for Entities mention this change for Job.WithCode, but I do recall seeing some post from Joacim about these kind of name changes - though my search power eludes me.
     
  4. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
    Now I'm on PC. Where you exact found deprecation for
    Job.WithCode(() => { }).Schedule() 
    in SystemBase? Source code haven't anything about deprecation Schedule for WithCode. And Rider doesn't tell that for WithCode.
     
  5. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    I doesn't see any deprecation warnings in SystemBase and Job.WithCode
     
  6. joepl

    joepl

    Unity Technologies

    Joined:
    Jul 6, 2017
    Posts:
    87
    Yes, Job.WithCode.Schedule should not be deprecated. If you get that error again can you send the text of the deprecation warning and your version of Visual Studio?