创造你的世界
社交
添加以下内容:关注者列表功能
9 分
使用zepeto module的社交api,世界创作者可以加载用户的好友列表。 世界创作者还可以关注新用户或取消关注他们之前关注的用户。 如何安装 请首先安装窗口 → 包管理器 → zepeto world包版本1 21 0或更高版本。 然后,安装zepeto module包。 使用弹出好友列表预制件 zepeto module包提供ui预制件,方便您轻松创建关注/粉丝列表。 1\) 在项目面板中,转到包 > zepeto module > 社交 > 运行时 > ui > 资源 > 预制件文件夹。 2\) 从文件夹中的预制件中,将followscrollview\ prefab拖放到场景中。 ❗️ 注意 当场景中不存在eventsystem对象时,此功能可能无法正常运行。通过转到gameobject > ui > eventsystem添加该对象。 3\) 点击播放按钮以查看好友列表弹出窗口出现在屏幕上。 followscrollview\ prefab,创建好友列表弹出窗口,使用followscrollview组件加载并显示屏幕上的好友列表和总用户数。 在followscrollview组件中配置的信息如下。 跟随滚动视图组件 true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type 当通过 followscrollview 生成好友列表时,如果世界屏幕处于横向模式,则应用 followscrollview landscape。 当屏幕处于纵向模式时,应用 followscrollview portrait。 应用于 followscrollview landscape 和 followscrollview portrait 的 followview controller 组件中配置的信息如下。 跟随视图组件 true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type 如下所示,显示朋友信息的单元格应用了关注单元格视图和用户信息单元格视图组件。每个组件中的信息如下。 用户信息单元视图组件 true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type 👍 提示 zepeto 文本继承自 unityengine ui text,并为世界中的 ui 便利性提供了一些附加功能。文本可以在 followscrollview prefab 编辑模式中轻松编辑。 显示在用户名旁边的徽章图标用于标记特殊用户,例如 zepeto 创作者和迎宾员。 修改好友列表弹出窗口预制 ui 您可以通过修改 ui 元素来自定义好友列表。 在 packages 中选择一个预制件,并将其拖放到 assets 文件夹中以复制该预制件。 👍 提示 预制件在 packages 文件夹中无法修改,但一旦复制到 assets 文件夹的子文件夹中,就可以进行修改。
