Firebase查询方法不适用于我,我似乎找不到任何方法

时间:2019-06-24 09:53:19

标签: c# firebase unity3d firebase-realtime-database

查询不包含“ once”的定义,也没有可访问的扩展方法“ once”。也许我真的很愚蠢,但是与此同时我遇到了很多问题。

这是供数据库检查的用户(如果未创建用户或加载其数据)是否已经存在。

DatabaseReference databaseReference = FirebaseDatabase.DefaultInstance.RootReference;
        databaseReference.Child("users").OrderByChild("users").once("value", snapshot =>
        {
            if (snapshot.exists())
            {
                GetUserData(user);
            }

        });

1 个答案:

答案 0 :(得分:0)

'--with-gmp=PATHNAME' '--with-gmp-include=PATHNAME' '--with-gmp-lib=PATHNAME' '--with-mpfr=PATHNAME' '--with-mpfr-include=PATHNAME' '--with-mpfr-lib=PATHNAME' '--with-mpc=PATHNAME' '--with-mpc-include=PATHNAME' '--with-mpc-lib=PATHNAME' If you want to build GCC but do not have the GMP library, the MPFR library and/or the MPC library installed in a standard location and do not have their sources present in the GCC source tree then you can explicitly specify the directory where they are installed ('--with-gmp=GMPINSTALLDIR', '--with-mpfr=MPFRINSTALLDIR', '--with-mpc=MPCINSTALLDIR'). The '--with-gmp=GMPINSTALLDIR' option is shorthand for '--with-gmp-lib=GMPINSTALLDIR/lib' and '--with-gmp-include=GMPINSTALLDIR/include'. Likewise the '--with-mpfr=MPFRINSTALLDIR' option is shorthand for '--with-mpfr-lib=MPFRINSTALLDIR/lib' and '--with-mpfr-include=MPFRINSTALLDIR/include', also the '--with-mpc=MPCINSTALLDIR' option is shorthand for '--with-mpc-lib=MPCINSTALLDIR/lib' and '--with-mpc-include=MPCINSTALLDIR/include'. If these shorthand assumptions are not correct, you can use the explicit include and lib options directly. You might also need to ensure the shared libraries can be found by the dynamic linker when building and using GCC, for example by setting the runtime shared library path variable ('LD_LIBRARY_PATH' on GNU/Linux and Solaris systems). 方法仅存在于Firebase实时数据库的JavaScript SDK中。

Unity客户端中的等效项是once(),如reading data once上的文档所示。

从那里:

GetValueAsync