25 lines
599 B
C#
25 lines
599 B
C#
|
using System;
|
|||
|
using System.IO;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
namespace HK.FUJIFILM
|
|||
|
{
|
|||
|
public class StrokeCamSetPosition : MonoBehaviour
|
|||
|
{
|
|||
|
private string path = Path.Combine(Application.streamingAssetsPath, "TestStrokeCam.txt");
|
|||
|
|
|||
|
private void Update()
|
|||
|
{
|
|||
|
if (Input.GetKeyDown(KeyCode.O))
|
|||
|
{
|
|||
|
Set();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
void Set()
|
|||
|
{
|
|||
|
var lines = File.ReadAllLines(path);
|
|||
|
transform.localPosition = new Vector3(float.Parse(lines[0]), float.Parse(lines[1]), float.Parse(lines[2]));
|
|||
|
}
|
|||
|
}
|
|||
|
}
|