#archived-unity-gaming-services

1 messages · Page 3 of 1

full flint
#

I make a call to my backend from Unity and return this:

//************************/
//*        GOOGLE        */
//************************/

//API Point for getting the Google login page url
app.get('/solcraft-alpha/auth/google', async (req, res) => {
    const authUrl = googleSignIn.GetGoogleAuthUrl();
    res.redirect(authUrl);
});

//API Point for exchange the Google Sign-in code for a token
app.get('/solcraft-alpha/auth/google-callback', async (req, res) => {
    var code = req.query.code;
    const idToken = await googleSignIn.GetGoogleIdToken(code);
    const redirectUrl = `http://127.0.0.1:3000/?code=${idToken}`;
    res.redirect(redirectUrl);
});
#

Then I fired up a local server and read the id token from the url

#

await AuthenticationService.Instance.SignInWithOpenIdConnectAsync("oidc-google", accessToken);

#

so when the user signs in the google api redirect to my "google-callback" page which is then redirected to the local server

#

that's using googleapis => https://www.npmjs.com/package/googleapis

sick hamlet
#

the purpose of the token google gives you is to make google api calls from the backend that are authorized for the user

#

it isn't to be a login mechanism

#

does that make sense

full flint
#

you can authenticate with Unity with that token

sick hamlet
#

this is really an arcane distinction, but it isn't meant to be a login mechanism

full flint
#

pretty much an authentication with google, the user links the unity game with his google account

sick hamlet
#

i mean i don't know exactly what the google platform services stuff said

#

you are redirecting to a local server to capture the token, that should be telling you that something is up

full flint
#

what do you mean?

#

From what I read, that how everyone is doing

sick hamlet
#

you would separately register your backend and Unity with GPS, and use the native login for the platform

#

well

#

i mean you can "just" save that token right

#

google gave it to you*

full flint
sick hamlet
#

that token authenticates the user. you're done at this stage. simply provide that token to your backend.

full flint
#

yep, that's what I should do, I was wondering if I can use any unity token instead

sick hamlet
#

you can use the google apis to validate it

#

you ought to be able to

#

but i dont' think you should

#

the way this is all set up

#

you would be expected to create your own user accounts

#

you would run an IdP

#

so you have a website that has a real Sign in with Google button

#

and you use some node shit to create a user account

#

from there, do whatever you want

full flint
#

that's the point of signing in with Unity, that's the user account creation

sick hamlet
#

you can use Oauth2/OIDC, you can use blah

#

unity created a thing to authenticate users to its services, not yours

full flint
#

yep but also if I can avoid storing user data I would

sick hamlet
#

if they don't want you to use their idToken - and based on what i'm reading, you ought to be able to use it, but as you've observed, the idToken is nowhere to be found - they don't have to

sick hamlet
#

in the OIDC model, everyone runs their own IdP

#

that's just how it goes

#

you can't handle google user account ephemera* like these access tokens like a token for a "service mesh" or a "zero trust API"

#

they're just not designed for that

#

i agree with you it's really painful

#

most people just want to not fuck with this stuff, and honestly, when they do go all in on OIDC, they almost always introduce one point of failure, like in your case doing a local server thing, that messes up the security model anyway

#

@full flint is this a webgl game?

#

also have you looked at unity player accounts?

full flint
#

desktop

#

the local server is not an issue, the token does not go through the internet doing so

sick hamlet
#

this should have probably been called IdToken

#

these usually have a sub or iss field, it won't say your website URI in it

#

it's important to understand why you can't reuse this thing - like i could just login to some other game's unity authorization service

#

do you see what i mean?

#

and send that token to your API

#

@full flint so if you reuse the unity token to authenticate with your thing, it's insecure

#

maybe that's unimportant to you

full flint
#

I agree sending tokens around is not so safe, even with https

#

it's not a good practice

sick hamlet
#

no

#

it's not the sending around part

#

it's using a token issued for one purpose for another purpose

#

anyway you can read about this stuff yourself

#

i gotta go

#

you can just ignore all this stuff

#

it's your call

#

it's not my thing

full flint
#

got some food for thoughts, good chatting with you

young drum
#

Hello I noticed that when using Anonymous accounts in Unity Cloud Save, when testing in the unity editor my Player ID suddenly changed, is that normal?

grizzled temple
#

I've uploaded a test-build on Unity.Play to share with team-members ... is there a way to password protect builds on play.unity ... or should I just go ahead and set up a private server?

upbeat falcon
tame bison
#

I'm trying to build a Linux Dedicated Server using Unity Cloud Build and I'm getting the following errors in IL2CPP:

