public void Initialize(LocatorFlow flow) { if (Application.isEditor) { if (PlayerPrefs.HasKey(RuntimeConfigNames.DevAuthTokenKey)) { flow.DevAuthToken = PlayerPrefs.GetString(RuntimeConfigNames.DevAuthTokenKey); return; } var textAsset = Resources.Load <TextAsset>("DevAuthToken"); if (textAsset == null) { throw new MissingReferenceException("Unable to find DevAuthToken.txt in the Resources folder. " + "You can generate one via SpatialOS > Generate Dev Authentication Token."); } flow.DevAuthToken = textAsset.text; } else { initializer.Initialize(flow); } }
/// <summary> /// Initializes a new instance of the <see cref="ReceptionistFlow"/> class. /// </summary> /// <param name="workerId">The worker ID to use for the worker connection.</param> /// <param name="initializer">Optional. An initializer to seed the data required to connect via the Receptionist flow.</param> public ReceptionistFlow(string workerId, IConnectionFlowInitializer<ReceptionistFlow> initializer = null) { WorkerId = workerId; initializer?.Initialize(this); }
/// <summary> /// Initializes a new instance of the <see cref="LocatorFlow"/> class. /// </summary> /// <param name="initializer">Optional. An initializer to seed the data required to connect via the Alpha Locator flow.</param> public LocatorFlow(IConnectionFlowInitializer<LocatorFlow> initializer = null) { initializer?.Initialize(this); }