01/08 : Rescale, other functions
Working Hour : 9:40 - 18:00
Works to do
1. Dibash's model changing script
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.MagicLeap;
public class test : MonoBehaviour
{
public List<GameObject> Models = new List<GameObject>();
private int i;
private MLInput.Controller _controller;
// Start is called before the first frame update
void Start()
{
i = 0;
MLInput.Start();
MLInput.OnControllerButtonDown += OnButtonDown;
_controller = MLInput.GetController(MLInput.Hand.Right);
for(int j=0; j<5; j++)
{
Models[j].SetActive(false);
}
}
// Update is called once per frame
void Update()
{
}
void OnDestroy()
{
MLInput.OnControllerButtonDown -= OnButtonDown;
MLInput.Stop();
}
void OnButtonDown(byte controllereld, MLInput.Controller.Button button)
{
if (button == MLInput.Controller.Button.HomeTap)
{
i++;
check_model();
}
return;
}
void check_model()
{
int k = i % 5;
for(int j=0; j<5; j++)
{
Models[j].SetActive(false);
}
Models[k].SetActive(true);
return;
}
}
2. Resclae
공간의 사이즈를 재기 위해
댓글
댓글 쓰기