[error] [2023-10-30T13:58:39Z - Unity] /BUILD_PATH/coreloop.sbgames_cyborgimmortal.linux-dedi9c606t/Library/Bee/artifacts/LinuxPlayerBuildProgram/il2cppOutput/cpp/Assembly-CSharp__2.cpp:22632:2: error: unknown type name 'Dictionary_2_tD1D99EF8DBFAF04525FC30992C1691570BEF8FDE'
[2023-10-30T13:58:39Z - Unity]         Dictionary_2_tD1D99EF8DBFAF04525FC30992C1691570BEF8FDE* V_15 = NULL;
[error] [2023-10-30T13:58:39Z - Unity] /BUILD_PATH/coreloop.sbgames_cyborgimmortal.linux-dedi9c606t/Library/Bee/artifacts/LinuxPlayerBuildProgram/il2cppOutput/cpp/Assembly-CSharp__2.cpp:22651:42: error: use of undeclared identifier 'Dictionary_2_tD1D99EF8DBFAF04525FC30992C1691570BEF8FDE'
[error] [2023-10-30T13:58:39Z - Unity] /BUILD_PATH/coreloop.sbgames_cyborgimmortal.linux-dedi9c606t/Library/Bee/artifacts/LinuxPlayerBuildProgram/il2cppOutput/cpp/Assembly-CSharp__2.cpp:22651:97: error: expected expression
[error] [2023-10-30T13:58:39Z - Unity] /BUILD_PATH/coreloop.sbgames_cyborgimmortal.linux-dedi9c606t/Library/Bee/artifacts/LinuxPlayerBuildProgram/il2cppOutput/cpp/Assembly-CSharp__2.cpp:22652:3: error: unknown type name 'Dictionary_2_tD1D99EF8DBFAF04525FC30992C1691570BEF8FDE'
[2023-10-30T13:58:39Z - Unity]                 Dictionary_2_tD1D99EF8DBFAF04525FC30992C1691570BEF8FDE* L_4 = V_15;
[error] [2023-10-30T13:58:39Z - Unity] /BUILD_PATH/coreloop.sbgames_cyborgimmortal.linux-dedi9c606t/Library/Bee/artifacts/LinuxPlayerBuildProgram/il2cppOutput/cpp/Assembly-CSharp__2.cpp:22653:5: error: use of undeclared identifier 'Dictionary_2_tD1D99EF8DBFAF04525FC30992C1691570BEF8FDE'
[2023-10-30T13:58:39Z - Unity]                 *(Dictionary_2_tD1D99EF8DBFAF04525FC30992C1691570BEF8FDE**)L_3 = L_4;
[error] [2023-10-30T13:58:39Z - Unity] /BUILD_PATH/coreloop.sbgames_cyborgimmortal.linux-dedi9c606t/Library/Bee/artifacts/LinuxPlayerBuildProgram/il2cppOutput/cpp/Assembly-CSharp__2.cpp:22653:61: error: expected expression
[2023-10-30T13:58:39Z - Unity]                 *(Dictionary_2_tD1D99EF8DBFAF04525FC30992C1691570BEF8FDE**)L_3 = L_4;
[error] [2023-10-30T13:58:39Z - Unity] /BUILD_PATH/coreloop.sbgames_cyborgimmortal.linux-dedi9c606t/Library/Bee/artifacts/LinuxPlayerBuildProgram/il2cppOutput/cpp/Assembly-CSharp__2.cpp:22654:38: error: use of undeclared identifier 'Dictionary_2_tD1D99EF8DBFAF04525FC30992C1691570BEF8FDE'
[2023-10-30T13:58:39Z - Unity]                 Il2CppCodeGenWriteBarrier((void**)(Dictionary_2_tD1D99EF8DBFAF04525FC30992C1691570BEF8FDE**)L_3, (void*)L_4);
[error] [2023-10-30T13:58:39Z - Unity] /BUILD_PATH/coreloop.sbgames_cyborgimmortal.linux-dedi9c606t/Library/Bee/artifacts/LinuxPlayerBuildProgram/il2cppOutput/cpp/Assembly-CSharp__2.cpp:22654:94: error: expected expression
[2023-10-30T13:58:39Z - Unity]                 Il2CppCodeGenWriteBarrier((void**)(Dictionary_2_tD1D99EF8DBFAF04525FC30992C1691570BEF8FDE**)L_3, (void*)L_4);
[2023-10-30T13:58:39Z - Unity] 8 errors generated.```

Any ideas?
upbeat falcon
#

Hi @daring wolf - I can help with this if you still need it. You mention that you have your base64 encoded string already. That's great - after that you have to call the token-exchange API to get your token like so

curl -X POST -H "Authorization: Basic <ENCODED_STRING>"  'https://services.api.unity.com/auth/v1/token-exchange?projectId=<PROJECT_ID>&environmentId=<ENVIRONMENT_ID>'

Then you can call other UGS endpoints with the token, e.g. call cloud save like so

curl -X POST 'https://cloud-save.services.api.unity.com/v1/data/projects/<PROJECT_ID>/players/<PLAYER_ID>/items' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "key":"test-key",
    "value": "test-value"
}'

The same counts for the other APIs listed for cloud save here https://services.docs.unity.com/cloud-save/v1/

daring wolf
# upbeat falcon Hi <@272046568293662720> - I can help with this if you still need it. You mentio...

Hi there, thanks
I'm not quite sure how I got it working in the end, I think it was that I wasn't including a body identifying the permissions I needed.
But either way I got it working now and even have my rudimentary inventory item importer setup to upload json arrays of inventory items 🙂
The documentation is certainly helpful though it took me a little time to realise that sometimes requests need the access token and sometimes they only work with the id+key b74 pair and not the token.
Next function for my admin tool is a delete all inventory items function to make re-uploading my evolving economy inventory items easier.

upbeat falcon
sick hamlet
#

and does it build windows dedicated servers correctly?

#

the only solution to the error you posted is a unity support ticket

tame bison
#

I believe its IL2CPP. I've never tried building a windows dedicated server but it does build fine on a regular Windows or Mac unity install

sick hamlet
tame bison
#

I'm not sure what you mean

sick hamlet
#

sorry i miswrote unity instead of mono like i meant

#

you can switch the scripting runtime to mono for the linux dedicated server

#

@tame bison does that make sense

tame bison
#

actually

#

it's Mono

#

odd that I'm getting IL2CPP errors

sick hamlet
# tame bison odd that I'm getting IL2CPP errors

you might be able to switch your platform on the website, including the scripting runtime. or linux dedicated server only supports il2cpp (unlikely). what is your goal? linux is not a reliable target for unity

tame bison
#

We are in pre-alpha and the linux dedicated server seems to be working fine

sick hamlet
#

i meant switching to linux mono as opposed to linux il2cpp

#

not to windows or whatever

#

@tame bison can you try building linux dedicated server with mono (ensure it says mono) on your workstation?

tame bison
#

Will do

sick hamlet
#

i can't even tell from the docs if dedicated builds support mono. they should.

tame bison
#

so up until now we've been building the linux dedicated server on our workstation with mono as the backend. I'm going to try switching to IL2CPP and see what happens.

#

Thanks for the tips

#

@sick hamlet yup I get the exact same error as the Unity Cloud Build if I switch the backend to IL2CPP in my build settings.

#

It looks like it's forcing it to IL2CPP even though we have Mono in our settings

sick hamlet
#

@tame bison do you have types of the form IDictionary<string, IList<X>> field = new Dictionary<string, IList<X>>(); ?

tame bison
#

yes we have some dictionaries that use lists as the value

sick hamlet
#

i guess do you even want to plumb this far into your code?

tame bison
#

I think I have a successful IL2CPP dedicated server build on my workstation

sick hamlet
#

i'm not saying you're doing anything wrong

tame bison
#

its finishing up now

sick hamlet
#

did you change anything?

tame bison
#

i upgraded from 2022.2 to 2022.3

sick hamlet
#

great

tame bison
#

I still don't know why Unity Cloud Build forces it to IL2CPP when we had mono in our project settings 🤷‍♂️

#

Noooo same error

#

😩

#

I submitted a ticket asking why its forcing it to IL2CPP

sick hamlet
tame bison
#

😆

#

I think it might be related to the fact that the standalone player is set to IL2CPP. It must be reading the value from the wrong platform because in the Unity build settings "Dedicated Server" is it's own platform where in Cloud Build its just a checkbox.

vast flax
#

Does anyone know how to fix this?

#

I just reinstalled Unity, after removing it, and need help with the problems of restoring it.

prime acorn
#

hey guys not sure what gaming services mean . also not sure if its free or not. But would like to know if someone can take some time private chat or something to teach me or guide me in a simple task that I have as a beginner that I am struggling with related to scriptable objects and spawning dif enemies using a spawn manager.

gaunt sun
prime acorn
gaunt sun
jovial sparrow
warm badge
#

In Cloud Code, can two separate C# modules communicate directly with each other? Can I just import a module that has already been uploaded?

cunning thicket
# warm badge In Cloud Code, can two separate C# modules communicate directly with each other?...

Not directly but Dan and Gab suggest some other options here https://forum.unity.com/threads/calling-c-module-endpoint-from-js-script-or-other-module.1478181/
Happy to take feedback back to the team too if these don't help with your use case

cosmic kite
#

I am looking for someone to educate me on using unity multiplay. I want to create servers that can handle a multitude of players. Please dm me so your response doesn't get buried.

warm badge
analog pilot
#

Help!
Simple question. Im initializing **UGS **and then creating a class which manages Analytics. That class calls the method Analytics.CustomEvent(""). the thing is that, the result returned from that calling is always NotInitialized

sick hamlet
#

are you saying you are not seeing analytics in the editor?

#

also are you running analytics in test mode?

peak forge
#

Hey could someone help me. I've been trying to have a play with Unity services Monetization, but i cant figure out how I'm supposed to use ads in an webGL/ Itch.io build?
My only two options through Unity Monetization seem to be android, or IOs, which don't load in my webGL Itch.io build? Am i missing something?

young drum
#

Hello, how do you change which environment will be used for cloud save?

mental umbra
sick hamlet
lavish estuary
#

In Cloud Save there are 3 classes of access according to docs.

There are 3 different Access Classes for Cloud Save Player Data.

Default: Readable and writable by the player the data corresponds to
Public: Readable by any player, writable by the player the data corresponds to
Protected: Readable by the player the data corresponds to, only writeable from a server

My question is:
How do you set the access class protected? I want to alter the data only by cloud code and let the player only read his data.

lavish estuary
#

Oh I see... It's not available yet to access the protected data from Unity SDK. I can access it only from Cloud Code now, OK.

turbid sphinx
#

On unity multiplay, is there a way to increase the number of machines in the cloud or specs of it? or add fleets on a single queue on matchmaker? what I'm trying to do is create 50+ available servers on a single queue. and also is there a way to get the number of available servers before the player starts Queueing?

mental umbra
warm badge
cunning temple
#

Hi I’m new to Unity Gaming services and I have been using match making in dedicated server, ticket is getting created and getting received but not getting matched and giving me Timed out status , any one have any idea, please let me know

warm badge
cunning temple
#

Here if you see there are available servers

warm badge
cunning temple
#

Okay, thank you so much

#

I’ll see what I can do

young drum
#

Hello, is there a way to delete all player data at once in the unity dashboard?

mental umbra
raven echo
#

@young drum in the meantime, you could create a new environment and point your client at it, that'd effectively clean-slate things but you'd need to make sure you deployed your service configuration into it as well.

raven echo
rugged flower
#

How can I make it so that all clients can interact with a rigidbody in unity netcode for gameobjects?

sick hamlet
rugged flower
sick hamlet
#

you end up writing so many game-specific logic to handle all that crumminess that you mgiht as well have done the thing that generalizes better in the first place

turbid sphinx
stark lion
#

Anyone here familar with Plastic SCM?

soft anchor
#

it seems this is a common problem, but I'm struggling to get analytics events (both standard & custom) to show up in the correct environment (they're showing in production). I've turned off legacy analytics and it still happens. has anyone here solved issues like that?

raven echo
#

it seems this is a common problem, but I

celest nebula
#

I have installed plastic scm server onto my pc and it says it has a 5 day trial. what happens after it expires?
please ping me if you are replying

turbid sphinx
#

On multiplay/matchmaker, how to get the number of allocated machine on a fleet? or get if a pool has already a maximum server without queueing .

cunning temple
#

Hi " Required property 'ip' not found in JSON. Path " I'm getting this error in match making , what am I doing wrong, anyone else faced this ?

#

This is for multiplay allocation

long patrol
#

Can anyone help me, I've been downloading for almost 2 days now, and I don't know if it's a bug.

gaunt sun
#

this is validating not downloading. if it has been stuck on validating for that long, try restarting the hub. if it doesn't magically show that it has been installed after that then you'll probably need to check the !logs for any installation related errors

boreal gladeBOT
#
📝 Logs

Documentation

Editor logs

Windows: %LOCALAPPDATA%\Unity\Editor\Editor.log
MacOS: ~/Library/Logs/Unity/Editor.log
Linux: ~/.config/unity3d/Editor.log

Unity Hub

Windows: %UserProfile%\AppData\Roaming\UnityHub\logs
Mac: ~/Library/Application support/UnityHub/logs
Linux: ~/.config/UnityHub/logs

gaunt sun
#

well i don't read that language so i don't know what it says. also this is not the appropriate channel for this issue anyway. #💻┃unity-talk

long patrol
#

ok

native depot
#

Has anyone worked with an SVN repository in Unity Dev Ops/Cloud Build?
By default, the commit number you can retrieve through the cloud build manifest is for the entire trunk rather than the branch your building from.
There's a work around by running svn info from a pre build shell script but when trying to do that I get an svn: command not found error.

I'd assume svn is installed on the build systems since they're able to pull the repo.
Does anyone know how to access svn batch commands or have a workaround for getting the correct branch commit number from unity cloud build?

sick hamlet
desert wasp
#

Hello, I’m reading the documentation for Economy, there is a method for directly changing the currency balance through the client (DecrementBalanceAsync for example). How to protect game from this? Is it possible to somehow set the currency to read only mode so that it can only be changed through cloud scripts?

cunning thicket
desert wasp
#

Thanks!

hybrid pecan
#

SVN Commits

young drum
#

Hello, I am currently using Username and Password as my Identity Provider but for some reason, I get this error:
I just entered my usernam as "abcdefg" but it still does not accept it

young drum
#

Oh i forgot to attach the code my bad, here it is

desert wasp
#

Hello! Am I moving in the right direction? I have disabled all actions with UGS and want to allow only the [CloudCodeFunction("SayHello")] call
But have HttpException: (403) HTTP/1.1 403 Forbidden

native depot
dapper tangle
#

So is there currently a way to search for specific values in a certain key for players using unity authentication

fickle stratus
#

Cloud Code x Multiplay (help atwhatcost )

what i'm trying to do: call a Cloud Code script (that modifies players data using their id) from the dedicated server (multiplay).

example: when the match ends every player's level increases by 1,
this request must be called from the server to Cloud Code and in the Cloud Code script i access Cloud Save and increase the level.

i've been reading through the Cloud Code documentation for 2 days non-stop and i'm just getting increasingly confused and lost.
any help would be appreciated sadok !

rose latch
#

Not sure the best place to ask this as it involves multiple categories: Plastic SCM | Moving a project to another PC?

Attempting to open my remote project from Plastic SCM. I version often, and the files appear to be there. I made sure the meta files are visible and also that the other computer is using the correct unity version for this project: 2022.2.7f1. Both computers are using Windows 11. The project works fine on my original computer. Start the game, Lobby works, Relay works, it's all good.

Once the project is downloaded from the remote SCM library to the alt computer:

  • It doesn't download any files, so I have to manually go and install Plastic SCM for the project even though it should be there. The files should be there as I have double checked that it is using the main version and not a branch.
  • Once SCM is installed, it recognizes that it needs to download all the files for that project so it does.
  • After the files are downloaded, it still didn't get them properly, so I have to restore to the latest version.
  • Then, it gets all the files, but the settings are not there and things don't seem to be how I versioned them. The project is basically useless like this.

A work around I ended up doing was copying the file over via drive, without zipping, then logging into plastics and reverting to the latest version.

dull nest
#

Hello,

Has anyone found the right flow to use anonymous authentication with the ability to link a provider?
We want to use this with Google Play Games and Apple Game Center but I find the documentation not very clear, there are login and signin functions, I have trouble seeing what to do once the account is linked.

Thanks in advance!

sick hamlet
sick hamlet
#

you are currently dropping the placeholder text element into the slot in your inspect, so your username is being sent as whatever that is

#

you might want to log the username you are sending 👀

mental umbra
mental umbra
fickle stratus
dense cipher
#

Hello,

#

Hello, I am currently using Username and

#

Hello! Am I moving in the right

fickle stratus
# mental umbra Okies! On the Cloud Code side, can I ask if you would prefer to get help with Cl...

Mr.GPT helped me to write this code, do you think that it's a good way of doing this ?
if yes, is there any changes that i should make ?

using UnityEngine;
using UnityEngine.Networking;
using System.Collections;

public class MyScript : MonoBehaviour
{
    string bearerToken = "<BEARER_TOKEN>";
    string projectId = "<PROJECT_ID>";
    string scriptName = "<SCRIPT_NAME>";
    string url = $"https://cloud-code.services.api.unity.com/v1/projects/{projectId}/scripts/{scriptName}";

    void Start()
    {
        StartCoroutine(PostRequest(url));
    }

    IEnumerator PostRequest(string url)
    {
        UnityWebRequest www = new UnityWebRequest(url, "POST");
        www.SetRequestHeader("Content-Type", "application/json");
        www.SetRequestHeader("Authorization", "Bearer " + bearerToken);

        yield return www.SendWebRequest();

        if (www.result != UnityWebRequest.Result.Success)
        {
            Debug.Log(www.error);
        }
        else
        {
            // Get the data returned from the server
            string returnedData = www.downloadHandler.text;
            Debug.Log("Returned data: " + returnedData);
        }
    }
}

fickle stratus
#

@mental umbra sorry if i'm asking too much, but it would be much better if i can access and edit player's data without using cloud code (directly Cloud Save and Economy).
so when the server needs to know any information about the player he just needs to have his id, and then get this data via REST API.

i see here that it's only accessible via an authenticated server:
how can i set my server as an authenticated server ?

young drum
#

Hello, I tried to Delete my Anonymous player account data in the dashboard and then start my game in the editor I get this error,

#

But then my 2nd playthough was okay, what should I do to avoid this error

cunning temple
#

"MultiplayService.Instance = System.InvalidOperationException: Unable to get IMultiplayService because Multiplay API is not initialized. Make sure you call UnityServices.InitializeAsync(); " , I'm getting this error for running dedicated server, can anyone please tell me what's wrong, I'm also calling UnityServices.InitializeAsync() in start, so I don't know where it is going wrong

dense cipher
#

Hello, I tried to Delete my Anonymous

#

"MultiplayService.Instance = System.

desert wasp
#

what is the reason that all examples are written in js? Is there no similar API for C# or have they not yet managed to make a C# version?

desert wasp
#

Is there a difference in the performance of cloud code if you deploy 1 module (1 .net sln), which contains the entire version of the backend logic, or if you split the project into several projects/modules. authorization, shop, quests, etc.? the first option seems more convenient.

raven echo
#

Cloud Code Module Performance

#

Cloud Code Examples

unkempt leaf
#

Anyone have any general(ish) use scripts for network transforms for lag compensation, interpolation, extrapolation, client prediction, etc?

unkempt leaf
#

Scripts or whatever to handle the above with net code for game objects

#

I thought network transform components might be a way to do that, and was asking if anyone had an available to share to use or build upon

#

Apologies if that’s not the right thing to call them

sick hamlet
#

so it was very confusing

unkempt leaf
#

Sorry about that

sick hamlet
#

if you need to find scripts that use network transforms, try searching github for the class names. take a guess for some of the names.

unkempt leaf
#

Ok. Thanks

sick hamlet
unkempt leaf
#

Ok I’ll take a look, thanks for the link.

sick hamlet
#

the networktransforms perform interpolation automatically. i am not super familiar with the feature set. i think this is in the docs, although i'm sure those are not written well

unkempt leaf
#

Yeah I saw it performs some client interpolation, but I guess I’d like to investigate server side interpolation and maybe using a buffer for hit registration and other techniques mentioned in the documentation, but not yet implemented directly in NGO.

#

I appreciate the guidance though, I’ll look at some examples and see if I can glean anything from that.

desert wasp
#

When creating a player first time, I set him initial currencies. Is it possible to set everything at once in one request, like SetItemBatchBody for CloudSaveData ?
for now I send two request

upbeat falcon
desert wasp
raven echo
#

Another common pattern is to have an explicit Login endpoint that every client calls when the game starts, similar to the trigger but it also gives you a chance to modify their profile data if you need to fix things up between versions, pre-seed some data for an event, that kind of thing

sick hamlet
#

you could certainly author all the affordances yourself. you'd have to choose. you'd have to write some kind of ad hoc transactions on top of the currency apis in the implementation you just shared. then, if you do it as a server side trigger, you'd have to deal with the state that the user will successfully login before they're "ready"; and that the backend might timeout getting the player ready, so you'd need to deal with that too, etc. etc.

#

there's no such thing as a Lock in UGS... it's hard. player data initilization bugs happen literally all the time

#

so you can blub your way through this for sure.

#

i know that there is a way to make what you said work dsiems

#

i guess my point is that it requires authoring an ad-hoc transaction idea

#

of course the login endpoint could write some variable early on, maybe you were going to call it "busy" or "in progress" or even "locked"

#

but that's what i mean. you'd have to blub your way through it

#

or maybe the backend api requests are never run concurrently when requested by the same user, which is another really leaky abstraction. like is it no concurrency by name, or no concurrency across the whole api?

#

afaik playfab has all these same problems

raven echo
#

Nope we're on the same page, dealing with the race conditions from multiple simultaneous cloud code functions executing at the same time, or multiple clients calling the same cloud code function at the same time is challenging for sure, and can be a gotcha.

Cloud Save does support writeLock in its API, which can help you resolve some of the race conditions you're describing: https://services.docs.unity.com/cloud-save/v1/index.html#tag/Data/operation/setItem

This just detects the conflict, you still have to write the logic to reconcile what you were trying to do with what the other writer just tried to do, which can be quite complex

sick hamlet
#

i also agree it's impracticable to make something that looks as easy as MongoDB and is as expressive and correct as Postgres

raven echo
#

In terms of initialization, what i've done in the past is create a state machine for the player's profile, and use that in combination with a version number to determine when to execute code for setting initial state, or updating state between versions etc.

sick hamlet
#

i mean it's just all blub. UGS needs to strongly couple a user-authored cloud function to whatever the idp does at the time of creating the user record

#

it's impracticable to do it any other way*

#

and afaik the only open source, mature IdPs that would allow 1 person to author that correctly, and are still HA, are like Keycloak

#

so it really goes way back to, well you can't shove user records in dynamo or whatever

#

just because there was a tradition 10 years ago from some mobile game developer in LA writing weird backend C# code against dynamo, that the user profiles would be shoved into dynamo and sql at the same time, and have a ton of weird reconciling logic, doesn't mean it makes sense now

#

have i reached deeply enough into the heart of UGS

#

lol

raven echo
#

Nope it's all great feedback, appreciate it 👍

sick hamlet
#

lol

#

c'mon "some mobile game developer in LA"

#

that's a good one

#

to their credit they wrote the economy stuff against MSSQL, it wasn't a crazy dynamodb idea, but it still had all the same concurrency issues

#

i'm sure if the user creation occurs in a transaction - and even if you guys are using mongo or something, well, that has transactions nowadays - you can allow users to throw in their cloud code to rollback, or pass an ITransaction or whatever.

#

the decoupled approach is so painful

#

all pain no gain

#

then... do you want Unity's IdP calling out to someone's code? C# has no isolates. security issues notwithstanding, if you did a REST call against the user's thing, it could return a huge response, it could take forever... it could do all sorts of weird stuff.

#

all sounds very hard

desert wasp
# sick hamlet i mean it's just all blub. UGS needs to strongly couple a user-authored cloud fu...

if he logs in simultaneously from two different devices, he will generate two different local ids - these will be two different profiles. we can automatically create local anonymous profiles, and then link the social login to this anonymous profile if necessary.
This situation is possible if the player takes an iPhone and an iPad and simultaneously logs in (create profile), say, through the game center. but this can be easily solved
please correct me if I'm wrong.

sick hamlet
# desert wasp if he logs in simultaneously from two different devices, he will generate two di...

presumably there's a moment in time where as you are making serial, technically unrelated API calls, the user is created but is not yet initialized from a game business logic point of view.

  1. user logs in on device 1
  2. service creates account
  3. you receive login trigger and start a task
  4. user logs in on device 2. because the account is created, everything is good.
  5. you receive login trigger and start a task

and from now on, there's an issue.

i mean of course you can work around this. i'm not saying it can't be worked around. the issue is that it HAS to be worked around.

#

ideally the way it would work is

  1. user logs in on device 1
  2. service creates account and runs the account initialization task to completion, returning only if everything succeeded.

in this scenario, there's no invalid state that is exposed to the user at any time. whereas in the earlier scenario, there are multiple points where there is invalid state, that must be managed by an ad-hoc locking, transaction, state machine or similar approach.

desert wasp
#

ok I understand what you mean. thanks

mental umbra
# desert wasp ok I understand what you mean. thanks

Hey Vadim!

Just an FYI that if you use Unity Cloud Save for data, it does explicitly support Write Locks on when saving both Player Data and Non-Player Data.

Using Cloud Code + Cloud Save is a different approach to using Economy, but provides a way to break out and develop more sophisticated behaviour (particular when paired with functionality like Cloud Code Triggers and Cloud Save Queries), should that be something you are interested in.

desert wasp
mental umbra
# desert wasp Hi Iain! Thanks for the advice. Yes, I thought about that. I haven’t studied al...

Will I miss out on any of this in the future if I go all Cloud Save instead of Economy?

Great question! A short answer is yes - and that's a great reason to stick with Economy (it's technically possible to still use Remote Config with a custom solution built on Cloud Code and Cloud Save, but it's not as easy as it would be with Economy).

I'm really interested in how we can solve for best of both worlds there, and was actually talking with someone about exactly that today, but it's the case for now that Economy and Remote Config work really together out of the box.

There is a Remote Config SDK for Cloud Code Scripts:
https://cloud-code-sdk-documentation.cloud.unity3d.com/remote-config/v1.1

I am not sure about the current status of Remote Config SDK other platforms though (e.g. Multiplay servers, Cloud Code Modules), but can find out if you are interested!

desert wasp
#

thank you!

#

in this doc, I found sample only cloud code with js https://docs.unity.com/ugs/manual/cloud-code/manual/scripts/how-to-guides/unity-services-integration#Using_the_Unity_Remote_Config_SDK
For now all my game balance is stored in Google spreadsheets.
For example, when creating a player, I want to assign him currency from one of the tables. The right solution, I believe, would be to throw this table into remote config json and read it from the cloud code.
Well, or I can directly put json or static classes in my backend project, but it’s more convenient to AB test balance or making some changes through the remote config.

mental umbra
desert wasp
#

Thanks!
BTW please pay attention to how made this asset https://assetstore.unity.com/packages/tools/game-toolkits/cbs-cross-platform-backend-solution-playfab-200638 . This is essentially an C# analogue  of the, https://docs.unity.com/ugs/solutions/manual/Welcome but for playfab,
and more functional. It covers basically everything you need for multiplayer and single player games. Developers just need to fine-tune the little things to your liking.

Get the CBS - Cross-platform Backend Solution (PlayFab) package from Simple Game Assets and speed up your game development process. Find this & other Game Toolkits options on the Unity Asset Store.

strong hinge
#

Hey UGS members!
Just want to announce that we have editor tooling for UGS if you dont know of it already.
This basically supports changing configuration directly from the editor for some services:

  • CloudCode
  • Leaderboards
  • Economy
  • Remote Config

The original thread is here: https://forum.unity.com/threads/cloud-code-js-authoring-tool-from-the-editor-officially-released.1423911/.

This will not only allow you to version, diff and all the good stuff you do with files, but also easily just deploy to one environemnt or the other.

These services (and some more) are also supported by the UGS CLI, if you want to set up automation!

Here are the forum posts if you're interested:
https://forum.unity.com/threads/economy-authoring-editor-cli-updates.1517413/
https://forum.unity.com/threads/cloudcode-authoring-editor-cli-updates.1517407/
https://forum.unity.com/threads/leaderboards-authoring-editor-cli-updates.1517416/
https://forum.unity.com/threads/game-sever-hosting-authoring-editor-updates.1517419/

We are always receptive to feedback, and my team watches the forum.

Have a nice weekend!

Gab

honest oriole
#

Can anyone tell me why in the unity hub my VCS server is set to Taiwan but in cloud dashboard it shows eastern US. I'm pretty sure I wouldn't have selected Taiwan.

prime acorn
#

Guys, just want to thank you all and give a feedback as always I have received so much support here and patience. Just want to say thank you, as you guys are helping me grow a lot. this is really amazing, have a great weekend

hybrid pecan
desert wasp
#

just for development reason I allow full access to UGS
{
"statements": [
{
"Sid": "deny-all-ugs-access",
"Effect": "Allow",
"Action": [""],
"Principal": "Player",
"Resource": "urn:ugs:
:/**"
}
]
}
Why sometimes I have error like Unauthorized ?

young drum
#

Is it possible to check all users in a certain Identity Provider in our game?

young drum
#

and I would like to ask is "Username and Password" not counted in the Identities attirbute of PlayerInfo? I bound my guest account with the "Username and Password" Identity provide but my PlayerInfo.Identities did not increase in count

thorn charm
#

I'm experiencing this error when trying to commit/merge my file, any thoughts?

thorn charm
#

That's odd, I guess by default you have to set the Unity to the YAML merge tool manually.

dense cipher
#

and I would like to ask is "Username and

#

Is it possible to check all users in a

desert wasp
#

@dense cipher hi! Could you explain pls, why I can't call gameApiClient.RemoteConfigSettings.AssignSettingsGetAsync from trigger funcrtion? wron context? I can call GetRemoteConfig from clien, but can't from InitializeNewPlayer trigger function. I need get config for player creation.

dense cipher
#

@Erick (Unity) hi! Could you explain pls

flat python
#

I'm struggling to figure out iOS provisioning profiles for build automation. I'm not sure what type of credentials to generate for builds to properly deploy.

Does anyone experience have insight to share? Or are there any resources that are a bit more verbose than the documentation?

Currently I'm receiving errors that "the Device was signed for the app store" when I try deploying.

final halo
#

are you distributing via testflight or installing the ipa directly? It sounds like you have the app store provisioning which is what you'd use for prod/testflight builds, and maybe you are trying to install the downloaded ipa yourself in which case you need a development or ad-hoc (probably dev) profile + register the device(s) in your dev account

misty marlin
#

What are the alternatives for Vivox? Vivox doesn't work right now

#

At least not v16, trying to join channels returns a 404

desert wasp
#

Is it possible to create a player only in the current environment? I work in a development environment, but the player is created in all environments at once.

fickle stratus
fickle stratus
desert wasp
flat python
# final halo are you distributing via testflight or installing the ipa directly? It sounds li...

Apologies for the delay. Passed out.
I'm just scanning the the QR code distributed by DevOps. Not sure if that leads to TestFlight or direct install based on documentation.

I'll generate the recommended profiles and see where that leads.

I'm a bit lost on the available workflows. Just your bit of text helps me understand a bit of the options in front of me, thank you. I've done iOS dev but always with someone else handling builds/automation. So it's my first time doing this setup and it's overwhelming compared to Android nervousSweat, so thank you.

flat python
brisk peak
#

man the documentation is really lacking

#

i was hoping to get cloud code set up with cloud save but theres just not much information available

paper apex
#

Does anyone know how to change the 'address' of where a Version Control Workspace is pointing? I had re-named my repository, which caused issues with VC. But in Plastic SCM/Unity VC, I can't find any option to re-name my Workspace address! Super frustrating as I cannot use VC until this is resolved. Couldn't find it via google either

#

I'm referring to the part that says main@MyName@MyOrgName@cloud

#

Alternatively anyone know can I tell Unity Editor the new repository address to point to for version control? That would get me unstuck

#

OK I deleted my dupe workspace and now re-enabled VM in the Editor with the remaining workspace. Currently re-checking in all the changes in the editor. Friggin scary. Thank goodness I have everything backed up

desert wasp
#

The documentation says that if you want to create a cloud save player data that only the server can write, you need to use Protected.
If I use Protected the entry does not appear, if I use SetItemAsync then everything is ok.
So, use GetItemAsync and disable writing to security policy levels?

brisk peak
#

after flipping through a bunch of pages a bunch of times i guess i finally figured it out but i still think the docs need some work

mental umbra
# brisk peak after flipping through a bunch of pages a bunch of times i guess i finally figur...

Thanks for the feedback – we hear you and agree!

@desert wasp If it's relevant, currently only default Player Data is visible in the Dashboard, the ability to view different Access Classes of Player Data (and Game Data) is being worked on right now.

We released a bunch of new features last month but are still working on better documentation, tutorials for some of the features. We also have some additional methods to the SDK in progress to make some of them easier to use.

(We are also exploring use cases we can better support through tutorials and/or improvements to the services. I would love to hear what you are working on / would like to do, if you are comfortable sharing!)

brisk peak
#

im still trying to figure out if cloud save is right or me. Im working on a competetive card game and need to store a players decks/unlocked cards. ive been wondering since last night how i could accomplish this with key/value storage. i know exactly how to do this with sql and already have it set up but id really like to try out unitys solution. do you think this is doable?

#

also, do you all have any plans for some sort of sql implementation?

#

i kinda have an idea of saving the deck as customdata then storing a list of the players deck ids but this sounds like it would be inefficient to modify. it would be cool if there was a way to add/remove data from a list without reading the whole thing but maybe there is and im just missing it?

#

sorry, lots of text but one more question: how can we deserialize the GetItemsResponse from GetCustomItemsAsync back into our custom data object?

mental umbra
brisk peak
#

sure thanks

warm badge
green warren
#

When I save the unity project it doesn't save the scene I am working on. I need to do save all/save scene to save the scene. Is there a solution for this?

mental umbra
# brisk peak i kinda have an idea of saving the deck as customdata then storing a list of the...

So yeah, this sounds like a good use case!

Having Custom Items (with maybe a random ID as a name) and key/value that is named something like "PlayerID" and then indexing that key would allow you to query to fetch all Decks for a Player.

As you have 2000 key/value pairs per item you could either have a couple of properties on each "Deck" like this:

Deck ID: DECK_ABCDE12345
• PlayerID: a83b482e81ac (etc)
• Deck: [ array of cards ]
(This would require you to get the entire array to change it, as you say)

OR you could do something like this:

Deck ID: DECK_ABCDE12345
• PlayerID: a83b482e81ac (etc)
• Card0: { card object }
• Card1: { card object }
• Card2: { card object }
(etc.)
i.e. each card in it's own "slot" (would work well assuming each deck is < 2000 cards 🙂

You could also do something like this:

Deck ID: ABCDE12345
• PlayerID: a83b482e81ac (etc)
• Card0: <CARD_ID>
• Card1: <CARD_ID>
• Card2: <CARD_ID>
i.e. Specify an ID for each card (e.g. if your cards are defined in the game). This makes more sense, unless you have entirely dynamically generated cards that would be unique to each player.

warm badge
#

Right now, my cards are scriptable objects and decks are lists of IDs. But I'd like to save the entire card pool to Cloud Save for easy patching and updating

mental umbra
# brisk peak also, do you all have any plans for some sort of sql implementation?

also, do you all have any plans for some sort of sql implementation?

Cloud Save supports queries like this:

  • EQ - Equal
  • NE - Not Equal
  • LT - Less Than
  • LE - Less Than or Equal
  • GT - Greater Than
  • GE - Greater Than or Equal

These work for numerical and string values and can be joined with AND but not (currently) with OR. We are considering other query types of query, like explicit support for string contains (though it already supports queries like "starts with").

So it's not quite as flexible as SQL, but we agree that's a really interesting idea –and actually we did just build something that lets you do that for our Observability platform (logging). We are trying to understand the use cases that are currently not well supported by what is possible, to work out how to best fill those gaps.

brisk peak
mental umbra
mental umbra
warm badge
mental umbra
# mental umbra Ah yes you and <@86985386886201344> were asking about that, will follow up short...

Okay, I can see some issues with the examples on docs.unity.com that I am going to resolve.

The sample included with the Cloud Save SDK is much better (and shows how to use the same methods but with error handling), but there is a lot in there, so I have attached a more concise, practical example of how to save and load an object in Cloud Save, fetching only keys you want for a particular object - hopefully this is helpful.

Note this example uses player data and so calls CloudSaveService.Instance.Data.Player.LoadAsync() to load data but that call can be swapped out for CloudSaveService.Instance.Data.Custom.LoadAllAsync(customId) to load an object from a Custom Item.

The syntax for getting data in Hashsets in C# requires a little boilerplate, so some folks use helper methods to reduce the amount of the code they need to write.

(We are considering if that's something we might want to do in the SDK.)

mental umbra
brisk peak
#

so im a little confused on how the indexes work.
i created an index with an index key of "PlayerId" with access class of Default with entity type of player, i then created inserted a test deck and now i try to query like this and its throwing a bad request error:

#

im doing this from cloud code btw

#

im just trying to return the id because i havent figured out yet how to apply your example to mine (also thanks a lot for that).
EDIT: idk what happened before but now theres no error, im just not getting an empty array in the response.Data of { "results": [] }

brisk peak
#

ive added return keys to the QueryIndexBody but am still getting an empty result var returnKeys = new List<string>{"Id", "Name", "CardIds"};

mental umbra
# brisk peak ive added return keys to the QueryIndexBody but am still getting an empty result...

I don't see any issues with that query! This might be a bit of a "gotcha" but currently only data saved after an Index is created gets indexed - meaning data already saved won't show up in Query results.

If you were to resave the item, that should cause it to be indexed - it should show up right away in results.

(This is not ideal, but again appreciate hearing about this sort of thing as it helps us prioritize.)

If that doesn't seem to be it, please do let me know and will dig into it more!

desert wasp
#

Hi! I'm reading the authorization documentation, it says that you can add social id to an anonymous player: facebook apple GC etc.
Often you need to have an anonymous ID + game center + facebook + custom at the same time is this possible now?

brisk peak
#

i got that from the dashboard. the keys name for this object is Deck_4 if that matters

pallid cradle
#

Hello!
I'm here on a work assignment... I've been looking at the Unity Gaming Services documentation, and I saw in limitations that the host has to choose one region, but anyone can connect to that region. Does anyone know if that means that if, lets say, I make a game and host it in US, someone from China can join it by joining a US server?

warm badge
pallid cradle
#

Oh I see! No, quite the opposite, I need to connect players from anywhere.

#

And china is sometimes a problem... Thats why I'm clarifying

#

Thank you!

mental umbra
# brisk peak i got that from the dashboard. the keys name for this object is Deck_4 if that m...

Ah! Okay I think I get it now 🙂

So, if the Deck is stored as Player Data (which I had missed) and you know the Player ID you could fetch it without using Queries or defining indexes.

You could just load the data for that Player ID for the key "Deck_4" using GetItems() and specifying the Player ID and "Deck_4" as they key you want back (or if don't specify a key, you can get all the keys and values back).

#

Of course for matching players to battle (if that is a thing you want to do) Indexes would still be relevant. However there are different patterns you could consider there.

You might find that you want to store all the Decks as Custom Items instead of Player Data (and save the PlayerId as a key, then query for all Decks with that Player ID when you want to load all of a players decks).

Of course I don't know what you have in mind but I suggest that as it would be an easy way to then implement a "Battle" mechanic (e.g. by then having a query that is just return another random Deck, that belongs to a different player - i.e. ignore results returned with the same Player ID as the current player).

#

Perhaps worth saying we are looking at adding a function to explicitly to return a random set of results for a matching query, as that's such a common use case.

It's also possible to generate a random number then pick that from the array of results returned, but we can see a function that can return X random results from a wider list would be convenient for a lot of things (matching players, pulling a random item from a loot table, etc).

brisk peak
mental umbra
brisk peak
#

if thats the case it seems like it would kinda defeat the purpose of what im trying to do 😦

mental umbra
brisk peak
#

i guess i could make another object that holds an array of the players decks but that would be an extra call on top of the others i might need

#

ill try it out

mental umbra
# brisk peak i guess i could make another object that holds an array of the players decks but...

If you did have a Custom Item per Deck you could fetch back all Decks at once by querying for Decks with that Player ID, if that make sense.

e.g. with a bunch of Custom Items like this:

{
    "CardIds": ["1", "2", "3"],
    "Id": "8b1f10f7-974c-4eb4-aa37-f26d6c995695",
    "Name": "4th Test Deck",
    "PlayerId": "K55u1UqG9r0MnHiIHg3BLJkl5OGk"
    "DataType": "Deck"   
}

You could query based on PlayerId: "K55u1UqG9r0MnHiIHg3BLJkl5OGk" and DataType: "Deck" and ask for the Name, ID and CardIds in the query response and you should get them all back in a single query.

#

I think using Player Data with keys like Deck_1, Deck_2 (etc) is also a reasonable approach, but guessing that the Custom Item per Deck approach might be an easier way to do a lot of card game type mechanics that you might be interested in.

Totally appreciate that I might not understand what you have in mind though 🙂

sick hamlet
brisk peak
#

nope

sick hamlet
#

you can architect it to be fully denormalized.

#

do you know what i mean?

brisk peak
#

could be an idea but im thinking now sql might be a lot better for this

#

it seems like im going to have to store so many data objects to keep track of things

sick hamlet
#

all your access patterns are denormalized

#

so SQL and relations add way more complexity, especially on top of UGS

brisk peak
#

im reading now

sick hamlet
#

editing decks isn't transactional either, it's like, one operation and you're done

brisk peak
#

so i was thinking i would have to do a lot of querys for example, when adding a card i would have to do another query to verify that card id exists

sick hamlet
#

and besides

#

when is that ever going to happen?

brisk peak
#

in my current setup user sends the request to the server with a list of card ids to create the deck with

#

i would need to check to make sure those cards exist and they own them

sick hamlet
#

well, but in principle, the user could shove anything they want into the cloud save. so you always have to validate it at the time of accessing

#

aka gracefully handle invalid data

#

it's just a limitation of the architecture of UGS

brisk peak
#

users wont have direct access to the cloud save. i trying to do all the validation in cloud code

sick hamlet
#

okay, maybe another way to think about this is, the user could also go and intercept the server responses, and have it return invalid card IDs

#

but... why would they do that?

#

they wouldn't

#

well... they're not going to modify the client to send invalid card IDs either

#

it's just something to think about

brisk peak
#

probably not but accessing cards that they dont own would be an issue

sick hamlet
#

yes, you'd have to check the card IDs

brisk peak
#

or adding too many to the deck

sick hamlet
#

i've been on this journey, and from the point of view of having a working card game

#

unless you need a piece of data that is concurrently modified by two or more players

#

at least for the card game model, it is vastly simpler to achieve everything using the UGS architecture aka denormalized data is norm

#

it has firebase-like features but those are always going to be worse than SQL

#

you can have the game check that the player has ownership of the cards at the time that they are acessed

#

i'm saying that all your validation you will probably need to do when something is used

#

because anyway, that's where the rules are actually enforced, and it's sort of why denormalized architectures are actually quite powerful

#

or don't use UGS

#

you don't want to do SQL over REST

#

UGS is simply not architected for SQL ideas

#

it pretends to be for the sake of satisfying specifications or whatever

brisk peak
#

im liking cloud code a lot so far and im really interested in the other ugs features but it just seems like im going to run into a couple issues

sick hamlet
#

yeah

#

i think you should stick to single player document

brisk peak
#

i mean with cloud save

sick hamlet
#

you can do all the checks you need

#

it will all go very fast

#

but do it against a single player document you modify

#

full denormalized

#

C# is more expressive than sql. that said, thanks to gpt4, it has never been easier for laypeople to write application code in SQL

#

last november I would not have recommended this at all. but today, you can possibly, maybe, figure out how to stand up Postgrest.

brisk peak
#

im going to try out lain's suggestion for the query when i have time tomorrow and if it works i might try to continue with cloud save

#

i had a small prototype set up with postgres and it was working great but i didnt back it up and dont have that pc with me right now

#

deserialization was quick and simple

sick hamlet
sick hamlet
sick hamlet
#

@brisk peak overall, imo, it is way simpler to use a per-player document. i'm not sure if UGS has migrations.

brisk peak
#

yea would definiely be simpler than that

#

ill try working on it again tomorrow and hopefully i get a query to go through

sick hamlet
#

it's hard to simply answer the question "does UGS have migrations"

#

it's not coming up in google

brisk peak
#

seems like these parts of it are just too new to find info

stray tartan
#

is there a possibility of a Mute for all functionality in Vivox v16?

limpid bobcat
#

Hello, I am trying to submit my game to Appstore via Unity Cloud and this is the error I get:

[error] 2023-11-24 13:51:48.529 *** Error: Unable to upload archive. Failed to get authorization for username '<BLABLA>@yahoo.com' and password. (
[error]     "Error Domain=NSCocoaErrorDomain Code=0 \"Status code: 0\" UserInfo={NSLocalizedDescription=Status code: 0, NSLocalizedFailureReason=The auth server returned a bad status code.}"
) (-1011)
 {
    NSLocalizedDescription = "Unable to upload archive.";
[error]     NSLocalizedFailureReason = "Failed to get authorization for username '<BLABLA>@yahoo.com' and password. (\n    \"Error Domain=NSCocoaErrorDomain Code=0 \\\"Status code: 0\\\" UserInfo={NSLocalizedDescription=Status code: 0, NSLocalizedFailureReason=The auth server returned a bad status code.}\"\n)";
}```

