private static Antilatency.Alt.Tracking.IEnvironment CreateEnvironment( Antilatency.StorageClient.ILibrary storageClientLibrary, Antilatency.Alt.Tracking.ILibrary trackingLibrary) { using var storage = storageClientLibrary.getLocalStorage(); string environmentCode = storage.read("environment", "default"); if (string.IsNullOrEmpty(environmentCode)) { throw new Exception("Cannot create environment"); } return(trackingLibrary.createEnvironment(environmentCode)); }
private static Antilatency.Math.floatP3Q CreatePlacement( Antilatency.StorageClient.ILibrary storageClientLibrary, Antilatency.Alt.Tracking.ILibrary trackingLibrary) { using var storage = storageClientLibrary.getLocalStorage(); string placementCode = storage.read("placement", "default"); if (string.IsNullOrEmpty(placementCode)) { var identityPlacement = new Antilatency.Math.floatP3Q(); identityPlacement.rotation.w = 1; Console.WriteLine("Failed to get placement code, using identity placement"); return(identityPlacement); } return(trackingLibrary.createPlacement(placementCode)); }