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

SceneReference bugs out OnValidate when selecting a prefab asset in the project view. #106

Open
TheXRMonk opened this issue Nov 24, 2020 · 0 comments

Comments

@TheXRMonk
Copy link

Reproduce;

  1. Create a gameobject, add a MonoBehaviour script with;
    [SerializeField] private SceneReference sceneReference;
  2. Make the GO into a prefab.
  3. Select the prefab asset in the project view.
  4. Add a scene to the reference.
  5. deselect and reselect the prefab asset.
  6. Unity gets stuck in what looks like an OnValidate loop.
  7. .....
  8. Loss?

If it indeed is due to OnValidate being run somewhere, we need something like;
UnityEditor.EditorUtility.IsPersistent(gameObject)
or
gameObject.scene.IsValid()

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