长按实现安卓端下载图片和安装包
2023-09-27 14:27:29 时间
①长按按钮保存图片至安卓手机相册
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LongPress : MonoBehaviour
{
//设置变量记录触摸时间与bool触摸
private float touchTime;
private bool newTouch = false;
void Update () {
//判断是否单击,单击则进入if分支
if (Input.GetMouseButton (0)){
//设置一条射线
Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition);
//设置接收射线的返回值
RaycastHit hitInfo;
//如果射线碰到物体,返回为真,进入if分支
if (Physics.Raycast (ray, out hitInfo)) {
//当一根手指触摸,则进入if分支
if (Input.touchCount == 1 ) {
//记录触摸
Touch touch = Input.GetTouch (0);
//如果触摸刚开始,则进入if分支
if (t
相关文章
- FL Studio21最新中文版安装包下载操作教程
- CleanMyMac X激活码免费版安装包MAC清理工具
- Office系列版本安装包下载
- 不提供离线安装包,又不会编译,怎么搞qt5.15?
- 如何用pip install从豆瓣源安装包
- mysql安装包下载地址
- Unity3D如何减少安装包大小
- 新装的主机没有ifconfig,route等命令,怎么查找对应的安装包
- 阿里云apt-get安装包时Err:2 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/main amd64 git amd64 1:2.7.4-0ubuntu1.2 404 Not Found
- node.js安装及环境配置超详细教程【Windows系统安装包方式】
- vs2017_enterprise正式版离线安装包bt下载
- 2019-10-26-Inno-Setup-安装包脚本-Run-的-Flags-标记
- 2019-10-26-Inno-Setup-安装包脚本-Run-的-Flags-标记
- 【Android 安装包优化】APK 打包流程 ( 文件结构 | 打包流程 | 安装流程 | 安卓虚拟机 )
- yum安装软件之后如何保存rpm安装包