Exemple #1
0
 public unsafe BlobAssetReference Build(ITreeNode <INodeDataBuilder>[] builders)
 {
     if (NodeType.IsZeroSizeStruct())
     {
         return(BlobAssetReference.Null);
     }
     using (var blobBuilder = new BlobBuilder(Allocator.Temp, UnsafeUtility.SizeOf(NodeType)))
     {
         var dataPtr = blobBuilder.ConstructRootPtrByType(NodeType);
         Build(dataPtr, blobBuilder, builders);
         return(blobBuilder.CreateReferenceByType(NodeType));
     }
 }