godotengine / godot-demo-projects

Demonstration and Template Projects
https://godotengine.org
MIT License
5.44k stars 1.52k forks source link

2.5d Demo is not fully ported from Godot 3.5 to 4.0 #1040

Closed chrisl8 closed 2 months ago

chrisl8 commented 2 months ago

Which demo project is affected:

2.5D Demo with GDScript

OS/device including version:

Godot v4.3.dev (1f0f81049) - Windows 10.0.22621 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3080 Ti (NVIDIA; 31.0.15.5186) - AMD Ryzen 9 5900X 12-Core Processor (24 Threads)

Issue description:

This project is not entirely ported from Godot 3.5 to 4.0.

In Godot 3.5, there is this extra editor screen that allows you to view the scene in various perspectives within the editor: image

However, this is entirely missing in the 4.0 version. Further, there are quite a few calls to functions that don't exist anymore in 4.0.

  res://addons/node25d/main_screen/gizmo_25d.gd:9 - Parse Error: Could not find type "Node25D" in the current scope.
  res://addons/node25d/main_screen/gizmo_25d.gd:64 - Parse Error: Identifier "Node25D" not declared in the current scope.
  res://addons/node25d/main_screen/gizmo_25d.gd:73 - Parse Error: Identifier "Node25D" not declared in the current scope.
  res://addons/node25d/main_screen/gizmo_25d.gd:73 - Parse Error: Identifier "Node25D" not declared in the current scope.
  modules\gdscript\gdscript.cpp:2859 - Failed to load script "res://addons/node25d/main_screen/gizmo_25d.gd" with error "Parse error". (User)
  res://addons/node25d/main_screen/viewport_25d.gd:80 - Parse Error: Could not find type "Node25D" in the current scope.
  modules\gdscript\gdscript.cpp:2859 - Failed to load script "res://addons/node25d/main_screen/viewport_25d.gd" with error "Parse error". (User)
  Unable to open file: res://.godot/imported/node_25d_icon.png-2ad780313818706789bbb15408797db2.ctex.
  Failed loading resource: res://.godot/imported/node_25d_icon.png-2ad780313818706789bbb15408797db2.ctex. Make sure resources have been imported by opening the project in the editor at least once.
  Failed loading resource: res://addons/node25d/icons/node_25d_icon.png. Make sure resources have been imported by opening the project in the editor at least once.
  Unable to open file: res://.godot/imported/y_sort_25d_icon.png-48050bfa8b299992a68b4f1e12bd5d44.ctex.
  Failed loading resource: res://.godot/imported/y_sort_25d_icon.png-48050bfa8b299992a68b4f1e12bd5d44.ctex. Make sure resources have been imported by opening the project in the editor at least once.
  Failed loading resource: res://addons/node25d/icons/y_sort_25d_icon.png. Make sure resources have been imported by opening the project in the editor at least once.
  Unable to open file: res://.godot/imported/shadow_math_25d_icon.png-f286bd905218b9a04121a430c1fdd042.ctex.
  Failed loading resource: res://.godot/imported/shadow_math_25d_icon.png-f286bd905218b9a04121a430c1fdd042.ctex. Make sure resources have been imported by opening the project in the editor at least once.
  Failed loading resource: res://addons/node25d/icons/shadow_math_25d_icon.png. Make sure resources have been imported by opening the project in the editor at least once.
  Unable to open file: res://.godot/imported/viewport_25d.svg-5df077fb699779f821141e20086cbf11.ctex.
  Failed loading resource: res://.godot/imported/viewport_25d.svg-5df077fb699779f821141e20086cbf11.ctex. Make sure resources have been imported by opening the project in the editor at least once.
  Failed loading resource: res://addons/node25d/icons/viewport_25d.svg. Make sure resources have been imported by opening the project in the editor at least once.
  res://addons/node25d/node25d_plugin.gd:18 - Parse Error: Could not preload resource file "res://addons/node25d/icons/node_25d_icon.png".
  res://addons/node25d/node25d_plugin.gd:19 - Parse Error: Could not preload resource file "res://addons/node25d/icons/y_sort_25d_icon.png".
  res://addons/node25d/node25d_plugin.gd:20 - Parse Error: Could not preload resource file "res://addons/node25d/icons/shadow_math_25d_icon.png".
  res://addons/node25d/node25d_plugin.gd:47 - Parse Error: Could not preload resource file "res://addons/node25d/icons/viewport_25d.svg".
  modules\gdscript\gdscript.cpp:2859 - Failed to load script "res://addons/node25d/node25d_plugin.gd" with error "Parse error". (User)
  res://addons/node25d/node25d_plugin.gd:10 - Invalid assignment of property or key 'editor_interface' with value of type 'EditorInterface' on a base object of type 'ColorRect (viewport_25d.gd)'.

This is also likely the cause of This is also the cause of https://github.com/godotengine/godot-demo-projects/issues/1016

I am starting on the process of finishing the port of this code to 4.0 so that the screen from 3.5 shows up in 4.0, but if anyone else gets to it first I would not be offended.

chrisl8 commented 2 months ago

UPDATE: I think that I almost have this fixed. I will make a PR soon. I have it working, just need to clear out a few errors that I'm still getting.

aaronfranke commented 2 months ago

Thanks!

TheOpponent commented 4 days ago

I'm unable to open the 2.5D panel in 4.3-beta2 with the current commit of this demo. The 2.5D tab appears but its contents are completely blank, and this error is logged when the project is opened:

  res://addons/node25d/node25d_plugin.gd:10 - Trying to assign value of type 'VBoxContainer' to a variable of type 'Panel'.

0015309

I also get the same errors in the first post with 4.2.2-stable.

Calinou commented 4 days ago

I fixed the incorrect static typing in https://github.com/godotengine/godot-demo-projects/commit/7223aec0012ba5f89b7f9f28a65e91abb30be0cc, so the demo should open correctly in 4.3.beta now.

The demo was saved in 4.3 since https://github.com/godotengine/godot-demo-projects/pull/1041, so it can't be opened in 4.2.