Skip to content

Compilation error on Unity2021.3.0~Unity2021.3.17. #690

@Akeit0

Description

@Akeit0

FindAnyObjectByType was added in version 2021.3.18 so it causes a compilation error in versions 2021.3.0~2021.3.17.

static LifetimeScope Find(Type type)
{
#if UNITY_2020_4_OR_NEWER || UNITY_2021_4_OR_NEWER || UNITY_2022_3_OR_NEWER || UNITY_2021_3_OR_NEWER
return (LifetimeScope)FindAnyObjectByType(type);
#else
return (LifetimeScope)FindObjectOfType(type);
#endif
}

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