Rick Posted December 11, 2016 Share Posted December 11, 2016 We had this issue when we made the Cobra demo. When we have an emitter that uses a spritesheet (making an explosion) and make that a prefab that emitter won't cycle through the spritesheet. It just shows the entire spritesheet. As a workaround is there a way to unlink a prefab? It works if the prefab is no longer an instanced prefab (when I do this via the editor it makes the spritesheet play. Can I do this via code?). Trying to work around this. My explosion is a parent pivot and 4 emitter children (one being the spritesheet of fireball explosion, others being smoke and dust kicking up). I pass this as a script parameter to the thing I want to blow up. That works but clearly if I want 5 things to blow up the can't all share the same explosion. So I figured I'll use :Instance() on the passed in explosion entity. That gives the same results as the prefab where the entire spritesheet is displayed vs cycling through the sub images so that doesn't work. Any other ideas? Link to comment Share on other sites More sharing options...
Josh Posted December 14, 2016 Share Posted December 14, 2016 If you change any of the properties, the editor will ask you if you want to unlink the prefab. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
macklebee Posted December 14, 2016 Share Posted December 14, 2016 As a workaround is there a way to unlink a prefab? It works if the prefab is no longer an instanced prefab (when I do this via the editor it makes the spritesheet play. Can I do this via code?). If you change any of the properties, the editor will ask you if you want to unlink the prefab. --EDIT I ran into this before and it looks like the issue is the emitter's animation columns and rows are being set to 1 no matter what is set in the prefab. The way I have been able to get around this bug is by attaching a small script to the emitter that sets the columns and rows. function Script:Start() self.entity:SetAnimationColumns(6) self.entity:SetAnimationRows(6) end The below picture shows a emitter with the above script saved as a prefab and a emitter without the script saved as a prefab loaded into the scene. Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Josh Posted December 14, 2016 Share Posted December 14, 2016 I believe I have fixed this for the next build. Please let me know if it continues to be a problem after the next update. 1 My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
tjheldna Posted December 14, 2016 Share Posted December 14, 2016 Thanks for looking into that! Link to comment Share on other sites More sharing options...
Recommended Posts