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. Dismiss Notice

Bug TransformUsageFlags.Dynamic doesnt exist

Discussion in 'Entity Component System' started by Hazzel, May 23, 2023.

  1. Hazzel

    Hazzel

    Joined:
    Feb 26, 2022
    Posts:
    14
    Hello,

    i am following a tutorial and there is GetEntity(TransformUsageFlags.Dynamic) beeing used, but Visual studio says :

    upload_2023-5-23_23-52-54.png

    Code (CSharp):
    1. public class BrainBaker : Baker<BrainMono>
    2. {
    3.     public override void Bake(BrainMono authoring)
    4.     {
    5.         var brainEntity = GetEntity(TransformUsageFlags.Dynamic);
    6.         AddComponent<BrainTag>(brainEntity);
    7.         AddComponent(brainEntity, new BrainHealth { Value = authoring.BrainHealth, Max = authoring.BrainHealth });
    8.         AddBuffer<BrainDamageBufferElement>(brainEntity);
    9.     }
    10. }
     
  2. Hazzel

    Hazzel

    Joined:
    Feb 26, 2022
    Posts:
    14
    nvm wrong entitis version, fixed it