Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

MultiPlatform ToolKit - Multiplatform development, simplified.

Discussion in 'Assets and Asset Store' started by gtjuggler, Oct 18, 2011.

  1. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238


    What is it?
    An end-to-end multiplatform solution for Unity!
    Battle-tested during the development of the quadruple-platform game Snuggle Truck, this tool allows for configuration of specific per-platform settings for all devices. Need to change button sizes for iPhone Retina and swap out textures for iPad? Not a problem. Need to replace text on a per-platform basis or swap fonts? Easy. Need to create a resolution-independent UI that works on all major aspect ratios? It's a breeze!

    For those who saw our Unite '11 talk on multiplatform development, we've been persuaded to sell our tools on the Asset Store! Please tell us what you think, and check out the info page here: http://smuggletruck.com/multiplatform

    Cheers!

    -Owlchemy Labs



















    More info on the MultiPlatform ToolKit homepage.
    The following information if from the ToolKit site linked to above:


    What do you get?

    PlatformSpecifics
    A component that stores all per-platform information and applies it with ease. All stock platforms are supported (iPhone, iPad, Android, Standalone) as well as custom platforms (Demo build, Press-only build) and major aspect ratios (4x3, 16x9, 16x10, and 3x2 for iOS). Also includes a helper tool called EasyPlatform that emulates different platforms within the Unity Editor.

    AssetSettings
    Your asset management command center. Create configurations of asset compressions and apply them whenever needed. Get the granularity that Unity doesn't provide by creating custom asset configurations for all situations. Includes a tool called Automator, which applies settings to multiple assets at once. When you want to change texture compression or audio bitrate on hundreds of files at once, these tools make it painless.

    BuildProcess
    An automated granular build process. Operates as a one-button menu item for building to different platforms. It scans scenes for platform-specific changes and assets and applies them at BUILD TIME to achieve optimal stripping! If you're trying to stay under 20mb for iPhone, you'll appreciate the flexibility of having PlatformSpecifics and BuildProcess working to your advantage.

    Others
    Also included are a couple of dependencies and usability extras that are needed for this pipeline's operation, such as AspectPerfect - A tool that automates the process of scaling quads to the proper aspect ratio of a texture, making working with sprites very simple... And RenderQueueSorter - A tool that helps avoid sorting issues in 2d games by adding the ability to hand specify render order.

    For information on requirements, extensibility, compatibility with 2d toolkits, and info about support, visit the tool site!
     
    Last edited: Oct 19, 2011
  2. EvilDingo

    EvilDingo

    Joined:
    May 7, 2011
    Posts:
    190
    Is title of your game Snuggle Truck or Smuggle Truck?

    I think you should be a little more focused on your video and explain right away exactly why the tool is good. Start by saying it does: THIS, THIS, THIS, THIS, and THIS! Then go into more detail. It sounds like you're rambling a little. I want to know a bullet list of awesome stuff before I see how it's implemented.

    Cheers!
     
  3. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    Hey Dingo,

    Feel free to check out our site which does quite a bit to explain the bullet points of 'awesome stuff' that the tool does.

    http://smuggletruck.com/multiplatform/

    Let me know if you think anything specific should be added.

    And for info regarding our prior games, feel free to visit our game site for the details. http://snuggletruck.com
     
  4. kheng

    kheng

    Joined:
    Oct 22, 2008
    Posts:
    126
    will this work with ex2d? They have their own scale value.
     
  5. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Interesting. This might come in handy. Bookmarked.
     
  6. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    Hey kheng, I've updated our page to include the answer to your question. I've pasted it below.

    To summarize, if something is overriding the transform.localScale of your sprite at runtime, then the scale set from PlatformSpecifics will of course get overridden. This isn't necessarily an incompatibility, but users should be aware of what their 2d framework is doing and keep that in mind when using MultiPlatform ToolKit to create platform-specific changes.
     
    Last edited: Oct 19, 2011
  7. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    Just purchased!! Such an awesome tool, thanks for developing and sharing. The amount of extra time spent on developing for iOS and standalone simultaneously has been major, for us; this is sooooooo very welcome an addition to our toolset.

    Has anyone tested this alongside AutoPilot(from the asset store)? TestFlight is a great service for iOS beta testing, and AutoPilot makes building and uploading to TestFlight far smoother(and shorter a process).

    Also, is there a manual/help system for this tool? I cant find any references on the url provided above, aside from the youtube video. I'm selecting a specific platform in "Platform Specifics" on a gameobject, and its still trying to build with the scripts on that GO, when the build target is a different platform. What exactly does selecting a specific platform in the "restrict to platforms" enum do, relating to the specific gameobject it is attached to? Can a gameobject be forced to NOT be included in a build target if it has a platform selected in that enum field that is NOT the type of platform the build target is currently building to? That would seem most intuitive to me imo.

    how would I prevent an iOS specific class from being compiled in a standalone build? I use the "iphonesettings." call, that prevents a standalone from building? I'm currently using my own homebrew method of switching the file locations into the WebTempFolder, then swapping them back after the standalone-build.
     
    Last edited: Oct 23, 2011
  8. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    Hey zhx. Thanks for the purchase. I've made huge additions to the documentation and have aimed to answer all of the user questions I've heard thus far. Let me run through your questions:

    1.) Has anyone tested with AutoPilot?
    Yep! See the "Compatibility with AutoPilot for TestFlight SDK" section of the documentation here: http://smuggletruck.com/multiplatform - In short, most users will have no trouble.

    2.) What does Restrict to Platforms do?
    Check out Tutorial 3 in the documentation "Removing elements from your game and changing text based on platform" for a full explanation of Restrict to Platforms usage.

    3.) How would I prevent an iOS specific class from being compiled in a standalone build?
    Check out Tutorial #4 in the documentation "Preventing certain code from executing on one platform"

    Hopefully this has not only helped you answer your questions but also helped hundreds of other people wondering the same things :)

    -Edit- There are some lines in the documentation regarding features which are in the v1.1 update which has not been approved by the Asset Store as of yet. If you're reading this, hang tight until the update comes through!
     
    Last edited: Oct 24, 2011
  9. rstehwien

    rstehwien

    Joined:
    Dec 30, 2007
    Posts:
    101
    Here is a demo of using the Multiplatform Toolkit with EZGUI. I may make one for ex2d and the 2d Toolkit if time and demand allows.

    The video shows how to reposition and rescale EZGUI elements and demo them using the Multiplatform Toolkit EZPlatform and then how to make changes to create a build using the Multiplatform Build.

     
  10. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,778
    I assume this doesn't conflict with the prime 31 GameCenter plugin?
     
  11. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    Nope, no conflicts. In fact we use lots of Prime31 stuff in our iOS build -- Cheers to Mike for making the awesome GameCenter plugin!
     
  12. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,778
    Awesome. That's all I needed to know. I'll be getting this. Is there an ability to swap meshes on different platforms? you can swap materials, texture and sound settings as shown in your demo video but swapping out higher poly meshes for lower poly ones on iOS would also be useful.

    Thanks,
    Antony.
     
  13. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    After the recent documentation created updates in the v1.1 release, we suggest anyone doing multiplatform development to get this asset ASAP! The refinements made in the v1.1 release + documentation make this an absolutely essential toolset for multiplatform development. Owlchemy has truly crafted a concise toolset for Unity3D-based multiplatform development(in fact the finest 3D cross-platform dev toolset we've ever used). Grab it now if you already havent!
     
    Last edited: Oct 27, 2011
  14. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    I swear we didn't pay this guy off! But seriously, thanks for the recommendation.

    You can write a script to spawn the appropriate prefab for the platform. Just make a prefab with a lower poly mesh linked in, then a simple spawner class such as this one would do the trick for you.

    Code (csharp):
    1.  
    2.     public GameObject highPolyObject;
    3.     public GameObject lowPolyObject;
    4.    
    5.     void Awake () {
    6.         if(Platforms.platform == Platform.iPhone)
    7.             Instantiate(lowPolyObject, transform.position, Quaternion.identity);
    8.         else
    9.             Instantiate(highPolyObject, transform.position, Quaternion.identity);
    10.     }
    11.  
     
    Last edited: Oct 27, 2011
  15. sebako

    sebako

    Joined:
    Jun 27, 2009
    Posts:
    301
    bookmarked, going to purchase soon, definetely a need! thanks!
     
  16. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    would it be possible to have a feature added to MPTK? :

    the ability to have customized data added to the BuildProcess.cs NOT lost on updating MPTK, there are a number of ways to go about this... just wanted to send a request your way. :)

    Just an idea, I've been itching to serialize the variables for the SceneName-string-arrays. Would keeping the data in the editor using this method retain the strings entered in the editor after updating MPTK? In addition, this would add a bit of convenience as well IMO; not that its much of a hassle by any means to edit the scene in monodevelop atm.

    P.S. another useful feature request, to have natively supported in MPTK would be EZGui (mostly text) support. So, again, this doesn't need to be constantly added with each MPTK update. EVERY unity dev I know and work with uses EZGui(no disrespect to the other 2D gui solutions available).
     
    Last edited: Oct 28, 2011
  17. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    I think the easiest way would be to diff the new version with the old version (make a backup), until we build in some kind of editor tool which gives a GUI frontend to the buildprocess's scene files.

    I'm planning on making a tutorial showing how to add custom fields to the PlatformSpecifics class, and I'll use the EZGUI text class as my example. :)
     
  18. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    I'm really looking forward to the GUI frontend for the buildProcess fields. Is there a super-rough eta for a tool like that to be released?

    Cant wait to see the EZGui text class example. Thank you for your stellar support!
     
  19. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    I think the GUI frontend for BuildProcess is fairly low priority, based on the feedback I've gotten thus far, but the EZGUI Text example is definitely something I'd like to do in the upcoming weeks. I'll post here when it's up.
     
  20. EvilDingo

    EvilDingo

    Joined:
    May 7, 2011
    Posts:
    190
    I've tried using this with Android - specifically the location based on aspect ratio, but it looks like the strange resolutions (1024x600) aren't being detected properly. The changes I make only show up when I change the Editor to 3:2 - even when set to 1024x600. The platform is set to Android.

    One thing with Android is resolution. Aspect ratio is only half the battle. You can have a 3:2 screen for example and a wide range of resolutions but there is no way to scale/position based on resolution in Multiplatform Toolkit.

    I ended up solving all of these issues with EZ GUI.

    I'm going to have a closer look at the stripping possibilities now. My .apk file is much too large, even with default Unity stripping applied.
     
  21. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    @EvilDingo: There are an absurd amount of resolutions possible for both PC/Mac and Android. Hundreds, in fact. This is why we (and many others, when considering resolution independence) decided to have these platforms determine their aspect ratio and base calculations off of that. Assuming you're using quads rendered by a regular orthographic/perspective camera, elements will scale based on resolution, thus making aspect ratio the key to knowing what kind of positioning you should be using for your on-screen elements.

    You're 100% right that EZ GUI works great to position UI elements based on resolution, and that's completely compatible with MultiPlatform ToolKit. If you want to pin a 2d GUI element to the corner, go ahead and use EZ GUI's positioning to help you out with that and when you want to swap text, switch materials or fonts, or do other platform specific operations, MultiPlatform ToolKit can help with that area.

    If you wanted to expand on the enumeration of resolutions, feel free to look at how the 1024x600 custom Android resolution was implemented, and copy and paste any new resolutions in that same manner. I would argue that someone who wanted to support both 3000px by 2000px -and- 300px by 200px in the same project without scaling everything up uniformly (which would happen automatically with a normal camera system), that they should feel free to modify the resolution enumerations to support their custom endeavors.

    As for the custom 1024x600 not being detected properly in editor, make sure A.) your Easy Platform is set to Android or Standalone. B.) the game view resolution is set to 1024x600 and C.) the entire game view space is given room to scale up to that exact resolution, and is not being scaled down by being confined to a smaller window area. That should allow the 1024x600 resolution to be detected properly (and on-device with a native 1024x600 screen, it should work just fine)
     
  22. EvilDingo

    EvilDingo

    Joined:
    May 7, 2011
    Posts:
    190
    Thanks for the reply. I ended up putting your Multiplatform Toolkit to good use on my iPhone port of the game. It's possible the full resolution wasn't represented in the game view, but I think it was. I'll double-check. And you're right, the Multiplatform Toolkit works great with EZ GUI.

    Cheers!
    Jason
     
  23. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    Gotcha. If it turns out that the 1024x600 detection is misbehaving, please feel free to email info@owlchemylabs.com with a description of the issue and we'll get it fixed up right away.
     
  24. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    New section added to the documentation based on questions I received:

    Compatibility with Prime31 Plugins:
    The MultiPlatform ToolKit is fully compatible with Prime31 plugins which modify the build process. Prime31's postprocess scripts are handled after the MPTK BuildProcess takes effect, so everything just works. In fact, we used 3 Prime31 plugins with Snuggle Truck on iOS.
     
  25. msc4tech

    msc4tech

    Joined:
    Sep 8, 2011
    Posts:
    17
    we use this plugin:
    - playmaker
    - 2d toolkit
    - simplepath

    no conflict problem with this plugin?
     
  26. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    I haven't touched simplepath, but the other two are confirmed to have no conflicts and simplepath doesn't touch any of the systems that our product touches so I can pretty much say that there will be no conflict.
     
  27. jeffweber

    jeffweber

    Joined:
    Dec 17, 2009
    Posts:
    616
    Has anyone tried using the MultiPlatform Toolkit with the Unity3.5 Beta? Any issues?
     
  28. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    +1, I've been wary of upgrading to the 3.5b because I've already read or other 3.5b issues with other tools I use. Plus, the 3.5GM is nearly done, according to some of the Unity Dev tweets, so I'm REALLY going to want to use MPTK in the final 3.5 release when it comes out, if possible ;-)
     
  29. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    @gtjuggler

    Good morning! So i've been eyeing the MP Toolkit for a while and i think we're at a point that we're going to need this functionality but i had one question (that i believe is answered but i just wanna confirm). As i understand it, i can use the toolkit to setup the various build settings related to compression etc on a per platform basis and NOT have to swap the platforms to work on the project? Aka if i have iPhone plugins and Android plugins i won't have to so any platform switching in the editor to get the builds out? Swapping platforms is such a time consuming process and that really is what i'm looking to skip over near term.

    Cheers
     
  30. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    The process of swapping platforms is time consuming due to the re-compression of audio and textures. No tool in the world will allow you to 'skip' that step, as you'll need textures in PVR format and audio in MP3 format on iOS, while on Mac you'll need DXT and OGG.

    The AssetSettings tool that ships with MPTK can assist by giving you the required compression granularity Unity doesn't provide out of the box when shipping multiple platforms.
     
  31. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    Yes! It's been tested in 3.5 and now supports Flash and NaCl export automation :)
     
  32. pbaker

    pbaker

    Joined:
    Feb 14, 2012
    Posts:
    8
    I've got a small request:
    Optionally apply an Asset Settings configuration at the start of the build process.
     
  33. adb

    adb

    Joined:
    Feb 14, 2012
    Posts:
    10
    I have been really impressed with the demo of the Toolkit, but I would like to know what works and doesn't when mixed with Sprite Manager 2. I think this would be of interest to a lot of people.

    Thanks.
     
  34. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    thanks for the 3.5 test reports, upgrade time! MPTK ROCKS!!!
     
  35. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    Anyone done any work using Multiplatform Toolkit with NGUI? Swapping sprites for iPhone vs iPad, repositioning, scaling UIText objects, etc?
     
  36. Kyle Poole

    Kyle Poole

    Joined:
    Mar 13, 2010
    Posts:
    8
    Hello, I just purchased the MultiPlatform Toolkit from the Asset Store.

    1. Using Unity 3.5.0f5 on Mac OSX 10.7.3
    2. Create a new project
    3. Import MultiPlatform Toolkit
    4. Notice warnings such as:
    Assets/MultiPlatformToolSuite/Editor/AssetSettings/TextureAsset.cs(140,37): warning CS0618: `UnityEditor.TextureImporter.correctGamma' is obsolete: `correctGamma Property deprecated. Use generateMipsInLinearSpace instead.'
    5. Quit Unity, save scene
    6. Re-open Unity, Go to Window->MultiPlatform Toolkit->Asset Settings
    7. Window doesn't work, many errors such as:
    NullReferenceException: Object reference not set to an instance of an object
    AssetSettingsWindow.Init () (at Assets/MultiPlatformToolSuite/Editor/AssetSettings/AssetSettingsWindow.cs:174)
    AssetSettingsWindow.OnEnable () (at Assets/MultiPlatformToolSuite/Editor/AssetSettings/AssetSettingsWindow.cs:133)
    UnityEditor.EditorWindow:GetWindow(Boolean, String, Boolean)
    AssetSettingsWindow:InitWindow() (at Assets/MultiPlatformToolSuite/Editor/AssetSettings/AssetSettingsWindow.cs:129)
    8. Sync the MonoDevelop project, and build all
    9. 1 error and 4 warning (#4 above). Error is:
    PlatformSpecificsEditor.cs:454 - The variable 'addAll' cannot be used with type arguments.
    on line:
    T[] newArray = addAll<T>();


    Is there a known fix for this or should I attempt to debug myself?
     
  37. IJReilly

    IJReilly

    Joined:
    Jan 27, 2012
    Posts:
    1
    Any insight would be appreciated.

    If I want an App Build that supports all generations of iTouch and iPhone.

    Does the build this toolkit provides handle device recognition and the loading of the appropriate assets as needed or does it just allow me to customize my assets for each platform but the device recognition and loading is still code I need to handle myself?

    If ithe build does in fact handle all of the device switching does this process require Unity Pro.

    Thanks.
     
    Last edited: Mar 12, 2012
  38. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    As answered in our email conversation, here's the fixes for the current build:

    Hello, I just purchased the MultiPlatform Toolkit from the Asset Store.

    1. Using Unity 3.5.0f5 on Mac OSX 10.7.3
    2. Create a new project
    3. Import MultiPlatform Toolkit
    4. Notice warnings such as:
    Assets/MultiPlatformToolSuite/Editor/AssetSettings/TextureAsset.cs(140,37):
    warning CS0618: `UnityEditor.TextureImporter.correctGamma' is
    obsolete: `correctGamma Property deprecated. Use
    generateMipsInLinearSpace instead.'

    This warning can safely be ignored.

    5. Quit Unity, save scene
    6. Re-open Unity, Go to Window->MultiPlatform Toolkit->Asset Settings
    7. Window doesn't work, many errors such as:
    NullReferenceException: Object reference not set to an instance of an object
    AssetSettingsWindow.Init () (at
    Assets/MultiPlatformToolSuite/Editor/AssetSettings/AssetSettingsWindow.cs:174)
    AssetSettingsWindow.OnEnable () (at
    Assets/MultiPlatformToolSuite/Editor/AssetSettings/AssetSettingsWindow.cs:133)
    UnityEditor.EditorWindow:GetWindow(Boolean, String, Boolean)
    AssetSettingsWindow:InitWindow() (at
    Assets/MultiPlatformToolSuite/Editor/AssetSettings/AssetSettingsWindow.cs:129)

    This is our bug and we're fixing it in the next version. Here's how to fix it:

    The issue is that the default reference assignments for the AssetSettings window were lost during the upload to the Asset Store. I'll attempt to fix that in the next release.

    For now, you can fix the issue with one simple step:
    Take a look at the two images here for the solution to the issue. It involves linking in the proper images to the default references of the editor scripts pictured.

    http://d.pr/9IZ
    http://d.pr/7FOG

    I believe you have to set your inspector to DEBUG in order to see that information.

    See here: http://d.pr/cjZE


    8. Sync the MonoDevelop project, and build all
    9. 1 error and 4 warning (#4 above). Error is:
    PlatformSpecificsEditor.cs:454 - The variable 'addAll' cannot be
    used with type arguments.
    on line:
    T[] newArray = addAll<T>();

    In PlatformSpecificEditor, you can change:
    T[] newArray = addAll<T>();

    to

    T[] newArray = addAll();
     
  39. MindJuice

    MindJuice

    Joined:
    Jun 10, 2009
    Posts:
    18
    Hi Alex,

    Just bought Multiplatform Toolkit and had no problem setting up the basics of platform-specific stuff.

    However, I can't get the build process to do anything.

    I created a new empty project in Unity 3.5 with just the MP Toolkit and it's testScene.unity.

    If I try to Build Mac Intel, I see that it quickly creates a _temp scene and then it disappears and says "Build complete!", but there is no .app file anywhere to be found.

    I also don't see the small pop-up dialog that shows up in your tutorial video where it goes through the build steps.

    From my understanding of your BuildProcess script it seems I shouldn't have to change anything just to build the testScene.

    If I use the normal Unity Build menu it builds and runs fine, but the MP Toolkit menu doesn't seem to work.

    Is there something else I need to do?

    Thanks,

    Ken
     
  40. Raphael Dias

    Raphael Dias

    Joined:
    Jan 18, 2011
    Posts:
    61
    Hi,

    Could you please explain to me exactly what I *can't* do without UnityPro using your toolkit?
    Can I use platform specifics and then build to different platforms using only Unity free?

    Another question: I am new to mobile development, so I would like to know the following. If I use platform specifics to setup different assets for iPhone standard and iPhone Retina, what will happen in the building process? Would I have a single .app that identifies if the costumer is using iPhone or iPhone retina before loading the correct resolution asset?

    Thanks.
     
  41. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    The automated build process requires Unity Pro.
     
  42. MindJuice

    MindJuice

    Joined:
    Jun 10, 2009
    Posts:
    18
    Bah...stupid me! I knew that, but I had temporarily switched to another Unity license to try something in Android I forgot to switch back!

    Just switched back to my Unity Pro license and the build works fine.

    Thanks Alex.


    Ken
     
  43. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    The automated build process is the only part of MPTK that is not supported in Unity Free. This automation also facilitates the stripping of assets from targets, so you'll lose the ability to strip assets automatically by not using the automated build system.
     
  44. alfredbaudisch

    alfredbaudisch

    Joined:
    Dec 13, 2010
    Posts:
    45
    I want to know this too before buying it and enjoying the Asset Store Madness discount: does the MPT work well with NGUI?
     
  45. Raphael Dias

    Raphael Dias

    Joined:
    Jan 18, 2011
    Posts:
    61
    I want to know the same! NGUI and MPT.
     
  46. Raphael Dias

    Raphael Dias

    Joined:
    Jan 18, 2011
    Posts:
    61
  47. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    same question about NGUI, I'm about to buy this but need to be sure it works fine :)
     
  48. Raphael Dias

    Raphael Dias

    Joined:
    Jan 18, 2011
    Posts:
    61
    Just sent an email regarding this. Lets see.
     
  49. gtjuggler

    gtjuggler

    Joined:
    Nov 13, 2008
    Posts:
    238
    Hi everyone! For some reason, the Unity forums are not sending me emails, even though I have a subscription on this thread. Weird.

    To answer questions regarding compatibility with various 2d toolkits, I don't personally own every single 2d toolkit out there, so the best way to explain is to give a breakdown of what the MPTK does and how to detect areas that would be incompatible.

    From our Documentation, you can check out these sections:

    Compatibility and Known Issues with 2D Frameworks
    The MultiPlatform ToolKit has been tested with SpriteManager2 and EZGUI with minimal friction. If your 2d framework works with Transforms in the scene hierarchy that can be scaled and positioned at any time, then it's definitely compatible with the MultiPlatform ToolKit. Here are a few things to consider when dealing with 2d:

    Known Issue: The custom Text classes in 2D frameworks such as SpriteManager's SpriteText are not supported out of the box. For more information, please read the Custom Text Compatibility section.

    Known Issue: Watch out for swapping materials when using atlasted textures! Depending on the atlasing software and how the atlas is generated you might not be able to use MultiPlatform ToolKit to do the swapping.

    Known Issue: Using things like EZLayout or checking Pixel Perfect in SpriteManager2 will of course override any positioning or scaling done by the MultiPlatform ToolKit. Same goes for the "Normalize Scene Sprite Scales" box in the ex2D sprite toolkit.

    Compatibility with text replacement
    The MultiPlatform ToolKit supports replacing text contents on TextMesh objects as well as swapping fonts and font materials. For example, if you want your mobile versions to say "Tap Here!" and your Standalone platforms to say "Click Here!", the Text Mesh Text field will allow you to swap out text for any platform. Or if you want to swap from 60pt font to 24pt font depending on your screen resolution, the toolkit supports that.

    Out of the box, the toolkit only supports changes to the TextMesh class, but it could be easily extended to have another text class in its place, such as GUIText, SpriteManager's SpriteText class, 2D Toolkit's BMTextMesh class, or ex2D's SpriteFont class depending on what you're using. Feel free to extend PlatformSpecifics to support it.

    In order to extend PlatformSpecifics to support custom text solutions, take a look at PlatformSpecifics' function ApplyFont() and ApplyTextMeshText(). Change these to edit your custom class' text field and material/font field. Then, swap out the instances of "<TextMesh>" within the PlatformSpecificsEditor.cs class to your custom class to ensure proper editor functionality of the PlatformSpecifics class. That's pretty much it.

    TLDR: If you're asking "will MPTK work with <insert 2d toolkit here>, pause the game and move the scene transforms around. If your 2d toolkit uses normal transforms and 3d quads that can be moved around the scene, you should be fully compatible to scale and position based on platform. See above for the gotchas (like avoiding switching materials post-atlasing)
     
    Last edited: Apr 16, 2012
  50. adb

    adb

    Joined:
    Feb 14, 2012
    Posts:
    10
    I want to add my two cents. I have just modified MPTK to support SpriteText (out of EZGUI). It took about an hours to write the supporting functions and now I can change the text/size/spacing/width from the toolkit editor (had to modify that as well).

    Concerning 2d toolkits in general, you just can't switch their atlases around freely. Instead, I am using a system that was inspired by the MPTK to load assets at runtime (Resources.Load() was the discovery that allowed it). What you can do with the MPTK toolkit however is to move them and scale them, just not changing the textures (assuming they are atlas based).

    Btw, a couple of features that I ended up having to program myself that I feel should be part of the MPTK:
    - a menu option to change all the objects in the scene to platform/aspectration at once
    - a default option for platforms/aspectratio: I don't want to rely on the editor to maintain the default positioning... just a click of wrong button (set) and it's gone. So I have added a default option that is you can edit like any other platform. Quite convenient.
    - to add a 'resolution' based filtering (for lack of a better term), to allow switching position/sizes/etc based on the resolution size.
    - same thing as above, but with the physical size of the device (based on the ppi). Quite useful for text sizing.

    Cheers