- Home /
Is it possible to embed multiple normal .swf's in Unity?
Specifically looking for the possibility of getting shader lab to interpret a simple animation in an .swf file as an animated texture and Unity to send data to the .swf to alter which animations the texture plays. If it requires some coding on my part to try to set it up, that's fine; just looking for possible starting points to try this. I've seen unity as an .swf and nested inside of .swf and even using .swf as GUI, but nothing where the two have to consistently communicate and at the core the .swf is inside of unity.
Answer by Philipp · Feb 20, 2013 at 12:24 PM
You could in theory do something like that, if you're targeting the Flash player only. In this case you could have a separate swf, render animations from it into an AS3 BitmapData and construct Textures from there once per frame. This requires quite a lot of knowledge of Unity's Flash exporter and AS3, and it's probably a bad idea to begin with, from a performance perspective.
If you're targeting other platforms than the Flash player, I'd say you're out of luck. There's talk about Scaleform coming to Unity, which enables you to build GUIs with a subset of Flash (and might be coerced into doing what you describe), but AFAIK they're not there yet, and the technology apparently comes with an enormous price tag.
That's what I figured really; either it wouldn't be possible (rendering out ahead of time and animated the texture via swapping files or moving UV's being more efficient but still not so.) Didn't want to hear it, but the truth is the truth. I really like the conceptual of true vector (infinitely scalable textures); but unless I had source access to a good engine or was building one from scratch, just a dream for now. Thanks, though.
Your answer
![](https://koobas.hobune.stream/wayback/20220613093024im_/https://answers.unity.com/themes/thub/images/avi.jpg)