PUN Classic (v1.x)およびBoltは旧バージョンとなり、今後はアップデートの提供が終了します。既存のPUN ClassicおよびBoltプロジェクトは引き続き稼働します。
今後の新しいプロジェクトについては、Photon FusionまたはQuantumへ切り替えていただくようよろしくお願いいたします。
IEntityReplicationFilter
IEntityReplicationFilter で、特定の接続にエンティティを同期すべきかどうか決定できます。
C#
public class EnemyController : Bolt.EntityEventListener<IEnemyTest>, Bolt.IEntityReplicationFilter
{
/**
* Filters out any package to be
* sent to a target connection
* @param connection Target player connection
* @return True if the target connection should
* receive updates from this entity
*/
public bool AllowReplicationTo(BoltConnection connection)
{
return (myDistance < 1000f);
}
}
Last updated on
Back to top