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

Overriding Bolt Logging

You can override Bolt’s internal logging and add your own implementation. First you implement BoltLog.IWriter:

C#

/**
 * The interface providing log writing capabilities to an output
 */
public interface IWriter : IDisposable
{
  void Debug(string message);
  void Error(string message);
  void Info(string message);
  void Warn(string message);
}

Example of implementation:

C#

// MyLogger.cs
using Bolt;

public class MyLogger : BoltLog.IWriter
{
    public void Debug(string message) { /* log code */ }
    public void Error(string message) { /* log code */ }
    public void Info(string message) { /* log code */ }
    public void Warn(string message) { /* log code */ }
    public void Dispose() {}
}

And then you add it to Bolt at runtime with BoltLog.Add:

C#

public override void BoltStartDone()
{
    BoltLog.Add(new MyLogger());
}

At this point you can turn off the options for Bolt logging in the Bolt settings and then you control the logging of Bolt yourself.

Back to top