using UnityEngine; using System.Collections; public class SandR : MonoBehaviour { public GameObject controlled; public float scaleSpeed=0.5f; public float scaleValue = 0; public float rotateSpeed = -3; void Update() { Scale(); if (Input.GetMouseButto
这里推荐两种方法,第一种是用鼠标滑动,第二种是用手机的陀螺仪进行全景查看 第一种: 1.新建一Sphere,然后为其赋予材质,注意材质的Shader类型为:Mobile/particles/Alpha Blended,然后将做好的全景图贴上去 2.在摄像机上附加以下脚本:代码来源参考自 using UnityEngine; using System.Collections; using UnityEngine.UI; public class GyroController_01 : MonoBe
只允许竖屏: Portrait √ Portrait Upside Down √ Landscape Right × Landscape Left × 只允许横屏: Portrait × Portrait Upside Down × Landscape Right √ Landscape Left √ 代码动态设置屏幕旋转: private void set