Skip to content

GUIDs may be modified automatically without being detected by Unity #8

@schmid

Description

@schmid

Example: when adding a GuidComponent to a prefab, prefab instances in Scenes will be modified, but the Scene will appear unmodified. Adding Undo.RecordObject before every call to CreateGuid resolves the issue for me:

In GuidComponent.cs, add the following:

    void Awake()
    {
        Undo.RecordObject(this, "Update GUIDs in Scene");
        CreateGuid();
    }

    void OnValidate()
    {
        Undo.RecordObject(this, "Update GUIDs in Scene");

#if UNITY_EDITOR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions