firebase / firebase/quickstart-unity

Initialization of the static member of FirebaseAnalytics(Unity)

Open
#741 4 comments 0 reactions 0 assignees View on GitHub
api: analytics type: feature request
Dominant language
C#
Stars
923
Forks
456
PR merge metrics
No merged PRs in 30d

Description

we find this:
![BAED4EB4-8B36-4B0B-B794-2BA659C41452](https://user-images.githubusercontent.com/68526116/88617689-dba13300-d0c9-11ea-8e43-f75b3667125f.png)

But I think we should use lazy initialization here, like this:
![817A0C8A-06EF-49C1-800C-336D86305002](https://user-images.githubusercontent.com/68526116/88617802-1acf8400-d0ca-11ea-9bac-3435c0e84251.png)

why do i report this issue:
we hava a analytics wrapper for FirebaseAnalytics, and there is a static map here:
![BFE8C602-C3FA-44D2-A44C-6505DD205397](https://user-images.githubusercontent.com/68526116/88618056-bbbe3f00-d0ca-11ea-8849-f37c45f837de.png)
but when we use the public static member of FirebaseAnalytics, it constructs a FirebaseApp first, which is not expected, due to the static member FirebaseAnalytics.app
(As you say, we must check dependencies first, then construct the app~)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.