Using the Social API of ZEPETO.Module, World Creators can load users' friend lists.
World Creators can also follow new users or unfollow users they followed.
Please first install Window → Package Manager → ZEPETO.World Package version 1.21.0 or later.
Then, install the ZEPETO.Module Package.
ZEPETO.Module Package offers UI prefabs for you to easily create the following/follower list.
- In the Project panel, go to Packages > ZEPETO.Module > Social > Runtime > UI > _Resources > Prefab folder.
- Out of the prefabs in the folder, drag and drop FollowScrollView.prefab into the scene.
When the EventSystem object does not exist in the scene, this feature may not run correctly. Add the object by going to GameObject > UI > EventSystem.
- Click the Play button to see the friend list popup appearing on the screen.
- FollowScrollView.prefab, which creates the friend list popup, uses the FollowScrollView component to load and display the friend list and total user count on the screen.
- Information configured in the FollowScrollView component is as follows.
|||Height||The value for the vertical distance between user info cells in the scroll view|
|||Load Count||Cell Load Count: The number of cell data loaded when the scroll view is scrolled. Configuring a high number for this value may affect the loading speed.|
|||User Info Prefab||The UI prefab for individual cells for displaying the user information|
|||Total Count Prefab||The prefab that displays the total user count. The text can be automatically translated and displayed in multiple languages.|
|||Canvas Scaler||Can select the Canvas appearance for friend list UI. Can use premade Canvases.|
|||Vertical||Register vertical screen UI prefab including the Follow View Controller.|
|||Horizontal||Register horizontal screen UI prefab including the Follow View Controller.|
|||Background||Semi-transparent black screen that appears when friend list UI is displayed|
If the world screen is in horizontal mode when the friend list is generated through FollowScrollView, FollowScrollView_Landscape is applied.
- When the screen is in vertical mode, FollowScrollView_Portrait is applied.
- Information configured in the FollowView Controller component applied to FollowScrollView_Landscape and FollowScrollView_Portrait is as follows.
|||Follwer Tab||Follower tab group|
|||Following Tab||Following tab group|
|||Scroller||Friend list scroll view|
|||Empty Image||An image displayed when the friend list is empty|
|||Loading Spinner||An image displayed while the friend list is loading|
|||Close Button||A button to close the friend list popup|
|||Title||A title for the friend list popup|
|||Follower||A button text for displaying the active/hidden state of the follower panel|
|||Following||A button text for displaying the active/hidden state of the following panel|
|||Empty Text||A text displayed when the friend list is empty.|
|||Panel||Whole UI panel|
As shown below, the cell where the friend information is displayed has the Follow Cell View and UserInfo Cell View components applied. The information in each component is as follows.
|||View Name||Username text|
|||View Profile||User profile image|
|||Btn Follow||Follow user button|
|||Btn Un Follow||Unfollow user button|
|||View Badge||Badge icon image|
|||View Greeter Badge||Greeter icon image|
|||View Follow||Follow button text|
|||View Is Following||Unfollow button text|
- ZEPETO Text inherits UnityEngine_UI.Text and provides some additional features for UI convenience within the world. The texts can be easily edited in the FollowScrollView Prefab edit mode.
- The badge icons displayed next to the user name are icons used to mark special users such as ZEPETO creators and greeters.
You can customize your friend list by modifying the UI elements.
Select a prefab in Packages and drag and drop the prefab into the Assets folder to copy the prefab.
Prefabs cannot be modified while in the Packages folder, but they can be modified once they are copied into subfolders of the Assets folder.