hasLikedSpace
Property
Has the local user loved this space?
Returns bool
Examples
void OnEnable()
{
if (SpatialBridge.spaceService.hasLikedSpace)
{
Debug.Log("You have already liked this space!");
return;
}
SpatialBridge.spaceService.onSpaceLiked += HandleSpaceLiked;
}
void OnDisable()
{
SpatialBridge.spaceService.onSpaceLiked -= HandleSpaceLiked;
}
void HandleSpaceLiked()
{
SpatialBridge.badgeService.RewardBadge("SpaceLikerBadgeId");
}
void OnEnable()
{
if (SpatialBridge.spaceService.hasLikedSpace)
{
Debug.Log("You have already liked this space!");
return;
}
SpatialBridge.spaceService.onSpaceLiked += HandleSpaceLiked;
}
void OnDisable()
{
SpatialBridge.spaceService.onSpaceLiked -= HandleSpaceLiked;
}
void HandleSpaceLiked()
{
SpatialBridge.badgeService.RewardBadge("SpaceLikerBadgeId");
}