I face new challenge as this "What if I have carry datas (such as current Player Party Members’s stat like… HP) that constantly are changing, but must be persistent? "
oops… For sensitive yet various datas, should I use custom Game Instance? if I use Game Instance, where should I use Global Data Access?
Camera… It is newbie question again… but I also need help from it.
I think I will place a scene’s own camera in each scene.
is it okay? or should I implement the camera inside the GameManager c++ (whether it is Game Instance or Global Data Access)?
3.And lastly… How do I set my camera as default when I hit Play Button?
Even in Empty Level, new Camera kept is being instanced… which I don’t really need it for now.
Again… another beginner question and may not relate to C++, but I really need help again…
If I have free time, I will figure out without asking questions… but I am really desperate and have no aid from my entourages about Unreal Programming c++.
(their forte is mostly Unity, not Unreal. Not enough Programmers too, Awkward to be Unreal Engine Beginner by myself in South Korea).
Sure, inherit from GameInstance and put whatever you want to persist in it, including a global data pointer. You can probably modify it to persist duplicated PlayerStates across levels even (if you are using AIController::bWantsPlayerState)
Question #2 : If your camera can move in your scene and you want to store their positions, that can be reset if you change level, I think you can create a TMap who store an id to your camera as key, and value will be a FTransform, and I guess you will need to create a new Camera actor, with a “Event Begin Play” who load data and “Event End Play” who save data, and you can add an ID integer to identify your camera in the TMap, lastly add some function C++ to manage TMap from blueprint.
Question #3 : I don’t know if they are a simple configuration to do that, but you can edit the Level blueprint and use “Event Begin Play” to get the player controller and use the node “Set View Target” to set your camera.
holy cow! Man, I think your solution might work on my project. i gonna try them. Thank you so much! You provided me with a lead like a clue in a detective’s case