You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a prefab with a class inheriting GUID. Guids are never generated automatically. Context menu functions work. Prefab instances never generate new guids either, they inherit whatever is in the field for the prefab asset.
The text was updated successfully, but these errors were encountered:
I'm also having this issue, when instantiating prefabs in-game or duplicating prefab instances in-editor.
Currently, it seems GUIDs are only auto-generated for pre-existing scene instances.
They aren't auto-generated for dynamically instanced prefabs in-game (i.e.: GameObject.Instantiate(); dragging a prefab to the Scene View), or for duplicated prefab instances in-editor (i.e.: Ctrl+D).
Hello, sorry for the very late reply but this repo is not actively monitored. When you inherit GUID from a custom class if you override the Reset method you should call the parent implementation with base.Reset() to generate Guids on instantiation.
Prefab instances should generate guids if the asset guid is set to auto, if you are having problems with that you can give use more details on that and we can take a look at it.
Runtime-generated instances (via GameObject.Instantiate()) should not auto-generate guids because (I guess) Reset() is never called on those, you could generate it yourself after instantiating by calling GenerateGUID(). The same should apply for duplicated prefabs (which is a problem we also had), but the latest commit should have fixed that (it had a missing assembly error so you may not have tried it yet). While dragging a prefab to the scene view should regularly work, if the prefab asset has the guid set to auto (see paragraph above).
Installed manually from package.
I have a prefab with a class inheriting GUID. Guids are never generated automatically. Context menu functions work. Prefab instances never generate new guids either, they inherit whatever is in the field for the prefab asset.
The text was updated successfully, but these errors were encountered: