简体   繁体   English

是否可以在Unity3D中使用python进行控制台开发?

[英]Is it possible to use python in Unity3D for console development?

I am developing a 3D Graphing Calculator software in Unity3D. 我正在Unity3D中开发3D图形计算器软件。 I am struggling to find good numerical/symbolic math libraries written in C/C#. 我正在努力寻找用C / C#编写的好的数值/符号数学库。 Also, I want to make the calculator programmable (like the TI-84 Calculators everyone uses in school). 另外,我想使计算器可编程(例如每个人在学校使用的TI-84计算器)。

I found Python to be a very good language for the backbone of this project. 我发现Python是该项目骨干的一种非常好的语言。 SymPy and NumPy are really good math libraries. SymPy和NumPy是非常好的数学库。 And Python would be really good for users to program the calculator. Python对用户进行计算器编程确实非常有用。 (Here is already a calculator, the Numworks, that supports Python programs. The team ported Python to the hardware.) (这里已经是一个支持Numworks的计算器,它支持Python程序。该团队将Python移植到了硬件上。)

If I am developing for the PC, I could just use Python with openGL, or use IronPython in Unity. 如果要为PC开发,则可以将Python与openGL一起使用,或者在Unity中使用IronPython。 However, I'm developing for the Nintendo 3DS. 但是,我正在为Nintendo 3DS开发。 It may sound like a strange hardware choice, but it makes good sense. 这听起来像是一个奇怪的硬件选择,但这很有道理。 The 3DS has a stereoscopic display perfect for showing 3D functions. 3DS具有立体显示器,非常适合显示3D功能。 It has a joy stick to operate the camera. 它带有操纵杆,可以操作相机。 It has a touch screen to handle input. 它具有触摸屏来处理输入。 Imagine showing a height map of a 3D function on the lower display. 想象一下在下部显示屏上显示3D功能的高度图。 You can use it to trace the function. 您可以使用它来跟踪功能。 You can draw a region D on it, and have the 3DS integrate over the region. 您可以在其上绘制区域D,并使3DS集成在该区域上。 You can take directional derivatives with your stylus. 您可以使用触控笔进行方向导数。 The possibility is endless. 可能性是无限的。 The problem, of course, is that Unity doesn't support Python, and IronPython only supports Windows/Mac/Linux/Android. 当然,问题在于Unity不支持Python,而IronPython仅支持Windows / Mac / Linux / Android。

Do you have any suggestions for me? 您对我有什么建议吗? For example, any possible way to use python in unity for the 3DS? 例如,对于3DS统一使用python的任何可行方法? Any good math library in C/C#? C / C#中有任何好的数学库吗? Can I implement a good enough Python interpreter in C# to handle user's program (doesn't have to be complaint)? 我可以在C#中实现足够好的Python解释器来处理用户程序(不必抱怨)吗?

You could try the Math.Net library for C#, it should have the functionality you need, or you could try IronPython, here is an article that might help you get started. 您可以尝试使用C#的Math.Net库,它应该具有所需的功能,或者您可以尝试IronPython,这是一篇可以帮助您入门的文章。

http://shrigsoc.blogspot.com/2016/07/ironpython-and-unity.html http://shrigsoc.blogspot.com/2016/07/ironpython-and-unity.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM