¡WOW! How can I change this unity forum, after so many time without going to the forum. After learning the basics in Junior Programmer, I have managed to advance a little more in my understanding of Unity. I recently downloaded a fighting game project made in Unity that is inspired by the MUGEN game engine. This project has allowed me to learn a lot, such as how the game options work, the new input system, artificial intelligence, among other things. However, there are still aspects that are not being added, such as the implementation of the arcade mode, the selection and loading of characters, the operation of the sounds not working, the story mode, and the limitation of the camera zoom, among others. Fortunately, I have permission to modify this project to my liking.
I am here because I need help with loading characters in the versus screen. For example, in the character selection, if I have Bruno as a character and I choose Cube, I don’t know how to make Cube load in the versus scene (What you do is think that the character you chose is loaded but in reality it was always active, there is no script that loads the character you chose). What I’ve done so far in the character selection scene is to create a GameObject, copy the script that loads the character (SelectPlayer), and place Cube as a child of the object that has the script to spawn the character (SelectPlayer). However, when I choose a scenario and go to the versus scene, the character I selected doesn’t appear; instead, the default character appears. Here’s the video with details.
The problem seems to be related to the fact that the script has a public GameObject PrefabPlayer array; which only contains Bruno. When I try to add Cube, the script spawns both Bruno and Cube in the P1 and P2 positions, which results in a mess. This script doesn’t seem to be designed to load the previously selected character, but instead only loads the prefab that’s already set up in the battlefield scene.
Is there an idea or tip I could do? If you want I can give you more details of the code. Thanks in advance.
Please don’t recommend me to download or buy from UFE (Universal Fighting Engine) asset store because I don’t have USD, I’m a 16 year old so I don’t have a bank account to deposit money, in Argentina the payment rule is different from your country (for example the United States).
(Sorry if there are some parts that are poorly translated, I’m using Google Translate)