My email and password are both completely correct.
sick hamlet
whole peak
#

Does is reset every month or not? Dev ops

zealous salmon
#

Anyone else getting "Oops! Something went wrong" error popping up repeatedly up in the Lobby Cloud Pages?
It seems to be generated by error 404 and 400 for schema and JS files.

  • Used 3 different browsers, and on PC / Mobile Phone.
  • VPN is off. Script blocking is off. New login sessions also tried.
  • Stops after a while but starts again whenever I try to Access Lobby Activity etc. Selecting does nothing, and seems to even to redirect back to the config page shown in the image.
  • Also happened at the configuring stage of the lobby.
terse oracle
# whole peak

Yes, both minutes and storage resets each month. HOWEVER, if you start the month storing over 5GB of data (in UVCS or in build artifacts) AND do not delete anything then you will exceed the free tier that month

terse oracle
warm steeple
#

Good evening, I wanted to install the Authentication Package via Package Manager, but it is only showing the 2.6.1 version of the Authentication Package, but I need at least the 3.1.0 version because I wanted to use the Custom ID sign in. I am using Unity 2021.3.29f1 version. How can I get the latest version of the package, what am I doing wrong? Thank you for your help!

civic hemlock
#

Hi all, I'm new to the group so I apologise if my first post is in the wrong area... I need a Unity Australian Beach environment. Has anyone seen a super high quality Unity beach scene? The scenes I've come across in the Asset Store are not quite up to the quality I need for a presentation. If anyone could share links to any high quality asset store beach scenes that would be great, OR would anyone here be willing to create an Australian Beach scene as a paid project? Thanks.

