Search Issue Tracker

By Design

Votes

2

Found in

2017.4

2019.3.5f1

2020.2

Issue ID

1229008

Regression

No

Serialized field values in different Platform Dependent Compilation directives are reset in the Editor when switching platforms

Serialization

-

How to reproduce:
1. Open the "SampleScene" Scene in the attached "1229008.zip" Unity project
2. Select the "GameObject" GameObject in the Hierarchy and navigate to the Inspector
3. In the NewBehaviourScript component, change the serialized field values
4. Switch to MacStandaloneSupport, then back to iOS

Expected result: the serialized field values remain as they were set
Actual result: the fields are reset to primary values ("0")

Reproducible with: 2017.4.38f1, 2018.4.19f1, 2019.3.6f1, 2020.1.0b2, 2020.2.0a4

Notes:
1. Reproducible when switching various platforms, but a change in the script is needed

  1. Resolution Note:

    The serialization system, do not save the state pr platform, as you've noticed.
    How I would do this would be to have the pr platform settings in something separate, ie. json file pr platform, and then load the settings for the target platform.
    Either use InitializeOnLoad or ISerializationCallbackReceiver
    https://docs.unity3d.com/ScriptReference/InitializeOnLoadAttribute.html
    https://docs.unity3d.com/ScriptReference/ISerializationCallbackReceiver.html

Comments (2)

  1. netvilox

    Oct 05, 2020 19:01

    iPod is not just a tunes participant even though the remarkable functions will even enable you to look at tunes films and make your expertise with this remarkable gizmo much more fulfilling. However, just before you could download popular tunes video clip classes with regards to iPod, at this time there are factors that you need to have to realize.

    Download latest south african music mp3 training course your primary dilemma is exactly exactly where to get the multimedia data files for down load. Generally there are a few methods to support download tunes movies with regard to iPod. A single is by freebies websites which are not really a good idea mostly simply because of vicious viruses jointly with spyware that could hurt your DESKTOP plan. Additionally the particular legitimacy of these giveaways sites is questionable. But if you really want to attempt it, down load then in your very own chance. But yet another way is through online tunes stores, it’s lawful but you have to pay out for every single download which could really effectively be quite higher-priced if you want to obtain a great deal related with tunes videos. As properly as the ultimate selection which is this most smart and best decision is by signifies of account websites giving one time month to month payment for countless admittance downloads offered. No recurring expenses or maybe shell out for each receive expenses.

    Rehab Mp3 Media file conversion. If you get tunes online video clips to get ipod product

  2. makaka-org

    Mar 20, 2020 17:49

    Same Issue.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.