Files
Continentis/Assets/TemporaryResources/Cartoon Coffee/Demo/Scripts/ObjectMover.cs
SoulliesOfficial d09b58fd80 架构大更
2026-03-20 11:56:50 -04:00

24 lines
543 B
C#

using UnityEngine;
namespace Demo_Project
{
public class ObjectMover : MonoBehaviour
{
// Set the desired position for the object
public Vector3 targetPosition = new Vector3(0, 0, 0);
// Update is called once per frame
void Start()
{
// Check for user input to move the object
MoveObject();
}
void MoveObject()
{
// Set the object's position to the target position
transform.position = targetPosition;
}
}
}