[英]How to keep my unity3d program (c# v3.5) even if there is an exit(1) in a c++ dll / native plugin?
我在unity3d項目中使用了c ++ dll,如果任何輸入不正確,該庫將使用exit(1),這會使unity3d崩潰/關閉。 有什么辦法可以避免這種現象而無需修改原始的c ++代碼?
我不知道這是否可行,但是嘗試在try and catch 子句中 調用 C ++ 函數 。 例如:
try{
//Call you C++ function from C# here
}catch(Exception e){
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.