Hi!
What’s wrong with this really simple piece of code?
Instead of setting the prefab’s localPosition to 1000,1000, it just puts it to 0, 0.
Debug says it’s on 1000, 1000, yet, it is on 0, 0.
Either it is an Alien Mystery, or a well-sized facepalm.
Since i don’t believe in Alien Misteries, but a have produced a decent amount of facepalms running my rounds around the sun, i’d vote for the facepalm…
Thanks in advance!
EDIT: AFAIK it worked before. A lots of times. Do i remember wrong? Any feedback would be appreciated…
EDIT 2: User error (AKA facepalm. As predicted ) I Instantiated a wrong prefab, with a script… yaaay…
void DoItPlease(){
Vector2 pos = new Vector2(1000f, 1000f);
GameObject nextBase = Instantiate(basePrefab, new Vector2 (0,0), Quaternion.identity, gameObject.transform);
nextBase.transform.localPosition = pos;
Debug.Log("after: " + nextBase.transform.position);
}