Hello!
TLDR version:
Can I make Game Object a child of the entity?
What is a best way to link entity (converted from Game Object) components to monobehaviour script and vice versa? (for example how to add translation component to the list in game manager monobehaviour)
I am working on a way for game object to be a sort of a child of the entity (so I can handle all physic/ collision etc. in the ECS and some things for VR in the game objects to not complicate things. And probably animation in GO in future). I could not see a way to make it off the shelf, so I wanted to do this myself. I cannot properly make a link between parent entity and child game object. I have:
-[GenerateAuthoringComponent] public struct C_FIX_GAMEOBJECT IComponentData that stores values that I want from entity (translation and rotation)
-public class A_FIX_GAMEOBJECT_START : MonoBehaviour that runs at awake, before conversion to entity. It supposed to link Game Object and entity in outside script, but does not work
-public class A_FIX_GAMEOBJECT : MonoBehaviour that stores lists of game objects and entities, and updates the transform of the Game Objects.
Edit:
My solution for this is:
-create entity prefab from Game Object with GameObjectConversionUtility.ConvertGameObjectHierarchy(,)
-Instantiate entity with prefab and keep reference to it
-Add all links to/ from entity that I need.