Beispiel #1
0
        public BlobAssetReference Build(ITreeNode <INodeDataBuilder>[] builders)
        {
            var minSize = UnsafeUtility.SizeOf <T>();

            if (minSize == 0)
            {
                return(BlobAssetReference.Null);
            }
            using (var blobBuilder = new BlobBuilder(Allocator.Temp, minSize))
            {
                ref var data = ref blobBuilder.ConstructRoot <T>();
                Build(blobBuilder, ref data, builders);
                return(blobBuilder.CreateReference <T>());
            }