Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

[NetCode] GhostAuthoringComponent can't generate generic component data?

Discussion in 'NetCode for ECS' started by khalid_mightybear, Feb 28, 2020.

  1. khalid_mightybear

    khalid_mightybear

    Joined:
    Sep 10, 2017
    Posts:
    36
    Code (CSharp):
    1. public struct ItemToBeUsedComponent<T> : IBufferElementData where T : struct, IComponentData
    2. {
    3.       public T ComponentData;
    4. }
    and
    Code (CSharp):
    1. dstManager.AddBuffer<ItemToBeUsedComponent<HealthKitComponent>>(entity);
    would end up as

    Code (CSharp):
    1. private ComponentType componentTypeItemToBeUsedComponent`1[[Project.Mixed.HealthKitComponent, Project.Mixed, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]];
    in GhostSerializer.cs