1. Project Setup

  1. 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.
  2. 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
  3. Remove Unnecessary Assets:
    • In the Assets folder, delete the README file or any other unused default files.

2. Environment Cleanup

  1. 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)
  2. 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

3. Configure Project Settings

  1. Enable Burst Settings:
    • Go to Edit > Preferences > Burst.
    • Enable Optimize for Performance.
    • Enable Line-only Debugging to reduce overhead during development builds.
  2. 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.
  3. 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

  1. 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.
  2. GPU Skinning:
    • Under Rendering, enable GPU Skinning unless GPU usage is too high.
  3. Graphics Jobs:
    • Enable Split Graphics Jobs for multithreaded rendering.
  4. Texture Compression:
    • Set Default Texture Compression to ASTC for mobile performance.
  5. Input Handling:
    • Go to Active Input Handling under Player Settings and set it to New Input System (Only).

5. Optimize Quality Settings

  1. Terrain and LOD:
    • Disable Terrain features if not needed.
    • Turn off LOD Crossfade unless smoother transitions are essential.
  2. Skin Weights:
    • Set Maximum Bones per Vertex to 4 for high-fidelity animations (e.g., hand models).
  3. Shadows:
    • Reduce Shadow Distance to 15–30 meters for optimal performance.
    • Adjust Shadow Cascades to balance quality and rendering overhead.

6. Configure URP Settings

  1. Render Path:
    • Use Forward+ for projects with many dynamic lights.
    • Use Forward for simpler lighting setups.
  2. Shadows:
    • Enable Transparent Shadows only for Mixed Reality features.
    • Turn off Post-Processing unless required for visuals.
  3. Lighting:
    • Bake lighting for static objects wherever possible.
    • Use real-time lighting only for dynamic elements.

7. Fine-Tune XR Plug-in Management

  1. 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.
  2. Depth Submission:
    • Enable Depth Submission to improve depth rendering precision between UI and 3D objects.

8. Render Pipeline Features

  1. Antialiasing:
    • Use 2x MSAA initially; increase to 4x MSAA if performance allows.
  2. Shadows:
    • Use Soft Shadows on low settings for mobile.
    • Turn off shadows completely for less demanding applications.
  3. Post-Processing:
    • Decrease settings or disable entirely for improved performance.
  4. HDR:
    • Turn off HDR for Quest devices as it is unsupported.

9. Final Adjustments

  1. Optimize Mesh Data:
    • Go to Edit > Project Settings > Player.
    • Enable Optimize Mesh Data to remove unused mesh components during the build.
  2. Pre-Bake Collision Meshes:
    • Pre-bake collision meshes to reduce runtime calculations.

10. Testing and Iteration

  1. Run Test Builds:
    • Deploy test builds on target devices (e.g., Quest 2/3).
    • Use Unity Profiler to monitor performance and bottlenecks.
  2. 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.