UnityVR游乐园笔记#002
跟着课程做的一个项目(VR游乐园)
1. 主场景的搭建
1-1. 场景背景
1-2. 头盔和手柄
摄像机要调整到10000
2. 创建UI界面(World Space)
3. 实现轮播图
创建 ImageItem 预制体
用代码生成 ImageItem
挂载在空对象
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
public class ImageItemCreaty : MonoBehaviour
{
public static ImageItemCreaty instance;
[HideInInspector]
public int i;
public Material[] materials;
public GameObject imageItem;
private float angle;
private void Awake()
{
instance = this;
}
private void Start()
{
angle = 360.0f / materials.Length;
for (int i = 0; i < materials.Length; i++)
{
GameObject go = Instantiate(imageItem, transform);
go.transform.localEulerAngles = new<