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.
没有合适的资源?快使用搜索试试~ 我知道了~
用Unity3d做一个魔方
共955个文件
info:279个
meta:158个
bin:50个
3星 · 超过75%的资源 需积分: 50 27 下载量 75 浏览量
2018-04-19
15:50:41
上传
评论 3
收藏 41.05MB RAR 举报
温馨提示
用Unity3d做的一个魔方demo,算是自己初学练手的作业吧。
资源推荐
资源详情
资源评论
收起资源包目录
用Unity3d做一个魔方 (955个子文件)
00000000000000001000000000000000 4KB
00000000000000002000000000000000 4KB
00000000000000003000000000000000 4KB
00000000000000004000000000000000 4KB
00000000000000004100000000000000 4KB
00000000000000005000000000000000 4KB
00000000000000005100000000000000 4KB
00000000000000006000000000000000 4KB
00000000000000006100000000000000 4KB
00000000000000007000000000000000 4KB
00000000000000007100000000000000 4KB
00000000000000008000000000000000 4KB
00000000000000009000000000000000 4KB
0000000000000000a000000000000000 4KB
0000000000000000a100000000000000 4KB
0000000000000000b000000000000000 4KB
0000000000000000c000000000000000 4KB
00c3c865782347f41b6358d9fba14b48 8KB
01571ba68fb2dad46aa03094ab219579 4KB
05ec5cf00ca181d45a42ba1870e148c3 14KB
0621b4aab2236437592f1f292cb81d20 4KB
0626b924325d1c34cafa6b22297f4e4f 59KB
07cd4dd3dc3dc614aa89aef53d731571 6KB
0bc72db1e9dcb9647818df5a07871127 4KB
0bfb2599080d5d24e84362b4ae314ae7 4KB
0c30e253f98ef674e8a81eb976b67d94 4KB
0c6271a290ef75b4c97d58746c86c5b8 104KB
0cdb788e79be7594e8cc8e1f742d23b7 5KB
0d3bb855445e36e479c85976fc88383a 5KB
0d9d26e2162aa4d11ab075b34c029673 525KB
0de3730b71e479c47995d4a98395073e 4KB
0f57aeb1b8dce3342bea5c28ac17db24 9KB
1062212255550964e974f3ffb3cbaae3 932KB
10bf81265ad87424d946598c575f45a0 1.34MB
12fd8a0055b84bb59e84c9835a37e333 6KB
1322fd896bbb15bb6e335591b766ae62 4KB
15be9c691b85a41a39c18beeff87e21b 10KB
15bf9c691b85b41a39c18bee2f87e21b 10KB
174090ae7f9eff84abe76f0ff062efac 4KB
1835e4537efbdd94b93c2dd136860f1d 4KB
1b32bcce201b4494ea8848326290c5d5 1.34MB
1b51fc08fe1883f41adefbb55436c161 4KB
1c52c953c83c2254a9fa72d50250f028 1.52MB
1c6d1fbb51834b64847b1b73a75bfc77 7KB
1caf40fc8bebb6b43b2550c05ca791d6 9KB
1cb8ed3cbba15f0479fbae54e0a963df 1.39MB
2025b46aac7ef3f4cbf5b8b8d0534315 53KB
208eae7de6567c841ba5654e4ecdbe1b 53KB
2169821f0567671499a5c10104c69c24 4KB
21eff446d50eaf44a85985cd4c0b6fa1 5KB
220224b43fc464c28bc0e8de8f54a432 6KB
224ede67b4f3a4109bfec4d5cb161b05 6KB
22bbf57ec543cee42a5aa0ec2dd9e457 5KB
246cc59c7a84ea44f87f6b70acfe30c5 5KB
2682a692a2be7e14e901a738c7806da0 5KB
277b0b7d6ce48a34190c7fdc8cbd87f8 4KB
29014cd42b6d273408e0ceefd336c0b3 6KB
29486a9cd1773f44f80570b5bd896a1d 4KB
2d4d46c70fdd242668a56e99799e8540 4KB
2dac79461900e0f4c93561031c2e6902 4KB
314f49b24dc9d5d40956a7b28c67b237 4KB
32188fd89022c154c81befa2f0e00be0 5KB
328cc881519068e4eb7db4bb907ad2d9 5KB
3369231b1ed7ad34e84d9240a571db81 4KB
36e8bb3feb5e6402185947b817a6ed8d 4KB
37e60a97f2c87ae41b6cdc1055d78cb9 8KB
37fac21d1f093d344816942d1abce94e 5KB
38c8faf1788024c02930a0c68a6e0edc 4KB
3a7cedf246fca744f90cbdc9dbe41166 11KB
3a84de5cd0624681b6b6dcd8921d912a 6KB
3aeb7dadc0c69d54d9e5777e9d5631f1 4KB
3b09d59f4499d45428baa7a21e954296 22KB
3b5b7be0f2332c24f89a2af018daa62d 21.34MB
3cebe1a96232b44388b30b2f72dde434 4KB
3d8675433a508ec47b8f895201eacf20 358KB
3ee9c33ffee000840b0fed14ec400bc9 4KB
3f66eeca8ac36914e9ec9a716a9d9f73 4KB
405b9b51bb344a128608d968297df79c 4KB
4113173d5e95493ab8765d7b08371de4 7KB
41b808ba7c2f15e47bef4912db87d7c5 4KB
41db8cbfecdbdb54ab2bac971c05547a 4KB
42e65e088b3f4374e851b8dbd38f3df9 22KB
438c5036def53d643a5c720213903c0f 4KB
44f39a74ca5ee4bf5936b17e901f251c 4KB
4539eb30e895bbb41b5eae6df2dde978 4KB
453f100e6bdae4dfd9e655927819dc85 4KB
48986928cc2a449dbaecdd1654bc9bf6 4KB
492f54f4accf00440828ffcb9e4fcc19 6KB
49b611e658efbf443b686a4036f74fe3 102KB
4a3ecb1425d14502837abea459cf2b70 6KB
4b3fa4bde7f1451a8218c03ee6a8ded8 4KB
4b42c70f54fe4f24d84cdc651f46c005 11KB
4b5dce0492bdfb648a389fe390071625 4KB
4ba2329b63d54f0187bcaa12486b1b0f 4KB
4c6fe94acbb24417c988bab18cbd5209 10KB
4db017495c69e8140a56a0e2b669e3f8 102KB
4e2f32e9a1fefc24092337ae061f3dbc 10.68MB
4e7c9ab97e5884e4eaa5967e9024f39c 22KB
4f234578336894dc081edf696f2ff5f2 4KB
50731098485d271438e4a39ed5684425 4KB
共 955 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10
资源评论
- T74532019-12-10可以用于参考
- 一只小男猫2018-07-20无法运行啊……
wys597314829
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功