Announcement

Collapse
No announcement yet.

Can you break a blueprint?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can you break a blueprint?

    Hello, I just joined from a Unity background and is wondering if you can essentially make it so that a blueprint no longer inherits any features?
    Essentially doing what is known as "Breaking up the prefab" in Unity.

    What I want, is to have 2 blueprints with simular components, but different functionallity.
    So inheritance is not wanted in this case. Can you do that without having to make a new blueprint from scratch?

    #2
    You can reparent a blueprint to a different class at any time.

    Comment


      #3
      Inheritance works fine for what you need. If you make a Parent/Base class You can reuse the "features" and attributes in anything that is a child of it without affecting the parent or other children
      Click image for larger version

Name:	Parent.png
Views:	74
Size:	119.0 KB
ID:	1657965 This is my parent class with a custom event and a few variables

      Click image for larger version

Name:	Child.png
Views:	72
Size:	112.8 KB
ID:	1657966 This is the Child class it has its own instance of whatever the parent contains so you can use the variables and events anyway you see fit.

      The same applies to functions you can override anything it does so each child or BP has its own functionality.

      Hope that helps
      Attached Files

      Comment


        #4
        After getting a bit more familiar with the editor. I believe I can describe what I want a little better...

        Assume we have a blueprint named BP_CubeRed which contains a StaticMesh with a RedMaterialInstance assigned to it.
        • Crate two instances of BP_CubeRed in a level. Lets call these objects ObjA and ObjB.
        • Duplicate the blueprint BP_CubeRed and call it BP_CubeBlue.
        • Assign a BlueMaterialInstance to BP_CubeBlue.
        I'm looking for the most efficient way of doing the following:
        • Assign ObjB to BP_CubeBlue, so that I can retain all existing values for all components (excluding the BlueMaterialInstance).
        • Make change to BP_CubeRed, I don't want ObjB to get affected.
        Is this something reparenting will let you do?
        As far as I know, it would affect both ObjA and ObjB?
        Last edited by SareptaAleks; 12-03-2019, 06:23 AM.

        Comment


          #5
          I believe the short summary is "can i reparent a single instanced object?"

          Comment

          Working...
          X