How can I get the type of the Keys (

Hello,

I can't find a way to get the proper type of my remote config server data.

Lets assume I have an INT, that is named "myInt" and has a value of "10"

If I query the ConfigManager if the key exists, it replay "true", because it does.

- ConfigManager.appConfig.HasKey("myInt"))

If I don't know what kind of Type (Bool, Int, Float, String, Long). I don't know what kind of type to query from.

I can query all the types, and all the types return me a "10" value:

print("GetBool(myInt) = " + ConfigManager.appConfig.GetBool("myInt"));
print("GetInt(myInt) = " + ConfigManager.appConfig.GetInt("myInt"));
print("GetFloat(myInt) = " + ConfigManager.appConfig.GetFloat("myInt"));
print("GetString(myInt) = " + ConfigManager.appConfig.GetString("myInt"));

How can I get the types of my Keys?

P.S: I can get all the keys with:

string[ ] aAllMyKeys = ConfigManager.appConfig.GetKeys();

But I don't know its type, help please

You as the developer already know the type that you created. Can you describe your use case?

Sure, I am creating an Asset for the asset store, so I don't know what my customers will create, I am trying to download and have all the keys, in the first load, to present the server data to the user in an object in the inspector.

That way you can have in the game all the options (a pretty UI) and in the inspector, so I can use local data or remote data within a simple interphase.

But I don't know what kind of info is in the catalogue, I just know the keys, and all the GetDataType returns the same data.

Was I clear?

[quote=“VrGamesDev”, post:3, topic: 840268]
Sure, I am creating an Asset for the asset store, so I don’t know what my customers will create, I am trying to download and have all the keys, in the first load, to present the server data to the user in an object in the inspector.

That way you can have in the game all the options (a pretty UI) and in the inspector, so I can use local data or remote data with a single interphase.

But I don’t know what kind of info is in the catalogue, I just know the keys, and all the GetDataType returns the same data.

Was I clear?
[/quote]
Yes, makes perfect sense, thanks. You might be able to use the REST API to get that info https://remote-config-api-docs.uca.cloud.unity3d.com/

For example, I report what is available and the value in a report in html, but I need to know the data type

7126694--851369--Screen Shot 2021-05-10 at 11.10.46.png

[quote=“VrGamesDev”, post:5, topic: 840268]
For example, I report what is available and the value in a report in html, but I need to know the data type
[/quote]
It looks like the Config API returns the datatype, I haven’t tested.

[quote=“JeffDUnity3D”, post:4, topic: 840268]
Yes, makes perfect sense, thanks. You might be able to use the REST API to get that info https://remote-config-api-docs.uca.cloud.unity3d.com/
[/quote]
I already read all the REST API.

And I can’t find any method or way to get the keys… May I ask for a more detailed URL where to find it?

[quote=“VrGamesDev”, post:7, topic: 840268]
I already read all the REST API.

And I can’t find any method or way to get the keys… May I ask for a more detailed URL where to find it?
[/quote]
You may be right, if you’ve already looked at the Config api section. I’ll ask the team too.

Thanks a lot, I appreciate your quick responses

Actually it is the Get Configs API:

"The Remote Config web APIs require authentication via Unity's APIs. To authenticate with Unity, use a Unity account with permission to access the appropriate Organization and Project (manage accounts and roles in the developer dashboard). In the POST payload below, replace [username] and [password] with your Unity account login information."

I already checked, and I don't want to ask my users to provide its unity login / pass to my asset so it can get the type data.

Is there another way to get the type of the remote config Keys?

[quote=“VrGamesDev”, post:11, topic: 840268]
“The Remote Config web APIs require authentication via Unity’s APIs. To authenticate with Unity, use a Unity account with permission to access the appropriate Organization and Project (manage accounts and roles in the developer dashboard). In the POST payload below, replace [username] and [password] with your Unity account login information.”

I already checked, and I don’t want to ask my users to provide its unity login / pass to my asset so it can get the type data.
Is there another way to get the type of the remote config Keys?
[/quote]
Not at this time, I have mentioned this feature request to engineering.

[quote=“JeffDUnity3D”, post:12, topic: 840268]
Not at this time, I have mentioned this feature request to engineering.
[/quote]

Thanks a lot, it is easy for my own environment and games (like you said, I already know what type is, I created it), not that comfortable to ask for a user

[quote=“VrGamesDev”, post:13, topic: 840268]
Thanks a lot, it is easy for my own environment and games (like you said, I already know what type is, I created it), not that comfortable to ask for a user
[/quote]
But it’s a one time configuration, and it’s in the developer’s Editor and on their system with their username and password, correct? How are you allowing them to set their keys and values?

[quote=“JeffDUnity3D”, post:14, topic: 840268]
But it’s a one time configuration, and it’s in the developer’s Editor and on their system with their username and password, correct? How are you allowing them to set their keys and values?
[/quote]

I mean when you build the client

[quote=“VrGamesDev”, post:15, topic: 840268]
I mean when you build the client
[/quote]
Yes, I understand that. But if they are retrieving value datatypes, how did their data get there?