Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Bug Converting prefab to DOTS Entity

Discussion in '2020.2 Beta' started by AldoSama, Sep 29, 2020.

  1. AldoSama

    AldoSama

    Joined:
    Mar 29, 2020
    Posts:
    3
    Hello,

    I have a very small project that was working correctly on unity 2020.1, but its bugged when I migrated to 2020.2.

    Basically the only part that doesn't work is the conversion of a prefab into an entity:

    Code (CSharp):
    1. var entityPrefab = GameObjectConversionUtility.ConvertGameObjectHierarchy(playerPrefab, GameObjectConversionSettings.FromWorld(World.DefaultGameObjectInjectionWorld, null));
    2.  
    3. var entity = em.Instantiate(entityPrefab);
    4. em.AddComponentData(entity , new Translation { Value = new float3(3, -3.22f, 3) });
    5. em.AddComponentData(entity , new Rotation { Value = quaternion.EulerXYZ(new float3(0f, 45f, 0f)) });
    The entity is correctly created because I can see it in the dots inspector and my camera system is still following it when I update his position, but nothing is displayed on the screen. It's supposed to be a default cylinder.

    Can someone help me please?
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Hi @AldoSama,

    Could you please submit a bug report with your project and reproduction steps attached and reply in here with the issue ID?
     
  3. AldoSama

    AldoSama

    Joined:
    Mar 29, 2020
    Posts:
    3
    Hello @LeonhardP,

    The issue ID is : Case 1282760

    Thanks.
     
    LeonhardP likes this.
  4. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Thanks a lot, we'll have a look.