Question by
Relec · Dec 20, 2020 at 06:27 PM ·
instantiateprefabsprefab changing at runtime
Instantiated prefab not updating until interacted with?
Hi I am spaning a prefab at runtime in my scene and setting a few values like so:
spawnedvideo = Instantiate(VideoPrefab, new Vector3(0, 0, 0), Quaternion.identity);
spawnedvideo.transform.SetParent(gameObject.transform);
spawnedvideo.transform.localPosition = trans.transform.localPosition;
spawnedvideo.transform.localRotation = trans.transform.localRotation;
I then change a few things on it like an image and some UI text. The item spawns in fine but with the original prefab image and text. It's not until I interact with the spawned item that it suddenly updates itself with the new image and text.
Is there anyway to "refresh" it so it immediatly updates on spawn?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613021936im_/https://answers.unity.com/themes/thub/images/avi.jpg)