Skip to content

SceneAttribute finds references across all loaded scenes instead of current one #41

@ANU-CHEEKI-BREEKI

Description

@ANU-CHEEKI-BREEKI

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:

  1. Open two scenes additively in the editor.
  2. Use SceneAttribute on a field in a ValidatedMonoBehaviour in Scene A.
  3. Assign a reference from Scene B.
  4. Field has `Scene mismatch' "value".

Suggested fix:

Filter found references so only those from the same Scene as the target GameObject are considered valid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions