MultiPlatform ToolKit - Multiplatform development, simplified.

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

  1. gtjuggler

    gtjuggler

    Member

    Joined:
    Nov 13, 2008
    Messages:
    238
    Cool. If you'd like to share your implementation as a patch, feel free to upload it here!

    Correct. Atlasing and swapping materials is usually not supported due to the fact that the 2d toolkit of choice usually takes full control of your material assignment and UVing.

    Right now we use Play Mode in editor to accomplish this, but yes, if you wanted to change into a platform without playmode, a simple menu option could be added. I'll put this on 'the list' :)

    If you are filling each platform with its positioning data, you should have all of the data stored in the platformspecifics component and shouldn't need to rely on the default state of the transforms. The PlatformSpecifics class also has undo states so if you click SET or GET by accident, a quick undo should fix it for you. Since the names of the platforms are completely arbitrary and editable, as you mentioned, you could create a null/default/standard/other group which held some additional data for you.

    Right now we standardized on very popular platform sizes (iPhone size, iPad size, etc) and aspect ratios (16:9, 16:10, 4:3, 3:2 etc). This provides an overall way to deal with all of the differing sizes, but as you mentioned, if you have specific needs like needing to scale based on DPI, that feature could be added in the future. The concern is creating too many fields that the user must fill in in order to get the basic set of results that the multiplatform toolkit offers, but if it were implemented in a way where DPI-based positioning (or ppi) were optional, that could work.
     
  2. adb

    adb

    New Member

    Joined:
    Feb 14, 2012
    Messages:
    10
    Sure, here is the code to insert to get a SpriteText per platform.

    In PlatformSpecifics.cs, first the definition of the new structure:

    Code (csharp):
    1.    
    2. [System.Serializable]
    3.     public class SpriteTextPerPlatform {
    4.         public Platform platform;
    5.         public TextAsset font;
    6.         public Material mat;
    7.         public float characterSpacing, characterSize, maxWidth;
    8.        
    9.         public SpriteTextPerPlatform (Platform _platform, TextAsset _font, Material _mat, float _characterSize, float _characterSpacing, float _maxWidth) {
    10.             platform = _platform;
    11.             font = _font;
    12.             mat = _mat;
    13.             characterSpacing = _characterSpacing;
    14.             characterSize = _characterSize;
    15.             maxWidth = _maxWidth;
    16.         }
    17.     }
    18.     public SpriteTextPerPlatform[] spriteTextPerPlatform;
    19.  
    then, in the Init() function:

    Code (csharp):
    1.  
    2.         if(spriteTextPerPlatform == null) spriteTextPerPlatform = new SpriteTextPerPlatform[0];
    3.  
    Also, let's now forget to apply the changes in ApplySpecifics

    Code (csharp):
    1.  
    2.         ApplySpriteText(platform);
    3.  
    Finally, the apply function

    Code (csharp):
    1.  
    2.     public void ApplySpriteText(Platform platform) {
    3.         if(spriteTextPerPlatform != null) {
    4.             SpriteTextPerPlatform defaultPair = null;
    5.             bool hasBeenSet = false;
    6.             foreach(SpriteTextPerPlatform pair in spriteTextPerPlatform) {
    7.                 if(platform == pair.platform) {
    8.                     SetSpriteText(pair.font, pair.mat, pair.characterSize, pair.characterSpacing, pair.maxWidth);
    9.                     hasBeenSet = true;
    10.                     break;
    11.                 } else if( pair.platform == Platform.Default ) {
    12.                     defaultPair = pair;
    13.                 }
    14.             }
    15.             if( !hasBeenSet  defaultPair != null )
    16.                 SetSpriteText(defaultPair.font, defaultPair.mat, defaultPair.characterSize, defaultPair.characterSpacing, defaultPair.maxWidth);
    17.         }
    18.     }
    19.    
    20.     void SetSpriteText(TextAsset font, Material mat, float characterSize, float characterSpacing, float width){
    21.         this.GetComponent<SpriteText>().SetFont(font, mat);
    22.         this.GetComponent<SpriteText>().characterSpacing = characterSpacing;
    23.         this.GetComponent<SpriteText>().maxWidth = width;
    24.         this.GetComponent<SpriteText>().SetCharacterSize(characterSize);                       
    25.     }
    26.  
    By the way, you can see in the snippet above, that I created a Platform.Default option that gets selected by, hrem, default, when no other platform specifics applies to the current object, *if* it has been defined. I have found it quite convenient for me, targeting android and ios at the same time.

    Then, there is the editor (PlatformSpecificsEditor.cs) to modify. Add a variable to show/hide the new section

    Code (csharp):
    1.  
    2.     bool showSpriteTextPerPlatform = false;
    3.  
    And make sure it is properly initialized in OnEnable()

    Code (csharp):
    1.  
    2.         showSpriteTextPerPlatform = (specifics.spriteTextPerPlatform != null  specifics.spriteTextPerPlatform.Length > 0);
    3.  
    In OnEditorGUI(), at the end (or wherever you want to display it

    Code (csharp):
    1.  
    2.         //Draw sprite text section
    3.         DrawSection<PlatformSpecifics.SpriteTextPerPlatform>
    4.         (ref showSpriteTextPerPlatform,
    5.         "Sprite text per platform",
    6.         ref specifics.spriteTextPerPlatform,
    7.         DrawSpriteTextPerPlatform<PlatformSpecifics.SpriteTextPerPlatform>,
    8.         () => {return new PlatformSpecifics.SpriteTextPerPlatform(Platform.Standalone, null, null, 100, 1, 10 );},
    9.         () => {
    10.                 SpriteText text = specifics.GetComponent<SpriteText>();
    11.                 if(text == null) return null;
    12.                 PlatformSpecifics.SpriteTextPerPlatform[] array = new PlatformSpecifics.SpriteTextPerPlatform[defaultAspectRatios.Length];
    13.                 for(int i=0; i<array.Length; i++)
    14.                     array[i] = new PlatformSpecifics.SpriteTextPerPlatform(defaultPlatforms[i], text.font, specifics.renderer.sharedMaterial, text.characterSize, text.characterSpacing, text.maxWidth);
    15.                 return array;
    16.             });
    17.  
    and finally, finally, the function that build the part of the editor for SpriteText

    Code (csharp):
    1.  
    2.     void DrawSpriteTextPerPlatform<T>(int index, ref T[] array, ref int itemToDelete, ref int moveItemIdx, ref int moveItemDirection) {
    3.         PlatformSpecifics.SpriteTextPerPlatform[] perPlatform = array as PlatformSpecifics.SpriteTextPerPlatform[];
    4.         DrawPlatformEnum(index, ref itemToDelete, ref moveItemIdx, ref moveItemDirection, ref perPlatform[index].platform);
    5.         GUILayout.BeginHorizontal();
    6.             GUILayout.Space(20f);
    7.             perPlatform[index].font = EditorGUILayout.ObjectField(perPlatform[index].font, typeof(TextAsset), false) as TextAsset;
    8.         GUILayout.EndHorizontal();
    9.        
    10.         GUILayout.BeginHorizontal();
    11.             GUILayout.Space(20f);
    12.             perPlatform[index].mat = EditorGUILayout.ObjectField(perPlatform[index].mat, typeof(Material), false) as Material;
    13.         GUILayout.EndHorizontal();
    14.  
    15.         GUILayout.BeginHorizontal();
    16.             GUILayout.Space(20f);
    17.             perPlatform[index].characterSize = EditorGUILayout.FloatField(perPlatform[index].characterSize);
    18.             perPlatform[index].characterSpacing = EditorGUILayout.FloatField(perPlatform[index].characterSpacing);
    19.         GUILayout.EndHorizontal();
    20.  
    21.         GUILayout.BeginHorizontal();
    22.             GUILayout.Space(20f);
    23.             if(GUILayout.Button("Get")) {
    24.                 SpriteText text = specifics.GetComponent<SpriteText>();
    25.                 if(text != null  specifics.renderer != null) {
    26.                     Undo.RegisterUndo(specifics, "get font and material");
    27.                     perPlatform[index].font = text.font;
    28.                     perPlatform[index].mat = specifics.renderer.sharedMaterial;
    29.                     perPlatform[index].characterSize = text.characterSize;
    30.                     perPlatform[index].characterSpacing = text.characterSpacing;
    31.                 } else {
    32.                     Debug.Log("There is no SpriteText or Renderer component on this game object.");
    33.                 }
    34.             }
    35.             if(GUILayout.Button("Set")) {
    36.                 SpriteText text = specifics.GetComponent<SpriteText>();
    37.                 if(text != null  specifics.renderer != null) {
    38.                     Undo.RegisterUndo(text, "set font");
    39.                     Undo.RegisterUndo(specifics.renderer, "set material");
    40.                     text.font = perPlatform[index].font;
    41.                     specifics.renderer.sharedMaterial = perPlatform[index].mat;
    42.                     text.characterSize = perPlatform[index].characterSize;
    43.                     text.characterSpacing = perPlatform[index].characterSpacing;
    44.                 } else {
    45.                     Debug.Log("There is no SpriteText or Renderer component on this game object.");
    46.                 }
    47.             }
    48.         GUILayout.EndHorizontal();
    49.     }
    50.  
     
  3. amaranth

    amaranth

    Member

    Joined:
    Jan 31, 2012
    Messages:
    113
    I'm just getting started and have a total newbie question. :)

    My game is tile-based, like old-school Zelda, and on larger resolutions, I want to show more tiles, and on smaller resolutions, less tiles so my characters don't look like ants. I'm not sure if I need to create a bunch of ortho cameras (one for each platform using Restrict to Platforms) or if I should create one camera and use one of the Local Scale fields.

    For example, on PC, I would show 15x20 tiles. And on iPhone, I would show something like 10x15 tiles.

    If you were building a game like this, what would you do? Thanks for your awesome tool and any help!
     
    Last edited: Apr 19, 2012
  4. gtjuggler

    gtjuggler

    Member

    Joined:
    Nov 13, 2008
    Messages:
    238
    Sounds like this is more than a simple quick fix. You'll probably want to build your map specifically based on what platform you detect that you're running on. From there you can also switch on or off a specific camera which has been set up properly for that platform/aspect ratio.


     
  5. amaranth

    amaranth

    Member

    Joined:
    Jan 31, 2012
    Messages:
    113
    I figured you might say that. I suppose the easiest fix might actually be to let players expand/shrink the window so that they can decide how close/or far away they are from the camera.
     
  6. amaranth

    amaranth

    Member

    Joined:
    Jan 31, 2012
    Messages:
    113
    I believe I found a bug. When I restrict an object to the iPhone platform, the object does not show up on the iPhone. This does not happen with any other platform restriction I've tested. Thus far, I've tested PC, Mac, iPad, iPhone, iPhone Retina, Android, and Web.

    I'm using Unity 3.5.1f2, MultiPlatform ToolKit 1.7, iPhone 4S

    Note: I've tested both iPhone and iPhone Retina with my iPhone. The object does not appear when restricted to either of these platforms. I've tested with both objects enabled. I've tested with only one object enabled. Problem persists.
     
    Last edited: Apr 21, 2012
  7. amaranth

    amaranth

    Member

    Joined:
    Jan 31, 2012
    Messages:
    113
    Hello? Bumping this since the bug above is stopping us from working with iphone retina. Will there be a fix soon?
     
  8. gtjuggler

    gtjuggler

    Member

    Joined:
    Nov 13, 2008
    Messages:
    238
    Hi amaranth,

    The toolkit is known working with your setup. If you want to ping me on Skype (gtjuggler), I can walk you through the setup procedure for how to properly do builds with MPTK.
     
  9. Denifia

    Denifia

    New Member

    Joined:
    Nov 16, 2011
    Messages:
    32
    For your snuggle/smuggle truck game, what resolutions did you choose to support on Android? I've bought this plugin but as I don't own an Android, I'll a little lost as to what I should be supporting.

    Thanks :D
     
  10. amaranth

    amaranth

    Member

    Joined:
    Jan 31, 2012
    Messages:
    113
    Thank you, Alex! I'll get in touch soon. :D
     
  11. gtjuggler

    gtjuggler

    Member

    Joined:
    Nov 13, 2008
    Messages:
    238
    Hi Denifia. We supported all of the resolutions/aspect ratios on Android that the MPTK supports, when we created Smuggle Truck. You can check out Tutorial 2 here for a listing of all of the resolutions: http://smuggletruck.com/multiplatform/
     
  12. samurai413x

    samurai413x

    New Member

    Joined:
    Apr 19, 2012
    Messages:
    5
    I know the question was asked several times earlier, and the response seemed vaguely positive, but can anyone give me a definitive answer? Does it work well with NGUI specifically, and if there are any hang ups, what are they?
     
  13. gtjuggler

    gtjuggler

    Member

    Joined:
    Nov 13, 2008
    Messages:
    238
    NGUI Compatibility
    NGUI uses quads and transforms and avoids the use of UnityGUI, therefore it is compatible with MultiPlatform ToolKit. I've just tested it and found that there are no errors with having both toolkits in one project. The following is a list of features that will overlap with functionality that NGUI handles:

    - Using the UIAnchor script will override MPTK position changes
    - Using PixelPerfect will override the MPTK scale changes
    - MPTK cannot change text of UILabels directly
    - MPTK cannot change materials on a quad directly due to the fact that UISprites don't use a unique material, they choose a subsection of a texture atlas.
     
    Last edited: May 4, 2012
  14. pbaker

    pbaker

    New Member

    Joined:
    Feb 14, 2012
    Messages:
    8
    How hard would it be to apply an Asset Settings configuration at the start of the build process?
     
  15. gtjuggler

    gtjuggler

    Member

    Joined:
    Nov 13, 2008
    Messages:
    238
    Line 601 of the editor script AssetSettingsWindow.cs is the ApplyConfiguration() function. Modifying that to accept a Platform argument would allow you to hook that function call into the pre-build phase of the build process.
     
  16. pbaker

    pbaker

    New Member

    Joined:
    Feb 14, 2012
    Messages:
    8
    Thanks, I'll give that a go.
     
  17. simjeanny88

    simjeanny88

    New Member

    Joined:
    May 17, 2012
    Messages:
    19
    Do Multiplatform toolkit support unity 3.4.2?
     
    Last edited: May 29, 2012
  18. gtjuggler

    gtjuggler

    Member

    Joined:
    Nov 13, 2008
    Messages:
    238
    The MPTK does support Unity 3.4.x, but the Unity Asset Store might not be allowing you to download it from 3.4, I'm not sure why. I saw someone else's asset store package gated by the store to 3.5 as well... Feel free to email me at support@owlchemylabs.com and I'll try to figure out how to fix the issue for you.
     
  19. bryantdrewjones

    bryantdrewjones

    Member

    Joined:
    Aug 29, 2011
    Messages:
    111
    Hey there :)

    Does the MPTK provide support for swapping SD/HD textures for non-retina and retina displays in universal iOS builds? I noticed that Snuggle Truck isn't a universal app. Do you only provide support for swapping textures in builds and not at runtime?

    This is probably a really simple question, but I couldn't come up with an answer after browsing the documentation.

    Thank you! :)
     
  20. gtjuggler

    gtjuggler

    Member

    Joined:
    Nov 13, 2008
    Messages:
    238
    At the moment, we only support build-specific stripping. The only way to swap between SD and HD versions of a texture (without loading both into memory on scene load), is to remove the textures from the material completely, and load them in programmatically using Resources.Load , finding the correct texture based on platform.
     
  21. bryantdrewjones

    bryantdrewjones

    Member

    Joined:
    Aug 29, 2011
    Messages:
    111
    Good to know! Thank you for the quick response :)
     
  22. YourUncleBob

    YourUncleBob

    Member

    Joined:
    Jun 11, 2012
    Messages:
    27
    How about release build only stripping? I have a lot of test user interface that I'd like to exclude from release builds. I'm programmatically disabling it in release builds right now (non development builds), but would like to completely exclude it.
     
  23. gtjuggler

    gtjuggler

    Member

    Joined:
    Nov 13, 2008
    Messages:
    238
    You could edit Platforms.cs to create a platform called "DevOnly" and then attach platformspecifics to the objects in scenes that you wish to be removed from a release build. Just tag them with "Restrict To Platforms" and whatever platforms you want it to remain on.
     
  24. petoine

    petoine

    Member

    Joined:
    Feb 26, 2009
    Messages:
    8
    Hi !

    I wonder how can I manage multi material with the MPTK ?
    Actually, it seems to reconise only a single material by mesh.

    - Regards
     
  25. YourUncleBob

    YourUncleBob

    Member

    Joined:
    Jun 11, 2012
    Messages:
    27
    I don't follow that. If I add a DevOnly platform, the platform property is never going to return DevOnly (unless I modify it the property to return it if it's a development build, in which case it won't tell me what actual hardware platform is active in dev mode), so how could it toggle assets on or off. All the other platforms are mutually exclusive, DevOnly doesn't seem to fit in there well.

    It looks like I'd want to add a DevOnly bool to the PlatformSpecifics class and then handle it in ApplyRestrictPlatform.

    I don't quite follow how the build process works. Am I missing something?
     
  26. paulbaker

    paulbaker

    Member

    Joined:
    Aug 29, 2012
    Messages:
    34
    Any chance of iPhone 5 support?
     
  27. gtjuggler

    gtjuggler

    Member

    Joined:
    Nov 13, 2008
    Messages:
    238
    We're workin on it! :)
     
  28. paulbaker

    paulbaker

    Member

    Joined:
    Aug 29, 2012
    Messages:
    34
    Cool. Any idea when it will be available? I was hoping to do a iPhone 5 build on Thursday :)
     
  29. loadexfa

    loadexfa

    Member

    Joined:
    Sep 2, 2008
    Messages:
    200
    +1 on the timeline request. Thanks!
     
  30. loadexfa

    loadexfa

    Member

    Joined:
    Sep 2, 2008
    Messages:
    200
    @paulbaker.
    If you can't wait (like me), look at MultiPlatformToolSuite/Scripts/Platforms.cs

    I haven't tested yet but it appears it doesn't take much editing to add the new platform. We'll see when I go to test on a device (waiting on a friend's phone).
     
  31. loadexfa

    loadexfa

    Member

    Joined:
    Sep 2, 2008
    Messages:
    200
    I tested it last weekend on an iPhone 5 and my changes work fine. Considering how easy these changes were, especially since I was new to this code, it's rather disappointing that the developer is taking so long to update their asset. Not a good sign for future platform updates, guess we need to handle updates by ourselves. :(
     
  32. gtjuggler

    gtjuggler

    Member

    Joined:
    Nov 13, 2008
    Messages:
    238
    This is incorrect. The lack of an update is not due to my own laziness or speed with a fix, but in fact I'm waiting on Unity to add support for the proper Game View resolution.

    The iPhone 5 detection changes are very simple, yes, and I made the changes soon after the iPhone 5 was released. The code is very extensible and since you can make the changes with very few lines of code, I would assume many owners of the product most likely already made the change locally. The issue is that I'm attempting to make it simple for users to simulate iPhone 5 resolution with very few steps, and right now current release of Unity does *not* have support for an iPhone 5 game view resolution. Yes, you can switch over to standalone and set your game view standalone size manually to 1136x640 or you can slowly expand the window until it matches the right resolution with some mousing accuracy, but it's extra steps and I didn't want to muddy my documentation with a strange fix since Unity claims an updated version is on the way.

    If you'd like me to make the update now, I can do that, but I was under the impression that it would be better to wait for Unity's real support for iPhone5 resolution previewing instead of doing a strange workaround to view that resolution. Thoughts?
     
    Last edited: Oct 11, 2012
  33. loadexfa

    loadexfa

    Member

    Joined:
    Sep 2, 2008
    Messages:
    200
    @gtjuggler
    Maybe I'm missing something, Unity released 3.5.6 which supports iPhone 5 2-3 weeks ago. My game view includes "iPhone 5 Tall" and "iPhone 5 Wide". Or do you require the Game View to have the iPhone 5's exact pixels? I have been using "iPhone 5 Wide", "iPad Wide", and "iPhone Wide" to test and when I've build to devices (iPhone, iPhone retina, iPad, iPhone 5) everything matches as it does in the editor. Perhaps others need the exact pixels. Since we haven't, that case didn't occur to me.

    I'm sorry if I came off as harsh, waiting on Unity and then your toolkit delayed us in adding iPhone 5 support so we could finally submit to Apple. Once Unity was updated we hoped the toolkit would soon follow.

    The fact that our game was pretty much finished right when Apple released the iPhone 5 was frustrating but not your fault of course. We had to add support to increase the chance we may get featured by Apple.

    I am glad to hear you will be keeping the toolkit up to date and I am sorry for my false assumption. It would have been helpful to see a post about this earlier so we would know what you are waiting on. :)
     
  34. gtjuggler

    gtjuggler

    Member

    Joined:
    Nov 13, 2008
    Messages:
    238
    Hey. Alright, that makes sense. I've updated with v1.9 to include the iPhone 5 resolution. It should be approved by Unity shortly!
     
  35. gtjuggler

    gtjuggler

    Member

    Joined:
    Nov 13, 2008
    Messages:
    238
    By the way, iPhone5 support has been added. Enjoy :)

    P.S. - We shipped an update to one of our games using this new code, so it's fully tested!
     
  36. 2Dboomer

    2Dboomer

    Member

    Joined:
    Jul 16, 2012
    Messages:
    17
    I just purchased the plugin . Good job guys !
    Hope support ipad mini as soon as possible, and continuously updated ! :)
     
    Last edited: Oct 24, 2012
  37. gtjuggler

    gtjuggler

    Member

    Joined:
    Nov 13, 2008
    Messages:
    238
    This makes no sense. What version of Unity are you using?
     
  38. cjow

    cjow

    Member

    Joined:
    Feb 29, 2012
    Messages:
    132
    1.91 basically breaks my editor atm. Using the most recent version of Unity but as soon as I import the plugin and try to access anything on a PlatformSpecifics script, non of the scripts editor features work (drop down bits, adding platforms, etc) and it spams out hundreds of errors.

    [​IMG]
     
    Last edited: Oct 25, 2012
  39. gtjuggler

    gtjuggler

    Member

    Joined:
    Nov 13, 2008
    Messages:
    238
    Could you email me with the full error, the topmost one in the console? Please email info -at- owlchemylabs (dot) com for support. Is anyone else seeing this issue?
     
  40. cjow

    cjow

    Member

    Joined:
    Feb 29, 2012
    Messages:
    132
    Problem is fixed now. If anyone else comes across this problem then you need to delete the multiplatform kit from outside the Unity editor in the project files and then open Unity and re-import the plugin.
     
  41. atmuc

    atmuc

    Member

    Joined:
    Feb 28, 2011
    Messages:
    791
    when try to build my scripts on mono developer i get this error. i deleted and reimport mptk

    T[] newArray = addAll<T>();

    /Assets/MultiPlatformToolSuite/Editor/PlatformSpecificsEditor.cs(56,56): Error CS0307: The variable `addAll' cannot be used with type arguments (CS0307) (Assembly-CSharp-Editor)
     
  42. atmuc

    atmuc

    Member

    Joined:
    Feb 28, 2011
    Messages:
    791
    can i change collection of 2d toolkit sprite per platform?
     
  43. gtjuggler

    gtjuggler

    Member

    Joined:
    Nov 13, 2008
    Messages:
    238
    You can change the line to
    T[] newArray = addAll();

    Monodevelop doesn't like it the first way for some reason.

    As for changing 2d toolkit sprite collections per platform, I'm not sure how that works but you can always change anything from code on Start() like:

    Code (csharp):
    1. if(Platforms.platform == Platform.iPad)
    2. { //ipad 1 and 2
    3.      //set 2dtoolkit sprite collection 1
    4. }
    5. else if (Platforms.platform == Platform.iPadRetina) //ipad 3
    6. {
    7.      //set 2dtoolkit sprite collection 2
    8. }
     
  44. atmuc

    atmuc

    Member

    Joined:
    Feb 28, 2011
    Messages:
    791
    1. should i make this change on each mptk update and import? is there any reason that you release your package with T[] newArray = addAll<T>();?

    2. is it possible for you to add 2dtk collection change and 2dtk camera settings change on gui ? do you give all source code with your package? if so i can try to write my own gui support for 2dtk. i have 2dtk and playmaker. i try to make everything on gui. when i use coding they become hidden for me.
     
  45. gtjuggler

    gtjuggler

    Member

    Joined:
    Nov 13, 2008
    Messages:
    238
    Hi Atmuc,

    1.) It will be updated in the next version, but since it doesn't affect 99% of users, it slipped through the cracks last update.

    2.) Yes, you can easily add changing TK2D collections per platform or camera settings, as all the source is included and the code is very simple to understand.
     
  46. atmuc

    atmuc

    Member

    Joined:
    Feb 28, 2011
    Messages:
    791
    thats great. thanks. so there is no limitation for me. :)
     
  47. atmuc

    atmuc

    Member

    Joined:
    Feb 28, 2011
    Messages:
    791
    i set 2 platforms webplayer and ipad. for web platform there is no problem. i set platform to iPad then i play. scene updates itself to the ipad settings. when i click stop button on the unity editor scene is back to the web player settings. is this normal? should not it stay with the ipad settings?
     
  48. gtjuggler

    gtjuggler

    Member

    Joined:
    Nov 13, 2008
    Messages:
    238
    Whatever is saved in your scene is the default state of objects. You are 'previewing' what another platform would look like by using the EasyPlatform selection and hitting PLAY. Once you exit playmode, it reverts back to your default state.
     
  49. atmuc

    atmuc

    Member

    Joined:
    Feb 28, 2011
    Messages:
    791
    it is bad news. i have to use designer to design my game for a specific platform. is it possible to add a button to apply platform specifics to the current scene for selected platform? so i can switch platform to design. i know adding a button is easy but what it implements is not easy :)
     
  50. gtjuggler

    gtjuggler

    Member

    Joined:
    Nov 13, 2008
    Messages:
    238
    You don't need to hit play to preview if you use the Get and Set buttons

    From the documentation:
    "The 'Get' and 'Set' buttons allow for easy swapping of values in the options fields of a platform. For example, you can position an object in the scene view exactly as you'd like it for iPhone and then hit the 'Get' button to retrieve the value from the Transform component in the inspector and auto-load it into the field you've selected. 'Set' on the other hand will apply a value to the Transform so you can apply that data to the selected GameObject."