Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added passing of data between staged scenes #509

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

Malcolmnixon
Copy link
Collaborator

This pull request allows optional data to be passed between scenes. The default handler of this data will use it to try and override the spawn-point of the player. The specifics of this pull request are:

  • Added passing of data between staged scenes
  • Added passing of user_data between scenes.
  • Added default handling of string/vector3/transform3d user_data as spawn-point.
  • Added extended documentation about staging signals and methods.
  • Modified demo teleporter to support optional spawn-point data.

Copy link
Member

@BastiaanOlij BastiaanOlij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, just some nitpicking issues.

My only worry is breakage on XRToolsSceneBase.scene_loaded. If someone has implemented their own code in an extended scene, GDScript will not call that because it hasn't got the user_data parameter now defined in it.

We should probably add a minor-breakage tag in the VERSIONS.md file.

We probably should think of how we want to maintain small footnotes about this in our releases (and since I copy those from VERSIONS.md maybe there as well) to instruct users to make minor changes like this.

Added passing of user_data between scenes.
Added default handling of string/vector3/transform3d user_data as spawn-point.
Added extended documentation about staging signals and methods.
Modified demo teleporter to support optional spawn-point data.
Add minor-breakage comment to VERSIONS.md.
Disable warnings for unused parameters on interface functions intended for overriding.
Added support for user_data objects with "get_spawn_position" method.
@Malcolmnixon
Copy link
Collaborator Author

I added a bolded minor-breakage at the start of the VERSIONS.md line to highlight the change.

@Malcolmnixon Malcolmnixon merged commit ab13127 into GodotVR:master Aug 21, 2023
2 checks passed
@Malcolmnixon Malcolmnixon deleted the staging-spawn-data branch August 21, 2023 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants