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

Remote scene tree: Unable to see internal Objects of extended Resource unless it's under an array #41442

Open
Tracked by #47369
Rubonnek opened this issue Aug 22, 2020 · 2 comments

Comments

@Rubonnek
Copy link
Member

Godot version:
3.2 branch at commit 9bf5a0b

OS/device including version:
Arch Linux

Issue description:
Internal Object of an extended Resource is not visible on remote view unless the remote Resource object is inside an array or a dictionary as far as I can tell.

Steps to reproduce:
Consider the following class:

tool
extends Resource
class_name AnAwesomeResource

var unseen_resource_in_inspector : Reference

func _init():
    resource_name = "AnAwesomeResourceName"
	unseen_resource_in_inpsector = Reference.new()

func _to_string() -> String:
       return "[" + get_name() + " ID: " + str(get_instance_id()) + "]"
  1. Open the attached project.
  2. On the Scene tab click the only node on the scene.
  3. Checkout the exported looks_good variable in Inspector -- it's of type AnAwesomeResource and we can't see the unseen_resource_in_inspector through Inspector variable which is fine.
  4. Press F6 to run the scene.
  5. Click on "Remote" under the Scene tab to see the remote scene.
  6. Click on the Node2D node.
  7. Look at Inspector -- the looks_good variable still has the correct resource name, however its internal member variables can't be seen on the Inspector.
  8. Click on can_see_internal_member array, and double click the only Object it contains --- the unseen_resource_in_inspector can now be seen because AnAwesomeResource lives inside an Array.

Minimal reproduction project:
RemoteResourceView.zip

Additional Notes
Related:
#41427
#40758

@davcri
Copy link
Contributor

davcri commented Jan 16, 2021

I want to highlight another strange behaviour:

  1. download the minimal reproduction project
  2. remove the assigned resource in the inspector
  3. update the script to initialize the resource programmatically:
func _init():
   looks_good = AnAwesomeResource.new()
   can_see_internal_members.push_back(looks_good)
  1. run the scene
  2. check the inspector

Result:

  • looks_good seems empty (but it's not)
  • can_see_internal_members displays the Resource correctly

image

@willnationsdev
Copy link
Contributor

willnationsdev commented Feb 1, 2021

I'm not sure why, but my build with #44879 shows the looks_good as having a value when I run your second example (the "strange behavior"). None of the internal properties appear though.

Now, when I change it to export(AnAwesomeResource) and properly mark the unseen property as exported (since it won't appear in the Inspector without that), then it appears in the local Inspector. The unseen property also appears in the remote inspector, but the Inspector shows it to be empty even though the _init() function should theoretically be giving it a value.

This doesn't appear to be related to my PR directly though. Seems like some sort of difference between the remote inspector and the local one. Or the Inspector when looking at remote vs local objects (not sure how the remote stuff is all implemented).

@Rubonnek Rubonnek self-assigned this Mar 6, 2021
@Calinou Calinou changed the title Unable to see internal Objects of extended Resource unless it's under an array Remote scene tree: Unable to see internal Objects of extended Resource unless it's under an array Mar 25, 2021
@Rubonnek Rubonnek removed their assignment Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants