mirror of
https://github.com/godotengine/godot.git
synced 2024-12-15 10:12:40 +08:00
7725ebf3d2
The path itself might not always be set in some cases, especially when the script is just created and is already in the resource cache. Using get_path() in this case gets the correct resource path. This also adds a null check for safety in case the path is incorrect or missing, to avoid a crash in the engine. |
||
---|---|---|
.. | ||
basis_universal | ||
bmp | ||
bullet | ||
camera | ||
csg | ||
cvtt | ||
dds | ||
denoise | ||
enet | ||
etcpak | ||
fbx | ||
freetype | ||
gdnative | ||
gdscript | ||
glslang | ||
gltf | ||
gridmap | ||
hdr | ||
jpg | ||
jsonrpc | ||
lightmapper_rd | ||
mbedtls | ||
meshoptimizer | ||
minimp3 | ||
mobile_vr | ||
mono | ||
msdfgen | ||
navigation | ||
ogg | ||
opensimplex | ||
opus | ||
pvr | ||
raycast | ||
regex | ||
squish | ||
svg | ||
text_server_adv | ||
text_server_fb | ||
tga | ||
theora | ||
tinyexr | ||
upnp | ||
vhacd | ||
visual_script | ||
vorbis | ||
webm | ||
webp | ||
webrtc | ||
websocket | ||
webxr | ||
xatlas_unwrap | ||
modules_builders.py | ||
register_module_types.h | ||
SCsub |