godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.6k stars 21.28k forks source link

4-rc6: adding godot-xr-tools to project gives some one-time errors #74122

Open flobotics opened 1 year ago

flobotics commented 1 year ago

Godot version

4.0.rc6

System information

win 11

Issue description

 Cannot open file 'res://.import/Hand_Glove_L.gltf-ac6c06fe48ca0d7ce0f9faffd177a897.scn'.
  Cannot open file 'res://.import/Hand_Glove_low_L.gltf-7b94b12c0dff159d494da6cafd52895d.scn'.
  Cannot open file 'res://.import/Hand_Glove_low_R.gltf-c32907596b2287c95aff0e704780ef3d.scn'.
  Cannot open file 'res://.import/Hand_Glove_R.gltf-0e99922c663867da8d37af9597ab1ce8.scn'.
  Cannot open file 'res://.import/hand_l.gltf-6ba1595ac4c28aef3719b7f0b4f2f4f2.scn'.
  Cannot open file 'res://.import/Hand_low_L.gltf-a83bdf9115e4fb62c63deabade61cbbb.scn'.
  Cannot open file 'res://.import/Hand_low_R.gltf-8b164aff014e5c5bfa2eccc8e40e7e97.scn'.
  Cannot open file 'res://.import/Hand_Nails_L.gltf-22452b307072e9d363b1f547e2b6a365.scn'.
  Cannot open file 'res://.import/Hand_Nails_low_L.gltf-60d8096917582bfe1d760ff1ad173fc8.scn'.
  Cannot open file 'res://.import/Hand_Nails_low_R.gltf-7d9fc9507def4b4fd9c10cdae7aa6e11.scn'.
  Cannot open file 'res://.import/Hand_Nails_R.gltf-35869d6a39400588d95465aa5e3b528d.scn'.
  Cannot open file 'res://.import/hand_r.gltf-dd429687cadefbc3e7a21ae26addfb30.scn'.
  res://addons/godot-xr-tools/assets/resource_queue/resource_queue.gd:52 - Parse Error: Static function "load_interactive()" not found in base "ResourceLoader".
  res://addons/godot-xr-tools/assets/resource_queue/resource_queue.gd:83 - Parse Error: Could not find type "ResourceInteractiveLoader" in the current scope.
  res://addons/godot-xr-tools/assets/resource_queue/resource_queue.gd:99 - Parse Error: Could not find type "ResourceInteractiveLoader" in the current scope.
  res://addons/godot-xr-tools/assets/resource_queue/resource_queue.gd:120 - Parse Error: Could not find type "ResourceInteractiveLoader" in the current scope.
  res://addons/godot-xr-tools/assets/resource_queue/resource_queue.gd:163 - Parse Error: Too many arguments for "start()" call. Expected at most 2 but received 3.
  res://addons/godot-xr-tools/assets/resource_queue/resource_queue.gd:163 - Parse Error: Invalid argument for "start()" function: argument 1 should be "Callable" but is "XRToolsResourceQueue".
  res://addons/godot-xr-tools/assets/resource_queue/resource_queue.gd:163 - Parse Error: Cannot pass a value of type "String" as "Thread.Priority".
  res://addons/godot-xr-tools/assets/resource_queue/resource_queue.gd:163 - Parse Error: Invalid argument for "start()" function: argument 2 should be "Thread.Priority" but is "String".
  res://addons/godot-xr-tools/assets/resource_queue/resource_queue.gd:200 - Parse Error: Could not find type "ResourceInteractiveLoader" in the current scope.
  res://addons/godot-xr-tools/misc/velocity_averager.gd:28 - Parse Error: Function "Transform()" not found in base self. Did you mean to use "Transform3D()"?
  res://addons/godot-xr-tools/misc/velocity_averager.gd:28 - Parse Error: Cannot infer the type of "_last_transform" variable because the value doesn't have a set type.
  res://addons/godot-xr-tools/misc/velocity_averager.gd:62 - Parse Error: Could not find type "Transform" in the current scope.
  res://addons/godot-xr-tools/misc/velocity_averager.gd:70 - Parse Error: Cannot infer the type of "linear_distance" variable because the value doesn't have a set type.
  res://addons/godot-xr-tools/misc/velocity_averager.gd:73 - Parse Error: Cannot infer the type of "angular_distance" variable because the value doesn't have a set type.
  res://addons/godot-xr-tools/misc/velocity_averager_linear.gd:26 - Parse Error: Function "Transform()" not found in base self. Did you mean to use "Transform3D()"?
  res://addons/godot-xr-tools/misc/velocity_averager_linear.gd:26 - Parse Error: Cannot infer the type of "_last_transform" variable because the value doesn't have a set type.
  res://addons/godot-xr-tools/misc/velocity_averager_linear.gd:58 - Parse Error: Could not find type "Transform" in the current scope.
  res://addons/godot-xr-tools/misc/velocity_averager_linear.gd:66 - Parse Error: Cannot infer the type of "linear_distance" variable because the value doesn't have a set type.
  res://addons/godot-xr-tools/misc/vr_common_shader_cache.gd:0 - Parse Error: Could not find base class "Spatial".
  res://addons/godot-xr-tools/objects/interactable_body.gd:0 - Parse Error: Could not find base class "PhysicsBody".
  res://addons/godot-xr-tools/xr_tools.gd:128 - Parse Error: The function signature doesn't match the parent. Parent signature is "find_children(String, String = <default>, bool = <default>, bool = <default>) -> Array[Node]".
  res://addons/godot-xr-tools/xr_tools.gd:155 - Parse Error: The function signature doesn't match the parent. Parent signature is "find_child(String, bool = <default>, bool = <default>) -> Node".
