Unity3D for iPhone使用入门与UnityRemote

注:Google页面翻译,非人工.原文链接:http://www.unifycommunity.com/wiki/index.php?title=IPhone_Getting_Started_with_the_UnityRemote

Unity3D for iPhone使用入门与UnityRemote
From Unify Community Wiki从统一社区维基
Jump to: navigation , search跳转到: 导航 , 搜索
This tutorial is still VERY rough but hopefully they will still be helpful in its current form.本教程仍然十分粗糙,但希望他们仍然是有帮助的现有形式。

If you have a minute and know your way around wiki formatting, please feel free to beautify this page.如果你有一分钟,并且认识自己的方式解决的wiki格式,请随时美化这一页。

NOTE: I didn’t think to start writing this until after I was done registering, so if you are following this tutorial and you notice something that I missed, PLEASE help out by extending this tutorial with whatever you figure out. 注意:我没想到,开始写这本之后,我做登记,因此,如果您是本教程之后,您的通知,我错过了, 请伸出你的援手,扩大本教程与你搞清楚。 At the moment, almost everyone is having problems getting things configured the first time. 目前,几乎每个人都上有问题的东西第一次配置。

Contents目录  [hide]
1 Register & Download 1 注册和下载
2 Register your Device & Fetch App ID 2 注册您的设备及撷取应用程序编号
3 Setup Unity iPhone 3 安装统一iPhone手机
4 Establish Network Connection 4 建立网络连接
5 Run UnityRemote 5 运行UnityRemote

