var heightmap = material.get_shader_parameter("heightmap") as NoiseTexture2D
var noise = heightmap.noise as FastNoiseLite
noise.seed = randi()
But remember that ShaderMaterial, FastNoiseLite and NoiseTexture2D are Resources. Resources are shared by default. You’ll need to make them unique doing one of the following:
Enable Local to Scene in the Resource. This will make unique the resource when instantiating the scene (if the resource is shared between nodes in the same scene the copies won’t be made unique)
You need to get the ShaderMaterial you want to access from your MeshInstance3D or Mesh. It looks like you are using the GeometryInstance3D.material_override property so use that.
extends MeshInstance3D
func _ready():
var heightmap = material_override.get_shader_parameter("heightmap") as NoiseTexture2D
var noise = heightmap.noise as FastNoiseLite
noise.seed = randi()