#Running Tween on object copies (needs a material copy)
6 messages · Page 1 of 1 (latest)
Yes it was. Sorry, it worked later on. 😬
But I have question problem now. I can’t seem to be able to run a tween on spawned objects. I want them to fade into the scene but when I add a “tween alpha” to the prefab and I have it on “awake”, then call it once the spawning is enabled, it just flashes all the spawned object every 2 seconds. Any idea on how to solve this
make sure they aren't using the same material, you made need a different script duplicating the material on each of them
material clone script
Yes, Olha from Snap helped me later on. Thank you.
I changed the topic name and I am leaving the code incase somebody else needs it:
var mmv = script.getSceneObject().getComponent("Component.MaterialMeshVisual");
mmv.mainMaterial = mmv.mainMaterial.clone();