Search Unity

Nested prefab issue - array is not serialized??

Discussion in 'Prefabs' started by AlexandreDelan, Jun 11, 2019.

  1. AlexandreDelan

    AlexandreDelan

    Joined:
    Oct 4, 2016
    Posts:
    4
    Hello,

    On Unity 2018.4.1f1.

    I have a nested prefab with a script with some array field

    public class WeaponSkin : MonoBehaviour
    {
    public int currentWeaponSkin;
    [SerializeField]
    public WeaponSkinProfile[] availableWeaponSkin;
    [SerializeField]
    public SkinSettings[] skinSettings;


    the field have some values:


    If I go up in the prefab all values are gone.


    The Weapon Skin has no overide.

    Any Idea?

    The only solution I have is to fill again all values... So If I change later the value in the nested prefab, the new value will be ignored...

    Thanks in advance.

    Alex
     
  2. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    729
    Is WeaponSkinProfile marked as a Serializeable class?
     
  3. AlexandreDelan

    AlexandreDelan

    Joined:
    Oct 4, 2016
    Posts:
    4
    Hello,

    Yes, thank you for your answer.

    It look like a bug.

    My coworker has collab my work and does not have the issue.

    I'm going to re-download my project...