Inheritance workarounds

Issue #40 resolved
Ondřej Čermák created an issue

Let's have a example.

  1. Prefab A

  2. Prefab B which has child - Instance of Prefab A with small changes

  3. Instance of Prefab B in Scene.

Now what I want to accomplish is, when i change value in 1, the value gets changed in the 2 and 3 aswell. What I've been trying to do:

Let's have a script called ABC with int param called price. When I change price on Prefab A and press Revert component ABC, the value gets populated to Prefab B's child, which is instance of Prefab A, but it doesn't get populated into Instance of Prefab B in any scene.

The reason: The Prefab B itself remains unchanged, the child is what has been changed.

I found temporary workaround : Adding textfield on Prefab B, which i change everytime i also change the Prefab A value so it gets populated to every scene instance of prefab B. Is this a Bug or inteded behaviour?

Comments (6)

  1. Devon Klompmaker

    This is a bug and should function the way you describe. I will open and investigate shortly.

    Thank you for bringing it to my attention.

  2. Devon Klompmaker

    Ondrej Cermak,

    A hacky workaround at the moment appears to be related to Unity itself. The value is reverted, however Unity in the scene does not get refreshed. If you reload the scene, it appears to then pull in the correct values. I will create a fix in the coming days to account for this.

    Thanks!

  3. Devon Klompmaker

    Submitted to the asset store as version 1.8f0. If you'd like to get access to this fix sooner, please email me at devon@antihero-studios.com.

    Thanks,

  4. Log in to comment