Skip to content

Commit 111be79

Browse files
committed
update README
1 parent a49ace5 commit 111be79

File tree

1 file changed

+53
-6
lines changed
  • src/Packages/Passport/Samples~/PassportManagerPrefab

1 file changed

+53
-6
lines changed

src/Packages/Passport/Samples~/PassportManagerPrefab/README.md

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,42 @@
11
# PassportManager Prefab
22

3-
The **PassportManager** is a drag-and-drop prefab that provides an easy way to integrate Immutable Passport authentication into your Unity game.
3+
The **PassportManager** provides multiple drag-and-drop prefabs for easy Immutable Passport authentication integration into your Unity game.
44

55
## 🚀 Quick Start
66

7-
### Option 1: Just Authentication (Code-based)
7+
### Option 1: Complete UI (Zero Config! 🎯)
8+
9+
**Perfect for:** Quick prototyping, testing, or developers who want instant authentication UI
810

911
1. **Import the Sample**: In Unity Package Manager, find "Immutable Passport" and import the "PassportManager Prefab" sample
10-
2. **Drag the Prefab**: Drag `PassportManager.prefab` from the Samples folder into your scene
12+
2. **Drag the Complete Prefab**: Drag `PassportManagerComplete.prefab` into your scene
13+
3. **Configure Settings**: Set Client ID and redirect URIs (e.g., `mygame://callback`, `mygame://logout`)
14+
4. **Test**: Hit Play - you'll see a complete login UI with Google, Apple, Facebook, and default login buttons!
15+
16+
**What you get:**
17+
18+
- ✅ Mobile-first responsive UI that works on all screen sizes
19+
- ✅ Pre-styled social login buttons (Google red, Apple black, Facebook blue)
20+
- ✅ Automatic panel switching (login → logged-in state)
21+
- ✅ Status messages and user info display
22+
- ✅ Zero code required - just configure and play!
23+
24+
### Option 2: Authentication Only (Code-based)
25+
26+
**Perfect for:** Developers with custom UI who want just the authentication logic
27+
28+
1. **Import the Sample**: Same as above
29+
2. **Drag the Minimal Prefab**: Drag `PassportManager.prefab` from the Samples folder into your scene
1130
3. **Configure Settings**: In the Inspector, set your Client ID and redirect URIs
1231
4. **Use Events or Code**: Subscribe to events or call methods directly
1332
5. **Test**: Hit Play - the prefab will automatically initialize Passport!
1433

15-
### Option 2: Complete UI Integration (No Code Required!)
34+
### Option 3: Custom UI Integration (Advanced)
35+
36+
**Perfect for:** Developers who want their own UI but with helper scripts
1637

1738
1. **Import the Sample**: Same as above
18-
2. **Drag the Prefab**: Same as above
39+
2. **Drag the Minimal Prefab**: Use `PassportManager.prefab`
1940
3. **Configure Settings**: Same as above
2041
4. **Add PassportUIController**: Add the `PassportUIController` script to a GameObject and assign your UI elements (supports both Legacy Text and TextMeshPro)
2142
5. **Wire Events**: In PassportManager Inspector, connect the events to PassportUIController methods
@@ -38,7 +59,33 @@ The **PassportManager** is a drag-and-drop prefab that provides an easy way to i
3859
- **Direct Login Method**: Pre-select login method (None, Google, Apple, Facebook)
3960
- **Log Level**: Control debug output verbosity
4061

41-
### UI Integration (Optional - No Code Required!)
62+
### UI Customization (PassportManagerComplete)
63+
64+
The complete prefab creates UI at runtime, which means you can customize the appearance:
65+
66+
**Runtime Customization:**
67+
68+
- The UI is built using Unity's default UI style
69+
- All UI elements can be accessed and modified after creation
70+
- Button colors, text, and layout are easily customizable via code
71+
- Mobile-responsive design automatically adapts to screen size
72+
73+
**Layout Configuration:**
74+
75+
- Panel Size: 300x400 (adjustable in PassportUIBuilder)
76+
- Button Size: 280x45 (adjustable)
77+
- Element Spacing: 10px (adjustable)
78+
- Canvas Order: 100 (prevents UI conflicts)
79+
80+
**Color Scheme:**
81+
82+
- Google Button: Red (#DB4437) with white text
83+
- Apple Button: Black with white text
84+
- Facebook Button: Blue (#4267B2) with white text
85+
- Default Button: White with black text
86+
- Background Panel: Semi-transparent dark (10% opacity)
87+
88+
### UI Integration (Option 3 - Custom UI)
4289

4390
Simply drag UI elements from your scene into these fields and they'll be automatically configured:
4491

0 commit comments

Comments
 (0)