Skip to content

GameObject GUID

Wagner GFX edited this page Nov 30, 2024 · 1 revision

This Component is designed to create a unique GUID that can be serialized.

The GUID value should persist even with commands like Redo/Undo, while also generating new values when the GameObject is duplicated.

It's main purpose is to track manually placed objects, like coins in a platformer. It may not be very useful for dynamic generated objects.

⚠ Be aware that the component can only detect when GameObjects are duplicated. Duplicated scenes will also duplicate GUID values for every object.


πŸ’‘ If you need to know how the Unity Editor and Inspector behaves when interacting with Scenes, GOs and Components, then the editor side of this component is a great example.

Many common paths are identified in this component, like duplicating, opening/closing scenes, Redo/Undo, diferentiating between prefabs and scenes, etc.

Clone this wiki locally