Search Unity

On Android, is there a way to ensure the PostUpdateCommands buffer in a ComponentSystem is created?

Discussion in 'Entity Component System' started by moxiewhimsy, Sep 16, 2019.

  1. moxiewhimsy

    moxiewhimsy

    Joined:
    Nov 13, 2013
    Posts:
    3
    Right now, the desktop code works as expected. On Android the PostUpdateCommands buffer isn't created. I'm guessing this is to reduce overhead, but is there a way to turn it on for a specific ComponentSystem? So far, the best solution I've seen is to make an EntityCommandBuffer (which is redundant on desktop).

    Edit 1: To clarify what I used to narrow my debug, I've put a message in before the error occurs and it shows
    Code (CSharp):
    1. PostUpdateCommands.IsCreated
    returns true in both editor and desktop, and returns false in the android build.
     
    Last edited: Sep 26, 2019
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    It works exactly the same on desktop and android.

    Have you stopped your code being stripped?
     
  3. moxiewhimsy

    moxiewhimsy

    Joined:
    Nov 13, 2013
    Posts:
    3
    Thanks for the suggestion. It did not solve my issue.