I use a c++ dll in my unity3d project and if any input is incorrect, the library use exit(1), which makes unity3d crashes/closes. Is there any way to avoid this behavior without modifying the original c++ code ?
I don't know if this would work but try to call the C++ function in a try and catch clause . For example:
try{
//Call you C++ function from C# here
}catch(Exception e){
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.