naverz / zepeto-studio-kor

48 stars 8 forks source link

[1.5.1]: Copy of values from Zepeto Script in Inspector generated during Playmode #1069

Closed Deytooh closed 2 years ago

Deytooh commented 2 years ago

Please tell us the version of the ZEPETO World package. (You can check the version in Unity > Window > Package Manager.) ex) 1.5.1

Please tell us which version of the ZEPETO app is currently installed. (You can check the version in ZEPETO App > MY > Settings > Version.) It's done inside Unity

What features were you trying to implement? I want to save a prefab

What problem did you encounter? I cant copy values of Zepeto Script's variables show in the Inspector Int, float등등 is working, but arrays are not working. ( int[], float[] ... )

Please tell us your development environment. Unity

Please attach the implemented code. If you have a screenshot, please attach it.

public InfoLightmapIndex: int[]; public InfoLightmapOffsetScale: Vector4[];

I set the values here during the playmode ( so initially everything arrays are empty ) So after doing some things, arrays are being full image image

But when I try to save this as Prefab, or copy and paste the component, the arrays all become empty. Like that -> image

In debug mode it looks like that -> image

So I guess the problem is that the values from arrays added during runtime are NOT added to the ZepetoScript inside values.

jhslee commented 2 years ago

Hello @Deytooh! 👋

I'm currently having trouble reproducing your issue. If i'm understanding correctly, the issue should occur through the following steps:

  1. A script with array values are all set to its initial defaults.
  2. Press play, and modify those values during runtime.
  3. Save the prefab to a folder.
  4. Stop play and check that the values do not save and are reverted to their original values.

These are my variables at each step:

Initial Defaults:

Screen Shot 2022-08-03 at 2 51 14 PM

Runtime Modifications:

Screen Shot 2022-08-03 at 2 52 00 PM

Save to prefab, and checked values after stopping play:

Screen Shot 2022-08-03 at 2 52 13 PM Screen Shot 2022-08-03 at 2 52 26 PM

If theres any steps im missing to reproduce the issue, please let me know!

Deytooh commented 2 years ago

Hi ~~ !

Oh thank you very much !!

"2.Press play, and modify those values during runtime." For this second step, you need to modify the values during runtime but through script ! through the inspector it works, but if the values are modified through the script, it doesnt get updated

Deytooh commented 2 years ago

@jhslee Hey ~ Any update about this issue ? It is quite a problem 😢

Zepeto-TechEvangelist commented 2 years ago

Hello, it will be applied in the next version. thank you