The project is a sample multiplayer WebGL hub built on the Welwise SDK, made with Unity 2022.3.30f1. It brings all the hub modules together in one playable project, so third-party developers can see how to plug them into their own games
Players walk around a shared online space: they chat, use emotes, customize their character, buy items, get pets and play mini-games. Meanwhile, bots wander between points of interest
- Move with the keyboard or a mobile joystick - the hub also works on phones in the browser
- Talk in the chat with chat zones and emoji; messages also show above the player
- Change their nickname, adjust clothes and colors, pick a pet
- Choose and play emotes from a radial menu
- Spend soft and hard currency in the shop
- Play mini-games: Block Tower, Doodle Jump, Flappy Bird and Helicopter
- Claim daily rewards, enter portals and go through the tutorial, where arrows show the way
All modules live in Assets/MainHub/Modules, and each has its own README with a step-by-step guide on adding it to another project
WelwiseChatModule- chat with an authoritative server, chat zones and a banned-word filterWelwiseEmotionsModule- choosing, saving and playing emotes onlineWelwiseHubBotsModule- server-side bots on NavMesh: they walk between portals, the bar and the shop, play emotes, and change their nickname and appearanceWelwiseMiniGamesModule- four mini-games, each with its own scene, assembly and reward rangeWelwisePetsModule- pet selection synced through the serverWelwiseCurrenciesModule- soft and hard currency, stored through the SDK's player dataWelwiseItemInShopModule- shared base for shop items: popups, buttons and syncing the selectionWelwiseClothesSharedModule,WelwiseLoadingClothesModule,WelwiseChangingClothesModule- clothes on skinned meshes, changing clothing and skin colorsWelwiseChangingNicknameModule,WelwiseNicknameSharedModule- nickname changes validated on the serverWelwiseCharacterModule- movement, camera, joystick, mobile HUD and device detectionWelwiseChangingAnimationModule- spots where the player triggers an animation, synced between clientsWebGLMobileKeyboardModule- native mobile keyboard for input fields in WebGL, also available as a separate repositoryWelwiseUICircleItemModule- a generic radial menuWelwiseDailyModule- daily rewards popupWelwiseSharedModule- shared base: a lightweight DI container, event bus, loading from Addressables orResources, helpers for UI, networking and localizationWelwiseHubExampleModule- the hub itself: scenes, bootstrap and the game state machine
- FishNet with the Bayou WebSocket transport, over WSS in builds - this is how browser clients connect to the server
- Authoritative server: chat, emotes, nicknames, pets, currency and bots are all decided on the server, and clients get the results through FishNet broadcasts
- Dedicated server: a separate Linux build with the
SERVERdefine. The port is read fromnetwork_settings.jsonnext to the server build, 7777 by default
- Modules split by role: each has separate
Client,ServerandSharedassemblies, so server logic never ships to the browser - Explicit composition root: the
ServicesScopeclasses create and wire up all services through a lightweight DI container - Game state machine:
Bootstrap → Initialization → Hub → Reconnection - MVC / MVP: logic is split into controllers, views, models, factories and provider services
- ScriptableObject configs for items, pets, mini-games and everything else
- Addressables with a Resources fallback: switched by the
ADDRESSABLESdefine, and assets are moved between them in the Editor -Tools/WelwiseHubExample/Settings - Async code on UniTask, animations on DOTween
- Open the project in Unity 2022.3.30f1
- Open the
Assets/MainHub/Modules/WelwiseHubExampleModule/Runtime/Shared/Scenes/Initial.unityscene - SDK settings are in
Assets/Resources/sdk_settings.json. In the Editor the SDK modules run on mocks, so no backend is needed - The client reads the server address from
Assets/StreamingAssets/network_settings.json. To run the server and client side by side, open a second Editor through ParrelSync
Build scenes: Initial, HubScene. WebGL template: Assets/WebGLTemplates/Welwise SDK
Unity 2022.3 LTS, C#, WebGL, FishNet, Bayou, Welwise SDK, UniTask, DOTween, Addressables, Unity Localization, Shader Graph, ParrelSync, NavMesh
The repository includes third-party assets under their own licenses: FishNet, Bayou, ParrelSync, Epic Toon FX and ZerinLabs CartoonSky. The Welwise SDK is installed from Welwise-Games/WelwiseGamesSDK
Happy to hear any feedback or questions! :)