Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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:
    4
    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?