brisk peak
#

is there any way to set environment variables in cloud code without including them in your module?

brisk peak
#

i just checked and you need 2022.3

brisk peak
warm steeple
brisk peak
#

where did you see that

brisk peak
#

thats weir

#

weird

#

can you upgrade to a newer editor?

#

and it says base unity version so i would assume that should mean 2021 is supported too

warm steeple
# brisk peak thats weir

It's a huge project, it started 2 years ago with Unity 2019. I upgraded the Unity version several times to 2021.3 now, but every time it involves a lot of work and the risk of breaking a lot of stuff, because especially 3rd party assets are not always compatible. I am currently in beta and have a user base of several hundred people, so I want to keep that risk low ofc. I would like to hear some official statement about the version problem before I start moving the project to another lts version.

warm steeple
brisk peak
#

looks like 3.2 should be supported for you too

warm steeple
#

I hope so, thats why I wrote originally "what am I doing wrong?" 😉

#

I just did a quick check with the last 3 Unity version I have installed. A new empty core project shows the following versions for the Authentication Package in the package manager:
2020.3.46f 2.7.2
2021.3.39f1 2.6.1 (?)
2022.3.13f1 3.1.0
This looks really strange to me.

brisk peak
#

extra weird 😂

#

the chinese site says 2022.3 so i thought maybe it was a typo but the english sites have 2020.3 written in multiple places

warm steeple
brisk peak
upbeat falcon
#

Hi @warm steeple the minimum supported version for the player authentication package for v3.2.0 is indeed Unity 2020.3. So you should be good to use the package. I tried installing this using 2021.3.31f and ran into the same issue where only v2.7.2 is available via the package manager. I think this might be a mistake, so I am going to report it to the team 👍

Meanwhile you could work around this by manually installing v3.2.0 of the authentication package by downloading it from this URL https://download.packages.unity.com/com.unity.services.authentication/-/com.unity.services.authentication-3.2.0.tgz, then going to the package manager, press the + button and select "install from tarball", then select the manually downloaded file.

upbeat falcon
# brisk peak when staff comes dont forget me too please

Hi @brisk peak, there isn't a way to set environment variables right now, but we are working on adding support for secrets in Cloud Code. Currently, the only way is to use parameters at execution time. Are you trying to set secrets using an environment variable so that you do not need to check the secret into your source control?

brisk peak
#

adding secrets would be great

dense cipher
#

You can manually enter package versions in your project package manifest and it should work

upbeat falcon
warm steeple
brisk peak
#

do dedicated servers get a guaranteed player id or way to authenticate it sending requests to cloud code?

#

i plan to setup a module for server only access and am wondering how to allow it with access control

#

ive been using anonymous login and just realized i can probably just make an account for the server to sign in to and use that for access control

upbeat falcon
brisk peak
#

thanks so much youre all a big help

sick hamlet
sick hamlet
brisk peak
#

im trying to authenticate as server, for example i have a cloudcode function to unlock an item for the player. after a game the dedicated game server should inform cloud code about match stats which should only be possible for the server

#

i was thinking i could use access control to only allow the server but based on what francois said i guess i just achieve this with dedicated server using a service account for auth

sick hamlet
#

do you see why?

#

no matter what, you must decide what the user can and cannot do. whether you do this using access control (policies) or ordinary C# code, both options have their plusses and minuses

brisk peak
#

ah i get what you mean now

#

i havent been able to test yet but i using access control to block this module then using a service account to access it is my best option

sick hamlet
#

yes that makes sense

#

imo most ordinary gameplay code is much easier to express in C# versus policies

sick hamlet
# brisk peak i havent been able to test yet but i using access control to block this module t...

when you are doing the "use C# code to express permissions," player accounts should be denied from everything by default. i don't know what unity's default policies are for player accounts, for example @dense cipher, do players have the ability by default to change their in-game usernames? is there a difference between accounts authenticated by federation versus unity's IdP? an unlimited number of times, or 1 time? is this expressed by a policy or by opaque UGS platform code?

brisk peak
#

so from what ive read all services are set to allow by default for testing

#

i added an access control file to limit player access to one module and denied for eeverything else

sick hamlet
# brisk peak so from what ive read all services are set to allow by default for testing

this should illuminate for you how shaky UGS is. it's allow everything by default not for testing, per se, but because people have so little comprehension of these issues, a product manager's funnel would show drop off with game developers being like, "oh why can't i do anything? i am getting access denied" a bajillion times if the default was what you actually need

#

AWS certainly lets you create root credentials and use them willy nilly

brisk peak
#

idk but testing it was the docs said lol

sick hamlet
#

yeah

#

well it's good you set it to deny all and access to a module, i'm not sure what that module does

#

it can make sense to give users policy-based ("access control") permissions to stuff like their profiles, but inevitably people want to do something weird with their games, like letting you only change your username once, which cannot be done with ad-hoc policy languages like what UGS has

#

i think your module is just the gateway to your backend server? that makes sense to me

brisk peak
#

yup

dense cipher
#

when you are doing the "use C# code to

young hornet
#

Hey everyone! im working on a blockchain game base on Hive Blockchain and im using https://docs.hiveauth.com/ to authenticate the players to their wallets. Now i want to authenticate the player to the UGS so i use the username/password option but there is no recovery password function yet so i saw that there is an opcion call Custom ID and i wanted to know if there is a way to connect both authentications but i dont see a lot of extra info about custom id so i almost in blank there

warm steeple
#

@dense cipher Thanks, adding the 3.2.0 Authentication Package manually did work, learned smth new about Unity, thank you. Another question, I think I saw some Custom ID server side example code some days ago, but can't find it anymore. Do you know if there are some example codes available?

sick hamlet
tall void
grave anchor
#

Help with Unity Cloud Saving please.

We're sending JSON to the cloud, which requires a dictionary of string, object.

We place the JSON in the object, but it then rewrites the code adding slashes in parameter fields. How do we stop this?

mental umbra
# grave anchor Help with Unity Cloud Saving please. We're sending JSON to the cloud, which req...

Hi there!

If you just pass the object without seralization that should resolve it (it will convert it to JSON automatically)

public async void SaveData()
{
    var data = new Dictionary<string, object>{{"keyName", "value"}};
    await CloudSaveService.Instance.Data.Player.SaveAsync(data);
}

You can then load it back like this:

public async void LoadData()
{
    var playerData = await CloudSaveService.Instance.Data.Player.LoadAsync(new HashSet<string>{"keyName"});
    if (playerData.TryGetValue("keyName", out var keyName)) {
        Debug.Log($"keyName: {keyName.Value.GetAs<string>()}");
    }
}
mental umbra
mental umbra
# tall void Does anyone know how I can run commands on my servers as described on this page?...

This example from @fickle stratus is for Cloud Save, but you might find it relevant for Cloud Code as the pragma should be the same:
https://forum.unity.com/threads/cloud-save-x-rest-api-unauthorized.1516343/

grave anchor
mental umbra
# grave anchor

Hmm from the error message it looks like you are on an older version of Cloud Save (v2.0.1 from last year), which doesn't have the new methods like CloudSaveService.Instance.Data.Player.SaveAsync(data). If you use the Package Manager to update to the latest version (v3) and use the new methods it should work as above.

[ There should be an "Update/Refresh" icon in the Package Manager which should upgrade you automatically, but you can also use the "+" icon and specify the package name as "com.unity.services.cloudsave" and it should also update to the latest version it can find. ]

Older versions of the SDK had different behaviour and methods for loading/saving.

Note: The older methods are still present in the new SDK, so it's not a breaking change to upgrade, but the older methods are marked as obsolete and will display warnings where used, you will need to use the new method names to get the benefit of the new behaviour (but then you can save/load data more easily, like the example above).

grave anchor
#

Right! Let's get the update, thank you.

dense cipher
#

Call from Unity game server (Multiplay)

brisk peak
#

just spent like 2 hours to find out i cant upload a json file in a module kekwait

brisk peak
#

not sure if this is where i should post this but when i make changes in my code then unity reloads and i exit im getting an error:

NullReferenceException: Object reference not set to an instance of an object
Unity.Services.Analytics.AnalyticsContainer.OnApplicationPause (System.Boolean paused) (at ./Library/PackageCache/com.unity.services.analytics@5.0.0/Runtime/Runtime/AnalyticsContainer.cs:105)

#

im also getting one for OnDestroy

brisk peak
#

im having an issue with CallModuleEndpointAsync. im trying to instantiate prefabs after awaiting it and if i exit play mode before it finishes the objects will still be created. ive tried task.run with a the cancellation token and get an error that it can only be called from the main thread

#

ive "fixed" it by checking gameObject.activeSelf and catching the object destroyed exception. might be good if we could get this function in a coroutine like UnityWebRequests?

native depot
#

I'm using Cloud Build and have been getting Apple's missing Push Notification Entitlement error email from builds uploaded to Test Flight

  • I've tried implementing using PBXProject.AddCapability, CapabilityManager, adding CodeSignEntitlements, setting the capabillity as a PBXProject Build Property, and Inserting an entitlements file with the required entitlement directly through script.
  • I have debug messages within the cloud build process showing that the entitlements file does exist and is correct but we still get the missing entitlement email.

