Hi, Im new to unity coding and i have a stupid question:
is it the best way to set Gameobject position when the orientation changed?
Is it using too much process because its in the FixedUpdate?
what is the best way to reduce the processing and getting the same result?
Thank you so much
here’s a code:
void FixedUpdate ()
{
if (Screen.orientation == ScreenOrientation.Landscape)
{
torch.transform.localPosition = new Vector3(-559,176,0);
}
else if (Screen.orientation == ScreenOrientation.Portrait)
{
torch.transform.localPosition = new Vector3(-247,176,0);
}
}