why mesh loaded via load() is not displayed in Godot?

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

why mesh loaded via load() is not displayed in Godot? How do I import a file located on the C:/, D:/ or E:/? If I use this code:

$PlayerMesh.mesh = load("D://Player.vox")

So I have an import error that requires me to import this file, how do I fix it (import this file)?

:bust_in_silhouette: Reply From: Inces

Just move the mesh to any subfolder of your resproject folder

I’m sorry, but it seems you didn’t understand me. Do you mean I should copy the file from D:// to res://?

roma | 2023-01-21 01:24

yes, open your Project folder, find res:// there and paste your mesh here. It will appear in editor, with options for custom import

Inces | 2023-01-21 09:46

I think you did not understand my question. The user will select a file in his file system, and the program, already exported in exe, will import it. I know how to transfer resources for game objects to res://))) But I need access to files that will be outside of res:// and user://. Can I import without moving it to res://? Because Godot Engine says it can find the file but can’t use it because it doesn’t have an .import file to use in the project.

roma | 2023-01-21 15:02

You are right, I didn’t understand this problem.
I don’t think load will solve this kind of task, but maybe You could try to open this file using Directoryfunctionality.
If it won’t work, I would suggest uploading mesh to res folder, and manually copying .import file that will appear there after running your project.

Inces | 2023-01-22 12:00

Sorry, but I meant that the player will create the Mesh file for the player skin himself. I don’t know what kind of file it will be, so I can’t move it to res, run it and import it to .import. Is it possible to make an .import file through some function by specifying the path to the Mesh file?

roma | 2023-01-22 12:12