--Main Shader--
    1 | shader_type spatial;
E   2-> render_mode depth_test_disable, skip_vertex_transform, unshaded;
    3 | 
    4 | uniform vec4 color : hint_color = vec4(0.0, 0.0, 0.0, 1.0);
    5 | uniform float radius = 1.0;
    6 | uniform float fade = 0.05;
    7 | 
    8 | varying float dist;
    9 | 
   10 | void vertex() {
   11 |  vec3 v = VERTEX;
   12 |  dist = length(v);
   13 | 
   14 |  
   15 |  if (dist < 1.5) {
   16 |  
   17 |  dist = radius;
   18 |  v *= dist;
   19 | 
   20 |  
   21 |  vec4 eye = PROJECTION_MATRIX * vec4(0.0, 0.0, 100.0, 1.0);
   22 | 
   23 |  
   24 |  v.xy += eye.xy / eye.z;
   25 |  }
   26 |  POSITION = vec4(v, 1.0);
   27 | }
   28 | 
   29 | void fragment() {
   30 |  ALBEDO = color.rgb;
   31 |  ALPHA = clamp((dist - radius) / fade, 0.0, 1.0);
   32 | }
   33 | 
  :2 - Ungültiger Rendermodus: ‚depth_test_disable‘.
  Shader compilation failed.
