I’m new in unity ev and tried many ways (used to try some options by myself) and I can’t figure out how to set this procedure
→ Start → LoadLevel (Scene) // It works
→ Now if loaded Scene(name) init methods // I’ve done it so
→ Update player position of method
// This part of init wont work like i want it is called from Update and it start as Main_Menu Scene is loaded
This is part of code is connected =
//Location
Vector2 pos;
public float slow = 5f;
public float destP;
private float startP;
//StartFlag
bool start;
// Use this for initialization
void Start () {
pos = transform.position;
startP = pos.x;
start = true;
}
// Update is called once per frame
void Update () {
if(start) {
ToPosAtStart ();
}
}
public void ToPosAtStart() {
if (pos.x != destP) {
pos.x = Mathf.Lerp (startP,destP,Time.time / slow);
transform.position = new Vector2 (pos.x,pos.y);
Debug.Log ("Start is True like life suck is true kappa");
}
}