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

potential bug: a field to a scriptableobject with [Expandable]/[GetScriptableObject] lost its reference to that SO #78

Closed
laurentopia opened this issue Aug 22, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@laurentopia
Copy link

It happened after I upgraded to latest saintsfields so it could be a problem

@TylerTemp
Copy link
Owner

This might not be a problem of expandable, but GetScriptableObject, well, which at least happened to my project.

Kinda difficult to locate what caused it though, need some time to figure it out

@TylerTemp TylerTemp changed the title potential bug: a field to a scriptableobject with [Expandable] lost its reference to that SO potential bug: a field to a scriptableobject with [Expandable]/[GetScriptableObject] lost its reference to that SO Aug 22, 2024
@TylerTemp TylerTemp self-assigned this Aug 22, 2024
@TylerTemp TylerTemp added the bug Something isn't working label Aug 22, 2024
@TylerTemp
Copy link
Owner

This issue might be because of a value comparison bug which has been fixed in 3.4.0

I'll leave this issue open for another month. If no problem found then I'll close it as fixed. (But if the issue still occurs, I'll open it again)

@TylerTemp
Copy link
Owner

Update about this issue:

if the target is a prefab but the prefab is put directly inside a scene, the value will be lost.

@laurentopia
Copy link
Author

Ah ok that's a problem. I think it's how Unity handles reference. Could you maybe add a warning in such conditions? To help prevent hard to find errors.

@TylerTemp
Copy link
Owner

Ah ok that's a problem. I think it's how Unity handles reference. Could you maybe add a warning in such conditions? To help prevent hard to find errors.

Sorry for the misleading... When I post that reply I indeed find a bug that makes it not working on prefab.

That bug has been fixed, but not quite sure it's that bug that lead all this. So this issue is still pending. I need some more time to investigate on it.

TylerTemp added a commit that referenced this issue Nov 1, 2024
@TylerTemp
Copy link
Owner

TylerTemp commented Nov 2, 2024

Hi,

3.4.9 fixes a bug which related to [Expandable] in IMGUI, that a SerializedObject did not get cached and led to problem.

This issue might be related to that. (Also might be related to #60 )

Please upgrade to 3.4.9 to check if the bug is gone.

Thanks

@laurentopia
Copy link
Author

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants