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

Question Why did Addressable detect prefab changes when I only changed the attached monoscript?

Discussion in 'Editor & General Support' started by jack021457, May 30, 2023.

  1. jack021457

    jack021457

    Joined:
    Mar 18, 2015
    Posts:
    22
    For example: I have a monoscript attached on LevelView prefab. whenever I change this monoscript(add a line) then run the "Check for Content Update Restrictions" it shows LevelView prefab has been changed.

    For other prefabs, it gives the same result.

    Is it a bug? Im using addressables 1.20.5 Unity 2020.3.36

    upload_2023-5-30_17-36-5.png

    Thanks for any reply
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,520
    The only thing I can think of is they hash the source files of the class(es) used in the prefab and noticed that it changed?

    If so this is brand-new behavior (to me) in Unity, since code isn't delivered via Addressable / Asset Bundle.

    What kind of diffs do you see from source control?
     
  3. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,610
    Kurt-Dekker likes this.
  4. jack021457

    jack021457

    Joined:
    Mar 18, 2015
    Posts:
    22
    The most weird thing is: there is no diff from source control.

    And I had read the source code of addressable, I found out that addressable would add warning flag if any dependency of this asset had changed.

    In my case, the monoscript is the prefab's dependency. So when i change the monoscript, the prefab is flagged.

    I dont know why does addressable design like this? And there is no optional case for user to choose.