Skip to content

Instantly share code, notes, and snippets.

@cdhanna
Created February 24, 2022 22:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdhanna/140b6a98b9fe017c7942a4b6240f7908 to your computer and use it in GitHub Desktop.
Save cdhanna/140b6a98b9fe017c7942a4b6240f7908 to your computer and use it in GitHub Desktop.
using Beamable.Api.Auth;
using Beamable.Common;
using Beamable.Common.Dependencies;
using UnityEngine.Scripting;
[BeamContextSystem]
[Preserve]
public class Testing
{
[RegisterBeamableDependencies]
public void Register(IDependencyBuilder builder)
{
builder.RemoveIfExists<IDeviceIdResolver>();
builder.AddSingleton<IDeviceIdResolver>(() => new CustomDeviceIdResolver());
}
}
public class CustomDeviceIdResolver : IDeviceIdResolver
{
public Promise<string> GetDeviceId()
{
return Promise<string>.Successful("FAKE_DEVICE_ID");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment