注册系统日志回调,根据日志内容和类型处理一些特殊问题

using UnityEngine;
using System.Collections;

public class SetupVerification : MonoBehaviour
{
	public string message = "";
	
	
	private bool badSetup = false;
	
	
	void Awake ()
	{
		Application.RegisterLogCallback (OnLog);
	}
	

	void OnLog (string message, string stacktrace, LogType type)
	{
		if (message.IndexOf ("UnityException: Input Axis") == 0 ||
			message.IndexOf ("UnityException: Input Button") == 0
		)
		{
                   //处理异常信息
		}
	}
	
	
}


相关文章:

  • 2022-12-23
  • 2021-11-17
  • 2021-11-26
  • 2022-12-23
  • 2022-12-23
  • 2021-09-29
  • 2022-12-23
  • 2021-04-23
猜你喜欢
  • 2021-07-22
  • 2022-03-01
  • 2022-12-23
  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
相关资源
相似解决方案