Loading Custom Data
// Open or close the door based on whether it is interacted or not
// InteractedState is called after loading
public override void LoadedState()
{
if (interacted)
{
doorPivot.position = initialPos + offsetPosition;
doorPivot.localRotation = Quaternion.Euler(new Vector3(doorPivot.localRotation.x, openedDoorRotation * side, doorPivot.localRotation.z));
}
else
{
doorPivot.position = initialPos;
doorPivot.rotation = closedRot;
}
}// LoadedState is called after loading
public override void LoadedState()
{
}Last updated