Forum rules - please read before posting.

New Unity 2018 Prefab Workflow - Constant ID Issues

Hey all,

I couldn't find anyone else having this issue however I guess that there aren't many who have moved over to the latest 2018 Unity build yet with their projects? Anyway just an issue I've noted regarding the new prefab workflow, if you open up the prefab in the new prefab view (to amend the prefab and make any changes) AC will detect a duplicate object and therefore set new Constant ID's for the prefab. I'd guess that AC is detecting the prefab in the prefab view but then also detecting the prefab still in the scene (and so it will write over a new ID in the prefab view, this will then overwrite the scene prefab once saved as Unity intended).

I've previously (last year) accidentally duplicated my player character in the scene view which then set new ID's for all the duplicate ID's it found and I then deleted the original Player instead of the copy. I didn't realise it was an issue until I realised that I had a lot of Action Lists and Menu's that couldn't find the correct objects due to the ID's being changed. So the above issue could result in a very tedious manual fix of re-linking broken ID connections, so I wanted to make sure that the potential issue is at least known about and on the radar.

I did a bit of testing the 'Retain in Prefab' option doesn't change the results whether it is checked or unchecked. In the meantime I'm trying not to amend any prefabs with ID's (or perhaps better would be to go through and revert all the ID's and apply all other changes as opposed to selecting Apply All - however from what I can see Unity currently makes you have to click revert or apply to every individual change with no option to mass select ).

Hopefully the above made sense, would be interested if anyone else has run into this - also more interested in whether anyone else is using 2018.3 and the HDRP?

Happy New Year to all!


  • What's your AC version? I've tried my best to have AC's save system account for the changes made to Unity's prefab system, but it's possible that some loose threads remain.

    Can you please share a detailed list of steps to reproduce the issue? I will need to know exactly what's going on.

  • Hey Chris, thanks again for the quick response. I'm using the latest AC version (1.65.2).

    As for recreation all I did was open a prefab via the arrow in the scene hierarchy (so the prefab was in the scene, then opening it up via that arrow takes you into the prefab edit view) - at this point, with the auto save box checked, I get constant AC console messages advising of new Constant IDs being assigned (multiple messages however they show the same number several times).

    I have noticed that this potentially only happens when the root object contains a Constant ID component (I only suspect this because I opened up another Prefab in the same way which has a Constant ID on one of its children but the ID didn't get overwritten). I'm away from my project, I will further troubleshoot to see if selecting the child object that contains the Constant ID component whilst inside the Prefab view results in the same issue as this would make a lot of sense considering what I've been encountering so far.

  • Apologies, but I need exact steps. Constant ID component have fields e.g. "Retain in prefab?" that I'll need to check/uncheck depending. If you can recreate the problem with a fresh object / prefab / scene, and then relay those steps to me, then that'd be perfect.

  • Hey Chris, sorry I've not had much time on my project since posting this. Struggling to recreate now (typical) - as I mentioned in my first post the 'Retain in Prefab?' didn't seem to be doing anything however whilst trying to recreate earlier today to give you more info on the issue as requested, the 'Retain in Prefab?' checkbox does seem to work as intended.

    This could be because I was testing it on a different prefab than the one I encountered the issue was with. I'll continue testing to try and recreate so I can relay back to you however for now I wouldn't concern yourself with it.

  • Quick update - it seems the 'Retain in Prefab?' option works perfectly as intended however I was buggering it up by not 'applying' this change via the Overrides tab in the scene view before opening up the Prefab in the Prefab view.

    So I've found that I should be checking the 'Retain in Prefab?' checkbox whilst in the scene view and then select Overrides and select the relevant GameObject with the newly ticked 'Retain in Prefab?' Constant ID and click on the Apply button (for that object only - or simply 'Apply to All' if all other changes are acceptable to be overriden). This then seems to have the desired effect of ensuring the ID stays the same throughout in all scenes and also in the Prefab view (as I'm sure is intended, doh)!

    So firstly I must apologise as it seems that AC is indeed working perfectly fine and it was simply an error on my part (not surprising at all)! The confusion for me came because of not 'Applying' the 'Retain In Prefab?' options in the Overrides section of the scene view Prefab before opening it up in the Prefab view. Because obviously not applying this change, when I would then open up the Prefab in the Prefab view, those changes to the 'Retain In Prefab?' checkbox weren't applied to the Prefab and so when opening the Prefab in the Prefab view it had the box unchecked and therefore these ID issues were cropping up.

    Sorry again Chris, at least I know where I went wrong though haha!

  • I'm just relieved all's fine, thank you for the update.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.