One of the things I have been discovering is I hate having to replace Instances just because I need it to be a different class. (EX: ImageLabel to ImageButton, or Seat to VehicleSeat) And every time I had to do this I had to copy every single property from the old instance onto the new one, and then delete the old one. It was tedious and frustrating. So I took the time earlier this week to write up a plugin to resolve this.
The Class Replacer Plugin!
How it works!
- Select objects you want to run this system on
- In the first Text Field labeled “Replace all”, Input the ClassName of the objects you want to replace, if you leave this blank it will run on ALL instances you have selected. Adding the ClassName will make it only replace instances with that ClassName
- In the second Text field labeled “With”, Input the ClassName you want to replace those objects with
- The toggle for Use Inheritance will cause the replace function to use :IsA instead of .ClassName to determine if the first Text Field matches
- The toggle for Run on Children will cause the replace function to search through the children object also
- The toggle for Run on Descendants will cause the replace function to search through the descendants of the object also
- Click on the Replace button to run the system
What it’ll do:
- When the objects selected are replaced it will check to make sure the object matches the ClassName from the first Text Field
- If the object matches, it will instantiate a new instance of the second Text Field
- It will go through each property of the old object, and copy it over to the new object
- It will move the children of the old object into the new object
- It will remove the old object
You can also use the Swap button in-between the Text Fields to swap the two.
It will also notify you in the Output window if there is a new update available for it
You can get the Class Replacer plugin for free!