한 걸음 두 걸음

가상증강현실및실습 0405 ] NevMesh 활용하여 Pacman 및 gohost 구현 / VR 환경 세팅(android studio 및 googleVR) 본문

Unity

가상증강현실및실습 0405 ] NevMesh 활용하여 Pacman 및 gohost 구현 / VR 환경 세팅(android studio 및 googleVR)

언제나 변함없이 2019. 4. 5. 09:28
반응형

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;


public class ghostControl : MonoBehaviour
{
    Transform target;
    NavMeshAgent agent;

    // Start is called before the first frame update
    void Start()
    {
        target = GameObject.Find("pacman").transform;
        agent = GetComponent<NavMeshAgent>();
    }

    // Update is called once per frame
    void Update()
    {
        agent.destination = target.position;
    }
}

Company명 맞춰주기

kitkat SDK 설치했으므로 Minimum API level 맞추기

android TV Compatibility 체크 해제

Build Setting 하단 Android PlayerSetting의 Resolution and Presentation
Potrait Upside Down 체크 해제

XR setting 에서 virtual Reality Supported 체크해주고, 밑에 생기는 +버튼 눌러서 Cardboard 세팅 넣어줍니다.


\

구글 VR SDK 설치
https://github.com/googlevr/gvr-unity-sdk/releases

반응형