1. Project Setup
- Create a New Project:
- Open Unity Hub.
- Click on New Project.
- Select the Universal Render Pipeline (URP) template.
- Name the project (e.g.,
VR Demo) and choose a location.
- Click Create Project.
- Verify Installed Packages:
- Open Window > Package Manager.
- In the Packages dropdown, select In Project.
- Confirm the following packages are installed:
- Universal Render Pipeline (URP)
- Input System
- XR Plug-in Management
- Remove Unnecessary Assets:
- In the Assets folder, delete the
README file or any other unused default files.
2. Environment Cleanup
- Remove Unneeded Packages:
- Open Window > Package Manager.
- Uninstall any packages that you wonβt use, such as:
- AI Navigation
- JetBrains Rider Editor (if using Visual Studio)
- Multiplayer HLAPI or Multiplayer Tools
- Visual Scripting
- Version Control (if using Git)
- Disable Unnecessary Features in Build Settings:
- Go to Edit > Project Settings > Player.
- Under Other Settings, scroll to Configuration and disable unused modules, including:
- Vehicles
- Wind
- Terrain
- Tilemaps
- Cloth
- Screen Capture
- Enable Burst Settings:
- Go to Edit > Preferences > Burst.
- Enable Optimize for Performance.
- Enable Line-only Debugging to reduce overhead during development builds.
- Enable Sprite Atlas:
- Install the 2D Sprite package via Package Manager.
- Go to Edit > Preferences > 2D > Sprite Atlas and enable it to group textures for fewer draw calls.
- Graphics Settings:
- Go to Edit > Project Settings > Graphics.
- Assign the URP Asset in the Scriptable Render Pipeline Settings field.
- Disable Compatibility Mode to use Render Graph for performance optimization.
- Ensure the Mobile Render Pipeline Asset is set for Quest development.
4. Adjust Player Settings
- Rendering Settings:
- Go to Edit > Project Settings > Player > Other Settings.
- Set Blit Type to
Auto.
- Disable 32-bit Buffers unless required by specific effects.
- Ensure Vulkan is enabled, and disable OpenGL for XR projects.
- GPU Skinning:
- Under Rendering, enable GPU Skinning unless GPU usage is too high.
- Graphics Jobs:
- Enable Split Graphics Jobs for multithreaded rendering.
- Texture Compression:
- Set Default Texture Compression to ASTC for mobile performance.
- Input Handling:
- Go to Active Input Handling under Player Settings and set it to New Input System (Only).
5. Optimize Quality Settings
- Terrain and LOD:
- Disable Terrain features if not needed.
- Turn off LOD Crossfade unless smoother transitions are essential.
- Skin Weights:
- Set Maximum Bones per Vertex to 4 for high-fidelity animations (e.g., hand models).
- Shadows:
- Reduce Shadow Distance to 15β30 meters for optimal performance.
- Adjust Shadow Cascades to balance quality and rendering overhead.
- Render Path:
- Use Forward+ for projects with many dynamic lights.
- Use Forward for simpler lighting setups.
- Shadows:
- Enable Transparent Shadows only for Mixed Reality features.
- Turn off Post-Processing unless required for visuals.
- Lighting:
- Bake lighting for static objects wherever possible.
- Use real-time lighting only for dynamic elements.
7. Fine-Tune XR Plug-in Management
- General Settings:
- Open Edit > Project Settings > XR Plug-in Management.
- Enable Multiview for Android to improve rendering performance.
- Enable Fixed Foveated Rendering for Quest devices.
- Enable Late Latching to reduce motion-to-photon latency.
- Depth Submission:
- Enable Depth Submission to improve depth rendering precision between UI and 3D objects.
8. Render Pipeline Features
- Antialiasing:
- Use 2x MSAA initially; increase to 4x MSAA if performance allows.
- Shadows:
- Use Soft Shadows on low settings for mobile.
- Turn off shadows completely for less demanding applications.
- Post-Processing:
- Decrease settings or disable entirely for improved performance.
- HDR:
- Turn off HDR for Quest devices as it is unsupported.
9. Final Adjustments
- Optimize Mesh Data:
- Go to Edit > Project Settings > Player.
- Enable Optimize Mesh Data to remove unused mesh components during the build.
- Pre-Bake Collision Meshes:
- Pre-bake collision meshes to reduce runtime calculations.
10. Testing and Iteration
- Run Test Builds:
- Deploy test builds on target devices (e.g., Quest 2/3).
- Use Unity Profiler to monitor performance and bottlenecks.
- Iterative Refinement:
- Adjust settings based on test feedback and performance profiling.
Additional Notes
- Use Application Space Warp for Quest for better frame rates (requires a custom URP setup).
- Check Unityβs documentation for the correct API Level for your target device (e.g., Android 12L for Quest).
- Avoid Static Batching when using Forward+ rendering, as it conflicts with GPU instancing optimizations.