Edit Prefab ingame and save them

Hi,

I want to create a tuningsystem for cars in my game only with enabling and disabling components of a carprefab which spawns in every scene. I dont know where I need to specify the path of the components from the prefab and where i need to say which component will be enabled/disabled and how to save the changes ingame…

Thx for every answer :slight_smile:

I think you can’t edit prefabs ingame, you can edit them with a custom editor in Unity’s editor, using the PrefabUtility class: Unity - Scripting API: PrefabUtility

What you want to do sounds like a customization. You should write some scripts that knows the different parts of the prefab that can be disabled, then instead of saving the prefab, save a text file that contains the state of each part of the prefab (a simple boolean value for the IsActive property). When you show that prefab in a new scene, load that text file and turn on or off the different parts according to what the file says.