Description:
When using SceneAttribute, it currently finds references in all additively opened scenes.
However, I believe it should only search for references within the scene where the ValidatedMonoBehaviour is located. This is because Unity doesn't support cross-scene references in edit mode anyway.
Expected behavior:
SceneAttribute should limit its search to the same scene that contains the object being validated.
Steps to reproduce:
- Open two scenes additively in the editor.
- Use
SceneAttribute on a field in a ValidatedMonoBehaviour in Scene A.
- Assign a reference from Scene B.
- Field has `Scene mismatch' "value".
Suggested fix:
Filter found references so only those from the same Scene as the target GameObject are considered valid.
Description:
When using
SceneAttribute, it currently finds references in all additively opened scenes.However, I believe it should only search for references within the scene where the
ValidatedMonoBehaviouris located. This is because Unity doesn't support cross-scene references in edit mode anyway.Expected behavior:
SceneAttributeshould limit its search to the same scene that contains the object being validated.Steps to reproduce:
SceneAttributeon a field in aValidatedMonoBehaviourin Scene A.Suggested fix:
Filter found references so only those from the same
Sceneas the targetGameObjectare considered valid.