res://addons/godot-xr-tools/hands/textures/african_baseColor.png: Verwendung der Textur in 3D festgestellt. Mipmap-Erzeugung wurde aktiviert und der Texturkompressionsmodus auf VRAM Compressed (S3TC/ETC/BPTC) gesetzt.
res://addons/godot-xr-tools/hands/textures/hands_occlusionRoughnessMetallic.png: Verwendung der Textur in 3D festgestellt. Mipmap-Erzeugung wurde aktiviert und der Texturkompressionsmodus auf VRAM Compressed (S3TC/ETC/BPTC) gesetzt.
res://addons/godot-xr-tools/hands/textures/african_realistic_baseColor.png: Verwendung der Textur in 3D festgestellt. Mipmap-Erzeugung wurde aktiviert und der Texturkompressionsmodus auf VRAM Compressed (S3TC/ETC/BPTC) gesetzt.
res://addons/godot-xr-tools/hands/textures/hands_normal.png: Verwendung der Textur in 3D festgestellt. Mipmap-Erzeugung wurde aktiviert und der Texturkompressionsmodus auf VRAM Compressed (S3TC/ETC/BPTC) gesetzt.
res://addons/godot-xr-tools/hands/textures/caucasian_baseColor.png: Verwendung der Textur in 3D festgestellt. Mipmap-Erzeugung wurde aktiviert und der Texturkompressionsmodus auf VRAM Compressed (S3TC/ETC/BPTC) gesetzt.
res://addons/godot-xr-tools/hands/textures/caucasian_realistic_baseColor.png: Verwendung der Textur in 3D festgestellt. Mipmap-Erzeugung wurde aktiviert und der Texturkompressionsmodus auf VRAM Compressed (S3TC/ETC/BPTC) gesetzt.
res://addons/godot-xr-tools/hands/textures/cleaning_glove_baseColor.png: Verwendung der Textur in 3D festgestellt. Mipmap-Erzeugung wurde aktiviert und der Texturkompressionsmodus auf VRAM Compressed (S3TC/ETC/BPTC) gesetzt.
res://addons/godot-xr-tools/hands/textures/glove_occlusionRoughnessMetallic.png: Verwendung der Textur in 3D festgestellt. Mipmap-Erzeugung wurde aktiviert und der Texturkompressionsmodus auf VRAM Compressed (S3TC/ETC/BPTC) gesetzt.
res://addons/godot-xr-tools/hands/textures/glove_normal.png: Verwendung der Textur in 3D festgestellt. Mipmap-Erzeugung wurde aktiviert und der Texturkompressionsmodus auf VRAM Compressed (S3TC/ETC/BPTC) gesetzt.
res://addons/godot-xr-tools/hands/textures/glove_caucasian_green_camo.png: Verwendung der Textur in 3D festgestellt. Mipmap-Erzeugung wurde aktiviert und der Texturkompressionsmodus auf VRAM Compressed (S3TC/ETC/BPTC) gesetzt.
res://addons/godot-xr-tools/hands/textures/glove_african_dark_camo.png: Verwendung der Textur in 3D festgestellt. Mipmap-Erzeugung wurde aktiviert und der Texturkompressionsmodus auf VRAM Compressed (S3TC/ETC/BPTC) gesetzt.
res://addons/godot-xr-tools/hands/textures/glove_fingerless_occlusionRoughnessMetallic.png: Verwendung der Textur in 3D festgestellt. Mipmap-Erzeugung wurde aktiviert und der Texturkompressionsmodus auf VRAM Compressed (S3TC/ETC/BPTC) gesetzt.
res://addons/godot-xr-tools/hands/textures/glove_fingerless_normal.png: Verwendung der Textur in 3D festgestellt. Mipmap-Erzeugung wurde aktiviert und der Texturkompressionsmodus auf VRAM Compressed (S3TC/ETC/BPTC) gesetzt.
res://addons/godot-xr-tools/hands/textures/glove_african_green_camo.png: Verwendung der Textur in 3D festgestellt. Mipmap-Erzeugung wurde aktiviert und der Texturkompressionsmodus auf VRAM Compressed (S3TC/ETC/BPTC) gesetzt.
res://addons/godot-xr-tools/hands/textures/glove_caucasian_dark_camo.png: Verwendung der Textur in 3D festgestellt. Mipmap-Erzeugung wurde aktiviert und der Texturkompressionsmodus auf VRAM Compressed (S3TC/ETC/BPTC) gesetzt.
res://addons/godot-xr-tools/hands/textures/labglove_baseColor.png: Verwendung der Textur in 3D festgestellt. Mipmap-Erzeugung wurde aktiviert und der Texturkompressionsmodus auf VRAM Compressed (S3TC/ETC/BPTC) gesetzt.
--Main Shader--
    1 | shader_type spatial;
E   2-> render_mode specular_schlick_ggx, async_visible;
    3 | 
    4 | uniform vec4 Color : hint_color;
    5 | 
    6 | 
    7 | 
    8 | void vertex() {
    9 | 
   10 | 
   11 | }
   12 | 
   13 | void fragment() {
   14 | 
   15 |  vec3 n_out2p0 = Color.rgb;
   16 |  float n_out2p1 = Color.a;
   17 | 
   18 | 
   19 |  float n_out4p0 = 0.100000;
   20 | 
   21 | 
   22 |  vec3 n_out3p0 = n_out2p0 * vec3(n_out4p0);
   23 | 
   24 | 
   25 |  float n_in5p3 = 1.00000;
   26 |  float n_out5p0 = pow(1.0 - clamp(dot(NORMAL, VIEW), 0.0, 1.0), n_in5p3);
   27 | 
   28 | 
   29 |  vec3 n_out6p0 = n_out2p0 * vec3(n_out5p0);
   30 | 
   31 | 
   32 |  ALBEDO = n_out3p0;
   33 |  EMISSION = n_out6p0;
   34 | 
   35 | }
   36 | 
   37 | void light() {
   38 | 
   39 | 
   40 | }
   41 | 
  :2 - Ungültiger Rendermodus: ‚async_visible‘.
  Shader compilation failed.
res://addons/godot-xr-tools/images/teleport_target.png: Verwendung der Textur in 3D festgestellt. Mipmap-Erzeugung wurde aktiviert und der Texturkompressionsmodus auf VRAM Compressed (S3TC/ETC/BPTC) gesetzt.
res://addons/godot-xr-tools/images/ring.png: Verwendung der Textur in 3D festgestellt. Mipmap-Erzeugung wurde aktiviert und der Texturkompressionsmodus auf VRAM Compressed (S3TC/ETC/BPTC) gesetzt.

Steps to reproduce

add godot-xr-tools addon folder to your project

Minimal reproduction project

add godot-xr-tools addon folder to your project

BastiaanOlij commented 1 year ago

@Malcolmnixon something to look into.

@flobotics is this just the first time you run Godot after installing XR tools? It is known that Godot 4 has some issues with dependencies not loading in the right order until it's build its caches. That should only be an editor issue. But if there is more going on we'll need to investigate further.

flobotics commented 1 year ago

hi, i now use godot-xr-tools-4.0 , now after adding the addons folder to my project i get this messages:

    Cannot open file 'res://.godot/imported/Hand_Glove_L.gltf-ac6c06fe48ca0d7ce0f9faffd177a897.scn'.
  Cannot open file 'res://.godot/imported/Hand_Glove_low_L.gltf-7b94b12c0dff159d494da6cafd52895d.scn'.
  Cannot open file 'res://.godot/imported/Hand_Glove_low_R.gltf-c32907596b2287c95aff0e704780ef3d.scn'.
  Cannot open file 'res://.godot/imported/Hand_Glove_R.gltf-0e99922c663867da8d37af9597ab1ce8.scn'.
  Cannot open file 'res://.godot/imported/hand_l.gltf-6ba1595ac4c28aef3719b7f0b4f2f4f2.scn'.
  Cannot open file 'res://.godot/imported/Hand_low_L.gltf-a83bdf9115e4fb62c63deabade61cbbb.scn'.
  Cannot open file 'res://.godot/imported/Hand_low_R.gltf-8b164aff014e5c5bfa2eccc8e40e7e97.scn'.
  Cannot open file 'res://.godot/imported/Hand_Nails_L.gltf-22452b307072e9d363b1f547e2b6a365.scn'.
  Cannot open file 'res://.godot/imported/Hand_Nails_low_L.gltf-60d8096917582bfe1d760ff1ad173fc8.scn'.
  Cannot open file 'res://.godot/imported/Hand_Nails_low_R.gltf-7d9fc9507def4b4fd9c10cdae7aa6e11.scn'.
  Cannot open file 'res://.godot/imported/Hand_Nails_R.gltf-35869d6a39400588d95465aa5e3b528d.scn'.
  Cannot open file 'res://.godot/imported/hand_r.gltf-dd429687cadefbc3e7a21ae26addfb30.scn'.
  res://addons/godot-xr-tools/player/player_body.gd:433 - Parse Error: Identifier "XRToolsUserSettings" not declared in the current scope.
  res://addons/godot-xr-tools/functions/movement_turn.gd:111 - Parse Error: Identifier "XRToolsUserSettings" not declared in the current scope.
  res://addons/godot-xr-tools/user_settings/user_settings_ui.gd:9 - Parse Error: Identifier "XRToolsUserSettings" not declared in the current scope.
  res://addons/godot-xr-tools/user_settings/user_settings_ui.gd:12 - Parse Error: Identifier "XRToolsUserSettings" not declared in the current scope.
  res://addons/godot-xr-tools/user_settings/user_settings_ui.gd:15 - Parse Error: Identifier "XRToolsUserSettings" not declared in the current scope.
  res://addons/godot-xr-tools/user_settings/user_settings_ui.gd:23 - Parse Error: Identifier "XRToolsUserSettings" not declared in the current scope.
  res://addons/godot-xr-tools/user_settings/user_settings_ui.gd:30 - Parse Error: Identifier "XRToolsUserSettings" not declared in the current scope.
  res://addons/godot-xr-tools/user_settings/user_settings_ui.gd:32 - Parse Error: Identifier "XRToolsUserSettings" not declared in the current scope.
  res://addons/godot-xr-tools/user_settings/user_settings_ui.gd:36 - Parse Error: Identifier "XRToolsUserSettings" not declared in the current scope.
  res://addons/godot-xr-tools/user_settings/user_settings_ui.gd:37 - Parse Error: Identifier "XRToolsUserSettings" not declared in the current scope.
  res://addons/godot-xr-tools/user_settings/user_settings_ui.gd:42 - Parse Error: Identifier "XRToolsUserSettings" not declared in the current scope.
  res://addons/godot-xr-tools/user_settings/user_settings_ui.gd:46 - Parse Error: Identifier "XRToolsUserSettings" not declared in the current scope.
  res://addons/godot-xr-tools/user_settings/user_settings_ui.gd:59 - Parse Error: Identifier "XRToolsUserSettings" not declared in the current scope.
  res://addons/godot-xr-tools/user_settings/user_settings_ui.gd:60 - Parse Error: Identifier "XRToolsUserSettings" not declared in the current scope.
  res://addons/godot-xr-tools/user_settings/user_settings_ui.gd:64 - Parse Error: Identifier "XRToolsUserSettings" not declared in the current scope.
  Expected Image data size of 925x100x1 (DXT5 RGBA8 with 9 mipmaps) = 125536 bytes, got 125552 bytes instead.
  drivers/gles3/storage/texture_storage.cpp:925 - Condition "image->is_empty()" is true. Returning: Ref<Image>()

When i then look into project settings and enable the plugin and xr and restart, i get this output. This output comes every time i re-open this project.

Godot Engine v4.0.stable.official (c) 2007-present Juan Linietsky, Ariel Manzur & Godot Contributors.
  Cannot open file 'res://openxr_action_map.tres'.
  Failed loading resource: res://openxr_action_map.tres. Make sure resources have been imported by opening the project in the editor at least once.
  modules/gltf/register_types.cpp:70 - Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
--- Debug adapter server started ---
--- GDScript language server started ---
Autoload hinzufügen
  Expected Image data size of 925x100x1 (DXT5 RGBA8 with 9 mipmaps) = 125536 bytes, got 125552 bytes instead.
  drivers/gles3/storage/texture_storage.cpp:925 - Condition "image->is_empty()" is true. Returning: Ref<Image>()

but i can build a simple VR app for windows which is running.

BastiaanOlij commented 1 year ago

Make sure you enable the XR tools plugin in project settings. XRToolsUserSettings is in an autoloaded script that needs to be setup, it will add the needed changes to your project when the plugin is enabled.

KoBeWi commented 1 year ago

Is this maybe fixed on stable?

rhiskey commented 1 year ago

Same issue in player_body.gd Parser Error: Identifier "XRToolsUserSettings" not declared in the current scope.

image

rhiskey commented 1 year ago

@flobotics @BastiaanOlij You need to manually enable plugin in Project Settings and issue will be gone! image

Next open the Project menu and select Project Settings... Now go to the Plugins tab and enable the plugin. Check docs: https://docs.godotengine.org/en/stable/tutorials/xr/introducing_xr_tools.html#installing-xr-tools

rhiskey commented 1 year ago

@flobotics Try to reenable XR Tools and add in autoload UserSettings image

BastiaanOlij commented 1 year ago

@rhiskey indeed as I mentioned in https://github.com/godotengine/godot/issues/74122#issuecomment-1469220427 you have to enable the plugin. The autoload entry is automatically configured if you do this. Note that you have doubled up on it so that could cause you problems. You only need the XRToolsUserSettings one.

It's our most heard complaint of XRTools users that installing plugins don't enable them, things thus break, and there is nothing alerting you. You have to read the manual, which most people don't know exists as nothing points them in that direction. You are far from the first, and will be far from the last user to be tripped up by this.

Note that you can find help on the plugin here: https://godotvr.github.io/godot-xr-tools/docs/setup/

BastiaanOlij commented 1 year ago

Check docs: https://docs.godotengine.org/en/stable/tutorials/xr/introducing_xr_tools.html#installing-xr-tools

Oh right, I had forgotten I added some basic info about XR Tools in the Godot manuals, that is a little more visible but still people often don't realise we have that :)