prebab instantiating in script runtime

I must make copy of object, so it will be saved as prefab (it musn’t run scripts) using script, because it saves lots of diffrent objects with diffrent objects positions and script values etc. Let’s just say i want freezed object to have better view what’s going inside.

  1. it this possible to save prefab type variables?
  2. if not is this possible to freeze object from running any script?

code example:

prefab x = gameobject // i want here gameobject state while it was saved
.
.
.
Instantiate(x);
Destroy(gameobject); // here loading object from earlier state and destroying actual

I don’t know what you are asking in the first question but for #2, you can use this to disable scripts so that it won’t run anymore. this.GetComponent<"Your script component name here">().enabled = false;
:slight_smile: