0728
This commit is contained in:
8
Assets/02_Scripts/Story/ch3.meta
Normal file
8
Assets/02_Scripts/Story/ch3.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c69e37265e7e163459b3894cea6d0c59
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
22
Assets/02_Scripts/Story/ch3/ResetChildLocalRotation.cs
Normal file
22
Assets/02_Scripts/Story/ch3/ResetChildLocalRotation.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class ResetChildLocalRotation : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Transform target;
|
||||
|
||||
private Quaternion initialLocalRotation;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (target != null)
|
||||
initialLocalRotation = target.localRotation;
|
||||
}
|
||||
|
||||
public void ResetRotation()
|
||||
{
|
||||
if (target == null)
|
||||
return;
|
||||
|
||||
target.localRotation = initialLocalRotation;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f701eb628e084b4f87b750c2716f6f5
|
||||
Reference in New Issue
Block a user