I have been trying to follow what's in https://learn.microsoft.com/en-us/azure/object-anchors/concepts/sdk-overview with some success. I successfully detect an ObjectInstance, but how do I get the coordinates to place my GameObject in the matching position? There are a lot of unfamiliar concepts to me in the documentation like SpatialGraphCoordinateSystem and I am at a loss on how to take it further.
Update
I finally got it working by first converting the SpatialGraphCoordinateSystem to SpatialCoordinateSystem.
SpatialGraphCoordinateSystem coordinateSystem
[...]
//After getting an ObjectInstance instance
SpatialCoordinateSystem spatialCoordinateSystem = instance.TryGetCurrentState().Center.ToSpatialCoordinateSystem();
var instancePos = spatialCoordinateSystem.TryGetTransformTo(coordinateSystem.Value.ToSpatialCoordinateSystem()).Value.ToUnityLocation().Position;
var instanceOrientation = spatialCoordinateSystem.TryGetTransformTo(coordinateSystem.Value.ToSpatialCoordinateSystem()).Value.ToUnityLocation().Ori;
//Place my hologram on the detected position
mySphere.transform.SetPositionAndRotation(instancePos, instanceOri);