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

Runtime exception in TypeManager.ClearStaticTypeLookup with generic types

Discussion in 'Entity Component System' started by Justin_Larrabee, Apr 23, 2019.

  1. Justin_Larrabee

    Justin_Larrabee

    Joined:
    Apr 24, 2018
    Posts:
    106
    I've updated to preview 30 and I am getting InvalidOperationExceptions thrown from ClearStaticTypeLookup. The exceptions only occur for generic IComponentData structs and IComponentData structs contained within an abstract generic component system.
     
  2. Piefayth

    Piefayth

    Joined:
    Feb 7, 2017
    Posts:
    61
  3. Justin_Larrabee

    Justin_Larrabee

    Joined:
    Apr 24, 2018
    Posts:
    106
    Well glad it's not just me.

    Not supporting generic IComponentData definitely adds some tedium for some patterns of use. I have some abstract generic systems that do simple tasks like initializing entities. They use private inner IComponentData to then use as an exclusion criteria in their EntityQuery. Nothing fancy, but now I'll need to break my simple abstraction to get rid of the generic IComponentData...
     
    felipin likes this.