Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | lwtrante | |
Old Version | Published before Godot 3 was released. |
I try to load a mesh at runtime.
-----------------code below----
extends MeshInstance
func _ready():
set_fixed_process(true)
func _fixed_process(delta):
if Input.is_action_pressed("ui_accept"):
var res=load("res://Cone.msh")
self.set_mesh(res)
print("set mesh has been invoked")
When I press enter key, the old mesh disappeared and the new mesh also can’t appear
I edited codes part to look better.
volzhs | 2016-07-17 13:14