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 125 使用Unity5.4开发《我的世界》Minecraft.zip
共869个文件
info:215个
meta:186个
cs:48个
需积分: 16 1 下载量 50 浏览量
2022-08-08
11:07:47
上传
评论
收藏 46.12MB ZIP 举报
温馨提示
Unity 125 使用Unity5.4开发《我的世界》Minecraft.zip
资源详情
资源评论
资源推荐
收起资源包目录
Unity 125 使用Unity5.4开发《我的世界》Minecraft.zip (869个子文件)
00000000000000001000000000000000 4KB
00000000000000002000000000000000 4KB
00000000000000003000000000000000 4KB
00000000000000004000000000000000 4KB
00000000000000004100000000000000 4KB
00000000000000005000000000000000 4KB
00000000000000005100000000000000 4KB
00000000000000006000000000000000 4KB
00000000000000006100000000000000 4KB
00000000000000007000000000000000 4KB
00000000000000007100000000000000 4KB
00000000000000008000000000000000 4KB
00000000000000008100000000000000 4KB
00000000000000009000000000000000 4KB
0000000000000000a000000000000000 4KB
0000000000000000a100000000000000 4KB
0000000000000000b000000000000000 4KB
0000000000000000c000000000000000 4KB
00375237d7f8ed14fa6826d6dc5b3f83 4KB
00c3c865782347f41b6358d9fba14b48 8KB
01571ba68fb2dad46aa03094ab219579 4KB
020ca64e125d0744082e77cf089de726 52KB
05ec5cf00ca181d45a42ba1870e148c3 14KB
0626b924325d1c34cafa6b22297f4e4f 54KB
066454ffbbdbcad4d945633440ca5a43 4KB
094a8b879af2b3846a0aa48536119c8e 52KB
0bc72db1e9dcb9647818df5a07871127 4KB
0bfb2599080d5d24e84362b4ae314ae7 4KB
0c6271a290ef75b4c97d58746c86c5b8 97KB
0cd4c57103ac3ee4781389974cd890cd 4KB
0cdb788e79be7594e8cc8e1f742d23b7 5KB
0d9d26e2162aa4d11ab075b34c029673 515KB
0de3730b71e479c47995d4a98395073e 4KB
0f57aeb1b8dce3342bea5c28ac17db24 9KB
1062212255550964e974f3ffb3cbaae3 907KB
15cb145d715d3c94c9fe263d79fd09d4 52KB
174090ae7f9eff84abe76f0ff062efac 4KB
17ab213a2303fba4bbcdfe91db62352d 4KB
1835e4537efbdd94b93c2dd136860f1d 4KB
1c52c953c83c2254a9fa72d50250f028 1.48MB
1caf40fc8bebb6b43b2550c05ca791d6 9KB
1cb8ed3cbba15f0479fbae54e0a963df 1.35MB
2169821f0567671499a5c10104c69c24 4KB
22bbf57ec543cee42a5aa0ec2dd9e457 5KB
23050e141a7b0e842a48998c96d1f5b7 4KB
246cc59c7a84ea44f87f6b70acfe30c5 5KB
29014cd42b6d273408e0ceefd336c0b3 6KB
29486a9cd1773f44f80570b5bd896a1d 4KB
2dac79461900e0f4c93561031c2e6902 4KB
314f49b24dc9d5d40956a7b28c67b237 4KB
3369231b1ed7ad34e84d9240a571db81 4KB
37e60a97f2c87ae41b6cdc1055d78cb9 8KB
37fac21d1f093d344816942d1abce94e 5KB
3a7cedf246fca744f90cbdc9dbe41166 11KB
3aeb7dadc0c69d54d9e5777e9d5631f1 4KB
3b09d59f4499d45428baa7a21e954296 22KB
3b5b7be0f2332c24f89a2af018daa62d 21.34MB
3bc1d1bdc29ed014a83e3b87d3b88eb9 4KB
3c0ad459c1534645b5d603b7cc258f97 6KB
3d8675433a508ec47b8f895201eacf20 353KB
3ee9c33ffee000840b0fed14ec400bc9 4KB
3f66eeca8ac36914e9ec9a716a9d9f73 4KB
40622e181101ede4189d063220a7f207 4KB
41b808ba7c2f15e47bef4912db87d7c5 4KB
41db8cbfecdbdb54ab2bac971c05547a 4KB
42e65e088b3f4374e851b8dbd38f3df9 22KB
438c5036def53d643a5c720213903c0f 4KB
4539eb30e895bbb41b5eae6df2dde978 4KB
492f54f4accf00440828ffcb9e4fcc19 6KB
49783c62c5cd2a141b033523c74b8559 4KB
49b611e658efbf443b686a4036f74fe3 97KB
4b42c70f54fe4f24d84cdc651f46c005 10KB
4b5dce0492bdfb648a389fe390071625 4KB
4db017495c69e8140a56a0e2b669e3f8 97KB
4e2f32e9a1fefc24092337ae061f3dbc 10.68MB
50af3d61b864f88489f953051afb0350 52KB
51dd2e4c869794f75a0df7d54b210214 387KB
521b611700410be45810047f0a74e899 7KB
52baaeb214519f347a35cf0edfd262ff 4KB
5485e2f56028a3c4cb54f5caa167377e 97KB
54eb5844754051b40a918a84c33b7c1a 4KB
57abd95e166c4c2419646a480329b86c 4KB
58650e15a2607e44daa0f150e0061d89 7KB
5897aeed9b676024fbb8c694b421a861 22KB
5a9383dda6cabc047b7a297602e93eb4 22KB
5b1a64ea234fb2343b8d0686c51280de 97KB
5c009bee5a53455408fb95bbdafd39e2 6KB
5c2d84226fbbaf94e9c1451f1c39b06a 9KB
5d2f1a0944eff024ab396500807b91cd 4KB
5d3fb8e05edcf4b41aef584ca1b0d06f 4KB
5e9e851c0e142814dac026a256ba2ac0 4KB
5eebb5849c50a2c4ea24ded96e6f3aac 4KB
5f32cd94baa94578a686d4b9d6b660f7 8KB
6045a93fb05b9c74884821030da2c46c 7KB
6205ca3f801b9c640a477a0188b8735a 52KB
621e901dcf5ebaf46bce29d18f67194c 4KB
63a4d96fee1bd3645ac566fe27a775b7 4KB
643c971818f68d3439e84b5d8bdafe07 6KB
6819f6c3ade023043b1b19569c896200 4KB
696c0e7b8c74e1442acbf15c2df9e72d 4KB
共 869 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9
违规者
- 粉丝: 5
- 资源: 39
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0