public BlockInstance Build() { var blockInstanceInternal = new BlockInstanceInternal(); blockInstanceInternal.m_BlockHandle = block.handle; var returnTypeHandle = container.AddBlockInstanceInternal(blockInstanceInternal); return(new BlockInstance(container, returnTypeHandle)); }
internal extern FoundryHandle AddBlockInstanceInternal(BlockInstanceInternal blockInstance);
// private internal BlockInstance(ShaderContainer container, FoundryHandle handle) { this.container = container; this.handle = handle; this.blockInstance = container?.GetBlockInstance(handle) ?? BlockInstanceInternal.Invalid(); }