Which function loads the finished material shader in MeshInstance3D ? (Godot 4)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By IG2

Which function loads the finished material shader (shader_1.tres) ?

MeshInstance3D > GeometryInstance3D > Geometry > MaterialOverride

extends MeshInstance3D

@onready var shaderA = preload("res://3d/Shader/material_shader_1.tres")

func _ready():
#	self. load material shader func ????????
	pass

Here’s a simple solution.
You need to create and save a material (name_material.tres)

extends MeshInstance3D


@onready var shaderA = preload("res://3d/Shader/material_shader_1.tres")

func _ready():

    self.material_override = shaderA

    pass

IG2 | 2023-01-07 13:57