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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Resolved codegen insists abstract classes be partial (wait, that's illegal!)

Discussion in 'Entity Component System' started by OUTTAHERE, May 18, 2022.

  1. OUTTAHERE

    OUTTAHERE

    Joined:
    Sep 23, 2013
    Posts:
    658
    I have a couple of abstract classes inheriting from SystemBase and am upgrading to Entities 0.50 (finally!)

    Code (CSharp):
    1. [UpdateInGroup(typeof(GameSimulationGroup))]
    2. public abstract class SimSystemBase : SystemBase
    CodeGen insists I make them partial; unfortunately, abstract classes cannot be partial.

    The compiler is not amused. :)
     
  2. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    3,993
  3. OUTTAHERE

    OUTTAHERE

    Joined:
    Sep 23, 2013
    Posts:
    658
    I thought so but... maybe my compiler is just having a longer time to get started than myself this morning.
     
  4. runner78

    runner78

    Joined:
    Mar 14, 2015
    Posts:
    761
    Maybe you got the order wrong?

    Code (CSharp):
    1. //wrong
    2. public  partial abstract class Test {
    3. }
    4.  
    5. //correct
    6. public abstract partial class Test {
    7. }
     
    OUTTAHERE likes this.
  5. OUTTAHERE

    OUTTAHERE

    Joined:
    Sep 23, 2013
    Posts:
    658
    Maybe I'm taking longer than my compiler to get started this morning. :D
     
    apkdev, thelebaron, Razmot and 5 others like this.