Kinect第二天:翻译

How to Use KinectManager across Multiple Scenes

-如何在多个场景中使用KinectManager


In order to use KinectManager across multiple scenes, it must be attached to a game object that is created only once during the game, not destroyed and available in all scenes. In this case the MainCamera is not a good choice. If this is your case, do as follows:
-为了在多个场景中使用KinectManager,KinectManager必须被添加到项目中唯一生成、不被销毁、所有场景可见的对象上。在这个例子中,放在了主相机(MainCamera)上,不是一个很好的选择。假如举的例子是你的范本,如下行事:

1.Create a new scene and name it ‘StartupScene’. Set it as the 1st scene to be executed, in the project’s build settings.-创建一个新场景,命名为“StartupScene”。在项目的Build Settings(File->Build Settings,将场景拖入即可)里面把它设置为第一个执行的场景。
这里写图片描述

2.Open the StartupScene.-打开启动场景

3.Create an empty game object and name it ‘KinectObject’.-新建一个空对象,命名为“KinectObject”

4.Attach the KinectManager there and modify its settings as needed. You can also attach the InteractionManager, SpeechManager or FacetrackingManager, if you need them.-添加KinectManager到这个对象上,按需求修改配置。如果有需要,你也可以添加InteractionManager, SpeechManager 或者FacetrackingManager。

5.Attach KinectScripts/Extras/LoadMainLevel-script to KinectObject. This script will simply load the next scene, right after Kinect-sensor has been initialized. -在KinectObject这个对象上添加KinectScripts/Extras/路径下的LoadMainLevel脚本。这个脚本将在Kinect感应器被初始化后,简单的加载下个场景。

* 6.Save StartupScene.* -保存启动场景(快捷键:Ctrl+s)

* 7.Open any of the other scenes.* -打开其他场景

* 8.Make sure KinectManager (and all other Managers) are removed from MainCamera.* -确保主相机上的 KinectManager(以及其他所有的Manager类)脚本已经被移除。

* 9.If you need avatars in your scene, set up the avatars as in the example. Don’t forget to attach KinectScripts/AvatarController-script to each avatar. Additionally attach KinectScripts/Extras/SetSceneAvatars-script to the MainCamera. It will automatically add the scene avatars to the Player-1 avatars’ list of KinectManager at the scene start-up.* -如果在你的场景中你需要骨骼动画,就像示例那样设置这个骨骼动画。不要忘记对每个骨骼动画添加KinectScripts/路径下的AvatarController脚本。此外,添加KinectScripts/Extras/路径下的SetSceneAvatars脚本到主相机上。它将在场景开始时自动地把场景中所有的骨骼动画添加到Player-1 avatars的列表中。

* 10.If you need to invoke a public function from KinectManager in your scripts, use the following line to get reference to KinectManager: ‘KinectManager kinectManager = KinectManager.Instance;’. You can get reference to the the InteractionManager, SpeechManager or FacetrackingManager in the same way.* -如果你需要在你的脚本中调用KinectManager中的公共方法,请使用下面一行代码来获取KinectManager的引用:“KinectManager kinectManager = KinectManager.Instance;”。你可以用同样的方式获取到InteractionManager,SpeechManager 或者 FacetrackingManager的引用。

Support, Examples and Feedback
-支持,案例和反馈
E-mail: rumen.filkov@gmail.com, Skype, Twitter: roumenf, Whats App: on request

/*
注: WhatsNew-Kinect-MsSdk.pdf是介绍该插件从1.1到1.9的改动的,故不翻译。
Kinect需要2.0的,链接在这里:http://www.ceeger.com/forum/read.php?tid=31699#read_494021
*/

内容概要:本文围绕SecureCRT自动化脚本开发在毕业设计中的应用,系统介绍了如何利用SecureCRT的脚本功能(支持Python、VBScript等)提升计算机、网络工程等相关专业毕业设计的效率与质量。文章从关键概念入手,阐明了SecureCRT脚本的核心对象(如crt、Screen、Session)及其在解决多设备调试、重复操作、跨场景验证等毕业设计常见痛点中的价值。通过三个典型应用场景——网络设备配置一致性验证、嵌入式系统稳定性测试、云平台CLI兼容性测试,展示了脚本的实际赋能效果,并以Python实现的交换机端口安全配置验证脚本为例,深入解析了会话管理、屏幕同步、输出解析、异常处理和结果导出等关键技术细节。最后展望了低代码化、AI辅助调试和云边协同等未来发展趋势。; 适合人群:计算机、网络工程、物联网、云计算等相关专业,具备一定编程基础(尤其是Python)的本科或研究生毕业生,以及需要进行设备自动化操作的科研人员; 使用场景及目标:①实现批量网络设备配置的自动验证与报告生成;②长时间自动化采集嵌入式系统串口数据;③批量执行云平台CLI命令并分析兼容性差异;目标是提升毕业设计的操作效率、增强实验可复现性与数据严谨性; 阅读建议:建议读者结合自身毕业设计课题,参考文中代码案例进行本地实践,重点关注异常处理机制与正则表达式的适配,并注意敏感信息(如密码)的加密管理,同时可探索将脚本与外部工具(如Excel、数据库)集成以增强结果分析能力。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值