This Unity project recreates the React-based UI flow for the Challas Aath game lobby in the Varasa heritage app.
Assets/
โโโ Scenes/
โ โโโ ChallasAath.unity # Main scene file
โโโ Scripts/
โ โโโ GameManager.cs # Core game state management
โโโ Textures/
โ โโโ back_arrow.png # Back button icon
โ โโโ gear.png # Settings icon
โ โโโ user_avatar.png # Player avatar icon
โ โโโ divider.png # Decorative divider line
โ โโโ question.png # Waiting player indicator
โโโ Prefabs/ # (To be created in Unity Editor)
This project is designed for Unity 6000.1.14f1 (Unity 6 LTS).
- Open Unity Hub
- Click "Open" and select this folder (
Unity_scene) - Unity will import all assets
- When Unity opens, it may prompt you to import TMP Essentials
- Click "Import TMP Essentials" in the prompt window
- Or go to: Window โ TextMeshPro โ Import TMP Essential Resources
The scene requires manual setup in the Unity Editor because the UI is complex. Follow these steps:
- In the Project window, navigate to
Assets/Scenes/ - Double-click
ChallasAath.unity
- Right-click in Hierarchy โ UI โ Canvas
- Set Canvas properties:
- Render Mode: Screen Space - Overlay
- Canvas Scaler:
- UI Scale Mode: Scale With Screen Size
- Reference Resolution: 1080 x 1920 (portrait mobile)
- Match: 0.5
- Find the "GameManager" object in the Hierarchy (should already exist)
- If not, create one: Right-click Hierarchy โ Create Empty โ name it "GameManager"
- Add the GameManager component:
- Select GameManager object
- In Inspector, click "Add Component"
- Search for "GameManager" and add it
Follow this structure exactly:
Canvas
โโโ Header (Panel)
โ โโโ TitleText (TextMeshPro - Text): "VARASA"
โ โโโ GearButton (Button with gear.png)
โ
โโโ LobbyPanel (Panel)
โ โโโ GameTitle (TextMeshPro): "CHALLS AATH"
โ โโโ PlayFriendsButton (Button): "PLAY WITH FRIENDS"
โ โโโ PlayRandomButton (Button): "PLAY WITH RANDOM PEOPLE"
โ โโโ Divider (Image + Text "OR")
โ โโโ Subtitle (TextMeshPro): "Re-discover the ancient strategy game."
โ
โโโ FriendsMenuPanel (Panel - initially disabled)
โ โโโ BackButton (Button with back_arrow.png)
โ โโโ Title (TextMeshPro): "START A CHALLENGE"
โ โโโ CreateRoomButton (Button): "CREATE PRIVATE ROOM"
โ โโโ DividerOR (Text in circle)
โ โโโ JoinRoomButton (Button): "JOIN PRIVATE ROOM"
โ โโโ JoinRoomPanel (Panel - initially disabled)
โ โโโ Label (TextMeshPro): "Enter 6-Digit Room ID"
โ โโโ RoomIdInput (TMP_InputField)
โ โโโ GoButton (Button): "GO"
โ
โโโ RoomWaitingPanel (Panel - initially disabled)
โโโ BackButton (Button)
โโโ Title (TextMeshPro): "ROOM CREATED"
โโโ RoomCodePanel (Panel)
โ โโโ RoomIDLabel (TextMeshPro): "Room ID"
โ โโโ RoomCodeText (TextMeshPro): Large display
โโโ PlayersJoinedText (TextMeshPro): "X/2 PLAYERS JOINED"
โโโ AvatarRow (Panel)
โ โโโ Player1Avatar (Image circle)
โ โ โโโ Player1Icon (user_avatar.png)
โ โ โโโ Background (Image - green when ready)
โ โโโ Player2Avatar (Image circle)
โ โโโ Player2Icon (user_avatar.png)
โ โโโ Player2Question (question.png)
โ โโโ Background (Image - gray when waiting)
โโโ StatusText (TextMeshPro): Status message
โโโ StartGameButton (Button): "START GAME"
Use these colors for UI elements:
- Background:
#FDF5E6(253, 245, 230) - Warm beige - Primary (Buttons):
#7B1113(123, 17, 19) - Deep red - Secondary (Accents):
#FFC300(255, 195, 0) - Amber - Text Primary:
#7B1113(Deep red) - Text Secondary:
#FFFBF0(255, 251, 240) - Cream
After creating all UI elements:
- Select the GameManager object in Hierarchy
- In Inspector, you'll see empty references in the GameManager component
- Drag and drop the corresponding UI elements from the Hierarchy:
- Panels Section: Drag LobbyPanel, FriendsMenuPanel, RoomWaitingPanel, JoinRoomPanel
- Lobby UI Section: Drag playFriendsButton, playRandomButton
- Friends Menu UI Section: Drag createRoomButton, joinRoomButton, backFromFriendsButton
- Join Room UI Section: Drag roomIdInput, goButton
- Room Waiting UI Section: Drag all room waiting components
-
GameTitle:
- Font Size: 72
- Color: Deep Red (#7B1113)
- Font: Bold, Serif style
- Alignment: Center
-
Buttons (PlayFriendsButton, PlayRandomButton):
- Width: Full width (with 40px margins)
- Height: 120px
- Font Size: 48
- Color: Deep Red background, Cream text
- Border Radius: 24px (use Unity UI Rounded Corners or Image with rounded sprite)
- Margin: 24px between buttons
-
CreateRoomButton:
- Background: Amber (#FFC300)
- Text Color: Deep Red
-
JoinRoomButton:
- Background: Deep Red
- Text Color: Cream
-
JoinRoomPanel:
- Background: Light amber/beige
- Border: 2px Deep Red
- Padding: 32px
- Border Radius: 24px
-
RoomIdInput:
- Font: Monospace style
- Font Size: 60
- Max Length: 6
- Uppercase only
- Center aligned
- Border: 2px Red
-
RoomCodePanel:
- Background: Light amber (#FFF5E1)
- Border: 4px Amber
- Border Radius: 48px
- Padding: 60px
-
RoomCodeText:
- Font Size: 120
- Font: Monospace, Bold
- Color: Deep Red
- Letter Spacing: Wide
-
Player Avatars:
- Size: 128x128 circle
- Ready state: Green background (#228B22)
- Waiting state: Gray background (#C0C0C0)
-
Scene 1 - Lobby:
- User sees "PLAY WITH FRIENDS" and "PLAY WITH RANDOM PEOPLE"
-
Scene 2A - Play with Friends:
- Options: "CREATE PRIVATE ROOM" or "JOIN PRIVATE ROOM"
- If "Join": Shows input field for 6-character room code
-
Scene 2B - Play Random:
- Simulates quick match (1.5s delay)
- Generates random room code
-
Scene 3 - Room Waiting:
- Displays room code
- Shows player count (1/2)
- Simulates 2nd player joining after 3 seconds
- "START GAME" button enabled when both players joined
- Make sure TMP Essentials are imported
- Window โ TextMeshPro โ Import TMP Essential Resources
- Ensure all UI elements are created and named correctly
- Drag each element to its corresponding slot in GameManager Inspector
- Check that GameManager script is attached to GameManager object
- Verify all button references are assigned in Inspector
- Make sure panels are children of Canvas
- Adjust Canvas Scaler settings
- Use Anchors properly for responsive design
- Test on different aspect ratios in Game view
To test mobile aspect ratio:
- In Game view, change aspect ratio to 9:16 or 9:19.5
- Or set Free Aspect and manually resize
- Press Play button in Unity Editor
- You should see the Lobby panel
- Test the flow:
- Click "Play with Friends" โ Should show Friends Menu
- Click "Create Private Room" โ Should show Room Waiting with random code
- Click Back โ Returns to Lobby
- Click "Play with Random" โ Simulates quick match
- In Room Waiting โ Wait 3 seconds โ Second player joins โ Start Game enabled
- The GameManager handles all state transitions
- Room codes are 6 random uppercase alphanumeric characters
- The UI is designed for mobile portrait orientation
- Colors and spacing match the heritage theme of the Varasa app
- All textures are included in the Assets/Textures folder
To customize the look:
- Replace textures in
Assets/Textures/with your own icons - Modify colors in the Unity Inspector for each UI element
- Adjust fonts by importing custom fonts and assigning to TextMeshPro components
- Modify button sizes and spacing in RectTransform properties
After completing the UI setup:
- Implement networking for real multiplayer (e.g., Photon, Mirror, or Unity Netcode)
- Connect to actual game scene when "START GAME" is clicked
- Add sound effects and animations for better UX
- Implement proper back-end for room management
- Add more heritage-themed visual effects and transitions
Need Help?
- Check Unity's TextMeshPro documentation
- Review Unity UI/Canvas system tutorials
- See the GameManager.cs script for logic reference