SHADE_Y3/TempScriptsFolder/CameraFix.cs

25 lines
483 B
C#
Raw Normal View History

2022-11-01 01:31:13 +08:00
using SHADE;
using System;
public class CameraFix : Script
{
public CameraFix(GameObject gameObj) : base(gameObj) { }
private Transform tranform;
public Vector3 pos = Vector3.Zero;
public Vector3 rot = Vector3.Zero;
protected override void awake()
{
tranform = GetComponent<Transform>();
if (tranform == null)
Debug.LogError("tranform is NULL!");
else
{
tranform.LocalPosition = pos;
tranform.LocalEulerAngles = rot;
}
}
}