[ edit ] Register & Download [ 编辑 ] 注册和下载
Register as an iPhone Developer , if you have not done so already.注册成为iPhone手机的开发 ,如果你还没有这样做。 This part does not cost anything, and will allow you to download the iPhone SDK and view all the developer documentation for the iPhone.这部分没有任何费用,并允许您下载的iPhone SDK和查看所有的开发者文档为iPhone 。 You will find the link on the right side of the page.你会发现上的链接页面右侧。
Download the iPhone SDK (~1.6GB) from the Apple iPhone Dev Center .下载的iPhone的SDK ( 〜 1.6GB )由苹果iPhone开发中心 。 The SDK includes the latest XCode toolset, so there is no need to install it separately.该SDK包括最新的XCode工具,所以没有必要单独安装它。
Enroll in the iPhone Developer Program .加入iPhone 的开发人员计划 。 There are two options here: $99 for the Standard Program, and $299 for the Enterprise Program.有两种选择浏览: 99美元的标准程序,以及299美元的企业计划。 The only real difference is that you can use the Apple Apps Store with the Standard Program, while Enterprise is only for in-house distribution.唯一真正的区别是,您可以使用苹果应用服务店的标准程序,而只是为了企业的内部分配。 Most will want to choose the Standard program.最希望选择的标准程序。
VERY IMPORTANT: When applying, you will be presented a choice for registering as a company or as an individual.非常重要:当申请,您将选择注册的公司或个人。 Choose carefully here, because you will not be able to switch easily.谨慎选择,因为你将不能轻易转。 If you already have your own business setup, you will most likely want to choose company.如果您已经拥有自己的企业安装,您将最有可能要选择的公司。
Wait until you get an email from Apple that lets you activate your iPhone program portal.等着,直到你收到一封电子邮件从苹果,让你激活你的iPhone计划门户。 It can take a day to a week for Apple to authorize individuals and last report was that companies can take as long as three months to be registered.它可以在一天至一周的苹果授权个人和最后一份报告认为,公司可能需要长达3个月内进行登记。 (I actually had to call the apple store at 1-800-MyApple and get transferred to the small business people who transferred me to the iPhone dev people who fixed the email for me when I still couldn’t get in after a week). (事实上,我已经打电话给苹果商店在1 – 800 – MyApple并移交给小企业的人谁转我对iPhone开发谁固定人民对我的电子邮件时,我仍然无法在一周后) 。
Send an email to Unity and request a Unity iPhone evaluation.发送电子邮件至统一 ,并要求统一iPhone手机的评价。 A real person has to read your email so again this may take a few days.一个真实的人已经阅读您的电子邮件,以便再次这可能需要几天时间。
[ edit ] Register your Device & Fetch App ID [ 编辑 ] 注册您的设备及撷取应用程序编号
Sign in to the iPhone program portal (this is what can take a week to get access to, it will show up as a button on the right side of your iPhone Dev Center page).登录到iPhone的程序门户网站(这是可以采取一个星期的获得,它会显示为一个按钮的右边你的iPhone 开发中心页) 。
Find the device ID of your iPhone or iPod Touch.找到的设备ID你的iPhone或iPod接触。 You can find out your device’s UDID using iTunes 7.7.您可以找到您的设备的UDID使用iTunes 7.7 。 or later.或更高版本。 To do this, connect your device to your Mac and launch iTunes.要做到这一点,您的设备连接到您的Mac和推出的iTunes 。 In iTunes, select your device in the ‘Devices’ section and navigate to the Summary tab.在iTunes中,选择您的设备中的’装置’节和浏览的简要标签。 Click on the Serial Number label to reveal the Identifier field and the 40 character UDID.单击的序列号标签,以显示标识符场和40个字符UDID 。 Press Command+C to copy the UDID to your clipboard.按Command + C复制UDID到您的剪贴板上。
In the program portal, click on “Team” and register yourself (here and elsewhere in the program portal there is a “How To” tab that holds context-sensitive help information for the current task)该计划的门户网站,点击“团队”和登记自己(在这里和其他地方的门户网站程序有一个“如何”标签持有上下文相关的帮助信息,目前的任务)
Click on “Certificates” and create a certificate that will be used to sign your application.点击“证书” ,并创建一个证书,将用于登录您的申请。 I found the instructions on the “How To” tab were enough to get me going.我发现上的指示, “如何”标签已足以让我去。
VERY IMPORTANT: later on, you need to download this certificate to your Mac so that xcode can use it to sign your projects.非常重要:后来,你需要下载该证书到Mac ,以便xcode可以使用它来登入您的项目。 No code can go onto an iPhone until it is signed.没有代码可以到iPhone手机,直到签署。 After you create a certificate you will see a button on the Certificates tab that lets you download it to your machine.在您建立您会看到证书上的一个按钮证书标签,您可以将它下载到你的机器。 Click on the “Download” button and install the downloaded certificate by double-clicking on it.点击“下载”按钮下载并安装证书通过双击它。 This will launch the Keychain Access application.这将启动钥匙扣Access应用程序。 Make sure you install to the login chain which should be selected by default.请确定您安装了登录链应该是默认选中的。
Click on “Devices” and add your device using the code that you copied out of iTunes above.点击“设备” ,加上您的设备使用的代码,复制出的iTunes以上。
Click on “App IDs” and add an ID.点击“应用程序名” ,并添加一个编号。 This is one of the steps that people commonly get wrong.这是一个步骤,人民普遍得到错误的。 First, App IDs need to be based on domain names (but backwards) and second they need to end in “.*” so if you have the domain waffles.com you want to list your App ID as com.waffles.* .首先,应用程序的ID必须是基于域名(但向后)和第二,他们必须结束在“ .* ”因此,如果您有网域waffles.com要列出您的应用程序ID作为com.waffles .* 。 When you are done and the App ID shows up in the list on the main page, Apple will have added a random identifier to the front of your text so that it will look like 8dbg88ga98gf89g.com.waffles.* .当您完成和应用程序编号显示在列表中的主网页,苹果电脑将增加一个随机标识符前线的文字,使它看起来就像8dbg88ga98gf89g.com.waffles .* 。
Click on “Provisioning” and create a provisioning profile.点击“配置” ,并创建一个配置的个人资料。 Again, I used the “How To” tab.同样,我使用的“如何”标签。
VERY IMPORTANT: you will need to add the provisioning information to your xcode project.非常重要:您将需要添加到您的供应信息xcode项目。 Download the provisioning information using the “Download” button.下载配置信息使用“下载”按钮。
Don’t worry about the “Distribution” tab yet.不必担心“分配”标签尚未。

