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 How to remove the NodeSetAttachment

Discussion in 'DOTS Animation' started by linfuqing, Jun 8, 2021.

  1. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    NodeSetAttachment is ISystemStateBufferElementData and added by GraphSystem.CreateNode,how can I remove it?
     
  2. NT_Ninetails

    NT_Ninetails

    Joined:
    Jan 21, 2018
    Posts:
    196
    looking at Unity's code it looks like they removed it as such:

    Code (CSharp):
    1.  if (attachments.Length == 0)
    2.                             em.RemoveComponent(contents.Entity, ComponentType.ReadWrite<NodeSetAttachment>());
    em = EntityManager
     
    Last edited: Jun 12, 2021
    linfuqing likes this.