godotengine / godot

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

Resource on Dictionary #92533

Open zzzamo opened 1 month ago

zzzamo commented 1 month ago

Tested versions

Issue is present in Godot_v4.3-dev6 I tested on Godot_v4.2.2-stable and it works Ok

System information

Windows 10 - Godot_v4.3-dev6

Issue description

Whenever I try adding Resource to a Dictionary it brings me this error

editor/editor_properties.cpp:1328 - Cannot reliably represent '-9223372002008496859' in the inspector, value is too large.

Steps to reproduce

  1. Add new Node
  2. Add a new script to the node
  3. Add 2 exports to the script and use _ready to assign resource to a value in the dictionary
    
    extends Node

@export var dictionary:Dictionary @export var resource:Resource

func _ready() -> void: dictionary[0] = resource


4. create new tres file from a Resource
5. put newly created tres file on the inspector under resource variable on node
6. run the application
7. go to remote tab on scene
8. select the node and look for the dictionary variable
9. expand it
10. you'll get the error mentioned before

### Minimal reproduction project (MRP)

[new-game-project.zip](https://github.com/godotengine/godot/files/15493859/new-game-project.zip)
matheusmdx commented 3 weeks ago

Bisecting points to #88231 as the culprit: image


Here is how the inspector would look in a normal build: Captura 2024-06-07 19-17-47-625220


And here how is looking with this bug: Captura 2024-06-07 19-18-45-399819


And the warning spam: Captura 2024-06-07 19-18-51-999889