This document is about: FUSION 2
SWITCH TO

Sample Project

The Interest Management addon comes with a separate Unity project which contains examples with fully commented code to help understanding how the interest can be designed in a clean and efficient way.

The sample project can be downloaded in Download section.

Sample Project

Sample Controls

  • Mouse - Look
  • W,S,A,D - Move
  • Space - Jump
  • Enter - Lock/unlock cursor
  • F5 - Toggle target frame rate
  • F7 - Toggle vertical synchronization
  • F12 - Disconnect from current session

Project structure

  • Assets - Base project folder
    • 01_BasicSetup - Shows basic configuration to get interest management working
    • 02_AdvancedSetup - Shows more advanced configuration with InterestCone shapes and PlayerInterestView locked to camera which fits games with third-person view
    • 03_InterestProvider - Shows custom interest provider that adds an area around it to player's interest if the player stands within certain distance
    • 04_InterestOverride - Shows custom non-global interest provider that overrides player's default interest
    • 05_PlayerInterestView - Shows custom player interest view and iteration over list of all player views
    • Common - Contains shared files, for example player, gameplay manager, ...
    • Photon - Base folder for Photon SDKs, addons, packages, ...
      • FusionAddons - Base folder for Fusion addons
        • InterestManagement - Interest Management addon

Validating interest

  1. For initial design of interest providers / local testing, it is enough to run the game in editor and select player object with PlayerInterestManager component.
  2. To see interest shapes and cells of a real client, it is best to run Host/Server in Editor and Client from standalone build, then select client's player object with PlayerInterestManager component.
  3. To see actual interest of a real client, it is best to run Host/Server from standalone build and Client in Editor. Check scene view what objects start/stop synchronizing.
Back to top