Importing the CrossPlatformInput package adds a menu item to Unity, "CrossPlatformInput", which allows you to enable or disable the CrossPlatformInput in the editor. You must enable the CrossPlatformInput in order to see the control rigs in the editor, and to start using Unity Remote to control your game.
The CrossPlatformInput sample assets contains two main sections.
1) The folder of prefabs provide a variety of ready-to-use "MobileControlRigs". Each control rig is suitable for a different purpose, and each implements the touch or tilt-based equivalent of some of the default standalone axes or buttons. These are ready to drop into your scene, and to use them you simply need to read the axes via the CrossPlatformInput class, rather than Unity's regular Input class.
2) The set of scripts provided are the scripts we used to put together the control rigs prefabs. They provide a simplified way of reading basic mobile input, such as tilt, taps and swipe gestures. They are designed so that various mobile controls can be read in the same way as regular Unity axes and buttons. You can use these scripts to build your own MobileControlRigs.
For example the Car control rig feeds the tilt input of the mobile device to the "Horizontal" axis, and has an accelerator and brake touch button which are fed as a pair into the "Vertical" axis. These are virtual equivalents of the real "Horizontal" and "Vertical" axes defined in Unity's Input Manager.
Therefore when you read CrossPlatformInput.GetAxis("Horizontal"), you will either get the "real" input value - if your build target is non-mobile, or the value from the mobile control rig - if your build target is set to a mobile platform.
The CrossPlatformInput scripts and prefabs are provided together as an example of how you can implement a cross-platform control solution in Unity. They also allow us to provide our other sample scenes in a form that can be published as standalone or to mobile targets with no modification.
To use the CrossPlatformInput, you need to drop a "Mobile Control Rig" into your scene (or create your own), and then make calls to CrossPlatformInput functions, referring to the axes and buttons that the Rig implements.
When reading input from the CrossPlatformInput class, the values returned will be taken either from Unity's Input Manager settings, or from the mobile-specific controls set up, depending on which build target you have selected.
The CrossPlatformInput class is designed to be called instead of Unity's own Input class, and so mirrors certain parts of the Input API - specifically the functions relating to Axes and Buttons:
GetAxis, GetAxisRaw
GetButton, GetButtonDown, GetButtonUp
Notes for coders:
This package sets two compiler define symbols. One is always set automatically, the other is optionally set from a menu item.
Importing the "CrossPlatformInput" package will automatically add a compiler define symbol, "CROSS_PLATFORM_INPUT". This enables the CrossPlatformInput functions defined in some of the other Sample Asset packages (such as the Characters, Planes, etc). Without this symbol defined, those packages use Unity's regular Input class, which means they can be imported alone and still work without the CrossPlatformInput package.
The optional define (which is set by default, but can be disabled using the "Mobile Input" menu), is "MOBILE_INPUT". This causes the MobileControlRigs to become active when a mobile build target is selected. It also enables certain mobile-specific control nuances in some of the packages, which make more sense when the character or vehicle is being controlled using mobile input (such as auto-leveling the character's look direction). This define is optional because some developers prefer to use standalone input methods instead of the Unity Remote app, when testing mobile apps in the editor's play mode.
没有合适的资源?快使用搜索试试~ 我知道了~
unity游戏开发 unity 赛车开发 竞速
共2000个文件
bin:915个
meta:433个
mat:167个
需积分: 0 1 下载量 151 浏览量
2024-05-04
12:06:09
上传
评论
收藏 318.1MB ZIP 举报
温馨提示
内容概要:这套资源是为Unity赛车游戏开发者学习者打造的,包含了高品质的3D赛车模型、道具、地形等资源,能够帮助开发者快速搭建赛车游戏场景,提升游戏的视觉体验。 使用人群:Unity赛车游戏开发学习者,可以通过学习赛车游戏开发流程来进一步完善自己的游戏。 使用场景和目标:这套资源完成了基础的赛车竞速功能,有飘移、加速、碰撞。目标是帮助开发者快速搭建赛车场景,节省开发时间,提升游戏品质,增加游戏乐趣。 其他说明:这套资源支持Unity3以上版本,可以在该游戏的基础上添加你所想要的功能,并且将场景进行更换。该套资源旨在让开发者可以基本了解开发赛车游戏所需要的一些基础功能,对于其他的功能开发,可以在该资源的基础上进行额外的开发。
资源推荐
资源详情
资源评论
收起资源包目录
unity游戏开发 unity 赛车开发 竞速 (2000个子文件)
DefaultWsdlHelpGenerator.aspx 59KB
DefaultWsdlHelpGenerator.aspx 57KB
New Terrain.asset 3.69MB
NavMesh.asset 1.64MB
ProjectSettings.asset 41KB
InputManager.asset 5KB
QualitySettings.asset 5KB
NavMeshAreas.asset 4KB
TagManager.asset 4KB
Physics2DSettings.asset 4KB
EditorUserBuildSettings.asset 4KB
DynamicsManager.asset 4KB
GraphicsSettings.asset 4KB
EditorSettings.asset 4KB
AudioManager.asset 4KB
EditorBuildSettings.asset 4KB
UnityAdsSettings.asset 4KB
NetworkManager.asset 4KB
TimeManager.asset 4KB
UnityAnalyticsManager.asset 4KB
sharedassets0.assets 130.4MB
0bfb8ff388e8624af3aff487036534f4.bin 27KB
0f311a2e35a22d2694ab1a04619a0cf2.bin 27KB
d97e2d0d5c74032d36466ec473e585da.bin 26KB
d26f45d8d18b337b95c7c0d6e847e45e.bin 26KB
d1cc16655032c2dbb69f4336b492aa07.bin 25KB
0fe6156e587d7891f1d008fa4a1ba994.bin 25KB
0b1e50bd280cf3f0351144f0586c6747.bin 25KB
0edf4a8277389c9bf1faf9808e3cc4ab.bin 25KB
0cf0376c6e30c35a6155c0faea0435d0.bin 24KB
d714a4b117fcacac2bb8c0592cf8ab85.bin 24KB
d33bbddfc1391e4416818e6c71988de9.bin 19KB
dd4b45265727de71143a9b0fd6b085e8.bin 19KB
0c3cd0fc6e1e74ea03b7655eabebf508.bin 18KB
d5bc942b2af851612430a246ba9a3040.bin 18KB
dd91947d7571cea09f74c4fd25280bf1.bin 17KB
d24ac25142afdbf3853e72bb503440f8.bin 17KB
02307dd5f8c082132c3f64e79ceaa279.bin 17KB
d0905637d1870a614cb15f045a5fd4e7.bin 17KB
d3eb442a233b27b239bfe298b308a550.bin 17KB
dd4a355d18ec44b81400b920d523c50d.bin 17KB
d24a3d4a6715fbdd7870fba362c1e99a.bin 16KB
db5a5883f288d226893e95e91626ec2c.bin 16KB
0c0a5073b990d1a9fb2f499dad1777ed.bin 16KB
001033bf046f17650d300a9a68f1057f.bin 16KB
08ecfe393539dc87439e93aace086868.bin 16KB
dc8b186300bec0101e5e896b9bf83ca5.bin 16KB
0cc99ff0ee85fd9465e2aba256792d87.bin 16KB
098c40910a840d52aa0dad30f8ccc025.bin 16KB
d162edadb78f13f2acf7ee86d49f9bed.bin 16KB
ed52135315fc616d94f91db580d3cd47.bin 16KB
0cdf61ceb93f988898a7472eb103e0d4.bin 16KB
d87666f4aae95be4ff7112e8d46dfb41.bin 16KB
07be8df256b9029f7653e5e6262ca0d4.bin 16KB
d5c3f99c8f64877b5b362b48b1592587.bin 16KB
05293814600c3988b7ac59243b8cd831.bin 16KB
0b3281db0262773d50fc4c4d89c19d3b.bin 16KB
d95a228a67fadb23656a1e83f874c303.bin 15KB
db32e042c932abce421901d004c6ae40.bin 15KB
d8a9b6418e4e307b52445f5eba4a58a0.bin 15KB
d323cb298996c5170b463b1f9e249cdd.bin 15KB
08a0963dd015058b1d5a8b724416f991.bin 15KB
04cfccd67acaf07eedbd9b6d3e1e6b47.bin 15KB
d72f35454bc24d0a5234fff42e00b071.bin 15KB
03f861b1724345475e1f74848e3ea9b7.bin 15KB
d5b9b5ab98c0dba2139604eed8893d98.bin 15KB
07fe1ec6fa8c112c05e9c4de06c50ed6.bin 15KB
0b5989604d56e347f5d06601edce6be5.bin 15KB
e85c650a0c07ffc57a8704ac0a21469b.bin 15KB
0c30a17cbeb14827f5de28d3d0eeeb07.bin 15KB
da5a78a148b02a88f9d78e62557f4cf3.bin 15KB
da602bdc46962fe20beb51ccdd4aa4b6.bin 15KB
030c958f589afd780b9b0fb118bae931.bin 14KB
0e3a9f086bd4861e562e86c17e203a5d.bin 14KB
080ee63367a6afebc606c18e7d9c23c7.bin 14KB
01176f31387c2b9084c12da3793dae1c.bin 14KB
d305553e4f807b2d9ca15b1e3e8ad297.bin 14KB
0cc296057653049c451f08b59f15fc70.bin 14KB
0a82afda50996f9672cda775f4f7723f.bin 14KB
08d7ac78b2ad2383f89f66b046422b78.bin 14KB
d37be0a4544f125abd1b288b78dd0182.bin 14KB
d7c067d8d7ef838c6d6e8f10a6083c14.bin 14KB
d1c1f235bc43d4817287dc59660cc0eb.bin 14KB
0c7271f0e518155c01db307a380b547c.bin 13KB
04c7fe9f8255458f235f4e4f0ffb136d.bin 13KB
d26f3c1cb1ef503aa2aafaa4ba116a01.bin 13KB
d15260a99691fc364ffaf86cc35dd564.bin 13KB
077369048bb031b3040d9085dab6cdf5.bin 13KB
eaf5d0e36372778f9cd7e204f7b14648.bin 13KB
06e8418160cde1fa93b194737c5b6dc5.bin 13KB
eb4181974f8ab715d206173a166a6b8f.bin 13KB
d70c7382a0168370be51b21973ba3136.bin 13KB
0ada2203b811ea7a2ef2127207302cc4.bin 13KB
0afd1232ffe101e13fee606b4dd9e0bd.bin 12KB
d011eaf441659e12e5c06a302ff59b62.bin 12KB
0bcbe184bb191702f296a514f19ceca9.bin 12KB
00c43317f09c9df84750c60004c42676.bin 12KB
e910bf9fe456dea79aa43c5cafb7c88f.bin 12KB
018e8e64180d086130fa2a6dc5442375.bin 12KB
0d289174d11837e132d8987421762aa5.bin 12KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
怪蜀黍客栈
- 粉丝: 161
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功