Has anyone run into this issue before or implemented Push Notifications on iOS in Unity Cloud Build?

grave anchor
# grave anchor Right! Let's get the update, thank you.

Hey Iain, sorry another question on this topic.

So we updated, and we started updating our calls to the new one.

To repeat, we have a custom JSON class that we want to send and receive as standard JSON to the players cloud.

Here's how I'm sending it, I haven't tested it yet, but no errors.

#

But when I try to load it back in, how am I expected to format the code? Previously we used:
var data = JsonUtility.FromJson<TitleData>(entry.Value);

But entry.Value is an item and can not be treated as a string.

Are we supposed to just parse it as an item, do we convert to string and json convert it there?

#

The problem I'm having is once I have the item, I need to put its contents into our class - which wont just accept the item directly.

mental umbra
# grave anchor Hey Iain, sorry another question on this topic. So we updated, and we started u...

As a really simple example, you can do this to specify the type for each property:

public async void LoadData()
{
    var playerData = await CloudSaveService.Instance.Data.Player.LoadAsync(new HashSet<string> {
      "firstKeyName", "secondKeyName"
    });

    if (playerData.TryGetValue("firstKeyName", out var firstKey)) {
        Debug.Log($"firstKeyName value: {firstKey.Value.GetAs<string>()}");
    }

    if (playerData.TryGetValue("secondKeyName", out var secondKey)) {
        Debug.Log($"secondKey value: {secondKey.Value.GetAs<int>()}");
    }
}
grave anchor
#

Oh, I don't think we're using it in this way. As our player saves are huge. Each 'key' is the save, which contains the entire contents of that JSON save file.

#

So this is one key, full of JSON. We just want it plain formatted, without the added slashes.

#

This was working by the way, I believe platform updates Unity's end added this change.

mental umbra
#

Ah, so if you save the contents of a JSON file to a key it will be treated as a value (e.g. a string). You would have to load the value as a string and then parse it from JSON when getting it back if you wanted the value of a key to also be JSON.

#

Anecdotally quite a lot of folks do the same thing, so you would not be alone - I think the syntax of the older version of the SDK meant a lot of folks found this easier so ended up going down that route.

grave anchor
#

OK, this is exactly what we were doing - sorry to keep you at this. But the specific issue is - when we send it to Unity, it now adds backslashes in the cloud.

#

It never used to do this, we didn't change our code.

mental umbra
#

Hmm, we haven't changed the service, as all the new SDK methods use entirely new endpoints (and the old methods in the SDK work the same and use the same methods on the backend).

It's hard to understand without an example of what your code to load the object back looks like.

grave anchor
#

OK, so I'm actually locked out of Unity Dashboard as it seems 2FA has been enabled. 😅

#

I can't test/debug this at the moment.

#

Leave this with me, I'll do some testing - the issue is still just at the saving level. Once that JSON hits the cloud, it changes the formatting for some reason. Which makes it impossible to read back, as it's not JSON with these new slashes.

#

I'll see if I can play with how we send it, to stop that from happening.

mental umbra
#

Okies! Hmm yeah I'm not quite sure what is going on. I know I mentioned the Samples that come with the SDK already, but calling it out again as it's got so many use cases and might be helpful 🙂

In case it helps, it's always possible that the Dashboard UI is doing something funky, if you suspect that do let me know and will raise a ticket (I don't think it is, just mindful of the possibility).

torn sapphire
sick hamlet
dense cipher
#

Question - Need some help properly setti...

zinc marsh
#

Is there any decent documentation on VIVOX anywhere? The documentation barely gives my anything to go off - as far as I can tell it doesn't say anything about how to actually get the sounds to play in game?

zinc marsh
#

This documentation too doesn't really seem to say anything about how to actually hook this up to an audiosource

#

I hate to be a downer but my experience with VIVOX so far has been nothing but an absolute shambles. Does anyone actually test these services or try to use it from scratch?

warm badge
sick hamlet
#

you do not need to manage these yourself

#

did you look at a sample?

#

i'm not sure you want to do this though

#

you will already hear the audio. it isn't mixed through the scene by default

zenith knoll
#

Hello. I started working on a project on my macbook, Unity 2022.3.13f1, based upon the default 2d template project, using unity version control. Haven't changed any settings at all except the default editor, and now, after spending days developing on the macbook, I figured I'd like to use my windows desktop instead, using the same version of unity. Added the remote project in unity hub, and first time I opened the project, I noticed it opened a blank scene, and as such, I switched to one scene in the project, and it was almost completely blank, since almost all prefabs was missing. Restarted unity, and it was still blank, tried to play, and unity crashed after a few seconds. I have no idea what is missing... Isn't the default unity version control settings usable? All files seems to be there, as they should, but a lot of my sprites are blank in unity, but I can clearly open them in Explorer and they're there. Any tips or ideas?

native depot
sick hamlet
zenith knoll
zinc marsh
zenith knoll
#

Somehow it is resolved now. Removed the project from unity hub, deleted the folder, readded the project, opened it, and it was working... Dunno what changed since I haven't changed anything at all 😮

#

Same changeset as yesterday

brisk peak
#

is it normal to get a module not found error during a cloud code cold start?

#

it seems like im getting it every time

warm steeple
#

