Skip to content

[Question] Document.ConvertTo<T>() for Derived classes #1262

Closed
@TaejunPark

Description

@TaejunPark

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2020.3.12f1.590.2
  • Firebase Unity SDK version: 8.9.0
  • Source you installed the SDK: .unitypackage
  • Problematic Firebase Component: Firestore
  • Other Firebase Components in use: Auth, Storage,
  • Additional SDKs you are using: -
  • Platform you are using the Unity editor on: Mac
  • Platform you are targeting: iOS, Android
  • Scripting Runtime: IL2CPP

[REQUIRED] Please describe the question here:

Hello,
Thank you for your time.

I am trying to use derived classes for Firestore Unity and got stuck.
my code is like this:


[FirestoreData]
public class SchdeuleRecord
{
    [FirestoreProperty] public List<RoundRecord> RoundRecords { get; set; }
}

[FirestoreData]
public abstract class RoundRecord {}

[FirestoreData]
public class RoundRecordA : RoundRecord {}

[FirestoreData]
public class RoundRecordB : RoundRecord {}

When I: document.ConvertTo< SchdeuleRecord >()
I seems not working. not giving any message at all.
I guess it is because of my derived classes, as I tried this in other cases

is there any way I can convert RoundRecord to
RoundRecordA & RoundRecordB ,
of List ??
if there were any overloading method on class creation, it would be great.
I know Firebase is the one greatest tool for Unity

Thank you!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions