I’m sorry but I just don’t get what you’re saying.
Make three GameInstances, one is UGameInstance.
Reparent UGameInstance to a GameInstance…then reparent the final GameInstance to the UGameInstance which had its parent changed? It just doesn’t work.
Reparent one GameInstance to another GameInstance does not leave me with all the functionalities from BOTH GameInstances.
Might I need to merge both to one single file? <— How do I do it?
So how do I do it? x)
My project is BP only. You’re saying convert to C++? Edit a GameInstance C++ class to change it from UGameInstance to another GameInstance class?
I don’t really understand what you say. Can you show me with blueprints?
So I make a GameInstance, then create a ChildBP of it. Then reparent that to my other GameInstance?
It doesn’t work. I’m trying to combine two GameInstances not Mathew’s actor Blueprints. lol
They are both UGameInstance types. Not Platform. But reparenting doesn’t allow the first one to be used. In vice or versa. None of functions are the same.
What do you mean inherited from UGameInstance?
Both appear when I search “GameInstance” but I know in 4.16/Engine/Plugins they both have “Source” folders and .cpp and .h files.
What is OOP? I’m not inheriting anything.
I’m not stupid. I have used Child and Reparent before. When I create one GameInstance and reparent, it breaks the GameInstance. There is Data Loss.
Just because they are UGameInstance doesn’t mean they will reparent at all. None of them have the same function names or any conflicts.
Just show me how to do it please?
“You cannot have two parents in inheritance. For that you may want to to an inhertance chain.”
Both are an inheritance??? None of what you are saying are working???
Enter slackers?
This is for answering questions. Are you a resourceful person or not?
I have a BP only project. All my plugins are installed in 4.16/Engine/Plugins/Marketplace/…/
I try to reparent one plugin GameInstance with another plugin GameInstance. I try both ways (vice and versa). I always get the Data Loss error. When I reparent, one just turns into the other.
I want to use both!
You cannot have two parents in inheritance. For that you may want to to an inhertance chain. GameInstance1 → GameInstance2 → YourGameInstance. It is not a very good solution but you will be able to have all the functionalities from the parents in your child.
You can decide which one will be the parent and do a simple reparent from one to the other, or just merge behaviour on a single file. You will only want to use inheritance when you will have different Game instances for different situations.
No, UGameInstance is the Unreal Engine base GameInstance, you shouldnt reparent that at all. You may need to have an structure like this one in terms of inheritance UGameInstance as the base parent, then one child and another one inheritating from that child.
To merge both in the same file you may want to reprogram the behaviour you have in one in the other one. And yes, inheritance will give you what you need, take a look at the concept of inheritance in OOP.