Solving Unicode Character Warning for Crossed Swords Symbol (⚔)
Problem
The character with Unicode value \u2694 (crossed swords ⚔) was not found in the [LiberationSans SDF] font asset, causing it to be replaced with a square placeholder (□).
Solution Options
Option 1: Add Fallback Font (Recommended)
Download a Unicode Symbol Font:
- Use Noto Color Emoji font from Google Fonts
- Use Segoe UI Symbol (Windows system font)
- Use Arial Unicode MS
Import Font into Unity:
- Place font file in
Assets/Fonts/ directory
- Select the font in Project window
- In Inspector, set Font Size: 512, Sampling Point Size: Auto, Padding: 5
- Click "Generate Font Atlas"
Set up Fallback Font:
- Open Window → TextMeshPro → Font Asset Creator
- Create a new TMP font asset from your symbol font
- Include Unicode range: 0x2600-0x26FF (Miscellaneous Symbols)
- Generate the font atlas
Configure Fallback in TMP Settings:
- Go to Edit → Project Settings → TextMeshPro → Settings
- In "Fallback Font Assets" list, add your new symbol font
- OR directly assign to specific text components
Option 2: Use Alternative Characters
Replace the crossed swords symbol with text alternatives:
- "⚔" → "X" or "VS" or "v"
- "⚔" → "[COMBAT]" or "BATTLE"
- Use TextMeshPro rich text:
<sprite name="sword"> if you have sprite assets
Option 3: Create Custom Font Atlas
- Use FontForge or similar tool to add the missing character to LiberationSans
- Or create a comprehensive font that includes all needed symbols
Option 4: Use Sprite Assets Instead
- Create a sprite image of crossed swords
- Import as TMP Sprite Asset
- Use
<sprite="crossed_swords"> in text instead of Unicode character
Implementation Steps for Option 1:
Step 1: Download Noto Emoji Font
# Download from Google Fonts or use system fonts
# Windows: C:\Windows\Fonts\seguisym.ttf (Segoe UI Symbol)
Step 2: Create TMP Font Asset
- Window → TextMeshPro → Font Asset Creator
- Source Font File: Select your symbol font
- Sampling Point Size: Auto Sizing
- Character Set: Unicode Range
- Character Sequence (Hex): 2600-26FF
- Render Mode: SDFAA
- Generate Font Atlas
Step 3: Configure Fallback
Add to TMP Settings or assign directly to text components that need symbols.
Quick Fix for Development
If you want a quick temporary fix, you can replace the character in your code:
// Replace crossed swords with alternative
string text = originalText.Replace("⚔", "[X]");
// or
string text = originalText.Replace("\u2694", "VS");
Finding the Source
To find where this character is being used, search your project for:
- "⚔" (the actual character)
- "\u2694" (Unicode escape)
- Any text files or scripts that might be setting this character
The warning indicates it's in a text object named "Title", so check:
- UI elements named "Title"
- TextMeshPro components in your scenes
- Dynamic text setting in scripts
This should resolve the Unicode character warning and properly display symbols in your game.