本文实例为大家分享了Unity实现3D循环滚动效果展示的具体代码,供大家参考,具体内容如下
然后通过SetDepthAndPosition这个方法,实现图片的空间空间展开
Z轴和Y轴,系数是一样的
经过上面设置,空间就摆开了
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class SelectRole : MonoBehaviour {
public GameObject rolesObj;
private int _half = 0;//一侧的卡片数
private int _movX = 150;//X轴移动距离
private int _movY = 50;//Y轴移动距离
private int _movZ = 60;//Z轴移动距离
private int count = 3;//组件数
private List _roleList = new List();
// Use this for initialization
void Start () {
//加载图片
Object[] textureList = (Object[