playMaker

Author Topic: How to edit prefabs without disconnecting them  (Read 977 times)

misterjuly

  • Sr. Member
  • ****
  • Posts: 357
How to edit prefabs without disconnecting them
« on: April 19, 2023, 11:46:23 AM »
Hello,

I have a game object that I have made a prefab so I can use it in multiple levels (scenes). When I try to edit an fsm that is part of the prefab, it disconnects it and it seems like it is no longer connected to the prefab. How do I make a copy of a prefab, edit it, and be able to edit it without it changing the prefab, the copy changing, but it still remaining connected to the main prefab and getting changes to the main prefab? Thanks!

John Bassi

misterjuly

  • Sr. Member
  • ****
  • Posts: 357
Re: How to edit prefabs without disconnecting them
« Reply #1 on: April 20, 2023, 09:43:05 PM »
Bump.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: How to edit prefabs without disconnecting them
« Reply #2 on: April 22, 2023, 04:15:30 PM »
Hi.
You can not edit the prefab itself else it will disconnect.

You can expose variables and edit then in the fsm component in the inspector.

just like C# script coding, you can expose variables and (for example set bools / ints / gameObjects / strings / etc. ) to do different behaviors inside the script

in the fsm you can do a bool test / int compare and go to the state you need for that object