Search Unity

Cleanup for custom InjectionHook?

Discussion in 'Entity Component System' started by Justin_Larrabee, Nov 28, 2018.

  1. Justin_Larrabee

    Justin_Larrabee

    Joined:
    Apr 24, 2018
    Posts:
    106
    I have a data type I want to inject via a custom InjectionHook that would wrap a ComponentDataArray. I need to allocate a NativeList to contain additional state and then dispose of it after the OnUpdate call. Right now there does not appear to be any callbacks made in ComponentSystem.OnAfterUpdate to support this requirement. Am I missing something? Additionally, is there a way to have a custom injection get access to the PostUpdateCommands buffer?
     
  2. Spy-Shifty

    Spy-Shifty

    Joined:
    May 5, 2011
    Posts:
    546
    I don't really understand your case...
    Maybe you can give us a little bit of code.