A function defined in BBMOD_MaterialPropertyBlock.gml
copy(_dest)
Shallowly copies properties into another material property block.
Name | Type | Description |
---|---|---|
_dest | Struct.BBMOD_MaterialPropertyBlock |
The material property block to copy properties into. |
Struct.BBMOD_MaterialPropertyBlock
Returns self
.
// Create one set of props
var _materialPropsA = new BBMOD_MaterialPropertyBlock();
_materialPropsA.set_float("u_fA", 1.0);
// Create a different set of props
var _materialPropsB = new BBMOD_MaterialPropertyBlock();
_materialPropsB.set_float("u_fB", 1.0);
// Override props B with props A
_materialPropsA.copy(_materialPropsB);
show_debug_message(_materialPropsA.get_names()); // Prints ["u_fA"]
show_debug_message(_materialPropsB.get_names()); // Also prints ["u_fA"]!
This removes properties that the other material property block has before this one's are copied into it!
Copyright © 2025, BlueBurn. Built on January 04, 2025 using GMDoc.