Search Unity

SpriteRenderer required component for hybrid?

Discussion in 'Entity Component System' started by JooleanLogic, Apr 24, 2022.

  1. JooleanLogic

    JooleanLogic

    Joined:
    Mar 1, 2018
    Posts:
    447
    If I remove the SpriteRenderer component from an entity prefab, none of the other hybrid (MonoBehaviour) components get added during conversion.
    After some testing, it seems to be if you don't have at least one of the types from Unity.Entities.Conversion.CompanionComponentSupportedTypes on your GameObject, then none of the other hybrid components will get added.
    They all show up as missing.
    spriteA.png spriteB.png
    During conversion, I can add any MonoBehaviour class via AddComponentObject but only if I also have one of the required types on it?