onSpaceLiked

Event

Triggered when the user likes the space.

Returns ISpaceService.OnSpaceLikedDelegate

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");
}