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

Exported PackedArrays are consistently reset in open scenes on script reload #97156

Open
imp0s5ible opened this issue Sep 18, 2024 · 0 comments

Comments

@imp0s5ible
Copy link

imp0s5ible commented Sep 18, 2024

Tested versions

v4.3.stable.official [77dcf97]

System information

Godot v4.3.stable - Windows 10.0.22621 - Vulkan (Forward+) - dedicated AMD Radeon RX 5700 XT (Advanced Micro Devices, Inc.; 31.0.24031.5001) - AMD Ryzen 9 3950X 16-Core Processor (32 Threads)

Issue description

If you save/touch a script that exports a PackedArray (I have tested Float32/64, Int32/64 and Color), then when reloading the script the editor silently resets the array to the default value given in the script in any scene that's opened.

I have tested and this does not occur with regular Array[float] or other Arrays.

If the undo history has modifications to the exported array, you can go back to that and then back to the present to restore it.

Minimum reproduction script:

class_name ArrayTester extends Node

@export var arr : PackedFloat64Array = [1, 2, 3]

Steps to reproduce

  1. Create an empty project
  2. Insert a node in the scene
  3. Attach the above script to the node
  4. Touch or save the script file to cause a reload (no need to make any actual modifications)
  5. Focus the editor window

Minimal reproduction project (MRP)

Reproducible in an empty project

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

No branches or pull requests

1 participant