OctoD / godot-gameplay-systems

βš”οΈ A plugin for Godot to create your gameplay systems in a Godot way.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ› [bug] plugin fail to load scripts and icons after 4.2 relocatability change

danielbernard opened this issue Β· comments

Describe the bug
Loading plugin from AssetLib fails to load on 4.2, indicating that load'ed scripts and files failed.

To Reproduce

  1. Create empty project
  2. Add GGS from AssetLib
  3. Enable plugin and relaunch editor or reload project
  4. See error:
  Attempt to open script 'res://./nodes/camera_shake.gd' resulted in error 'File not found'.
  Failed loading resource: res://./nodes/camera_shake.gd. Make sure resources have been imported by opening the project in the editor at least once.
  It's not a reference to a valid Script object.
  Attempt to open script 'res://./nodes/2d/point_and_click_2d.gd' resulted in error 'File not found'.
  Failed loading resource: res://./nodes/2d/point_and_click_2d.gd. Make sure resources have been imported by opening the project in the editor at least once.
  It's not a reference to a valid Script object.
  Attempt to open script 'res://./nodes/3d/point_and_click_3d.gd' resulted in error 'File not found'.
  Failed loading resource: res://./nodes/3d/point_and_click_3d.gd. Make sure resources have been imported by opening the project in the editor at least once.
  It's not a reference to a valid Script object.
  Attempt to open script 'res://./nodes/2d/interactable_area_2d.gd' resulted in error 'File not found'.
  Failed loading resource: res://./nodes/2d/interactable_area_2d.gd. Make sure resources have been imported by opening the project in the editor at least once.
  Resource file not found: res://./assets/InteractableArea2D.png (expected type: )
  It's not a reference to a valid Script object.
  Attempt to open script 'res://./nodes/3d/interactable_area_3d.gd' resulted in error 'File not found'.
  Failed loading resource: res://./nodes/3d/interactable_area_3d.gd. Make sure resources have been imported by opening the project in the editor at least once.
  Resource file not found: res://./assets/InteractableArea2D.png (expected type: )
  It's not a reference to a valid Script object.
  Attempt to open script 'res://./nodes/2d/interaction_raycast_2d.gd' resulted in error 'File not found'.
  Failed loading resource: res://./nodes/2d/interaction_raycast_2d.gd. Make sure resources have been imported by opening the project in the editor at least once.
  Resource file not found: res://./assets/InteractionRayCast2DIcon.png (expected type: )
  It's not a reference to a valid Script object.
  Attempt to open script 'res://./nodes/3d/interaction_raycast_3d.gd' resulted in error 'File not found'.
  Failed loading resource: res://./nodes/3d/interaction_raycast_3d.gd. Make sure resources have been imported by opening the project in the editor at least once.
  Resource file not found: res://./assets/InteractionRayCast3DIcon.png (expected type: )
  It's not a reference to a valid Script object.
  Attempt to open script 'res://./nodes/interaction_manager.gd' resulted in error 'File not found'.
  Failed loading resource: res://./nodes/interaction_manager.gd. Make sure resources have been imported by opening the project in the editor at least once.
  Resource file not found: res://./assets/InteractionIcon.png (expected type: )
  It's not a reference to a valid Script object.
  Attempt to open script 'res://./resources/interaction.gd' resulted in error 'File not found'.
  Failed loading resource: res://./resources/interaction.gd. Make sure resources have been imported by opening the project in the editor at least once.
  Resource file not found: res://./assets/InteractionIcon.png (expected type: )
  It's not a reference to a valid Script object.

Expected behavior
Plugin should load normally without error.

Desktop (please complete the following information):

  • OS: Windows 11
  • Godot version: 4.2 rc2

Reproducible project
Happens even on a clone of this repository

Proposed fix
I was able to remedy this by adjusting the load calls in the _enter_tree() functions within the plugin.gd files.
Addressed in subsequent pull request.

closed by #46