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

Run after conversion process (Solved)

Discussion in 'Entity Component System' started by GameMadeByGamers, Mar 19, 2020.

  1. GameMadeByGamers

    GameMadeByGamers

    Joined:
    Nov 25, 2014
    Posts:
    54
    Sorry if there's documentations on that already , cant seem to find it.

    My problem is simple, i want to call a method that generate my NavigationGraph after all NodeDataComponent as been converted (Conversion done from authoring mono with IConvertGameObjectToEntity interface).

    Thanks in advance.
     
  2. brunocoimbra

    brunocoimbra

    Joined:
    Sep 2, 2015
    Posts:
    677
    You can use the UpdateInGroup attribute on your ConversionSystem, the order of the conversion-related groups are the following:
    Code (CSharp):
    1.  
    2. public class GameObjectDeclareReferencedObjectsGroup : ComponentSystemGroup { }
    3.  
    4. public class GameObjectBeforeConversionGroup : ComponentSystemGroup { }
    5. public class GameObjectConversionGroup : ComponentSystemGroup { }
    6. public class GameObjectAfterConversionGroup : ComponentSystemGroup { }
    7.  
    8. public class GameObjectExportGroup : ComponentSystemGroup { }
    source: https://gametorrahod.com/game-object-conversion-and-subscene/
     
  3. GameMadeByGamers

    GameMadeByGamers

    Joined:
    Nov 25, 2014
    Posts:
    54
    Thanks you
     
    brunocoimbra likes this.