Work around parser regression in latest Godot 4 beta
This commit is contained in:
		
							parent
							
								
									9636d23dd0
								
							
						
					
					
						commit
						7526e60037
					
				| @ -15,13 +15,13 @@ enum PaintSlot { | ||||
| 	PAINT_3, | ||||
| } | ||||
| 
 | ||||
| var _albedo_maps: Array[Texture2D] = [null, null, null, null] | ||||
| var _albedo_maps: Array[Texture2D] = [] | ||||
| 
 | ||||
| var _material := ShaderMaterial.new() | ||||
| 
 | ||||
| var _mesh := PlaneMesh.new() | ||||
| 
 | ||||
| var _normal_maps: Array[Texture2D] = [null, null, null, null] | ||||
| var _normal_maps: Array[Texture2D] = [] | ||||
| 
 | ||||
| ## | ||||
| ## Range of the height channel value, ranging from [code]0.0[/code] to [code]100.0[/code]. | ||||
| @ -54,6 +54,11 @@ var size := Vector2i.ONE: | ||||
| 		size = value | ||||
| 
 | ||||
| func _init() -> void: | ||||
| 	var paint_channels := PaintSlot.values().size() | ||||
| 
 | ||||
| 	_albedo_maps.resize(paint_channels) | ||||
| 	_normal_maps.resize(paint_channels) | ||||
| 
 | ||||
| 	_material.shader = _SHADER | ||||
| 
 | ||||
| 	_mesh.surface_set_material(0, _material) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user