Search Unity

Disabling safety checks on native containers in editor

Discussion in 'Entity Component System' started by snacktime, May 6, 2018.

  1. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    So first off I tried using NativeDisableContainerSafetyRestriction attribute, but it seems to have no effect or at least not enough to measure. Is there a way to disable these globally in the editor?
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Do you have a specific code example of where you expected it to work but it didn't?
     
  3. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Example would be the docs example with the exception that the NativeArray is declared in a class not a job struct. Well actually I have several contexts some jobs some not.