Hey, when I create a player by using Custom ID Authentication (so it wasn't in the Unity Player db before) does it always create the player in all environments or only in the environment addressed in the Token Exhange Api? At the moment I can see all players created despite which environment I chose in the UGS Player Menu:

placid mural
# zinc marsh Ah cheers. The documentation that's linked through from Unity cloud just doesn't...

Hi, I hope your project has been progressing well since being able to find the right docs. The docs for Vivox has been in transition recently as we've been fully migrating everything from the old docs.vivox.com site to docs.unity.com. For anyone that has been having difficulty locating the correct docs we know it's been frustrating.
We're continuing to consolidate towards https://docs.unity.com/ugs/en-us/manual/vivox-unity/manual/Unity/vivox-unity-first-steps as our recommended starting point.
In case anyone is searching here and runs into a similar issue, v16 introduced a number of changes to our APIs and has different documentation. Any page labeled v15 will be out of date. We still support v15 for any live titles so we need to keep both doc pages alive in parallel.

#

Adding an unrelated comment that will hopefully help anyone searching for an answer. If you aren't able to locate Vivox v16 in the package manager this is because we initially released it as a preview. In this case you'll need to manually add it using com.unity.services.vivox.
Our next release later this month will be taking v16 out of preview and it will be fully discoverable again. Searching back through the channels I've seen a number of people run into this and should have shared it sooner.

dense cipher
#

Hey, when I create a player by using

torn sapphire
#

in Cloud Code Modules, are my classes & cloud functions allow to be static?

warm badge
#

Are there any tips for getting Cloud Code Module size down? The ccm file is ending up at 32MB. I can't figure out why its compiling all these extra dlls.

gaunt sun
#

!collab

boreal gladeBOT
cunning thicket
#

in Cloud Code Modules, are my classes &

#

Are there any tips for getting Cloud

grave anchor
# mental umbra Hmm, we haven't changed the service, as all the new SDK methods use entirely new...

Hey Iain, we resolved this by stripping the additional slashes once we get the data from the cloud, not ideal but it works.

I noticed you've added custom game data, how do I reference that? I can't find it in the docs. I'm looking at CloudSaveService.Instance.Data.Custom.LoadAsync I believe?

Basically we generate on the fly, reward keys for players when they complete certain challenges.

When we generate one, we want to add it to a public database so that we can prevent duplicates, or players redeeming them over several accounts.

Is this the best way to do it?

grave anchor
#

Also, a CDN addressables question. Whenever we do an update, our users have to download the entire CDN files again (200mb odd). Does Unity have a patching service, for users to update with just the changed files from the previous version?

young hornet
#

Hello! Im using unity authentication and cloud save. i have a problem when in my game i come back to the menu scene. When the game starts i log in and load the player data correctly, then i enter on the main game scene and there i can also load and save data perfectly but when i come back to the menu scene and load the player data again the cloud save throws me an error about there is no Player ID but if i try to log in again it tells me im already sign in

errant grotto
#

Does anyone have a script for player model

grave anchor
grave anchor
#

An issue with Unity Billing today. On Android, a purchase completes on Googe Play, it takes the money but then errors about receipt validation - the user isn't given their item.

I'm also seeing a JSON Parser exception when trying to add our Google Play License Key into the IAP Options or Receipt Validation Obfuscater.

JSONParseException: Cannot parse json value starting with '<!doc' at line 1, column 1
UnityEditorInternal.JSONParser.ParseValue () (at <1f0be198f5164d2489de92f22c998266>:0)
UnityEditorInternal.JSONParser.Parse () (at <1f0be198f5164d2489de92f22c998266>:0)
UnityEditor.Connect.PurchasingProjectSettings+EnabledState.OnGetGooglePlayKey (UnityEngine.AsyncOperation op) (at <e5f4d202b75e4ecbb6aa97b96ee17d45>:0)
UnityEngine.AsyncOperation:InvokeCompletionEvent()

#

Currently on V 4.1.5, have also tried the latest, 4.10.0

raven echo
#

Implementing Reward Vouchers

raven echo
#

IAP JsonParsing Issues

torn sapphire
#

Does Cloud Code Modules offer a way to persist some data (can be short term)

#

For example when a player makes several API calls to my CCM, it would be very useful to group & track those calls and then send them to my permanent storage (database) in one go

#

Concrete example: a player is buying items but they're spam clicking it to buy a lot really fast
by the time the 1st click is saved to the database, there's already 3 more calls going to the database that will create duplicate items
if I could store these in memory somehow (I don't know how to do this at all) and then send them to the database with 1 database call that would be perfect

raven echo
#

Batching Cloud Code Calls

odd rivet
#

Does netcode GameObject not work with Entities net code? Currently their assemblies are conflicting becuase they are both called Unity.Netcode.Editor

#

I was thinking that I could mix the two though where needed

raven echo
#

Netcode for GameObjects and Netcode for Entities Compatibility

cunning temple
#

Hi folks, I have successfully made game which is running fine on PC but when I want to build the game for android, I get this error

The type or namespace name 'Multiplay' does not exist in the namespace 'Unity.Services' (are you missing an assembly reference?).

So do I need to create assembly definition? , I have tried re-importing project files and also re-generating files, nothing worked, can anyone please tell me what is wrong here, Thank you in advance

warm badge
cunning temple
#

Oh cool thank you so much appreciate your reply @warm badge

fair hedge
#

I just tried my first devops cloud build and got what appears to be a "funny" error. The end of the log says success, but the build itself says failed because of two errors. In the log I found the following:

[error] Downloaded c:\workspace\workspace\p\Packages\com.singularitygroup.hotreload\Editor\Resources\error.png from XXX@cloud
[error] Downloaded c:\workspace\workspace\p\Packages\com.singularitygroup.hotreload\Editor\Resources\error.png.meta from XXX@cloud

Is it possible it regex found the word error for the image names and thought it was an error?

raven echo
#

Cloud Build Error

warm steeple
#

Hi, I am trying out Cloud Code for the first time and getting the following error when trying to call my HelloWorld module:
I am rather sure that I set the right environment in the Project Settings -> Environments (dev) and in the Code when initializing UGS (by using SetEnvironmentName Options at UnityServices.InitializeAsync). I see my Analytics Data and my Player Authentication Data using Custom ID in the right environment.

#

Also deploying the module by using the editor seems to work, its deploying without errors and I can also see the module in the right environment.

#

What else can lead to this error?

raven echo
#

Cloud Code Module Missing

topaz olive
#

Hello, I have a mobile game that uses Vivox for voice chat. The problem is that the Vivox Authentication doesn't work well in my country due to internet restrictions and requires clients to use VPNs for authentication.
I wanted to ask if it is necessary to actually authenticate Vivox users or not. I'd be grateful if someone could answer me.

torn sapphire
#

I'm looking for a solution for my game:
It's an Idle game with as core feature it being multiplayer co-op, players don't actually play with each other, but they co-op through trading.
So it's a single player game, but then players can and need to trade things they find to get stronger.
Being multiplayer, this means I need to run my game logic on a game server to prevent cheating.

I thought I could do this with UGS Cloud Code Modules.
But there's no way to save any persistent data in CCM so I'm now using a database, which slows everything down quite a bit and gets messy.

It also seems running my game logic on CCM would use up way too many calls.
Every player is killing monsters at a speed of 1/0.6s so I'd use up probably 2/3 calls per second per player at a minimum.
Server has to spawn a monster, calculate damage & health and spawn loot.

Does Unity offer any more suitable service? Or do you see any way I could make this work with CCM?
Or should I look for another solution? I'm thinking a game server that can store some persistent data in memory, but not sure what to look for.

warm badge
torn sapphire
#

and I'd still need a server to make the calls to cloud save, since I can't trust the clients

warm badge
hasty lance
#

How to create server browser for Game Server Hosting?

brisk peak
# hasty lance How to create server browser for Game Server Hosting?

🌍 Learn more about Game Server Hosting https://on.unity.com/3ZW9VZT
❤️ Watch my FREE Multiplayer Course https://www.youtube.com/watch?v=7glCsF9fv3s
✅ Get the Project Files https://unitycodemonkey.com/video.php?v=IvCVFywNXMc
🌍 Get my Complete Courses! ✅ https://unitycodemonkey.com/courses
👍 Learn to make awesome games step-by-step from start to ...

▶ Play video
hasty lance
warm badge
hasty lance
warm badge
brisk peak
#

any chance we get dedicated server support for cloud code in the sdk soon?

warm badge
#

Using lobbies might be easier. Just have the server create a lobby OnServerStart and keep the lobby data updated

brisk peak
#

using the rest api feels kinda bad after getting used to how easy the sdk is for player requests

dusk night
torn sapphire
dusk night
torn sapphire
#

not sure yet, haven't started on the systems yet
but my weapons for example will have a lot of different mods and then in the AH you'd be able to filter for weapons of a certain type that have a specific mod with values between min & max
there will be all types of different "currency" items like leather, iron, herbs, ... that are tradeable
same with modifiers on the different armor types
it's quite a lot

sick hamlet
# torn sapphire I'm looking for a solution for my game: It's an Idle game with as core feature i...

you should select a backend framework you are most comfortable with.

  • do you have any experience with any command line build tools, anywhere? for example, using python, have you ever authored a setup.py or pyproject.toml, or used pip install on your own code; or, have you ever authored a package.json and run npm install your-own-package? or have you ever used dotnet publish? or gradle shadowJar?
  • do you use git? do you use it from the command line?
brisk peak
#

im still getting this error on cold starts with cloud code. "Module with the name --- was not found. Ensure that it is published to Cloud Code for the correct environment" with response code 422

i have it set up to retry specifically for this error then it processes fine but im just wondering if im doing something wrong? all im doing in my ICloudCodeConfig.Setup is setting up dependency injection and setting a reference for my database

#

i just replied in the thread made a few days ago

vivid gyro
#

Hey there, I'm using Vivox for my game's voice chat. I want to use 2 channels. A main 3D/Positional channel and a 2D channel that is used for a walkie talkie. However the player talks into the walkie talkie channel they no longer talk into the 3D channel.
Here is my code:

This is subscribed to the VivoxService.Instance.LoggedIn event

private async void LoggedIn()
    {
        await VivoxService.Instance.JoinPositionalChannelAsync("Default", ChatCapability.AudioOnly, new Channel3DProperties(32, 1, 1.0f, AudioFadeModel.ExponentialByDistance));
        ChannelOptions options = new ChannelOptions();
        options.MakeActiveChannelUponJoining = false;
        await VivoxService.Instance.JoinGroupChannelAsync("WalkieTalkie", ChatCapability.AudioOnly, options);
        await VivoxService.Instance.SetChannelTransmissionModeAsync(TransmissionMode.Single, "Default");

        await VivoxService.Instance.SetChannelVolumeAsync("WalkieTalkie", walkieTalkieEnabled == false ? -50 : 0);
    }```

And this is my update
```csharp
private void Update()
    {
        if (!hasUsername && username.Value.ToString() != "")
        {
            gameObject.name = username.Value.ToString();
            hasUsername = true;
        }

        if (!isInVivoxChannel) return;

        VivoxService.Instance.Set3DPosition(gameObject, "Default");

        if (!IsOwner) return;

        if (Input.GetKeyDown(KeyCode.R))
        {
            walkieTalkieEnabled = !walkieTalkieEnabled;
            VivoxService.Instance.SetChannelVolumeAsync("WalkieTalkie", walkieTalkieEnabled == false ? -50 : 0);
            UIDebug.instance.wtStatus.text = "Walkie Talkie Status: " + (walkieTalkieEnabled == false ? "Off" : "On");
        }

        if (walkieTalkieEnabled)
        {
            if (Input.GetKey(KeyCode.E))
            {
                VivoxService.Instance.SetChannelTransmissionModeAsync(TransmissionMode.All);
                UIDebug.instance.wtEnabled.text = "Talking Into Walkie Talkie: True";
            }
            else
            {
                VivoxService.Instance.SetChannelTransmissionModeAsync(TransmissionMode.Single, "Default");
                UIDebug.instance.wtEnabled.text = "Talking Into Walkie Talkie: False";
            }
        }
        else
        {
            VivoxService.Instance.SetChannelTransmissionModeAsync(TransmissionMode.Single, "Default");
            UIDebug.instance.wtEnabled.text = "Talking Into Walkie Talkie: False";
        }
    }```
shut rampart
#

How do I get the current services environment at runtime? I can only find editor APIs

raven echo
#

Getting the Environment in Use

ivory ledge
#

does anyone know how to fix the visual studios product key?

torn sapphire
#

UGS Cloud Save: Player Data has a limit of 2000 key/value pairs per Access Class
2000 keys in the default Access Class
2000 keys in Public Data
2000 keys in Protected Data

What does this mean exactly?
Say I'm trying to save items for players
Can I only have 2000 items total?
Can I only have 2000 players total with unlimited items each?
Can I have unlimited players with 2000 items each?

This seems very limited? Unless it's the last case, that seems reasonable

warm badge
shrewd magnet
#

Are the services down? I can't connect to my account anymore in the Editor. Relinking doesn't work either since the Refresh tells me there are Network Issues

deft token
#

yes mee too

slender arch
#

me too

mental umbra
# warm badge If you max everything out it would be 6000 keys per player. There is no limit to...

Yes, this is correct (I appreciate that adding Access Classes had made this a bit more confusing, as the limits are per Access Class it is indeed technically 6000!).

@torn sapphire So yes it's "Can I have unlimited players with 2000 items each?" yes that's correct the limit is per player (and it's actually a bit more than that, because 2000 per access class).

I'll get the documentation updated to make it clear the limits are per player.

Of course when 2000 items per player are not enough you can use JSON as @warm badge suggests, in fact that's what a lot of folks do, using seralized JSON data as a value for a particular slot rather than mapping to a primitive like a string or a number.

If you need a lot of data per player (more than 5MB total) worth noting you can also have unlimited Game State objects (Custom Items) and then tie those back to a player.

e.g. You could name a Custom Item with a name like "{player_id}_inventory" and store all the inventory items for a player in a Custom Item object with a predictable name, which each Custom Item giving you another 2000 slots / 5 MB per item.

To get more exotic, you could also define a key as an Index and use a Query to get back all items with a specific value for a key like "PlayerID" if you wanted to have essentially unlimited dynamic storage for each player (e.g. if you had a game where players could have an unlimited player houses / spaceships / cars / etc. and you could then have unique properties for each of the things).

I think in most cases normal Player Data would be enough though and you probably don't need to do anything fancy unless a game has really large inventories of some kind.

coral bear
#

!status

boreal gladeBOT
deft token
#

I'm trying to call BuyItem from Cloud Script

#

to make the virtual purchase from cloud script and not from the game itself, because a need to do other things before buying in the future

mental umbra
# deft token <@1068529132905963642> Hi, i'm trying to use this documentation page https://doc...

Hi Andrea, That's really clear information, thank you!

I'm not actually sure what's going on there as I'm not too familiar how Cloud Code, Economy and Access Controls interact, but I'll relay this and see if anyone can help.

If you haven't already, I would definitely suggest reposting this to the forums at https://forum.unity.com/forums/cloud-code.725/

mental umbra
# mental umbra Hi Andrea, That's really clear information, thank you! I'm not actually sure wh...

I know this older example may not bee so helpful as you are using Cloud Code Modules (C#), which is great and recommend, and this example is in Cloud Code Script (JavaScript) but in case it's helpful and you haven't seen it yet:
https://docs.unity.com/ugs/en-us/manual/cloud-code/manual/scripts/use-cases/redeemable-coupons#Using_Economy

I'll specifically relay your use case to some of the staff engineers here so they can think about how best we can help folks solve for this use case though more explicit examples.

mental umbra
mental umbra
deft token
#

@mental umbra My issue at the moment is understanding why with my current policy settings the services are blocking me from make a virtual purchase from cloud scipt instead of the game itself

#

because from what i can see from the first page i posted, in the example, they are blocking inventory currencies increment/decrement from client but demonstrating that is working on cloud script, in this way the game can not be exploited

warm steeple
#

Hi, is the order of returned items fixed (in the order of the according keys) or is it random when I use gameApiClient.CloudSaveData.GetItemsAsync() ? Thanks.

shrewd magnet
# deft token yes mee too

This was unacceptable. My Game server wasn't able to initialize to Multiplay services! I need resilience with my game servers towards Multiplay otherwise the experience of players is suffering. I am a bit pissed

deft token
shrewd magnet
deft token
shrewd magnet
#

ok my bad then - I really thought the outage was also affecting the cloud services... 😮‍💨

mental umbra
warm steeple
mental umbra
# deft token thanks!

Aah, hey I think it's maybe because you are using the player's accessToken (which only has read access) but it should instead be serviceToken (which can read+write) to make the purchase.

deft token
mental umbra
muted turret
#

I moved to a new computer and how can I transfer my project in Unity to the new computer completely?

raw cloak
muted turret
#

I created a project and when my character starts running it becomes blurry. What is the reason?

raw cloak
#

Again, nothing to do with this channel. If you have general Unity questions you can ask in #💻┃unity-talk .

However you need to actually provide details or examples and not just a vague question like that.

zinc marsh
#

I just updated to Vivox 16.0.1 from 16.0.0-pre.1.
Now my Unity crashes everytime I open it.

#

Unity 2023.2.0b17

#

Also are there any Vivox Unity samples? I hate to be that guy but the Vivox documentation is pretty bad

faint crag
zinc marsh
#

The main Unity voice solution doesn't support the beta version of Unity?
I've only updated to beta since all of the Unity Netcode stuff requires it. I would've thought the main use-case of Vivox would be Netcode - why is Unity so fragmented?

sick hamlet
#

The main Unity voice solution doesn't

rotund ivy
#

Hi everyone Ive been using unity engine for a few years now and im still a bit new. I was making a new Chess game a few weeks back and i updated my unity from 2021 to 2022 and ever since I havent been able to even create a new project in any template without it asking to start off in safe mode and I get four (CS0246: errors) you can see them in the screenshot attactchment, does anyone know anything about this?

warm badge
rotund ivy
#

I have 10 times Ive been trying everything i can for the last 10 days over and over

#

Ive tried un-installing and re-installing unity 2022-2021 and the Unity Hub plus Ive tried Windows 10 recovery and starting again

#

deleted the unitypackaged folder and restarting project

#

deleted Library folder in project file

#

I have no Idea what to do

#

also tried adding in the using namespaces on the scripts that have the CS0246: error

#

Plus thing is I have no idea about anything im doing I may need someone who knows what theyre doing take my PC remotelley

final halo
# rotund ivy I have no Idea what to do

did you do the suggested thing and remove the test framework package? Presumably your project has included an incompatible version, so either remove it or edit packages manifest to point to the updated one

rotund ivy
#

I just tried completely removing the whole unity hub and editor right off my PC from appdata, regisstry editor and uninstalled the whole thing, and now ive just reinstalled it all on a completely different hard drive im opening a project now to see if that works!

final halo
#

if you're opening the same project and not a new one, that will do nothing because your old project is still pointing towards an incompatible package

rotund ivy
#

BOOO YA! IT WORKED!

final halo
#

is it a fresh project or the old one?

rotund ivy
#

projects opening fine now without errors

final halo
#

🤷‍♂️

rotund ivy
#

Thanks EvilReeper for the help

rotund ivy
#

Was a fresh project I deleted all my failed projects before i reinstalled unity on a new drive

#

I think it happened because I had Unity Hub and Editors on all sorts of drives because, my PC broke down months ago and I Had to Fix my motherboard and I was having issues with Disk drive boot up orders, so I had Unities installed all over 😒

karmic hornet
#

Hey everyone, we are working on a project as part of a team.

There are 4 people on the project with 3 seats assigned, including the person to whom the following issue is happening to:

Whernever he tries to Build an Run this error appears:

Unable to access Unity services. Please log in, or request membership to this project to use these services.
When trying to build I get the following message:

Missing Project ID
Because you are not a member of this project this build will not access Unity services.
Do you want to continue?```
#

Thing is that he already is a member and is assigned a seat

dawn aspen
#

Hey all - I'm curious how you guys end up unit testing Cloud Code functions? I'm currently doing a manual suite of Postman tests against my cloud function endpoints and that feels... clunky...

dawn aspen
#

And a follow-up question: How do you debug Cloud Code functions? I'd love to be able to attach a debugger to a process to step through the code

hasty lance
#

Hi. Unity support doesn't want to answer me. I hope that somebody will help me here.

I have problem with cloud code. I do increment currency request on cloud code module for daily reward and get Forbidden response error.

Here is my Cloud code function:

I don't know if this will help, but here is my project policy:

Here is the error in unity:

dense cipher
#

Hey everyone, we are working on a

#

Hi. Unity support doesn't want to answer

dense cipher
#

And a follow-up question: How do you *

whole peak
#

If I want to add in-game currencies I should combine cloud code and economy?

warm badge
whole peak
fair hedge
#

Is there a document somewhere that describes how to open an existing project from UGS Unity Version Control from Unity Hub?

fair hedge
#

Something like 'Open From Source Control'

#

I created a local project and tried to link, but got an error that the name was not available, as it does already exist.

fair hedge
#

Add -> Remote Project. 🙂

warm steeple
#

Hi, is there a documentation for the leaderboards configuration file, especially for the reset configuration, couldn't find it anywhere. Thanks.

tacit nebula
#

Hi everyone! We’re struggling with Unity Player Authentication and Google Play Game Services, because we can’t reach the login…

#

We get a yellow warning message in Android Logcat, saying “ERROR: Returning an error code. GooglePlayGames.OutUtils.PlayGamesHelperObject:Update()”

#

We’re using Unity 2022.3.14 and latests Google Play Games SDK (11.01), Resolver, Unity Authentication package…

#

Could anyone help us, please? 🙏🏻

rain adder
#

Hey guys, I am trying to work on a little hobby project with some other developers with Unity Version Control.

They were able to download all the assets and everything but all the materials are pink on their screen. Some of the settings are off. Can't figure out how to fix it.

(I assumed they would be able to simply download & open the project with all of my project settings and everything)

#

Nevermind, they just had to assign the URP settings and reload. All fixed!

random copper
#

Hi everyone, I am using UGS authentication for the login system in my project.

I wonder how I can let the players know that their username already exists when they register for a new account. How can I catch this exception and notify my players?

lost spear
#

@random copper You are probably storing data somewhere of already registered players?

#

Guys, I have a problem regarding Multiplay, when I create test allocation in Game Server Hosting, it crashes/turns off after 5-6 minutes or so. I assume issue is that in my scripts I have no code regarding multiplay SDK, i saw some tutorial which says those are necessary to keep server alive. While server is active i am able to connect as client to server and all works well.

DO you know some documentation to help me out implement stuff in scripts in server build that keep server alive? Or do you know any tips what causes those crashes and how to fix in general. Ty

random copper
random copper
warm badge
lost spear
mental umbra
random copper
#

Hi, I am making a mobile game and using the Authentication service to allow players to register accounts with a username and password. The issue is that I want the player's name to be unique, but it seems Unity allows players to have the same and only differ in suffixes.

So, I'd like to ask if there's a way for me to check whether the playername a player wants to register already exists or not?

weak saffron
#

can Lobby service be used in LAN games?

dense cipher
#

can Lobby service be used in LAN games?

gaunt sun
#

!collab 👇

boreal gladeBOT
haughty drift
lost spear
#

Hey guys quick question:

Do IPs of servers given in Game Server Hosting stay fixed (dedicated) after server is officially started or they change?

I am asking because right now i am using some just to start test allocation and i noticed IPs changing from time to time

lost spear
#

also, where can i check how much of those $800 i spent so far on testing

warm badge
lost spear
bleak juniper
#

Paths from Cpp or C++ or just a Display Bug to fix?
//in bad case means goto root in windows, dangerous

random rivet
#

does unity gaming services allow data storage and comparison or do i need a seperate relational db?

for example lets say users submit answers to a question, and get points based on it, at the end of the day I want the person with the max points to get some reward, is this possible?

#

i was thinking to use supabase and store the user points from an edge function, but ugs is easier to integrate with unity ofc, so i want to try UGS, but not sure if it works for my needs

#

or is there a way to use UGS with a relational db

warm badge
random rivet
warm badge
random rivet
#

Oh dang. Then worst case is it possible to integrate cloud code with an external db?

warm badge
random rivet
random rivet
warm badge
random rivet
#

i see, makes sense thanks

#

can we also set cronjobs in cloud code?

random rivet
#

thanks so much!

mental umbra
# random rivet does unity gaming services allow data storage and comparison or do i need a sepe...

We released a series of updates to Cloud Save, including Queries, non-player data, Access Classes, Files and a new (easier to use) SDK surface this year - and we increased the storage limits significantly.
https://docs.unity.com/ugs/en-us/manual/cloud-save/manual/concepts/queries

Using Cloud Save with Cloud Code (and Cloud Code Triggers) should be great for this sort of use case.

Queries works with Cloud Code (as is in both the C# and JavaScript SDKs). It's also supported in an experimental release of the SDK for Unity, which I can share with anyone interested; it will be out in early January - it's code complete, just delayed release 2-3 weeks because of the holidays.

This is slightly different from the use cases addressed by Persistant Worlds, although there is overlap and we have been collaborating with the team working on that this year. As well has benefiting from integration with the Unity ecosystem, Cloud Save can be more cost effective than paying for a hosting for a dedicated relational database and solves for a huge range of use cases - everything from Clans/Guilds, to shared Quests/Community Goals, Auction Houses, card games, Battle Passes, player rewards, etc.

We recognise there are some use cases call for more advanced features though; for situations like those you can use an external database with Cloud Code - with Cloud Code Modules (C#) you can use any database, for Cloud Code Script we've also enabled MongoDB support out of the box.

As some of these features are new - many of them went live just head of Unite - we are still working on building up examples for these use cases that show how to build them, but the features are live and we are already seeing folks starting to use them. If you have any questions would encourage folks to use the forums as I know a lot of staff engineers and engineers who work on those features are active on there!

whole peak
#

Uh. So my dedicated server structure is like this. Login scene with one script that will initialise services then auto move to the main scene. In the main scene we have Multiplay script with query handlers and backfill tickets. OnAllocate will be called by matchmaker that is on !dedicated server (normal players) in allocate callback we ready the server and set port and then move to game scene by unity network scene manager. So when the client receives info that the server was started then set the port to the server port and start the client. Since the server is in the game scene then the client will be automatically moved into the game. In game when it ends then destroy server

obsidian bobcat
random rivet
#

can i rate limit my users from abusing the cloud code based on username or ip or some unique identifier or something else?

random rivet
#

is there more foolproof installation steps of the unity CLI on windows? im getting errors in all the ways i can see

#
  1. curl installer only works for linux and mac it says
  2. windows installer from github doesnt work for me, just opens and closes my terminal and nothing else is done
  3. if i try to download the zip and run build.py myself i File "C:\Python312\Lib\subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command 'dotnet publish Unity.Services.Cli/Unity.Services.Cli/Unity.Services.Cli.csproj --self-contained true --nologo -p:PublishSingleFile=true -p:TrimUnusedDependencies=true -p:DebugType=None -c Release -r win-x64 -o build/windows /flp:--verbosity:diag /flp:logfile=build/build.log' returned non-zero exit status 1 error
severe peak
#

Can someone please help me?

i keep getting this error and i dont know how to solve it
"Internal build system error. read the full binlog without getting a BuildFinishedMessage, while the backend process is still running"

safe ferry
#

Hello. I have a question about Vivox Participant Tap.

I'm using a script to create participant tap on joining the channel but I want it to set their positions to relevant player objects in order to make 3D Audio. How can I achieve this?

(I tried to make it in positional channel but it doesnt work for me)

lost spear
#

Guys is there a way for me to know if my server got request to connect client to it? My server was working fine but i did some updates to it and now i cannot connect to unity test server that i Allocate

#

it says that its running it didnt crash but i cant connect to it at all

#

how can i track server logs?

lost spear
#

Can anybody tell me how to track server logs and where to check did i get connection request by client? i am talking about UGS (multiplay)

round token
#

Anyone else have a problem to upload new builds on Multiplay? They fail sync every time after a while.

mint trail
#

Hey! Have a question about what "server density" means.
The doc says "server density = servers per machine".

But what is "server"? Is it the server binary I provide? Or is it a separate virtualized environment, like whole another Linux instance, running on the same machine?

And in case of multiple server binaries in the same environments, they will have similar IP, but will be listening to data from different ports, right?

#

Need to know to understand whether it makes sense to have serverDensity > 1 (my server binary will be able to run multiple game sessions at the same time anyways).

thick spear
#

It is possible to have currency with decimals? Or I should move it to the cloud save?

nimble river
#

hello, i am trying to sign in with steam, i've followed the documentation, but i get these errors:

obsidian bobcat
# thick spear It is possible to have currency with decimals? Or I should move it to the cloud ...

Games rarely use currency in decimal form, I'd rethink the game design and try to make it use integers instead.

But, if you really need decimals, you could first of all implement a float-to-int conversion system where for example 2.056f becomes 2056 in integer form, and send that currency into the server. Then when you want to fetch currency from the server, you load it and parse it to float from the integer form, for example that 2056 becoming 2.056f.
This would be bad for maintainability though so again, I'd just base the currency around integers instead of decimals.

warm badge
cunning temple
#

Hey guys, I'm getting this very weird error "[Netcode] [DestinationState To Transition Info] Layer (0) does not exist!" for animation from idle to shoot, I did search on internet but they only say to remove blend tree which I'm not even using, so anyone else got this error, if yes, how did you guys solve it, it would be immensely helpful, Thank You.

crude sandal
#

Hey! I've created a Cloud Code function where I save data using the _gameApiClient.CloudSaveData.SetCustomItemBatchAsync method. Can I view these saved data on the https://cloud.unity.com/ ?

dawn aspen
#

Unity Cloud

astral remnant
#

hey, can anyone tell me where can we find the job board channel in this server?

boreal gladeBOT
dense cipher
#

is there more foolproof installation

#

can i rate limit my users from abusing

uneven linden
#

Hey guys. Where can I see the pricing for some Unity services like Netcode, Economy, Lobby, etc? Can I use them for free?

brisk peak
#

free for testing abi

#

or low traffic

uneven linden
#

thank you usta

thick spear
#

Is there a way to use helper files/functions for cloud code (js) ? I tried functions with export, module.exports but everytime i'm getting "Bad Request. Compilation Error" during deployment

dense cipher
#

Is there a way to use helper files/

dry totem
#

Will this make all interaction with things such as remote config from in the editor be on the development branch, but then do I need to switch this to production before build or will it automatically make builds use the production environment

obsidian bobcat
woeful wing
#

why isn't working?

#

i set everything

#

id/env

warm badge
woeful wing
#

yes im logged

woeful wing
warm badge
woeful wing
#

i don't understand why they didn't make like a real app or sth

warm badge
woeful wing
#

and how do i see the file i want to deploy if it's outside the project? or folder?

#

i think it worked, ty

vital plinth
#

We are trying to use vivox voice chat in our project. However even with the sample provided in package manager, in some devices if game background music volume is more than 10%, voice detection does not work as intended. Voice going to other person is very low and unclear until around 30% background music volume and not audile at all after 50% background music volume. Is there a solution to that or the capabilities of Vivox are that much only?

vital plinth
vital plinth
whole peak
#

Is this how you update backfill tickets? ``` public async void HandleUpdateBackfillTickets(){
if(backfillTicketId != null && (ServerManager.Instance.players.Value < k_DefaultMaxPlayers) && !ServerManager.Instance.GameEnded.Value)
{
Debug.Log("Handle Update back fill tickets");
PayloadAllocation payloadAllocation = await MultiplayService.Instance.GetPayloadAllocationFromJsonAs<PayloadAllocation>();
List<Unity.Services.Matchmaker.Models.Player> playerList = new List<Unity.Services.Matchmaker.Models.Player>();
foreach (var authenticationId in ServerManager.Instance.AuthenticationIds)
{
playerList.Add(new Unity.Services.Matchmaker.Models.Player(authenticationId));
}
MatchProperties matchProperties = new MatchProperties(
payloadAllocation.MatchProperties.Teams,
playerList,
payloadAllocation.MatchProperties.Region,
payloadAllocation.MatchProperties.BackfillTicketId

        );
        try{
            await MatchmakerService.Instance.UpdateBackfillTicketAsync(payloadAllocation.BackfillTicketId, new BackfillTicket(backfillTicketId, properties: new BackfillTicketProperties(matchProperties)));
        }
        catch(MatchmakerServiceException e){
            Debug.Log("Error: " + e);
        }
    }
}```
#

Btw, no errors in editor so I hope it will work

woeful wing
#

for what i use this dependencies? i don't understand..

woeful wing
#

solved i think

thorny elbow
#

Is anyone able to tell me how to relink a project in version control?

#

I deleted a workspace and there is no option to "set up workspace" like there is in a fresh project

#

Some file seems to be cached telling my project that it exists in a workspace that is no longer there

#

Unfortunately there are next to 0 resources online for how to properly fix things with Unity Version control especially in editor

#

There should be some way to reset this from within the client as well

whole peak
#

Damn, I reached the maximum limit of Dev ops and it didn't reset this month. Help me😭

dry laurel
#

how to you sign out of unity player account? calling this alone.... PlayerAccountService.Instance.SignOut(); doesnt work

grave anchor
#

Morning all, we're using the new Unity Player Accounts and it works perfectly in editor. But when testing on mobile, we get a string escape null error (I believe from trying to login using their access token, currently debugging more). Any idea why? The code is the same across all paltforms from what I can see.

`#region UNITY REGISTER
public async Task RegisterAccountWithUnity()
{
try
{
PlayerAccountService.Instance.SignedIn += RegisterAccountWithUnityCallback;

        try
        {
            Debug.Log("Logging in to Unity.");
            await PlayerAccountService.Instance.StartSignInAsync();

            while (!PlayerAccountService.Instance.IsSignedIn)
                await Task.Delay(1000);
            Debug.Log("Logged in to Unity.");
        }

        catch (PlayerAccountsException ex)
        {
            Debug.LogException(ex);
        }


    }
    catch (AuthenticationException ex) when (ex.ErrorCode == AuthenticationErrorCodes.AccountAlreadyLinked)
    {
        // Prompt the player with an error message.
        Debug.LogError("This user is already linked with another account. Log in instead.");
    }

    catch (AuthenticationException ex)
    {
        Debug.LogException(ex);
    }
    catch (RequestFailedException ex)
    {
        Debug.LogException(ex);
    }
}

void RegisterAccountWithUnityCallback()
{
    RegisterAccountWithUnityCallbackTask();
}

public async Task RegisterAccountWithUnityCallbackTask()
{
    PlayerAccountService.Instance.SignedIn -= RegisterAccountWithUnityCallback;
    try
    {
        await AuthenticationService.Instance.LinkWithUnityAsync(PlayerAccountService.Instance.AccessToken); (NULLS HERE?)
        BootManager.Instance.AuthStateChanged();
        Debug.Log("User linked to email.");
    }
    catch (Exception ex)
    {
        Debug.LogError("ERROR REGISTER UNITY BROWSER" + ex);
    }
}
#endregion`
dense cipher
#

Morning all, we're using the new Unity

pallid cradle
#

I was wondering if anyone knows - if a company signs up to use as a paying member Unity Gaming Services, what kind of additional dev support does Unity provide besides email, forums and this discord. Is there an engineer/dev assigned to the team as a contact to go to?

fair hedge
dense cipher
#

🐞 The Unity documentation for Cloud

zinc marsh
#

So I'm using Unity Vivox - and also MPPM (multiplayer play-mode).
I'm signing in with a unique profile in each instance, but for some reason the player ID is the same on each MPPM instance? Even though the Unity Authentication service I'm using states they have different IDs...

Any ideas? This is blocking testing

dry laurel
violet apex
#

hello, I want to experiment Game Server Hosting. As I see it's Free for new organizations and valid for 6 months. If I have 2 organizations will I have free credits on both of them? Let's say if I use all free credits on Organization A will I still have free credits on Organization B?

violet apex
#

What is the monthly cost if I have 7 available servers but they are not allocated. I am talking about Game Server Hosting (Multiplay)

warm badge
violet apex
#

But if game is on production I still need to have available servers constantly otherwise it will take a lot of time to allocate servers yes?

warm badge
violet apex
karmic hornet
#

Hello everyone, we are experiencing a weird issue with build and run.

Context: The game we are building has matchmaking, Lobby, Relay and HDRP (Which we have recently added - might be cause of issue)

When we build normally (i.e: save a build to local storage) the build is built correctly and runs. However, when using the 'Build and run' option in the dropdawn File > Run, from the Editor, we get a huge stack of errors.

Any ideas on how we might fix this?

Thank you

whole peak
warm badge
dense cipher
#

Hello everyone, we are experiencing a

zinc marsh
#

Heya, I'm using the Vivox Channel Audio Tap (or trying to), but when I enter a channel name in the box, it immediately disappears... Any ideas?

#

(with auto-acquire deselected)

lost spear
#

Why did server go offline after 15 minutes by itself?

warm badge
lost spear
#

in the events i get this :performed shutdown...

warm badge
lost spear
#

i dont have code to close server. I tried if i am connected to server or when its left without clients connected and same happens

#

dont know how and why

#

it does it on its own not if i press button to stop server or something

dense cipher
#

it does it on its own not if i press

whole peak
whole peak
deft token
#

I guys, i have a question, Cloud Code functions can be called only if client is authenticated, right? If so, how can i authenticate my multiplayer server to call cloud functions?

#

Or is just that i have to Inizialize services and then cal the cloud code functions but use the ServiceToken

dense cipher
#

I guys, i have a question, Cloud Code

wheat fiber
#

Assembly 'Library/ScriptAssemblies/Unity.Services.Core.Configuration.Editor.dll' will not be loaded due to errors:
Unable to resolve reference 'System.Security.Permissions'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
any idea what is going on here? was working fine yesterday
2023.3.0b1, latest package

#

but if true will be the fastest i've removed a package...

#

Switching editor (but not runtime) to framework does seem to solve this, not overly happy though will have to consider this...

worldly remnant
#

why is unity taking so long to download?

gaunt sun
#

why are you on an ancient version of the hub? 🤔

edgy vortex
#

Hi I use Unity 2022.3.14f to build a bundle, and the computer's memory increases. Even after building, it does not decrease.

worldly remnant
deft token
worldly remnant
#

oh ok

#

is it 3.7.0?

deft token
worldly remnant
#

ok thanks

unborn tartan
wicked swallow
#

Anyone has experience with Unity Analytics ? Do we have access to raw data (the database) when we use unity analytics ? For example, if I have several analytics calls with parameters called over several months, and I want to analyze something new, can I dig in the raw data and model the data as I wish ? Firebase and Google Analytics don't let the user do that, the data is aggregated and we don't have access to the event calls, and it bothers me a lot.

Use case example : An event is fired with 3 parameters : HasCat, HasDog, HasHorse. Boolean parameters. In Google Analytics, I can clearly see the distribution of people who have a cat, a dog, a horse separately. But there is absolutely NO WAY to tell how many users have 2 animals, because the events calls are not stored, only the result in separate tables.

raven echo
#

Analytics Custom Queries

dense cipher
#

Unity Services Web API docs

#

Assembly 'Library/ScriptAssemblies/

pure herald
#

Hello everyone, please advise on how to delete a custom event from Unity Analytics. I accidentally added an event to production and now I can't figure out how to remove it from the Event Manager?

charred sage
#

🔔 If you respond to this, please reply with ping on to these question so I know you responded to me 🔔

I just learned about Remote Config but wanted to know a few things...
#1 - Is there any sort of like limitations/pricing to using this (such as data limit / amount of variables / etc.)
#2 - Is the Environment ID sensitive data?
#3 - Is it fine to use this to balance updates without pushing updates to builds? Or is this more for testing purposes in development?

torn sapphire
#

Looking for some help/tips for cloud code modules.
I have a function that when tested on my pc executes in 2s
But on CCM is takes 7s to execute
The code includes some simple while loops and database calls.
Is CCM just really slow? Are there common mistakes that I should avoid?
I'm generating combat logs, doing some math to calculate dmg, but nothing crazy I think

dense cipher
#

🔔 If you respond to this, please reply

#

Looking for some help/tips for cloud

zinc marsh
#

Hey all, I'm using Vivox.

It says that it supports more than 1 channel at once, so when I do this line:

await VivoxService.Instance.JoinGroupChannelAsync(VoiceIntercomController.IntercomChannel, ChatCapability.AudioOnly);

And then add a channel tap in game, it works successfully.

But when I add another channel into the mix:

await VivoxService.Instance.JoinGroupChannelAsync(proximityChannel, ChatCapability.AudioOnly);

It no longer transmits on the intercom channel (in the code the proximity channel is joined before the intercom channel).

The transmission mode is set to 'ALL' for all channels, but I still can no longer hear any audio out of my channel tap. This is a blocking issue

#

If I switch the order of joining around, it's always the first channel I joined that works, the other one doesn't transmit.

worldly remnant
#

How can i shift the list to the right so i dont have to scroll back to white(Default) when i start the game?

granite orchid
#

hi could someone help with a bug

granite orchid
#

its giving me this but the scripts are there and they work

#

nvm got it fixed

granite orchid
coral bear
#

!mute 342603730404900864 7d and you too

boreal gladeBOT
#

dynoSuccess 4dcube was muted.

lean pilot
#

Me and My friend wants to work on a game his been working on but we don't know how Collaboration works in unity anything Helps!

warm badge
lean pilot
#

thanks

#

wait

#

so the project will be in our remote project tab?

warm badge
lean pilot
#

Ok when I get the chance I will test it with my alt

shut rampart
#

In all our user reports, the "GeoCountry" field is set to US even though they are coming from Australia, is this field set when Unity receives the report and why is it always set to this?

warm badge
lean pilot
#

ok

#

i think i did it

warm badge
lean pilot
#

ok

mint trail
#

Does game server hosting (multiplay) support custom environment variables?

vital plinth
#

What is the pricing of Vivox. Also if there is CCU based pricing, how is 1 CCU calculated?

warm badge
warm badge
vital plinth
warm badge
scenic dagger
#

Hey guys, can someone please help me understand? I want to monetize my game with In game advertising and I was looking at the pricing tab

#

Do I have to pay to put ads in my game?

dense cipher
#

Do I have to pay to put ads in my game?

mint trail
#

have a question about game server hosting (multiplay) server instance lifecycle.
Why do I need to listen to "Allocated" event, for example? Isn't the fact that the binary is running a proof of allocation?
Or can a server instance be running while not being allocated?

raven echo
#

Game Server Lifecycle

vital plinth
#

Unity is crashing when we play and stop play in editor when using Vivox. Is there a solution?

dark viper
#

Hi does anyone know what this error means ? :

{"type":"problems/invocation","title":"Unprocessable Entity","status":422,"detail":"Invocation Error","instance":null,"code":9009,"details":[{"message":"Error executing Cloud Code function. Exception type: TypeInitializationException. Message: The type initializer for '<module_name>' threw an exception.","name":"ScriptRunner.Exceptions.CloudCodeRuntimeException","stackTrace":["at <module_name>.InitializeNewPlayer(IExecutionContext ctx, IGameApiClient api) in /<path_to_my_module>/Core.cs:line 58"]}]}
flint venture
#

Hi, is there any way to switch the Unity Services environment at runtime? Or maybe we are doing something wrong.

Our use case:
-we do use Unity Services for our multiplayer game (Authentication, Lobby, Relay)
-right now each platform has its own environment (e.g. steam, playstation, nintendo_switch, etc.) because cross-play is not supported and users need to be separated
-we want to introduce a crossplay feature, so we created another "crossplay" environment and want to switch between the user's platform environment and "crossplay" environment based on the user's settings without restarting a game
-moreover, we want to have a global per-platform crossplay toggle (Remote Config service seemed like a good option for this)

But it seems like there is no (at least easy) way to switch environments in Unity during runtime. Reinitializing services with other initialization options does not work. Once services are initialized, they can't be "uninitialized"

mint trail
mint trail
vital plinth
#

When using Vivox for iOS, other game sounds start coming from earpiece speaker instead of main Speaker. I even tried

vivoxConfigurationOptions.SkipPrepareForVivox = true;

as mentioned in documentation and forums and still it is not getting fixed

vital plinth
#

I am unable to upload my build to TestFlight for testing in iPhone. I am getting the following error in xCode:

Asset validation failed
Invalid Signature. Code object is not signed at all. The file at path “App Beta.app/Frameworks/UnityFramework.framework/Frameworks/libVivoxNative.a” is not properly signed. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose “Clean All” in Xcode, delete the “build” directory in the Finder, and rebuild your release target. For more information, please consult https://developer.apple.com/support/code-signing.

vital plinth
# vital plinth I am unable to upload my build to TestFlight for testing in iPhone. I am getting...

This also:

Asset validation failed
Invalid bundle structure. The “App Beta.app/Frameworks/UnityFramework.framework/Frameworks/libvivoxsdk.a” binary file is not permitted. Your app cannot contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. For details, visit: https://developer.apple.com/documentation/bundleresources/placing_content_in_a_bundle

Apple Developer Documentation

Place bundle content in the correct location based on its type.

mint trail
#

Is it possible to run a Multiplay server locally in a way, where it will fully mimic a truly deployed server with allocation callbacks, automatic TTL deallocations etc.? Debugging in the cloud is sooo freaking slow, I don't believe people debug like that, having to upload a 200mb+ binary any time you want to test something.

#

Ideally within the Unity Editor, would be awesome if I could debug there

karmic hornet
#

Hello, does the user limit per project/ organization on the UGS prevent any more users from being able to link their project to the UGS from the editor?

#

We've been stuck on this issue for almost a month now, would really appreciate some feedback on this 🙏

karmic hornet
#

We tried everything we could, we even signed up for a Unity Pro free trial and nothing seems to be resolving the issue

#

Would really appreciate some expert help

#

We posted on the forums and emailed support as well, to no avail yet

neon cliff
#

Hi!! I dunno if this is the right channel to ask this... actually I am having an issue with setting up the Dedicated server for my UE project... I am trying to retrieve the server data as in the snippet but am not able to since they simply logs out null values... Additionally, I am not sure whether am I setting up the parameters correctly... am I missing out something

    Super::PostLogin(NewPlayer);

    GameWorld = GetWorld();
    GameInstance = GameWorld->GetGameInstance();
    ServerConfigSubsystem = GameInstance->GetSubsystem<UMultiplayServerConfigSubsystem>();

    const FMultiplayServerConfig& ServerConfig = ServerConfigSubsystem->GetServerConfig();
    UE_LOG(LogTemp, Log, TEXT("Server ID: %lld Allocation ID: %s Server Query Port: %u Port: %u Server Log Directory: %s"), ServerConfig.ServerId,   *ServerConfig.AllocationId, ServerConfig.QueryPort, ServerConfig.Port, *ServerConfig.


#

these are the errors I have come across from the log file

warm badge
warm badge
neon cliff
#

coz I couldnt find any file with that name in that location

lean pilot
#

Me and My friend did everything to try to Collab but its just not working We tried Devops, the repos and unity seats but I still cant see the project in my unity hub

warm badge
neon cliff
#

I did check the docs... and it only mentions for linux

#

and I dont use that OS

neon cliff
warm badge
#

But also the server needs to be built for Linux

neon cliff
#

this is the only server.json file I am aware of

warm badge
#

yes. you need put in these values
{
"queryPort": "$$query_port$$",
"serverID": "$$serverid$$"
}

neon cliff
warm badge
neon cliff
warm badge
#

You can remove the ip too

#

or I think its $$ip$$

neon cliff
neon cliff
#

am just giving it a go rn

#

@warm badge nothing changed...

LogTemp: Warning: Server ID: 0 Allocation ID: Server Query Port: 0 Port: 0 Server Log Directory:
LogTemp: Warning: Server ID: 0 Allocation ID: Server Query Port: 0 Port: 0 Server Log Directory:

warm badge
neon cliff
#

than yes... I do have them in place

warm badge
#

yes, running a test allocation. If you do then I'm out of ideas. I would open a ticket with Unity Support in the Dashboard

neon cliff
warm badge
neon cliff
warm badge
neon cliff
#

I wonder why does mine get deallocated so quick

warm badge
neon cliff
lean pilot
#

Me and My friend did everything to try to Collab but its just not working We tried Devops, the repos and unity seats but I still cant see the project in my unity hub

warm badge
neon cliff
#

@warm badge yes I managed to fix the things I thought had issues with... and this is the error I get with this:

warm badge
lean cipher
#

there is some good tutorial on how to make a 3d spatial voicechat with vivox?

flint venture
#

Hi, I have a question about authentication and player disabling\banning. I see that on a forum thread, disabling\enabling players is referred to as banning (attached screenshot).
I also see that the Authentication package v3.3.0 added a "BannedUser" error code (10009) under AuthenticationErrorCodes.
I've disabled my account via the Player Management dashboard. I then tried to log in but received error code 401 which doesn't correlate to banned players. In fact, I receive an "ACCOUNT_DISABLED" error, while the banned error code expects "BANNED_USER" or "PERMANENTLY_BANNED_USER". And there is no custom error code under AuthenticationErrorCodes for the "ACCOUNT_DISABLED" error. It's relatively easy to distinguish it though, so it's not a big deal.
Are "disabling" and "banning" different things now? Can I ban a player in another way, not via disabling?

dense cipher
#

Hi, I have a question about

shut rampart
#

does unity authentication have any way to censor profanity in steam usernames?

meager drum
#

Hi Guys, I have a question about the proxy system
How to disable the use of Unity editor proxy

dense cipher
#

does unity authentication have any way

river notch
#

Hi, i'm making an online game using relay and netcode. I need the player to send their username to the server when they join, to do this i have a function subscribed to the OnClientConnectedCallback action. This function should send a ClientRPC to the client that just joined, and that will trigger sending the username back to the server, but i cannot get it to work where it only sends to one client. The code works when i do not include clientRPCParams, but obviously sends to every client not just the client that joined. The error message says that the RPC is called on a network object that is not in the spawned objects list

warm badge
river notch
#

Is there any reason why it worked if I didnt include the rpcparams or is that just a weird quirk

warm badge
#

If you're the host it might still work since it spawns basically instantly. Not sure why params would cause an issue

mint trail
#

Can I use Cloud Code without the Authentication SDK?
I do identity management on my own, so I want to avoid adding additional auth SDKs/confusing auth code that is not related to auth in my game.

warm badge
mint trail
#

Have a cloud code module and see this error I cannot defeat:

ScriptError (422) HTTP/1.1 422 Unprocessable Entity Unprocessable Entity Invocation Error ScriptRunner.Exceptions.InvalidModuleException: Error in Cloud Code Setup

What could be the reason for this? "Error in Cloud Code Setup" seems super vague, I checked that the module name, function name and argument name are correct. The module function has a proper annotation to expose itself. .ccm file name is the same as the module name.

raven echo
#

Cloud Code Unprocessable Entity

chrome briar
#

i need help with getting a tester

raw cloak
#

That has nothing to do with this channel. You can post your game in #1180170818983051344 and ask there.

gritty umbra
#

I am building a chess/polytopia like game, where players may not take a turn for days. Is using lobby/relay feasible or are they only for games when clients will be continuously connected? If so, is there a better solution than an independent server?

cunning thicket
#

chess like game

mint trail
#

can I somehow pass launch parameters to Cloud Code? Or maybe set up environment variables? (so that I don't have to hardcode sensitive data into my Cloud Code module)

orchid surge
#

hey i need help with unity relay, when i open another scene additivly, because the player is not moving, when i return to the game scene the player would have been disconnected because of inactivity
how do i fix it ?

warm badge
warm badge
brisk peak
warm egret
dull grove
#

Where should I get the ConfigId for remotConfig?

#

I want to change the config value in the game through API

 private static string projectId = "--------";
    private static string configId ="--------";
    public string apiUrl = $"https://services.api.unity.com/remote-config/v1/projects/{projectId}/configs/{configId}";

    private void ChangeTokenValue(string newTokenValue) {
        StartCoroutine(SendChangeRequest(newTokenValue));
    }
    IEnumerator SendChangeRequest(string newTokenValue)
    {
        var jsonData = $"{{\"type\": \"settings\",\"value\": [{{\"key\": \"Token\",\"type\": \"string\",\"value\": \"{newTokenValue}\"}}]}}";
        var request = UnityWebRequest.PostWwwForm(apiUrl, jsonData);
        request.SetRequestHeader("Content-Type", "application/json");
        yield return request.SendWebRequest();
        if (request.result == UnityWebRequest.Result.Success)
            Debug.Log("Config changed successfully!");
        else
            Debug.LogError("Config change failed: " + request.error);
    }
```csharp

But now I can't find the configId. And will this code work?
#

Also, my config is like this

dense cipher
#

I want to change the config value in the

thorny elbow
#

In Unity Version Control, is it possible to change the root directory after creating the workspace?

cursive bobcat
#

hello

#

is it possible to make a playble ads through unity using webgl build?

cursive bobcat
#

can please anyone have any idea where should i ask for help

raw cloak
#

Here, have some patience. Unity Ads isn't supported on webgl.

runic gale
#

Error: failed to fetch repos

lavish pilot
#

Hello! I am trying to use Cloud Code to read other users cloud saves, I am however getting an invocation error that the required parameter playerId is null (I am trying to run the code in Cloud Code directly and have created a parameter called playerId which I populate).


const { DataApi } = require('@unity-services/cloud-save-1.3');

/*
 * CommonJS wrapper for the script. It receives a single argument, which can be destructured into:
 *  - params: Object containing the parameters provided to the script, accessible as object properties
 *  - context: Object containing the projectId, environmentId, environmentName, playerId and accessToken properties.
 *  - logger: Logging client for the script. Provides debug(), info(), warning() and error() log levels.
 */
module.exports = async ({ params, context, logger }) => {
  const { projectId } = context;
  const { playerID } = params;
  // Initialize the cloud save API client
  const cloudSaveAPI = new DataApi(context);
  // Access the save data for the specified player
  const otherPlayerSave = await cloudSaveAPI.getItems(
    projectId,
    playerID,
    "tutorialVariable" // Cloud Code key
  );

  const otherPlayer = otherPlayerSave.data.results[0] == null ? "" : resultOtherPlayer.value;

  // Return the JSON result to the client
  return {
    Leaders: otherPlayer
  };
};```
Anyone got any insight why this might occur?
deft token
#

Unity Local Multiplay Server Error

sly gorge
#

Hello! I am trying to use Cloud Code to

runic gale
dense cipher
dense cipher
#

Hello everyone!
We have released a new experimental package for UGS

The API package provides low-level access to all public apis by leveraging our OpenAPI specifications and enables you to extend UGS and build your own solutions.

Examples of capabilities that this enables:

  • Access to Admin Apis
  • Build custom editor tooling
  • Run operations with server authority
  • Extending Game Clients

More information can be found in this forum post:
https://forum.unity.com/threads/ugs-api-experimental-package-release.1543304/

We are looking for feedback to continue improving our offering and help you build games!

sharp wind
#

Hey, I'm trying to enable the new Unity Analytics System for our team's game... It's been in development for a while, so We used to use the old system with AnalyticsEvent.Custom, for example:

        
AnalyticsResult result = AnalyticsEvent.Custom("Full_Session_Time", new Dictionary<string, object>{
            { "SessionLength", dateTimeNoMS }
        }); ```

But Apparrently all the function calls have changed? And Also apparently, We need to ask users if we can record custom data now or something?
 I've read through the Tutorials on the UGS website, and I'm still barely making heads or tails of this, So I would appreciate some assistance! 🙂
lapis grove
#

Anyone migrate from PlayFab to UGS?

deft token
deft token
#

Hi guys, matchmaker is not matching the tickets, some body have ideas of why?

warm badge
deft token
warped portal
#

there way to delete every single one of these: