📜  unity c# 抛出异常 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:21.382000             🧑  作者: Mango

代码示例1
//usual c# syntax should work
throw new Exception(); //remember to include 'using System;'
//alternatively, try this
Debug.LogException(e, this);

//docs for latter: https://docs.unity3d.com/ScriptReference/Debug.LogException.html