[ edit ] Setup Unity iPhone [ 编辑 ] 安装统一iPhone手机
Launch the Unity iPhone app and see the sample project推出iPhone手机应用软件的统一和见示例项目
In the upper right hand corner of the view you will see the Player Prefs (you can find these later via Edit->Project Settings->Player).在右上角的看法,您会看到播放器偏好设定(您可以找到这些稍后通过编辑“项目设置, ”播放器) 。 You need to change the iPhone Bundle Identifier to get it to match both your App ID and to match the identifier in the xcode project (which we’ll be modifying shortly).你需要改变的iPhone束标识符使其符合您的应用程序ID和相匹配的标识符在xcode项目(其中我们将修改不久) 。 Assuming your App ID was 8dbg88ga98gf89g.com.waffles.* you want to change the iPhone Bundle Identifier to com.waffles.UnityRemote假设您的应用程序ID为8dbg88ga98gf89g.com.waffles .*要更改iPhone的束标识符com.waffles.UnityRemote
In the finder, double-click on Applications/Unity iPhone/Unity Remote/UnityRemote.xcodeproj在Finder中,双击应用/统一iPhone手机/统一远程/ UnityRemote.xcodeproj
With your iPhone connected to your Mac, you should see the device listed in the xcode organizer window.与你的iPhone连接到你的Mac ,您应该可以看到该设备中所列xcode主办窗口。
Select the device in the xcode organizer and click + to add a new provisioning to the device.选择中的装置xcode组织者和点击+添加新的配置到设备上。 Browse to the provisioning file you downloaded earlier.浏览到您的配置文件下载较早。
At this point, I was getting certificate not found warnings and had to power-cycle my iPhone to get it to register (hold the button at the top of the phone down for 5 seconds to power off, then repeat to power on) and I may have had to close and re-launch xcode but after that everything was fine.在这一点上,我获得的证书找不到了警告和权力周期我的iPhone手机,以获得注册(按住按钮上方的电话下降为5秒,切断电源,然后重复权力的) ,我可能不得不关闭并重新启动后, xcode ,但一切都被罚款。
From the xcode Window menu, select UnityRemote.xcodeproj (or if you had to close and restart xcode open it from the recent projects menu item)从xcode窗口菜单中,选择UnityRemote.xcodeproj (或者如果您已关闭并重新启动xcode打开它从最近的项目菜单项)
Select Device (rather than Simulator ) as the build target in the popup at the top left of the Xcode window.选择设备 (而不是模拟器 ) ,作为建设目标在弹出在左上方的Xcode窗口。
In the treeview, open Targets and select UnityRemote, then right-mouse-click and select Get Info.在TreeView中,打开目标,并选择UnityRemote ,然后右键单击鼠标,选择获取信息。 Go to the Properties tab and change the Identifier (NOTE: this is another one of the steps that people frequently get wrong).进入属性选项卡上,并改变标识符(注:这是另一种的步骤之一,人们经常得到错误的) 。 This identifier needs to match whatever you put in the iPhone Unity Player Settings iPhone Bundle Identifier field, which is this example is com.waffles.UnityRemote这标识符必须符合你的iPhone将在统一Player设定iPhone手机束标识符领域,这是这个例子是com.waffles.UnityRemote
[ edit ] Establish Network Connection [ 编辑 ] 建立网络连接
Click on the Air Port icon in your main menu bar and “Create Network…”点击图标,航空港的主菜单栏和“创建网络… ” to set up a wifi network (with a password) that you iPhone can connect to.设立一个WiFi网络(密码) ,您可以连接到iPhone手机。 You can only send apps to the iPhone over wifi (you can’t do it over a USB cable).您只能发送给iPhone的应用服务的无线(你不能做到这一点了一个USB线) 。
on the iPhone, click on Settings and join the new wireless network.在iPhone上,单击设置,并加入新的无线网络。
[ edit ] Run UnityRemote [ 编辑 ] 运行UnityRemote
Go back to xcode, find the UnityRemote.xcodeproj window, and click the “Build and Go” button.返回xcode ,找到UnityRemote.xcodeproj窗口,并单击“生成并返回”按钮。 xcode should build and sign your app and then you will see a notice on your phone that it is waiting for you to hit play in the editor. xcode应建立并签署您的应用程序,然后您会看到一个通知在您的手机上,它正等着你击中发挥的编辑器。
Switch to the Unity editor window and hit the play button in the lower-left-hand corner of the window.切换到统一编辑器窗口,然后按下播放按钮在较低左上角的窗口。
If you’ve done everything correctly, you should now be flying a ship around on your phone.如果您已经尽了一切正确的话,您现在应该船舶周围悬挂在您的手机上。 Note that what you see on the iPhone/iPod may be blurry.请注意,您所看到的在iPhone / iPod可能是模糊的。 This is because Unity Remote is streaming images rendered by Unity Editor to the device.这是因为统一是流远程图像编辑器所提供的统一的设备。 The blurriness is a result of compression artifacts.该blurriness是由于压缩文物。

发布于 :未分类

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注