PUN Classic (v1), PUN 2, Bolt는 휴업 모드입니다. Unity2022에 대해서는 PUN 2에서 서포트하지만, 신기능의 추가는 없습니다. 현재 이용중인 고객님의 PUN 및 Bolt 프로젝트는 중단되지 않고, 퍼포먼스나 성능이 떨어지는 일도 없습니다. 앞으로의 새로운 프로젝트에는 Photon Fusion 또는 Quantum을 사용해 주십시오.

Core Objects

목차

Tick Engine Settings

Project global settings that are stored in a ScriptableObject. You can find these in the Window menu.

Settings can be found in the menu:
Window > Photon Unity Networking > Tick Engine Settings

Tick Engine Settings

  • Enable Tick Engine - For testing purposes only. When disabled all callbacks from the NetMaster are stopped, effectively disabling all Simple code.
  • Send When Solo - Allows Simple to send updates from owned objects even when no other players are in the room. Default is enabled.
  • Show GUI Headers - Toggle the large graphic headers in the inspector for Simple components.

메인 화면으로
 

Time Manager

Fixed Timestep

This is the same reference used in Unity's Time settings. This adjusts the PhysX simulation rate, which affects the FixedUpdate rate.

메인 화면으로
 

Ring Buffer

Send Every X Tick

SimpleSync uses FixedUpdate as its primary tick but can produce a network rate that is a subdivision of the fixed time rate. For example the default Unity physics fixedDeltaTime is .02 secs (50 ticks per sec). Setting Send Every X to 3 would result in a net rate of .06 (16.7 ticks per second) which is 1/3rd of the physics rate, resulting in 1/3rd the traffic.

메인 화면으로
 

Buffer Correction

  • Manual - Set values by hand.
  • Auto - Values are set based on fixedDeltaTime and SendEveryX values.

메인 화면으로
 

Frame Count

The number of frames allocated to the ring buffer. The more frames, the greater the memory footprint but the longer the buffer. Values that result in a buffer total of 1-2 seconds is recommended.

메인 화면으로
 

Target Buffer Size

The ideal number of frames that will be on the buffer at consumption time (OnSnapshot). The closer to zero the lower the latency. However too low and the buffer will become more prone to under-run.

메인 화면으로
 

Buffer Min/Max

The values at which the buffer will be considered in need of a size adjustment.

메인 화면으로
 

Ticks Before Grow/Shrink

The number of ticks where the buffer exceeds the Min/Max value before an adjustment is made. Adjustments are made by either repeating a frame, or consuming multiple frames for a tick. The greater these values the less aggressively the buffer will try to resize itself. Corrections will create a visible hitch, so it is best to avoid them.

메인 화면으로
 

Pack Object Settings

Code Generation

Auto Generate

When enabled, the assembly will be scanned for classes with the [PackObject] attribute and generate the syncvar code needed for them to work. Disabling this will leave existing Codegen in place but new codegen will not be created until it is re-enabled.

메인 화면으로
 

Delete Bad Code

If a compiler error occurs in any of the generated extension scripts that script will get deleted automatically. You should always leave this option enabled.

메인 화면으로
 

Net Master & Net Master Late

Net Master

Two singletons are created at runtime if none exist in the scene. These produce timing callbacks used by Simple NetObjects and PackObjects and are the starting point for all activity.

메인 화면으로
 

NetObject

This component extends PhotonView to manage all SyncObjects and PackObjects and related callbacks.
This object collects and manages all of the callback interfaces of all ISyncObject components on a gameobject, as well as any Components with the PackObject Attribute. NetObject responds to timings generated by NetMaster, and passes them through to its SyncObjects and PackObject components via these callbacks. NetObject requires a PhotonView, as it uses the ViewID, IsMine and various network callbacks of the PhotonView.

Net Object Component

메인 화면으로
 

Skip When Empty: EXPERIMENTAL

This instructs the NetObject to not send at all, not even a heartbeat. This saves about 3 bytes per tick per object by removing heartbeat data but the side effect is some less than desirable extrapolation. This is included for edge cases where a scene may have a LOT of idle objects and some hitchy wake up behavior is worth the savings. Be sure to set your keyframe rates on children sync objects, as keyframes will force a send. Keyframe = zero will never send a keyframe. Also be aware that PUN does not initialize objects, so until an object moves, any late joiners will not see a correct position.

메인 화면으로
 

Ignore Non Controller Updates

Only will deserialize updates if they originate from the current Owner/Controller of this net entity. There are few use cases where anyone would want this to be unchecked.

메인 화면으로
 

Resimumlate Late Arrivals

If an net object update arrives too late, Simple components typically extrapolate the frame. Enabling this allows the net object to rewind to the late frame, apply its values and resimulate all following frames back to current. This is more CPU intensive but can make the net object handle network congestion more gracefully. Disabled, even reliable packets will not properly apply unless custom code is added for handling late packets.

메인 화면으로
 

Event Flow

Event Flow

기술 문서 TOP으로 돌아가기