Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

Question Cloud code setup

Discussion in 'Editor & General Support' started by zzap65, Apr 1, 2023.

  1. zzap65

    zzap65

    Joined:
    Aug 11, 2021
    Posts:
    2
    Im trying to setup my project to work with Cloud code.
    Im going thru the setup guide and states to add the following code to a script

    using Unity.Services.Core; using Unity.Services.Authentication; using Unity.Services.CloudCode;
    UnityServices.InitializeAsync()
    await AuthenticationService.Instance.SignInAnonymouslyAsync();

    but have problems with the last section:

    var result = await CloudCode.CallEndpointAsync<ResultType>("HelloWorld", new RequestType {}); Debug.Log(result);

    ^^ im not sure what Im doing wrong?

    Anyone have an example script I could use?